AirGradient: DIY Air Quality Monitoring with Open-Source Hardware & Firmware
airgradient.com
airgradient.com
As last time I am more than happy to send free PCBs to anybody who wants to build this sensor. It makes the build much easier as you don't have a lot of cables to handle. You just need to paypal me the postage fees.
If you like to get some, please press the orange button on the website and send me a message.
The guide is much appreciated!
AirGradient originally developed out of our desire to help our school to manage the air quality during this time of the year more effectively and to ensure that our kids breathe healthy air inside the classroom.
Most of the benefits come from our cloud platform that analyses the air quality data sent from the sensors and provides real time alerts and communication to the relevant staff (e.g. PE teachers when air quality gets worse).
It has also some unique features like integration of the school air quality policy. More information is on our website [1].
This service comes with our professional air quality monitor which has additional hardware components to achieve a very high degree of reliability.
We provide the open source version due to a desire to empower as many people as possible to measure the air quality in their environment and thus reduce their health risks due to bad air.
It also helps us to get customers onto our air monitoring platform in countries where our sensor is not available yet. A day care center in California for example build 12 DIY sensors and connected them to our platform to measure the indoor air quality in its classrooms.
Currently we have a strong focus on schools and if anyone of you has a connection to a school and is interested to learn more about how our platform could help, please get in touch with me.
At this point I've been recommending people buy PurpleAir monitors for grassroots air quality monitoring, but this looks like a really great DIY option.
I'm particularly excited about the CO2 sensor, since until this point I've been focused mostly on PM2.5 and PM10 particles, but am really keen to figure out if my stuffy apartment bedroom (and baby's room) is reaching too high CO2 levels at night (with corresponding headaches and impact on cognitive performance).
We measures this in classrooms [1] and I also wrote about the benefits of positive pressure systems to have near zero PM2.5 and low CO2 at the same time [2] even on heavily polluted days.
[1] https://www.airgradient.com/resources/we-measured-the-co2-le...
[2] https://www.airgradient.com/resources/positive-pressure-syst...
They will always give a useful 'relative change' indication but how does the SenseAir and the Plantower sensors compare with more expensive measurement equipment?
Disclaimer: I also run an environment data platform business
Would love a full package sensor like this for our own house (I have three purifiers..) so I'll get in touch once I've learned soldering, which requires acquiring the necessary tools.
I.e. is it feasible to make something battery powered and connected to an indoor base station or gateway via some low power radio link (bluetooth low-energy? z-wave?). Would these same sensors work outdoors or quickly fail due to harsh environment?
How complex would it be to make a housing that is sufficiently weather proof yet coupled to the environment to read ambient environmental conditions? I can imagine sun exposure, wind, high dust loads, rain, and condensing humidity all being very challenging for a DIY device to stick out in a yard or balcony.
* Uses an ESP32 + ESPHome + PMSA003 + BME680.
* Data collection is via MQTT -> HomeAssistant -> InfluxDB -> Grafana.
* Software and PCB design files are on Github[1].
Looks like adding the SenseAir CO2 module would be trivial with ESPHome[2]
[0] https://blog.kylemanna.com/hardware/sniffer-air-quality-moni...
Unfortunately prices are on the move now (presume the chip shortage) and they now cost 2x what they were a few weeks ago.
How was your experience with the PMSA003? We used it before but believe that the PMS5003 has more stable readings and a longer life time.
I've had one running 24/7 for 9 months now with no issues. I checked the accuracy outdoors relative to PurpleAir sensors in the area and they were with a percent or two which was pretty close for such a simple experiment.
Code is also on GitHub.
https://blog.jean-francois.im/2021/05/08/building-a-simple-a...
I have lots of little noises for various things that trigger via Home Assistant. Like when outdoor air quality spikes, I get one noise (usually neighbor having a cigar, leaf blower nearby, someone with a wood stove, etc.) If indoor air quality spikes I get another one (dry shampoo, burned pancakes, etc really set it off).
During fire seasons, balancing CO2 with PM2.5 is hard. Best move after many days was to put the box fan with filter in the window to blow filtered air in. I figure it's basically a mini version of those huge HVAC intake fans on skyscrapers.
Home assistant talks to the stations over MQTT over local wifi, no cloud, remote access over vpn when needed. Lots of fun! Happy to see fancier and better put together packages like this out there to spread the joy of ambient air quality monitoring.
https://partofthething.com/thoughts/weather-and-air-quality-...
[1] https://sensor.community/en/ [2] https://sensor.community/en/sensors/airrohr/
[1] https://nettigo.eu/products/sensor-community-kit-sds011-bme2... [2] https://api-rrd.madavi.de/grafana/d/q87EBfWGk/temperature-hu...
Real-time gas measurements are quite routine and mandatory in industry [4]. Wider spread of analytical chemistry technology to consumers will lead to a better world - pregnancy tests, insulin meters, breathalyzers are just the beginning :)
1. Z. Yang, T. Albrow-Owen, W. Cai, T. Hasan, Miniaturization of optical spectrometers. Science. 371 (2021), doi:10.1126/science.abe0722.
2. M. Erfan, Y. M. Sabry, M. Sakr, B. Mortada, M. Medhat, D. Khalil, On-Chip Micro–Electro–Mechanical System Fourier Transform Infrared (MEMS FT-IR) Spectrometer-Based Gas Sensing. Appl. Spectrosc. 70, 897–904 (2016).
3. A. Fathy, Y. M. Sabry, S. Nazeer, T. Bourouina, D. A. Khalil, On-chip parallel Fourier transform spectrometer for broadband selective infrared spectral sensing. Microsystems & Nanoengineering. 6, 10 (2020).
4. Eg. https://www.gasmet.com/
A VOC/CO2 equivalent sensor is measuring VOCs and using them as a proxy to estimate CO2 concentration levels. CO2 is of course fairly non-reactive so it'd difficult (read: expensive) to make a chemical sensor for this. VOCs are more reactive and easier to make a sensor for.
Basically, you're getting a sensor for VOCs that, based on some assumptions about outdoor or indoor air quality, is then being used to estimate CO2 levels.
This is fine if all you want is a loose estimate, but if you have reason to think your VOC/CO2 ratios are going to be different than "usual" (e.g. a CO2 storage facility, next to a poorly maintained combustion system) or where CO2 detection is of paramount importance (e.g. life-or-death situations), then a VOC detector is not acceptable.
EDIT: tried to improve the VOC examples
Is using H2 to detect CO2 "good enough" for all non life-or-death situations?
Edit: And to clarify, I was mainly asking the parent comment as to what is their application that demand NDIR or "more direct" CO2 sensors.
[1] https://www.sensirion.com/fileadmin/user_upload/customers/se... [2] https://rmtplusstoragesenseair.blob.core.windows.net/docs/pu...
For example, the two sensors I have right now, with the windows open, the S8s report 478 and 455 ppm of CO2, while the SGP30s report 400 and 405 respectively. Without having calibrated instruments it's hard to know if any of these values are good, but they seem at least not too wildly off.
The SGP30 is a lot more compact and much less of an energy pig than the S8; the S8 will actually take so much current on the 5V rail that it'll cause the voltage to sag if you're powering it through USB with other devices connected (https://blog.jean-francois.im/2021/05/08/building-a-simple-a...). It's also a lot cheaper.
However, the SGP30 approximation can be off by a bit, and the calculation of the humidity value to give the sensor is a bit gnarly (https://github.com/jfim/air-quality-monitor-firmware/blob/ma...). It's also pretty obvious that the SGP30 has a hardcoded floor of 400 ppm CO2eq and that it won't ever return a value lower than that.
Electrochemical sensors respond to CO2 and other VOC gases and give you an "eCO2" reading, and you can never be really sure if it measured CO2 or something else, and require frequent calibration. They suck.
NDIR CO2 sensors work by emitting IR light and measuring the CO2 by its IR absorption band, and are much more accurate at singling out only CO2 among other gases.
Only need to keep in mind that the baseline calibration sometimes needs 1-2 weeks to kick in but you can also force a manual calibration.
In general NDIR CO2 sensors are quite reliable but you should stay away from TVOC sensors that give an eCO2 (estimated CO2) value. These are often very off and I would not recommend to use TVOC sensors for CO2 measurement.
It can be disabled via a command IIRC.
This automatic calibration just ensures that the sensor is in the right ballpark, but if a 10-20 ppm absolute difference in CO2 concentration is important for your application, you'll need a better sensor and/or calibration procedure than the automatic background calibration.
Realistically, for home applications, it'll be more like CO2 < 500 ppm, things are good, above 700, might be time to consider opening the windows, above 1000, definitely time to open the windows. For that kind of application, being off by 10-20 ppm doesn't really matter too much.
On a side note, it is pretty disheartening to think that the 400 ppm CO2 background level was accurate a few years ago when the sensors were designed, and that in the span of a few years that background reference is now off.
Thanks!
https://dheera.net/projects/airmonitor/
Only problem is I found the PMSA003I always reports PM2.5 = 0 when actual values are anywhere below 100ish. It only begins to detect after that.
Edit: Site finally loaded (HN HoD), is this actually a decentralized monitoring program? From reading, it kinda sounds like it's just for your own monitoring rather than aggregating the data to give a broader picture across the globe.
Monitoring household/office/school indoor air quality seems to be a relatively new trend, but the impact of indoor air quality is actually quite strong so it makes sense.
We have a professional sensor but also the open source/open hardware version that can be connected to our platform.
Alternatively you can send the data to any other platform or use it as an offline monitor. There are many citizen science projects that have open API's that you could send data to.
I've bought a Qingping ClearGrass Air Monitor (CGS1). It costs about $100, but has CO2, tVoc, PM 2.5, PM 1.0, temperature and humidity sensors. From what I've read, sensors are quite good, people only sometimes complaining for bad fans, that need to be fixed after a year or so of use. Everything in one nice USB-C powered case with a sensor screen. A bit too much animation once a minute, that can't be disabled. Data is sent by WiFi.
There is a Qingping App for Android and IOS with some graphs and insight into values, but not much. It also can be integrated with Mi Home, but doesn't work for my region, and I can't get token to talk to it with python-miio, as in this habr example [1]. This example doesn't work too [2], looks like the api has changed.
So after a bit of sniffing I've made a simpler solution:
1. Installed Mosquitto MQTT Broker on my home gateway
2. Made a DNAT redirect of qing.cleargrass.com requests to this broker:
iptables -t nat -A PREROUTING -i br-lan -p tcp -d qing.cleargrass.com --dport 11883 -j DNAT --to-destination 127.0.0.1:11883
3. Added a cron job of periodic subscribing for air monitor data. Without this message it doesn't push the data. The topic consists of some base64 uid and air monitor MAC address, I wrote it in square brackets, should be changed by end user: */5 * * * * /usr/bin/mosquitto_pub -h 127.0.0.1 -p 11883 -t '/[uid]/[mac]/user/get' -m '{"duration":"303","up_itvl":"2","type":"12"}'
4. Configured a mqtt_consumer in telegraf: [[inputs.mqtt_consumer]]
servers = ["tcp://127.0.0.1:11883"]
name_override = "air_monitor"
topics = [
"/+/+/user/update",
]
data_format = "json"
tag_keys = [
"mac",
]
5. Created graphs and alerts in grafana. It was easier for me to create a further automation from there.It is sad that there are still no easy way to connect everything in a "smart" home.
[1] https://habr.com/en/post/482352/#comment_21085236 [2] https://habr.com/ru/post/493220/
Edit: formatting
https://www.sensirion.com/en/environmental-sensors/carbon-di...
Also, Sensirion just announced an all in one pm2.5, temperature, humidity, and voc sensor probably will be released next year
https://www.sensirion.com/en/environmental-sensors/environme...
15 euros on aliexpress.
There's a nice walkthrough here: https://www.hackster.io/taunoerik/using-sds011-dust-sensor-0...
I used one on an arduino to measure the 2020 Bear Creek fire PM / AQI measurements in Paradise CA. PM 2.5 and 10 were pushing 900+.
Inside, with 2 3M Filtrete 2900 filters with the fan on constantly and a BlueAir 680 the AQI was about 5.
I've never soldered a thing in my life, would be willing to learn it to get this sensor package built however. Looks like an awesome project.
I'm in Australia, which would likely make shipping a fair bit harder.