Posts in Electronics
Arduino Sensor Data Logging and Visualization on iPhone

This is the second entry into the tutorial series centered around the MakerBLE Arduino board. Using the BLExAR iOS app again, we are able to monitor the incoming data from the MakerBLE board, plot the values, and save them to a comma-separated value (CSV) file. The data being sent is read from a BMP280 sensor over the I2C port by the MakerBLE board. Temperature, atmospheric pressure, and approximate altitude were all sent over the BLE connection with an iPhone.

Read More
MakerBLE — A Tiny nRF52840 Bluetooth Arduino Board

The MakerBLE is introduced as a miniature breakout board variation of the nRF52840 Bluetooth Low Energy (BLE) Arduino board, which is capable of communicating with smartphnoes and carrying out many of the capabilities of other wirelessly-enabled microcontrollers. The MakerBLE is also compatible with our iOS app, BLExAR, and allows users to collect data, send commands, and control pins remotely from a smartphone. In this tutorial, the MakerBLE will be introduced and its capabilities will be explored from the perspective of the Arduino. This will also be the first in a series of entries geared toward low-power, BLE-enabled, tiny microcontroller projects; whether they involve remote control, data collection from sensors (I2C, SPI, UART), message transfers, BLE peripheral/central communication, or general electronics testing.

Read More
Portable GPS Tracker with Arduino

In the past, we explored the NEO-6M GPS module with Arduino through a few of our tutorials (see: "Comparing iPhone GPS Against NEO-6M with Arduino" and "Arduino GPS Tracker"). In this tutorial, we wanted to push the size limits of the portable GPS tracker by using a mini GPS module called the ATGM336H. The result is a pocket-sized GPS tracker with the low-profile by pairing the ATGM336H module with an Arduino Xiao microcontroller, SD Card Module, and 3.7V LiPo Battery. The prototype developed here will be an autonomous tracker that will record latitude/longitude at roughly 1-10 points per second (1Hz - 10Hz) and needs no external components to track geolocation. The prototype can fit in a users pocket and can track for several hours. We will also present a Python program that will plot the geolocation data points that the user can use to view the route tracked by the Arduino GPS datalogger system. The Python analysis demonstrates how well the ATGM336H GPS module and antenna are able to replicate the walking path of a human with great resolution and accuracy.

Read More
Bluetooth-Enabled e-Paper Display with Arduino

In this tutorial, a 1.54 inch e-Paper module is wired to a BLE-Nano Arduino board to communicates via SPI and display text in real time over Bluetooth. The e-Paper module here can be powered via 3.3V or 5.0V, requires very low power when refreshing (2mA-8mA), and can be completely powered off while retaining its text. An Android smartphone and the BLExAR app will be used to print text on the e-Paper display in real time, demonstrating the capabilities of electronic paper technology.

Read More
An Introduction to RFID with Arduino

Radio Frequency Identification, or RFID, is a widely used technology developed for storing and retriving information in radio frequency-enabled devices. Most often, RFID systems consist of one or multiple RF tags, an RF reader, and a database. In this tutorial series, passive, high frequency (13.56 MHz) RFID tags are the focus, as they are very compact, inexpensive, and require no external battery power. Using an Arduino board, a common RFID reader (MFRC522), and a few RFID tags/cards, we will be exploring methods for reading and writing RFID information in an attempt to understand the how RFID communication works and the limits of the technology.

Read More
TinyBlueX - A Low Power Bluetooth Arduino Board

The TinyBlueX is a Bluetooth Low Energy-enabled microcontroller module that combines an ATtiny85 microcontroller and CC254x Bluetooth Low Energy chip. The TinyBlueX is compatible with the Arduino platform (IDE) and the BLExAR iOS Arduino app. The TinyBlueX is very low power and has a low profile, which makes it great for very low power internet of things (IoT) applications with analog and digital sensors. The TinyBlueX can read sensors and transmit the data back to an iOS device, while also being able to read iOS commands and control LEDs, indicators, and motors. Pins 2,3,7 are available on the ATtiny85 aboard the TinyBlueX, allowing users to control/read up to 3 different devices or sensors. In this tutorial series, the TinyBlueX will be explored by instructing users on how to upload code to the module, how to control LEDs, and how to send data back to an iOS device using the BLExAR app.

Read More
PCB Design and Fabrication with NextPCB

The printed circuit board (PCB) is at the center of nearly all electronics products in the 20th century. PCBs originally consisted of wires placed along paths connecting a series of components on a rigid board — these were deemed printed wiring boards. Eventually, the printed wiring board morphed into the circuit boards with conducting strips etched into multi-layer boards that we see on PCBs today. The PCB industry is associated with nearly $1 trillion in sales of electronics each year [read more at: "Printed circuit board industry"]. Thus, it is important for engineers to know at least the basics of PCB design, even if the manufacturing is outsourced to companies. In this tutorial, we will introduce the design of a simple PCB and the process required to get the PCB manufactured by a company called NextPCB. Their process is simple and easy, and even allows the engineer to view their design on their online gerber file viewer.

