|
|
STM32U083KCUx |
x 1 | |
|
|
SGP40-D-R4Sensirion AG
|
x 1 | |
|
|
ADPL44002AUJZ-R7Analog Devices
|
x 1 |
|
Arduino Lab for MicroPythonArduino
|
How to build a Wearable Air Quality Monitor Pendant using STM32 & SGP40 Sensor
This DIY Wearable Air Quality Monitor Pendant is a compact, battery-powered device designed to continuously track Total Volatile Organic Compounds (TVOC) in the surrounding air using the SGP40 sensor. Built around an ultra-low-power STM32 microcontroller, the pendant provides real-time feedback through colour-changing LEDs and audio alerts, making air quality status instantly recognisable. The device is ideal for personal health monitoring in homes, offices, or while travelling, and features a sleek 3D-printed enclosure for comfortable everyday wear. The project includes a custom PCB, detailed assembly instructions, and Arduino-compatible code for easy customisation and development.

Motivation & Purpose
Health Awareness: VOCs (volatile organic compounds) are common indoor pollutants (from cleaning products, paints, plastics, etc.) and can adversely affect health. A wearable monitor helps users become more aware of air quality in different places.
Portable Monitoring: Rather than having a fixed air-quality sensor on a desk, this pendant allows you to carry an environmental sensor with you—ideal for commuting, office spaces, or shared environments.
Low Power Design: The device is optimised for battery operation, so it can run for long periods without frequent recharging. Circuit Digest
User-Friendly Feedback: By using intuitive red/green LEDs and audio tones, the device makes air quality information accessible without needing to read numerical data.
Learning & Maker Value: This project is a hands-on way to learn about embedded systems design (STM32), gas sensing (SGP40), PCB design, power management, and wearable technology.
Key Components & Requirements
Microcontroller: STM32U083KCUx — a low-power 32-bit MCU ideal for battery-powered projects.
Gas Sensor: Adafruit SGP40 Air Quality Sensor, which measures TVOC via I²C, offering low power consumption and good stability.
Power Management: MCP73831/2 Li-Po charge controller to safely charge the battery. ADPL44002 (LDO regulator) to produce a stable 2.5 V rail for the sensor and microcontroller.
Feedback: An RGB LED (common cathode) to visually indicate air quality (green = good, yellow = warning, red = critical). A piezo buzzer driven by a transistor to play simple melodies (RTTTL) depending on air quality.
Battery: A small Li-Po cell to make the device portable. PCB: Custom circular PCB (~32.5 mm diameter) designed in KiCad.
3D-Printed Enclosure: Pendant-shaped housing with a hook to wear around your neck; includes a cutout for USB-C charging.
Programming Tools: ST-Link or SWD interface for flashing firmware, plus serial / UART for debugging.

How It Works
Sensing: The SGP40 sensor periodically measures TVOC levels via I²C.
Processing: The STM32 reads the sensor data, evaluates the air quality based on predefined thresholds, and determines a “state” (good, warning, alarm).
Feedback: LEDs fade smoothly between colours depending on the detected air quality.
Buzzer plays different melodies using RTTTL (text-based ringtones) to signal the current air-quality level.
Power Management: The Li-Po battery powers the system. When plugged in via USB-C, the MCP73831 charges the battery, while the LDO ensures a stable 2.5 V for the sensor.
Task Scheduling: Uses a non-blocking scheduler (ptScheduler) so the device can handle sensor readings, LED fading, and audio playback concurrently without lag.
Enclosure: Everything is housed in a 3D-printed pendant case, making the device wearable, portable, and stylish.
Challenges & Considerations
Sensor Warm-Up: The SGP40 requires time to stabilise after being turned on; this is accounted for in the code. Circuit Digest
Battery Life: Since the device is wearable, power consumption must be minimised. Using an ultra-low-power STM32 helps, but battery size and usage patterns will affect how long it runs between charges.
I²C Reliability: Ensuring proper pull-up resistors and correct wiring to the SGP40 is essential for reliable readings. Circuit Digest
User Feedback Calibration: The thresholds for “good,” “warning,” and “alarm” air quality need to be meaningful for real-world conditions; some tuning may be necessary.
Enclosure Design: The 3D-printed case must allow adequate airflow to the sensor, while still protecting the internals and looking good as a wearable.

