Zonnestroompanelen in Nederland

duurzaamheid achter de meter

(29) Fine dust monitoring/logging at luftdaten.info with a Nova PMI SDS011 sensor, a NodeMCU ESP8266 and the internet

by Floris Wouterlood – The Netherlands

Pollution in the earth’s atmosphere consists among others of fine dust: particles with diameters of less than 10 micrometers. Stuff of this type is emitted by industrial processes, cars, incinerators, seagoing ships, airplanes, agricultural activity and so forth. There are also natural sources of fine dust, for instance pollen, smoke from bushfires and seaspray. Fine dust can be dangerous because the finest particles can be inhaled all the way down into your lung alveoli. The smaller and dirtier the particles (for instance soot from tobacco smoke or diesel fumes), the more dangerous they are. Inhaled ultrafine dust has been linked with all kinds of respiratory and cardiovascular diseases, and ultimately with premature death. Air pollution is a major cause of reduced lifespan in heavily industrialized nations, with fine dust as the carrier of death.

Particulate matter in the atmosphere comes in classes:

PM10: particles smaller than 10 micrometers but bigger than 2.5 micrometers. Most of the biggest of these particles end up trapped in mucus in the nasal and pharyngeal cavities and the trachea, and are removed from the body by the aaction of the mucosal lining of the airways (literally ‘swept up’ by cilla), e.g. when you clean your nose. The smaller the particles the deeper they travel into your lungs.

PM2.5: Particles smaller than 2.5 micrometers are carried by respiratory air into the lower airways, that is the broncheoli and alveoli of your lungs (20% ends up in alveoli). Ultra fine dust, say nanoparticles (smaller than 0.1 micron) may enter the circulatory system and can be carried all around your body. One-tenth of a micron equals 100 nanometers. Viruses have such diameters. An adenovirus (common cold virus) for example is a sphere-like thing 100 nm across.

Count ‘em
If inhaled particles would be clean they would not present a real danger to our body. However, particles produced by industrial processes are definitely not clean and therefore suspected to carry all kinds of rubbish, toxic payload and viruses very deep into our body.

