rmh78 / NO2-Measurement

Arduino project on a ESP32 for NO2 measurement sending the data with LoRaWan to TheThingsNetwork.
20 stars 4 forks source link
air-pollution air-pressure alphasense diesel esp32 gps heltec humidity lorawan no2 no2-sensor sensor temperature

Introduction

In this project I built a NO2 measurement station :mask: which sends its data via LoRaWan to TheThingsNetwork. A backend nodered server receives the messages and stores them into a MySQL database and then displays all on a dashboard. This project is inspired by the Urban AirQ (http://waag.org/en/project/urban-airq) of the waag society (Results are published here: https://www.atmos-meas-tech-discuss.net/amt-2017-43/). My intention to start this project was to show the amount of NO2 pollution at my home compared to the official measurement station "Landshuter Allee" of my hometown which is one kilometer away.

The NO2 measurement station uses two NO2 sensors, a temperature and humidity sensor, an air-pressure sensor and a GPS module. The sensors are connected with the ESP32 microcontroller which has an OLED display and a LoRa module onboard. All the hardware is powered with a powerbank.

Hardware

Image of NO2 measurement station - breadboard Image of NO2 measurement station - testrun

Software-Stack

NodeRed Flow 1 NodeRed Flow 2 Image of NO2 dashboard

Live Dashboard

http://h2708685.stratoserver.net:1880/ui/

Calibration of the NO2 sensor

The NO2 sensors are pre-calibrated and are shipped with a formular to calculate the NO2 concentration in ppb with the measured output voltages of the sensor. Because the results are poor I decided to calibrate the sensors against the measurement data of the official measurement station (http://inters.bayern.de/luebmw/csv/blfu_1404_NO2.csv) of my hometown. I placed my hardware on the roof of my car and placed my car next to the offical station. So I was able to store the measured data of 2 days on the flash memory of the ESP32. With this data I used linear regression (calculate with LibreOffice LINEST function: https://help.libreoffice.org/Calc/Array_Functions#LINEST) to get a linear function which outputs the NO2 concentration in ug/m3 like the official station does. For the linear regression I used the output voltage of NO2 sensor, the temperture, the humidity and the pressure as input data to get the values of the official station.

Image of NO2 calibration - sensor on the parking car Image of NO2 calibration - official station

Power consumption :battery:

The power consumption is high because the NO2 sensor has an integrated heating that needs to be powered all the time. The sensors, the GPS and the LoRaWan sender drains round about 100mA. That's sad because the device is not a low power device any more. For calibration runs I spent a big powerbank with 20.000 mAh to supply the hardware for some days.

Tasks

Historical conflicts, issues and findings