Air quality sensor


edsard boelen, 16 jan 2019


During newyears eve, the airquality drops a lot. This is also being measured by home sensors. More andmore sensor networks are being created and they share a lot of information about their setups. So time to join one of those groups. I will use the SDS011 particle sensor and my plan is to place 3 of them.



schematic


For now I will use a sds011 and a dht22 sensor. As the sds011 has a limited operating time (8000hours) I will add a FQP30N06L mosfet to turn it on only for measurement every 15 minutes. Both sensors are connected to a wemos d1 mini loaded with nodemcu. This will send the data via wifi.
the code is in lua, get it at bitbucket or here.

construction


the dht22 and the mosfet are on a shield.


placed in a drainage t-section. The small tube is to keep insects and stuff out


placed outside


First tests


The first test have been on different positions, this has quite some impact on the particle count.

{"date":"2019-01-16 07:32:12","pm10":"19.7","pm25":"17.6","temp":"17.4","humidity":"68.5"}
{"date":"2019-01-16 07:34:12","pm10":"20.9","pm25":"18.2","temp":"17.5","humidity":"68.6"}
{"date":"2019-01-16 07:36:12","pm10":"20.5","pm25":"16.4","temp":"17.5","humidity":"68.3"}
{"date":"2019-01-16 07:38:12","pm10":"17.5","pm25":"15.7","temp":"17.5","humidity":"68.1"}
{"date":"2019-01-16 11:24:27","pm10":"7.8","pm25":"4.7","temp":"11.2","humidity":"99.9"}
{"date":"2019-01-16 11:26:27","pm10":"5.3","pm25":"3.6","temp":"12.5","humidity":"91.9"}
{"date":"2019-01-16 11:28:27","pm10":"7.4","pm25":"3.1","temp":"13.4","humidity":"86.4"}
{"date":"2019-01-16 11:48:01","pm10":"16.5","pm25":"8.4","temp":"16","humidity":"74.5"}
{"date":"2019-01-16 12:03:01","pm10":"19.4","pm25":"9.2","temp":"10.8","humidity":"77.8"}



connecting to RIVM


The data can be sent to the RIVM db by a POST request on port 8086. The url parameters should contain the db, u and p fields for database name, username and password.
The post body is a CSV line containing the following fields:
for example: vuurwerk ,id=247698 Temp=14.4,Press=1001.3,Hum=44.4,PM25=5.5,PM10=12.3,RSSI=-22.0,ERROR=-1.0,ECOUNT=-1.0,SMPLS=234.0

based on this