– NodeMCU ESP8266, CPU/WLAN
– SDS011 Fine dust sensor (formerly PPD42NS)
– DHT22, temperature & humidity (optional)
– USB cable e.g.: flat 2m Micro-USB
– Power supply USB
– Cable straps
– Flexible tube, if possible not transparent, diameter 6 mm, length approx. 20cm (DIY store)
– Weather protection, Marley Silent HT Arc (DN 75 87°)
Fine dust sensor – construction manual
– NodeMCU ESP8266, CPU/WLAN
The assembly is designed in such a way that everyone can take part. With only 7 discs and 2 cable ties, the kit becomes a measuring station. Really simple!
Das Rohr als Gehäuse – 2 Rohrbögen zusammen ergeben den Wetterschutz für den Sensor
Der Sensor SDS011, der misst schon die richtigen Partikel PM10 und PM2,5
Der NodeMCU = ESP8266, eine WLAN Chip mit einem Computer, dort kommt die Firmware drauf
Der Anschluss: Spannung über ein Steckernetzteil 5V USB auf Micro-USB und eine WLAN Verbindung
To communicate with the ESP8266, you need usb2serial drivers. The chipset is CH341 for NocdeMCUs: website of the manufacturer (chinese).
- Linux: no installation required, chip should be supported (verfiy with dmesg)
- MacOS: for Sierra see these successfully tested instructions: https://github.com/adrianmihalko/ch340g-ch34g-ch34x-mac-os-x-driver
- Windows: TBA (try manufacturer driver, see above)
- Raspberry Pi: https://github.com/aperepel/raspberrypi-ch340-driver
Hint: Just copy the instructions
Having problems please look in the FAQ’s. There is a video tutorial (german).
Install Arduino software, import firmware
OS independant steps
- Download & install the Arduino software on your computer: https://www.arduino.cc/en/Main/Software
- In the settings look for the field “Additional Board Manager URLs” and insert this URL: http://arduino.esp8266.com/stable/package_esp8266com_index.json
- Under “Tools -> Board … -> Board Administrator” search for “esp8266” and install “esp8266 by ESP8266 Community”
- Quit Arduino IDE (at the latest before flashing)
- Download the English firmware https://www.madavi.de/sensor/update/data/latest_en.bin
- Bulgarian: https://www.madavi.de/sensor/update/data/latest_bg.bin
- French: https://www.madavi.de/sensor/update/data/latest_fr.bin
- German: https://www.madavi.de/sensor/update/data/latest_de.bin
- Italian: https://www.madavi.de/sensor/update/data/latest_it.bin
- Spanish: https://www.madavi.de/sensor/update/data/latest_es.bin
- Portuguese: https://www.madavi.de/sensor/update/data/latest_pt.bin
- Dutch: https://www.madavi.de/sensor/update/data/latest_nl.bin
- Connect the NodeMCU with your computer. If possible, connect a USB2.0 cable to a USB2.0 port, as the NodeMCU can be used e.g. otherwise may not be recognized under Windows.
Attention: When copying the firmware to the NodeMCU, use a USB cable not more than 1m in length.
- Open the command line (cmd.exe) under Windows
- 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_downloaded_firmware_file” (the port behind, ‘-cp’ may need to be adjusted)
- The appropriate port can be found, for example, by connecting the NodeMCU to the desired port (see note above) and then starting the Arduino IDE. Under, Tools -> Port ‘are the available port to see, usually quite easily the port with the NodeMCU recognizable. Or select a port and then run Tools – Get Board Information. If the correct port is selected, codes will appear at VID and PID. Close the IDE afterwards, otherwise this port is blocked.
Mac / Linux
- open the terminal
- Linux: ~ / .arduino15 / packages / esp8266 / tools / esptool / 0.4.9 / esptool -vv -cd nodemcu -cb 57600 -ca 0x00000 -cp /dev/cu.wchusbserial1410 -cf /path/to/firmware/file (the port behind, -cp ‘ may need to be adjusted)
- MacOS: ~ / Library / Arduino15 / packages / esp8266 / tools / esptool / 0.4.9 / esptool -vv -cd nodemcu -cb 57600 -ca 0x00000 -cp /dev/cu.wchusbserial1410 -cf /path/to/firmware/file (the port behind, -cp may need to be adjusted)
- In case of problems you should try to execute the above command as root. Then in the path, ~ / ‘must be replaced by the home directory.
- The appropriate port can be found, for example, by connecting the NodeMCU to the desired port (see note above) and then starting the Arduino IDE. Under, Tools -> Port ‘are the available port to see. Select a port and then run Tools -> Get Board Information. If the correct port is selected, codes will appear at VID and PID. Close the IDE afterwards, otherwise this port is blocked.
- For Linux there is a script in the repository sensors-software/utils/flash, which can also delete an existing configuration:https://github.com/opendata-stuttgart/sensors-software/tree/master/utils/flash
Don‘t worry: you don’t have to program!
You just have to install the firmware, everything is already prepared for you.
- Connect the station with the power cable
- The station tries to connect to the configured WLAN access point. If this does not work, the sensor opens an access point with the name Particulate matter . The ID referes to the ChipID (in the example below the 13597771). Please note that number down, as we need it later
- Connect to this access point. Wait a moment until the connection is made. Sometimes it take multiple attempts.
- Open your browser and type in http://192.168.4.1/. You see the menu site, choose “Configure”.
Please note: If the configuration of the sensor has worked, this page is no longer available
Example: View of the sensor as a router with the number of the ESP8266
- In ‘Configure’ enter the SSID (name of the home Wifi) and Wifi password
- For particulate matter sensors according to this manual, nothing needs to be changed
- After saving, the sensor will restart and is no longer accessable
If everything is setup correctly, after about 10 minutes visit following sites.
Search for your ChipID (in the example above the 13597771).
Sensor data: http://www.madavi.de/sensor/graph.php
Wifi signal: http://www.madavi.de/sensor/signal.php
To make the sensor part of the sensor network, we still need some information
Send an email firstname.lastname@example.org with these information:
- your ID of the ESP8266 (NodeMCU)
- your address: Street with house number, post code and city -> we approximate your coordinates for privacy reasons
- the environment of the station – e.x. height above ground, roadside, high traffic, open field or the like
- your email address. Will not be published, just if we need to contact you.
- If possible, an image where the sensor hangs – will not be published.
If you prefer to transfer this data in a secure manner, you can use the appropriate PGP key B1B3DC43. It may happen that the email with the login is classified as spam. Then it may take a while for the sensor to register.
Almost done! Soon you can measure fine dust.
Projekt im Reallabor
Kooperation mit der SWMH
StZ / Feinstaub