Measure Air Quality

Introduction: Measure Air Quality

About: I spent my career in computer networks. Now retired I am interested in topics that work my neurons. I am passionate about home automation and site administration that I host at home. I acquired skills in the f…

Air quality and fine particles:
The suspended particles (denoted "PM" for "Particulate matter") are generally the fine solid particles carried by the air (Wikipedia). Fine particles penetrate deep into the lungs. They can cause inflammation and worsen the health of people with heart and lung disease.

The device measures the presence rate of PM10 and PM2.5 particles

The term "PM10" refers to particles whose diameter is less than 10 micrometers. The term "PM2.5" refers to particles whose diameter is less than 2.5 micrometers.

The sensor:

This sensor is based on a SDS011 PM2.5 / PM10 laser to accurately and reliably measure the quality of the air. This reliable, fast and precise laser measures the particle content in the air between 0.3 and 10 μm.

Project constraints:

Wifi connected device

Wifi performance because far from the Wifi base

Must only be activated twice an hour (power consumption limitation and Wifi limitation)

Waterproof environment

Monitor the charge level of the battery


Step 1: Components Needed

  • Wemos D1 mini pro
  • Sensor SDS011
  • Reed relay Celduc D31A3110 (or equivalent PRME 15005, Edr0201 a0500, SIP1A05)
  • Two resistors: 470K, 100K
  • Battery holder Wemos ESP32
  • Battery 18650 2500 mAh
  • Electric box ~6.2x3.5x2.3in (158x90x60mm)
  • Two angled tubes plus fitting tube (diameter ~0.63in (16mm))
  • Flexible PVC tube (diameter ~0.47in (12mm))
  • PVC glue
  • Solar panel 5V 5W
  • Miscellaneous hardware: junction terminal, printed circuit board, switch, 2 screws, ~0.47in (12mm) aluminum flat shank, relay support


  • Espeasy Mega embedded software (version 20190619)
  • Centralization of measures on Domoticz server

Step 2: Electronics and Principle of Operation:

The particle sensor is programmed (from the factory) to supply on an I2C bus, after about fifteen seconds of operation, the measured values corresponding to PM10 and PM2.5.
This sensor is controlled by an ESP8266 type controller equipped with ESPEasy mega software (Version 20190626). The software must be flashed beforehand in the controller.

ESPEasy includes a plugin capable of interfacing the SDS011 sensor and collecting the measured values. There will therefore be no programming (or very little) to do but only the setting.

It starts from the principle of a measurement every 30 minutes. In the meantime the system will have to go into sleep mode in order to limit the power consumption. The ESP8266 natively has a sleep setting. For the sensor, which also includes a device for sleeping, we will opt instead for a pilot relay Reed. This relay will be powered by the ESP8266 when it wakes up (port D1 of the ESP8266). Thus the power consumption of the system will be minimal in sleep mode (of the order of 20μA). The use of a Reed relay has the advantage of being controlled directly by the ESP8266 (consumes 10mA on the maximum 12mA recommended per port).

In order to monitor the system supply voltage a voltage divider (resistors 100kO-470kO) will supply a voltage between 0 to 1V (0 for 0V and 1 for 5V) at port A0 of the ESP8266. This port accepts a maximum voltage of 1V. The ESP8266 features an analog / digital converter that provides the read value (from 1 to 1024). This value will be retransformed by the ESP8266 in voltage from 0 to 5V before being transmitted to Domoticz.

Step 3: Espeasy Settings: Main

Step 4: Espeasy Setings: Controler (domoticz)

Step 5: Espeasy Settings: Task (voltage Monitoring)

Step 6: Espeasy Settings: Task (SDS011)

Step 7: Espeasy Settings: Rule

On SDS011#PM10 do






On System#Wake do



On Rules#Timer=1 do



Step 8: Domoticz Settings: Controller (dummy)

Step 9: Domoticz Settings: Attached Devices

Step 10: Mounting the Sensor in the Box

Step 11: Circuit Board

Step 12: Final Assembly

Step 13: The Operational Sensor

The metal rod is fixed to the housing and curved so that it can be easily hooked (balcony). The solar panel is fixed using a mounting allowing a rotation on two axes.

Step 14: Result of the Measurements in Domoticz (three Devices)

Step 15: Result of the Measurements in Domoticz (PM2.5)

Step 16: Result of the Measurements in Domoticz (PM10)

Step 17: Conclusion:

This assembly does not represent any particular difficulty for people with knowledge in Domoticz and ESPEasy software.
It can effectively measure the presence of fine particles near your home. Thanks to the solar panel it will be possible to increase the frequency of the measurements if necessary. This assembly can be completed with probes for measuring temperature, humidity, pressure, CO2 etc.

This project is also visible on my site (multilingual):

Be the First to Share


    • Make it Glow Contest

      Make it Glow Contest
    • First Time Author Contest

      First Time Author Contest
    • PCB Challenge

      PCB Challenge

    2 Discussions

    Penolopy Bulnick
    Penolopy Bulnick

    1 year ago

    Thank you for sharing your project :)


    Reply 1 year ago

    Thank you very much Peneloppe. I am new to Instructables and I appreciate your support :)