Overview
This DIY air quality monitoring system integrates precision sensors with a connected processing platform and a low-power e paper display.
it monitors :
- temperature
- pressure
- humidity
- CO2 level
- air quality (particules/dust)
System Architecture
- Processing Unit (Core): The ESP32 S2 Lolin mini manages the sensors. It offers native Wi-Fi connectivity, ideal for sending data to dashboards (Home Assistant, InfluxDB, or MQTT). Its architecture enables efficient management of peripherals via SPI and I2C interfaces.
![]()
So for this project you will have the choice between (non exclusive):
- a simple e-paper display without any connection to Wifi !
- an IoT devoce connected to ThingSpeak
- an IoT device conected to your HomeAssistant server
- Display:
- 3.7-inch E-Paper (240x416): Electronic ink technology allowing for static data display with zero power consumption between refreshes, ensuring a clear and readable interface.
![]()
- 3.7-inch E-Paper (240x416): Electronic ink technology allowing for static data display with zero power consumption between refreshes, ensuring a clear and readable interface.
- Air Quality Sensors:
- SCD40: Photoacoustic sensor for CO2 concentration, temperature, and relative humidity.
![]()
- Plantower PMS5003: Laser scattering sensor for measuring fine particulate matter (PM1.0, PM2.5, PM10).
![]()
- SCD40: Photoacoustic sensor for CO2 concentration, temperature, and relative humidity.
- Complementary Environmental Sensors:
Schematics
it couldn't be simpler !

Implementation Considerations
- Power Management: The PMS5003 consumes significant current during startup (approx. 100mA). The 5V USB power source of the ESP32 can handle this peak load. The other sensors are directly powered at 3.3V witth the EPS32's power regulator. BME and DS18B20 are powered via an I/O pin of the ESP32
- Bus Sharing:
- The BME280 and SCD40 typically use the I2C bus. (they don't have the same addresses so do not conflict)
- The E-Paper uses an SPI interface, allowing it to function simultaneously with the I2C sensors without pin communication interference.
- Airflow: The PMS5003 requires constant airflow to function accurately. When designing the enclosure, the inlet and outlet are unobstructed and air circulates freely around the temperature and CO2 sensors.
PCB
The PCB can be bought at PCBWay


As you can see corners are "rounded" in order to fit into the 3d printed enclosure. The PCB is delivered CNC milled with this exact shape. No screws are needed for the PCB to fit into the enclosure.

Soldering the PCB is easy. Sensors go on both sides:

Result is a clean and compact setup.
The PCB was kindly sponsored by PCBWay and is as usual of excellent quality.

You can order it here : PCBWay shared project. It's cheap, delivered very fast, and so professional looking!
and if you are new to PCBWay please use this affiliated link : https://pcbway.com/g/o35z4O
Enclosure
You can print the enclosure, the PCB will fit inside

All the sensors fit into the box, venting holes are preset to help air to circulate into the Plantower laser particules sensor and the CO2 sensor.
Here is the box once closed

Firmware
Source code for the ESP32-S2 is quite simple and is available on my github pages
main characteristics are :
* ============================================================================
* ESP32-S2 Environmental & Air Quality Monitoring Station
* ============================================================================
*
* Description:
* A comprehensive environmental monitoring station utilizing an E-Paper display.
* The firmware implements a non-blocking asynchronous state machine to manage
* sensor warm-up sequences, take stable multi-sample averages, and refresh the UI.
*
* Integrated Hardware:
* - SCD4x : CO2, Temperature & Humidity (I2C)
* - BME280 : Pressure, Temperature & Humidity (I2C)
* - Plantower PMS5003 : PM1.0 & PM2.5 Particulate Matter (HardwareSerial)
* - DS18B20 : High-precision Temperature (OneWire)
...
Read more »
JP Gleyzes















mikrotron
Miguel Tomas
Kevin Kessler