user-img

Bertrand Selva

+ Follow

Compact and Low-Cost ESP32 IoT Air Quality Monitor

Invisible indoor pollutants? This ESP32 IoT node (AP mode) reveals them—TVOC, eCO₂, temperature, humidity rate —via its own Wi-Fi dashboard.

Compact and Low-Cost ESP32 IoT Air Quality Monitor
 
  • thumbnail-img
  • thumbnail-img
  • thumbnail-img
  • thumbnail-img
  • thumbnail-img
 

Hardware Components

  • ESP32 S3 with OLED 135x240 pixels with ST7789 controller

    X 1

Story

 

Why this tiny box can be trusted

The core sensor is ScioSense’s ENS160, a four-element MOX chip that outputs TVOC, equivalent CO₂ and a five-level AQI compliant with the German UBA scale (https://www.sciosense.com/wp-content/uploads/2023/12/ENS160-Datasheet.pdf). Its typical response ( t₉₀ ) is under a minute once warmed, and the datasheet recommends an occasional software reset to limit baseline drift — my firmware does exactly that every five minutes. Temperature and humidity come from an AHT20, accurate to ±0.3 °C and ±2 % RH; those values are fed straight back to the ENS160 for on-chip compensation. A LILYGO T-Display S3 provides an ESP32-S3, 8 MB PSRAM and a 1.9″ ST7789 TFT on one PCB, keeping the build truly compact.

https://cdn.hackaday.io/images/1728021747638594561.png

Introduction picture for the 135x240 pixels screen

 


Breakout board with the ENS160 + AHT2x from Aliexpress

How the firmware works

At boot the microcontroller decodes a PNG splash that lives in flash, streamed line-by-line with Larry Bank’s PNGdec library—no SD card required. It then starts a soft-AP called ESP8266_Mesure, fixes the IP at 192.168.4.22 and launches an Arduino-style WebServer. Every second the loop reads the AHT20, pushes that data into the ENS160, and refreshes both the TFT dashboard and the browser page. Gradients and text are drawn with TFT_eSPI, a graphics library heavily optimised for ESP32 hardware.

https://cdn.hackaday.io/images/7369591747639278477.png

 

What the real-world tests show

During a routine stir-fry the monitor jumped from a calm 30 ppb to over 400 ppb TVOC in under thirty seconds, flipping the AQI bar from green to solid orange. Cracking one window pulled the index back below 100 in roughly twelve minutes, right in line with the decay curves reported for kitchen VOCs in peer-reviewed ventilation studies (https://www.sciencedirect.com/science/article/pii/S0360132324005857).
A more dramatic demo appears in the build video: I hold a glass of acetone sealed with cardboard a few centimetres from the sensor. The moment the cover is lifted, the ENS160 flags an immediate AQI 5—“heavily polluted.” That isn’t surprising when you note that acetone’s vapour pressure is about 30 kPa at 25 °C, meaning it fills a room faster than you can step back. The bar on the TFT slams to red while any phone connected to the hotspot sees the same spike.
Night-time readings tell another story: with doors closed and no activity, the unit settles around 450 ppm eCO₂, a value generally accepted as a sign of adequate baseline ventilation in occupied spaces.

Enclosure

To ensure the durability and portability of the air quality monitor, a custom enclosure was designed. The design accommodates the ESP32-S3 board, the ENS160 gas sensor, and the AHT20 temperature and humidity sensor, providing precise cutouts for each component. The enclosure was 3D printed using PLA material. This protective casing not only safeguards the internal electronics but also enhances the device's aesthetic appeal, making it suitable for both desktop and portable applications.

https://cdn.hackaday.io/images/7220801747639109961.jpg

What's next

Because everything already sits on an ESP32-S3, it is straightforward to add MQTT and feed Home-Assistant, or to drop the board into modem-sleep between scans for better battery life—Espressif’s power-management docs show current drops of an order of magnitude when Wi-Fi naps between bursts. A Li-ion cell and TP4056 charger would make the node truly cable-free, and the raw-resistance mode of the ENS160 opens the door to on-device machine-learning that could recognise “cook”, “clean” or “spray can” just from gas signatures.

 

 

Compact and Low-Cost ESP32 IoT Air Quality Monitor

Invisible indoor pollutants? This ESP32 IoT node (AP mode) reveals them—TVOC, eCO₂, temperature, humidity rate —via its own Wi-Fi dashboard.

151
 
3
0
0

Share your project on social media to expand its influence! Get more people to support it.

  • Comments( 0 )
  • Like( 3 )
/1000
Upload a photo:
You can only upload 1 files in total. Each file cannot exceed 2MB. Supports JPG, JPEG, GIF, PNG, BMP

You May Also Like

View All
Add to cart
Board Type : GerberFile :
Layer : Dimensions :
PCB Qty :
Different PCB Design
PCB Thickness : PCB Color :
Surface Finish : Castellated Hole :
Copper Weight : 1 oz Production Time :
Total: US $
As a sharing platform, our community will not bear responsibility for any issues with this design and parameters.

PCB Assembly

PCBA Qty: BomFile:
NO. OF UNIQUE PARTS: NO. of Components:
Assembly Cost: US $
As a sharing platform, our community will not bear responsibility for any issues with this design and parameters.
Add to cart
3dPrintingFile : Size :
Unit : Volumn :
3D Printing Qty : Material :
Total: US $12.99
As a sharing platform, our community will not bear responsibility for any issues with this design and parameters.
Add to cart
Acrylic Type : AcrylicFile :
Dimensions: Engrave:
Acrylic Qty :
Acrylic Thickness:
Acrylic Color:
Total: US $12.99
As a sharing platform, our community will not bear responsibility for any issues with this design and parameters.
Add to cart
CNC Milling File : Size:
Unit: Volumn:
CNC Milling Qty : Material:
Type of Aluminum: Surface Finish:
Tolerance:
Surface Roughness:
Total: US $12.99
As a sharing platform, our community will not bear responsibility for any issues with this design and parameters.
Add to cart
Item Price Qty Subtotal Delete
Total: US $0.00
Certified Product | Supported Purchase: Full After-sales Protection