Air quality measurement
The concentrations of particles in the air can be measured with instruments to give us an idea how clean or, conversely, how polluted the air is around us. Professional air quality equipment is used by government agencies to do the monitoring required by environmental laws. In The Netherlands such monitoring is continuously being carried out by RIVM (National Institute for Public Health and the Environment) and published on a web site (https://www.lml.rivm.nl/verwachting/fijnstof.php).
You don’t have to rely completely on government agencies. You can measure the air quality around your home yourself with affordable equipment. In Germany the organization OK Lab Stuttgart runs a citizen science project, named Luftdaten.info that monitors air quality all over western Europe. This Luftdaten project is not limited to Europe, though. Anybody in the world can participate and the results are public (see the world map with real time data on https://luftdaten.info). The only things you need are a wifi connection and, of course, proper equipment. Here the Internet of Things (IOT) pops in because the actual logging and presentation is done via a familiar IOT solution: a sensor connected to a NodeMCU microcontroller board equipped with wifi. Data is collected and sent via your home wifi network to a server on the internet run by OK Lab in Stuttgart, Germany.

1x Nova PMI SDS011 fine dust particle sensor. This sensor optically measures light refraction by PM10 particles in air sucked in by a micro-fan.
1x NodeMCU ESP8266 microcontroller board
1x usb cable
piece of tubing
1x usb power supply (5V)
Mounting is necessary of the finished device in a weather resistant air open box. Once finished the device will necessarily be positioned somewhere on the outside of your home. The box must have a few openings to allow atmospheric air to flow through.

Wiring diagram

Figure 1. Wiring diagram

The wiring of the sensor is very straightforward. The nova PMI sensor has a 7-pin connector of which 4 pins are used: TXD and RXD for communication, and 5V and GND to supply power to the sensor and the micro-fan.
The TXD pin of the SDS011 is connected to pin D1 of the NodeMCU, the RXD pin on the SDS011 is connected to pin D2 of the NodeMCU, and the 5V that the sensor needs is drawn from the VIN pin of the NodeMCU. Finally, GND connects to G on the NodeMCU. Once that is done you can mount the device into its box, connect the NodeMCU with your computer via a usb cable, and upload the sketch.

Figure 2. Wired on the bench! The tubing is placved on the air inlet and the fine dust sensor is connected with foru wires to an ESP8266 NodeMCU. Time to upload.

The sketch must be uploaded to the NodeMCU. This uploading is done in a Command box with a cryptic MSDOS command that lists as follows:

Windows: “% USERPROFILE% \ AppData \ Local \ Arduino15 \ packages \ esp8266 \ tools \ esptool \ 0.4.9 \ esptool.exe” -vv -cd nodemcu -cb 57600 -ca 0x00000 -cp COM11 -cf path-to-the-folder-where-the-binary-is“

Have a good look at this intimidating string. It contains three parts: first a path to the program “esptool.exe” that does all the work, second a series of parameters and finally the path to where the file is located that contains the information to be flashed.

The essentials of the command string are for that matter the following:

1. First you need to know which COM port is used by the NodeMCU. The port number can be determined with the common Arduino user interface. In this example the port number is COM11.
2. Apart from the path that leads to the location of esptool.exe, the actual command that excutes the flashing is:

esptool.exe -vv -cd nodemcu -cb 57600 -ca 0x00000 -cp COM11 -cf path-to-the-folder-where-the-binary-is

3. Everything before that is the path leading to the folder with the cryptic name “0.4.9” that contains the utility program esptool.exe. If you start getting sick from typing the entire path, then navigate via the command box instruction cd/ AppData \ Local \ Arduino15 \ packages \ esp8266 \ tools \ esptool \ 0.4.9 \ to this directory and you don’t have to worry about retyping the path any more.

4 The …… -cf path-to-the-folder-where-the-binary-is…. tells esptool.exe where to find the binary. If for example this binary (its filename is latest_en.bin) is on a usb stick that is mounted as drive g: then the syntax of this part of the command line is …..-cf g:/latest-binary.en

If everything goes well the firmware update starts and completes. The fine dust device monitoring device is now working!

figure 3: Connecting the sensor with the smartphone to the home wifi network. Steps are: 1. Disconnect your phone from the home network, 2. Look around for Feinstaubsensors, 3. Connect to the Feinstaubsensor (in this case ID 322852). 3. Open the browser on the smartphone and call Next you can link the sensor to your home network via the sensor’s configuration page.

The next step is to connect the device to your wifi. You will need the name of your wifi network (SSID) and the wifi key. A working, not to any wifi connected device broadcasts an IP address You need to connect your smartphone, tablet or any computer with wireless connectivity with this device. I did that by disconnecting my smartphone from my wifi network and then looking around which wifi access points might be around. Fine dust particle sensor 6773442 was around so I started the internet browser on my smartphone and connected to the sensor by typing the IP address in the address line of the browser. A configuration page on the device opened (fig 3).

Among the many wifi networks reported you must select your private home wifi network (in my case: ‘ducks’), and enter in the Password field the key of your wifi connection. After saving the configuration the device is now visible as a regular device in your home network, having an IP address in the range of your home devices (usually 192.168.178.xx). My router reports the sensor as ‘ESP-******’ and when you click on this entry the sensor’s configuration page is presented.

After configuring the sensor to report to connect with the home wifi network the next step is to register the device with the server at OK Lab in Stuttgart, Germany. This can be done automatically via the web page https://meine.luftdaten.info/

Once registration has been completed the location of the fine dust sensor is indicated as a hectagonal icon on the world map at http//luftdaten.info. Clicking on that icon shows the actual PM10 air quality expressed in micrograms per cubic meter of air. The color of the map symbol changes towards red in register with the measured air quality.

figure 4. Zoomed in, Netherlands, Belgium, Germany on the world map page at http://luftdaten.info. On this particular day (May 18, 2019) air quality in Germany and central Holland was good while especially in Belgium air quality was poor.

Construction of the sensor / NodeMCU PM10 measuring device was straightforward. programming it was a little bit arcane because I am used to program through the Arduino IDE. Uploading binaries with esptool.exe was new fram me.
The device is currently up and running for two months in my garden. I am curious to learn how long the sensor will survive in the outdoor environment, first because Arduino components typically are made for indoor use, with connectors having marginal quality, second because there is outdoor air drawn into the sensor which means that dust can build up inside the Nova SDS011.
Otherwise it gives a good feeling to be member of a citizen’s network across Europe that monitors air quality.

website: https://luftdaten.info