Read More
WS2812 LED Ring Light with Raspberry Pi Pico

This is the second entry into the Raspberry Pi Pico tutorial series dedicated to exploring the capabilities of the Raspberry Pi Foundation's groundbreaking new Pico microcontroller. A WS2812 RGB LED is controlled via the programmable I/O system (PIO) on the Pico microcontroller. The code and methods used to control the WS2812 are based on Raspberry Pi Pico Micropython SDK the project entitled "Using PIO to drive a set of NeoPixel Ring (WS2812 LEDs)." A state machine is used on the Pico to control the WS2812 LED array, which allows users to test a range of algorithms that affect the ring light. The light mappings will subsequently be capable of emulating the LED effects similar to those demonstrated by the Amazon Alexa or Google Home devices. A universal wiring diagram is given that allows for any number of LEDs to be wired to the Pico, which we tested up to 60 LEDs.

Read More
3 Intermediate-Level Arduino Projects to Try at Home

Three different intermediate-level Arduino projects are introduced as a way of exploring the capabilities of the open-source microcontroller platform. First, an Arduino-based gimbal was proposed, with a video demonstration using the MPU6050 inertial measurement unit (IMU). Many commercial gimbals use similar sensors and methods for balancing objects and controlling angular and translational movement. Second, a mechanum wheels robot was presented as a way of creating a more omnidirectional robotic car, vs the normal one-dimensional movement associated with Arduino and robotic cars. Finally, an Arduino-based hovercraft was shown with motors and an Arduino at the center.

Read More
An Introduction to the Raspberry Pi Pico with MicroPython

The Raspberry Pi Pico was recently released by the Raspberry Pi Foundation as a competitive microcontroller in the open-source electronics sphere. The Pico shares many of the capabilities of common Arduino boards including: analog-to-digital conversion (12-bit ADC), UART, SPI, I2C, PWM, among others. The board is just 21mm x 51mm in size, making it ideal for applications that require low-profile designs. One of the innovations of the Pico is the dual-core processor, which permits multiprocessing at clock rates up to 133 MHz. One particular draw of the Pico is its compatibility with MicroPython, which is chosen as the programming tool for this project. The focus on MicroPython, as opposed to C/C++, minimizes the confusion and time required to get started with the Pico. A Raspberry Pi 4 computer is ideal for interfacing with the Pico, which can be used to prepare, debug, and program the Pico. From start to finish - this tutorial helps users run their first custom MicroPython script on the Pico in just a few minutes. An RGB LED will be used to demonstrate general purpose input/output of the Pico microcontroller.

Read More
Raspberry Pi Stepper Motor Control with NEMA 17

The NEMA 17 is a widely used class of stepper motor used in 3D printers, CNC machines, linear actuators, and other precision engineering applications where accuracy and stability are essential. The NEMA-17HS4023 is introduced here, which is a version of the NEMA 17 that has dimensions 42mm x 42mm x 23mm (Length x Width x Height). In this tutorial, the stepper motor is controlled by a DRV8825 driver wired to a Raspberry Pi 4 computer. The Raspberry Pi uses Python to control the motor using an open-source motor library. The wiring and interfacing between the NEMA 17 and Raspberry Pi is given, with an emphasis on the basics of stepper motors. The DRV8825 control parameters in the Python stepper library are broken down to educate users on how the varying of each parameter impacts the behavior of the NEMA 17. Simple characteristics of stepper control are explored: stepper directivity (clockwise and counterclockwise), step incrementing (full step, half step, micro-stepping, etc.), and step delay.

Read More
Distance Detection with the TF-Luna LiDAR and Raspberry Pi

The TF-Luna is an 850nm Light Detection And Ranging (LiDAR) module developed by Benewake that uses the time-of-flight (ToF) principle to detect objects within the field of view of the sensor. The TF-Luna is capable of measuring objects 20cm - 8m away, depending on the ambient light conditions and surface reflectivity of the object(s) being measured. A vertical cavity surface emitting laser (VCSEL) is at the center of the TF-Luna, which is categorized as a Class 1 laser, making it very safe for nearly all applications [read about laser classification here]. The TF-Luna has a selectable sample rate from 1Hz - 250Hz, making it ideal for more rapid distance detection scenarios. In this tutorial, the TF-Luna is wired to a Raspberry Pi 4 computer via the mini UART serial port and powered using the 5V pin. Python will be used to configure and test the LiDAR module, with specific examples and use cases.

Read More
Audio Processing with The QuadMic 4-Microphone Array on the Raspberry Pi

The QuadMic Array is a 4-microphone array based around the AC108 quad-channel analog-to-digital converter (ADC) with Inter-IC Sound (I2S) audio output capable of interfacing with the Raspberry Pi. The QuadMic can be used for applications in voice detection and recognition, acoustic localization, noise control, and other applications in audio and acoustic analysis. The QuadMic will be connected to the header of a Raspberry Pi 4 and used to record simultaneous audio data from all four microphones. Some signal processing routines will be developed as part of an acoustic analysis with the four microphones. Algorithms will be introduced that approximate acoustic source directivity, which can help with understanding and characterizing noise sources, room and spatial geometries, and other aspects of acoustic systems. Python is also used for the analysis. Additionally, visualizations will aid in the understanding of the measurements and subsequent analyses conducts in this tutorial.

