It is a major problem in almost all large German cities, that fine particulate matter is frequently exceeding its maximum permissible value of 50 μg/m3. In a special issue of the Make Magazine (IoT special 01/2017), I read an article about the Nova PM SDS011 sensor, which is using the principle of laser scattering to measure the concentration of particulate matter between 0.3 to 10 μm in the air. The sensor is cheap (about 20 Euro) and easy to use, since it communicates via serial connection.
For placing the sensor into an enclosure, it is equipped with a nozzle that allows to connect a hose of max. 1 m length. The UART communication protocol requires a bit rate of 9600 baud, with 8 data bit, no parity and one stop bit.
|Number of bytes
|PM2.5 Low byte
|PM2.5 High byte
|PM10 Low byte
|PM10 High byte
|ID byte 1
|ID byte 2
The Make Magazine published a shell script for data acquisition. However, I find it more more convenient reading the sensor data with Python. The script below opens a serial connection and converts the high- and low bytes for PM2.5 and PM10 as described in the sensor’s data sheet.
PM 2.5: 4.PM 2.5: 4.3 μg/m^3 PM 10: 5.7 μg/m^3 CRC=OK
In addition my Python script allows to operate the sensor in discontinuous mode, which is not documented in the data sheet.