Skip to content
MCU Atlas
ESP32ESP32Draft

ESPHome indoor air-quality monitor (CO2, PM2.5)

An ESPHome config for a DIY air-quality monitor measuring CO2, particulates, temperature, humidity and pressure.

Difficulty:BeginnerCost:Source available

Photos

ESPHome indoor air-quality monitor (CO2, PM2.5) photo 1
ESPHome indoor air-quality monitor (CO2, PM2.5) photo 2

Photos: koenvervloesem.github.io

Key Facts

  • Chip: ESP32
  • Sensors: CO2, PM2.5/PM10, BME280
  • Framework: ESPHome
  • Feedback: RGB LED or display

About This Project

Koen Vervloesem's project provides a tested ESPHome configuration for an indoor air-quality monitor, built on a perfboard in a project box. It measures CO2 with a Senseair S8 or SCD-series sensor, PM2.5/PM10 with a PMS5003-type sensor, and climate with a BME280, then optionally shows status via an RGB LED or display. Everything reports into Home Assistant, and CI keeps the config building.

Source & Attribution

Source: GitHub
License: MIT
Last verified: 10/16/2026
ESPHome indoor air-quality monitor (CO2, PM2.5)
How to Build It
An ESPHome configuration for a DIY indoor air-quality monitor that measures CO2, fine dust (PM2.5/PM10), temperature, humidity and pressure. A traffic-light LED shows the air quality at a glance, and the readings go to Home Assistant.

Parts Needed

  • ESP32 (or ESP8266) board
  • CO2 sensor: MH-Z19B or T6615 (or Senseair S8 per our BOM)
  • Particulate sensor: Nova SDS011 (or PMS5003)
  • BME280 breakout (3.3V version)
  • Red/yellow/green LEDs or an RGB LED
  • 5V boost converter if running from a battery; perfboard and project box

Steps

  1. 1

    Wire it up

    Follow the connection table in the README. On an ESP32: BME280 on I2C (GPIO21/22), the CO2 sensor's UART on GPIO35/32, the SDS011's UART on GPIO34/33, and the LEDs on spare GPIOs. Power the CO2 and dust sensors from a steady 5V.

  2. 2

    Install ESPHome

    Use the ESPHome add-on in Home Assistant or install the esphome CLI with pip.

  3. 3

    Configure

    Pick the YAML for your board from the repo and add a secrets.yaml with your Wi-Fi details (plus an API key or OTA password if you want them).

  4. 4

    Flash

    Run esphome run with your YAML file to compile and upload over USB. Later updates can go over Wi-Fi.

  5. 5

    Add to Home Assistant

    Home Assistant discovers the device. Add it, then build a dashboard or automations, for example opening a window when CO2 gets high.

  6. 6

    Tips

    CO2 sensors need a few minutes to warm up. The SDS011 has a limited lifespan, so the config reads it periodically rather than continuously.

Parts List (BOM)
Parts list inferred by MCU Atlas — check the original
inferred
PartQtyRoleEst. PriceBuy
1main board$5–$10View
1CO2$25–$40View
1PM$12–$25View
1climate$3–$15View
RGB LED
1feedback——
Estimated Total$45–$90 USD

Not included: 3D-printed case, wire, solder, USB cable

Download CSV

Related Projects

Watchy: open-source ESP32 e-ink smartwatch
Illustration
ESP32Draft
An open-source smartwatch with a 1.54in e-paper screen and ESP32, hackable watch faces in Arduino.
Beginner·Under $15·Code
2 parts listed
Low-power ESP32 e-paper weather display (7.5in)
Illustration
ESP32Draft
A wall-mounted 7.5in e-paper weather display on an ESP32 that runs for months on one battery charge.
Intermediate·Cost varies·Code
5 parts listed
OpenEPaperLink: reuse e-ink shelf labels with an ESP32 access point
Illustration
ESP32ESP32-S3Draft
Turns cheap second-hand electronic shelf labels into a Wi-Fi-managed e-ink display fleet via an ESP32 access point.
Advanced·Under $15·Code
3 parts listed