Read More
Calibration of an Inertial Measurement Unit (IMU) with Raspberry Pi - Part I

Inertial measurement units (IMUs) can consist of a single sensor or collection of sensors that capture data meant to measure inertial movements in a given reference frame. Acceleration, speed of rotation, and magnetic field strength are examples of sensors contained in an IMU. IMUs can be found in applications ranging smart devices, medical rehabilitation, general robotics, manufacturing control, aviation and navigation, sports learning, and augmented and virtual reality systems. Inertial measurement units have become increasingly popular as their form factors shrink and computational power increases. The ability to use IMUs for indoor/outdoor tracking, motion detection, force estimation, orientation detection, among others has caused the use and availability of inertial sensors to become nearly widespread in smart phones, smart watches, drones, and other common electronic devices. The internet is full of projects involving accelerometers, gyroscopes, and magnetometers, but few cover the full calibration of all three sensors. In this project, the manual calibration of a nine degree-of-freedom (9-DoF) IMU is explored. A common MPU9250 IMU is attached to a cube to manually find the calibration coefficients of the three sensors contained within the IMU: accelerometer, gyroscope, and magnetometer. The IMU is wired to a Raspberry Pi - which will allow for high-speed data acquisition rates of all nine components of the IMU.

Read More
Recording Stereo Audio on a Raspberry Pi

The INMP441 MEMS microphone is used to record audio using a Raspberry Pi board through the inter-IC sound (I2S or I2S) bus. The I2S standard uses three wires to record data, keep track of timing (clock), and determine whether an input/output is in the left channel or right channel. First, the Raspberry Pi (RPi) needs to be prepped for I2S communication by creating/enabling an audio port in the RPi OS system. This audio port will then be used to communicate with MEMS microphones and consequently record stereo audio (one left channel, one right channel). Python iS then used to record the 2-channel audio via the pyaudio Python audio library. Finally, the audio data will be visualized and analyzed in Python with simple digital signal processing methods that include Fast Fourier Transforms (FFTs), noise subtraction, and frequency spectrum peak detection.

Read More
Capacitive Soil Moisture Sensor Calibration with Arduino

Soil moisture can be measured using a variety of different techniques: gravimetric, nuclear, electromagnetic, tensiometric, hygrometric, among others. The technique explored here uses a gravimetric technique to calibrate a capacitive-type electromagnetic soil moisture sensor. Capacitive soil moisture sensors exploit the dielectric contrast between water and soil, where dry soils have a relative permittivity between 2-6 and water has a value of roughly 80. Accurate measurement of soil water content is essential for applications in agronomy and botany - where the under- and over-watering of soil can result in ineffective or wasted resources. With water occupying up to 60% of certain soils by volume, depending on the specific porosity of the soil, calibration must be carried out in every environment to ensure accurate prediction of water content. Luckily, the accuracy of measurement devices has been increasing while the cost of the sensors have been decreasing. In this experiment, an Arduino board will be used to read the analog signal from the capacitive sensor, which will output voltage values which can be calibrated to volumetric soil moisture content via gravimetric methods.

Read More
DIY Arduino Board

A DIY Arduino board is presented here, with most of the capabilities of the classic Arduino Uno board, but with a slimmer profile and more flexibility in hardware. The advantage to using the DIY Arduino board is its ability to change the input voltage (2.7V - 5.5V), the crystal oscillator (0-16MHz), and the use of LEDs and regulators when needed. The DIY board is capable of very lower power modes, without the requirement of draining components such as LEDs or regulators. The ATmega328P chip is at the center of every Uno board (in recent years), and is also at the center of the DIY board, which allows the DIY Arduino to behave almost identically to the Uno board.

Read More
BLE Nano Arduino Board - Bluetooth Control with an iPhone (BLExAR App)

The BLE Nano is introduced as a hybrid between an Arduino Nano and a CC2540 Bluetooth Low Energy (BLE) module. The Arduino Nano has an ATmega328P as its main microprocessor, which communicates over the serial port to send and receive Bluetooth packets from the CC2540 BLE chip. This creates a Bluetooth-enabled Arduino device - encased in a Nano-sized circuit board! Using the BLExAR iOS app, the BLE-Nano will be controlled using an iPhone. BLExAR allows users to control the pins on the Nano, which will be demonstrated by switching an RGB LED on and off.

Read More
Radar Emulator with Arduino + Python

In this tutorial, an ultrasonic sensor (HC-SR04) will be used in place of a radio emitter; and a plan position indicator will be constructed in Python by recording the angular movements of a servo motor. An Arduino board will both record the ranging data from the ultrasonic sensor while also controlling and outputting the angular position of the servo motor. This will permit the creation of a PPI for visualizing the position of various objects surrounding the radar system.

Read More