Air quality meter using of-the-shelf components to measure dust particles, CO2, benzene and other nasty stuff.
- Wemos D1 Mini Lite
- SDS-011 dust sensor
- 3x TM1637 4-digit display
- MQ-135 gas sensor
- breadboard
- wires, male to male and male to female
- enclosure, I used a cardboard box of 8cm x 21cm x 15cm
- power bank, with a USB cable that ends in a micro-USB connector
- stuff to attach the MQ-135 and displays to the enclosure. I used some electric wire (see photos).
- Open AirQualityMeter.sln in Visual Studio.
- Adjust the brightness of the digits to your liking (search for
setBacklightin AirQualityMeter.ino). - If you're using different pins than indicated in the schematic, change the the pin definitions in AirQualityMeter.ino.
- Select 'Wemos D1 mini Lite' in the board drop-down.
- Select the correct COM port.
- Build and upload. You might need to remove the D1 from the breadboard when uploading, I sometimes got a sync error with the D1 on the breadboard and everything connected.
- Let the meter burn in for at least 24 hours. During that time the top display will alternate between the measured gas concentration en between the current Rzero*10.
- When the Rzero*10 has stabilized after burn-in, open MQ135.h in Visual Studio and on line 27 change the value of RZERO to the displayed value / 10.
- Open AirQualityMeter.ino and comment out the MQ135_CALIBRATION define.
- Build and upload.
- Each time you turn on the meter, the MQ135 needs to heat up, this may take a while (20 minutes or more).
- You need to calibrate the MQ135, see this article.
The top display shows the ppm of NH3, NOx, alcohol, Benzene, smoke and CO2. The left display shows µg/m³ of PM2.5, the right one shows µg/m³ of PM10.