Learning Outcomes & Impact
By building this project, participants will:
- Gain hands-on experience with embedded firmware development on STM32 (using Arduino IDE or similar).
- Learn to interface gas sensors (SGP40) over I²C, including calibration and data interpretation.
- Understand power management for battery-powered systems (charging, regulation, low-power modes).
- Develop skills in PCB design and 3D casing for wearable electronics.
- Build a real-world health-oriented tool that raises awareness about environmental quality and air pollution.
Conclusion
This wearable air quality monitor is more than just a gadget — it’s a portable environmental sentinel. By combining efficient hardware (STM32), a professional-grade VOC sensor (SGP40), and intuitive feedback (LEDs + sound), this project empowers users to sense and respond to air pollution in their daily lives. It’s ideal for makers, students, or anyone interested in health, IoT, or wearable technology.
How to build a Wearable Air Quality Monitor Pendant using STM32 & SGP40 Sensor
*PCBWay community is a sharing platform. We are not responsible for any design issues and parameter issues (board thickness, surface finish, etc.) you choose.
- Comments(4)
- Likes(0)
- 0 USER VOTES
- YOUR VOTE 0.00 0.00
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
More by Jobit Joseph
-
How to build a Wearable Air Quality Monitor Pendant using STM32 & SGP40 Sensor
This DIY Wearable Air Quality Monitor Pendant is a compact, battery-powered device designed to conti...
-
Smart Digital Ludo Game Board with Multicolour PCB
Ludo, a beloved childhood game, holds a special place in our hearts with its simple and engaging gam...
-
Electronic Dice with BLE Connectivity
Many of us fondly remember the joy of playing board games like Snakes and Ladders or Ludo during our...
-
3D printed Enclosure Backplate for Riden RD60xx power supplies
3D printed Enclosure for Riden RD60xx power supplies such as RD6006, RD6012, RD6018, RD6024 and RD60...
-
3D printed Enclosure for Riden RD60xx power supplies
3D printed Enclosure for Riden RD60xx power supplies such as RD6006, RD6012, RD6018, RD6024 and RD60...
-
Suzuki Ignis Universal Armrest No Screw Adapter
I own a 2024 Suzuki Ignis. When I searched for an armrest for my car I couldn't find any domesticall...
-
Wireless Potentiostat for Electrochemical Analysis
This wireless potentiostat is based on the ADuCM355 SoC from Analog Devices, tailored for portable e...
-
160 Channel Configurable DAC Controller
The DAC controller board features 160 individually controllable 16-bit DAC output. It can output vol...
-
Build Your Own ESP32 AI Voice Assistant with MCP Integration
Project OverviewThe ESP32 AI Voice Assistant with MCP Integration is an advanced voice-controlled sm...
-
Build Your Own Precision Digital Micro-Current Meter with STM32
In many electronic projects — especially those involving battery-powered devices or low-power sensor...
-
DIY Meshtastic Using ESP32 : Build Your Own Private Off-Grid Network
Project OverviewThis project delivers a complete, custom-designed PCB solution for building Meshtast...
-
Second PCB for ESP32 Smart Watch
This project contains two PCBs, this is the Second PCB,and there is a Main PCB, please click https:/...
-
1S battery Charger with Battery level indicator and power path
1S Battery Charger with Battery level indicator and 5V out and standby mode.
-
Smart Universal Remote with Learning Function and Google Assistant Support
In our day-to-day life, we use various gadgets such as televisions, set-top boxes, air conditioners,...
-
High-Resolution POV Display using ESP32
In this guide, we'll learn how to create a cool POV display using an ESP32 module. It's all about us...
-
Low Cost Drone using ESP32
Drones have rapidly evolved from niche hobbies to versatile tools with a wide range of applications,...
-
DIY Thermal Camera
Ditch X-ray vision, thermal cameras are the real industrial superheroes! They don't just see light, ...
-
ESP32 Smart Watch
This project contains two PCBs, this is the Main PCB, and there is a Second PCB, please click https:...
-
-
mammoth-3D SLM Voron Toolhead – Manual Drill & Tap Edition
43 0 0 -
-
AEL-2011 Power Supply Module
576 0 2 -
AEL-2011 50W Power Amplifier
524 0 2 -
-
-
Custom Mechanical Keyboard
719 0 0 -
Tester for Touch Screen Digitizer without using microcontroller
355 2 2 -
Audio reactive glow LED wristband/bracelet with NFC / RFID-Tags
329 0 1 -
-







