Buying guide · Intermediate · 3 min read
Air Quality Sensors
PM2.5, CO2 and VOC
By Geekobot Learning Team · Updated 24 Oct 2026
On this page
An air quality monitor usually combines three sensors. A laser particle sensor such as the PMS5003 or SDS011 counts PM2.5 and PM10 dust. An NDIR sensor such as the MH-Z19 or SCD40 measures real CO2. A metal-oxide VOC sensor such as the SGP30 or CCS811 tracks chemical odours, but its "eCO2" value is an estimate. Use NDIR for CO2 and expect hobby sensors to show trends rather than lab accuracy.
Key specs at a glance
- PM sensors
- PMS5003, SDS011: laser scattering, UART output, 5 V fan
- CO2 sensors
- MH-Z19B/C, SCD40/41: NDIR or photoacoustic, 400 to 5000 ppm typical
- VOC sensors
- SGP30, CCS811, ENS160: metal-oxide, give TVOC and estimated eCO2
- Supply
- Most need 5 V for the fan or lamp, with 3.3 V logic
- Current
- Particle sensors draw roughly 70 to 100 mA with the fan running
- Warm-up
- From about 30 seconds (PM) to minutes or hours (CO2, VOC baseline)
Which sensor measures what
| Sensor | Measures | Interface | Notes |
|---|---|---|---|
| PMS5003 / PMS7003 | PM1, PM2.5, PM10 | UART 3.3 V logic | 5 V supply, sleep pin to save the fan |
| SDS011 | PM2.5, PM10 | UART, USB adapter | Larger, popular for outdoor stations |
| MH-Z19B / C | CO2 (NDIR) | UART or PWM | Auto-calibration assumes fresh air daily |
| SCD40 / SCD41 | CO2, temperature, humidity | I2C | Small; needs stable 3.3 or 5 V |
| SGP30 / CCS811 / ENS160 | TVOC, eCO2 estimate | I2C | Good for odour and trends, not true CO2 |
| MQ-135 | Mixed gases | Analog | Rough indicator only; see gas sensors |
- PMS5003 / PMS7003
- Measures:
- PM1, PM2.5, PM10
- Interface:
- UART 3.3 V logic
- Notes:
- 5 V supply, sleep pin to save the fan
- SDS011
- Measures:
- PM2.5, PM10
- Interface:
- UART, USB adapter
- Notes:
- Larger, popular for outdoor stations
- MH-Z19B / C
- Measures:
- CO2 (NDIR)
- Interface:
- UART or PWM
- Notes:
- Auto-calibration assumes fresh air daily
- SCD40 / SCD41
- Measures:
- CO2, temperature, humidity
- Interface:
- I2C
- Notes:
- Small; needs stable 3.3 or 5 V
- SGP30 / CCS811 / ENS160
- Measures:
- TVOC, eCO2 estimate
- Interface:
- I2C
- Notes:
- Good for odour and trends, not true CO2
- MQ-135
- Measures:
- Mixed gases
- Interface:
- Analog
- Notes:
- Rough indicator only; see gas sensors
Wiring tips
- Particle sensors: 5 V and GND to the supply, sensor TX to your board RX through the UART. The data lines are 3.3 V, so they are safe for ESP32. Use the SET or sleep pin, or a command, to stop the fan between readings and extend its life.
- MH-Z19: 5 V supply, 3.3 V UART. Disable automatic baseline calibration if the room never gets fresh air, or calibrate it outdoors.
- I2C sensors: share SDA and SCL with other parts; add a BME280 for temperature and humidity compensation.
- Power: a fan and NDIR lamp together can pull more than a USB port's weak supply can handle on some boards, so use a good 5 V supply.
Placement and honest readings
- Put the inlet in free air, away from your body, kitchens and exhaust from the sensor's own fan.
- High humidity, fog and rain make particle sensors over-read. Outdoors, use a shelter that keeps water out but lets air through.
- CO2 indoors is a good proxy for ventilation: values well above outdoor levels (about 420 ppm) suggest the room needs fresh air.
- Compare against an official air quality station nearby before publishing numbers; treat your device as a trend indicator. See also MQ gas sensors.
Try it: Power supply sizing calculator
Change the values and the diagram and results update as you type.
Common mistakes to avoid
- Trusting the eCO2 reading from a VOC sensor as real CO2.
- Powering a fan-based sensor from a weak 3.3 V rail.
- Running the particle sensor fan continuously and wearing it out.
- Mounting the sensor in a sealed box with no airflow.
- Ignoring humidity effects on particle readings.
Frequently asked questions
Which sensor measures real CO2?
NDIR or photoacoustic sensors such as the MH-Z19 or SCD40. VOC sensors only estimate CO2.
Is the PMS5003 accurate?
Good for trends and broadly comparable indoors; outdoors in high humidity it over-reads without correction.
Can I use MQ-135 as an air quality sensor?
Only as a rough indicator. It reacts to many gases and drifts with temperature and humidity.
Does the PMS5003 work with ESP32?
Yes. It needs 5 V power, but its UART pins are 3.3 V logic.
Why does my CO2 sensor read 400 ppm all the time?
Automatic calibration or a sensor that needs warm-up. Check the ABC setting and wait several minutes.
Parts for this guide
Calculators
Terms in this guide
Projects that use it
Put this into practice: 10 step-by-step builds in our project library use parts from this guide.
Keep learning
Sources
- Plantower PMS5003 datasheet
- Nova Fitness SDS011 datasheet
- Winsen MH-Z19B datasheet
- Sensirion SCD4x and SGP30 datasheets
Written by the Geekobot team from manufacturer datasheets. Always check the datasheet for the exact part and variant you buy.


