Commuting through the urban sprawl of a 21st century city brings exposure to significant quantities of pollution. For a Medway Makers member that meant the Isle of Dogs, London, and a drive through the Blackwall Tunnel under the Thames. When you can taste the pollution in the air it’s evident that this isn’t the best environment to be in, but just how bad is it? Time to put together an environmental monitoring and recording rig.
Into the build went an ESP32 module, an SPS30 particulate sensor, an MH-Z19 CO₂ sensor, an HTU21D temperature and humidity sensor, and a uBlox NEO 6M GPS module. The eventual plan is to add an SD card for data logging, but in the absence of that it connects to a Raspberry Pi running Grafana over InfluxDB for data analysis. The result provides a surprising insight into the environmental quality of not just a commute but of indoor life. We’re sorry to say that they don’t seem to have posted any of the code involved onto the Medway Makers writeup, though we hope that’s an oversight they’ll rectify by the time this has gone live.
This isn’t the first environmental monitor to grace these pages, indeed we’ve had quite a few as Hackaday Prize entries.
Nice project! $80+ worth of sensors and modules. Would be nice if this was a wearable device, warning you about harmful levels of pollution. I’ve got such a sensor in a (commercial) air cleaning device but that’s hardly portable. During Easter there’s a lot of burning wood piles across the country, the pollution from that makes it hard to breathe. Clean air is becoming a hard to get commodity these days.
Uh Hackaday, don’t tease me please!!
This CO2-sensor looks really interesting, but it’s almost 22€ (about the same in USD iirc)… I searched on the internet and found quite some information like here https://revspace.nl/MHZ19 and probably here https://habr.com/en/post/401363/ (im afraid it’s in russian with i don’t understand). However i also found this https://www.mikrocontroller.net/topic/470382 . It’s in german, but the TL;DR is these sensors are horrible, have a lot of noise, false readings and so on. The manufacturer didn’t respond well altough the guy bought 500 of the sensors. Making a good sensor is hard. They talk about sensors from swedish (iirc) company Senseair, but it’s not the same price. Their sensor costs about 80$ which is quite a lot for a “fun” project. There is an Aliexpress-listing for about 40$ but i don’t trust it.
Does anybody here had the opportunity to check this MHZ19 against a known-good, professional (and expensive) measuring device? How good/bad is it really? What about aging?
I also found a CO2-sensor from Sensirion, the SCD30. It is available for 50€ in germany https://www.soselectronic.de/products/sensirion/scd30-1-101625-10-290529 . Not exactly cheap but not chinese lucky bag… Does anybody used this one? Did not check the docs yet, somewhere i read about a calibration that needs to be done at regular intervals?
Sensors are fascinating stuff…
Hey, at least it’s not a VOC sensor being advertised for CO2. I see a lot of VOC sensors advertised as calculating “equivalent CO2” but that number is complete bullshit.
“There is an Aliexpress-listing for about 40$ but i don’t trust it” – I used S8 sensair from Ali, he works normally.
Do you by chance have a link to the listing or the name of the seller where you bought it?
https://aliexpress.com/item/32878309799.html?spm=a2g0s.9042311.0.0.274233edPAblo2
I bought here, but in November 2018 (Chinese stores deteriorate very quickly).
I made the calibration once, and more then 6 month he works without calibrate, the data looks like true till now. Peoples talks that S8 very sensitive to static electricity while mounting and soldering.
Thank you!
Th price is intersting, but I’m afraid it looks like they don’t ship to Europe… (The website show 46$ shipping with EMS and when i click to modify the method they tell me they don’t ship to my country at all…)
Thank your for the warning about ESD.
I bought a MH-Z14A from bang good and never used. The datasheet is sketchy but you are supposed to calibrate it for one hour every day in 400ppm CO2. Or maybe it self calibrates and automatically resets to 400ppm at that moment? no idea…
It turns out that a lot of gas sensors have the same deal: they drift a lot over time and need to either be calibrated or flat out replaced often.
Here deep diving in to MH-Z19 and about mistakes in the datasheet too. May be help in case MH-Z14A (autotranslated)
https://translate.google.ru/translate?hl=ru&tab=rT&authuser=0&sl=ru&tl=en&u=https%3A%2F%2Fmysku.ru%2Fblog%2Faliexpress%2F59397.html
Thanks a lot! This is a good reason to be determined to spend more money and buy the Sensirion one people were mentioning.
I like the way google translates the beginning of the article: “In order to finally decide the outcome of the age-old feud in the office between “those to whom it blows” and “those who are stuffy” decided to splurge on the budget CO2 sensor in atmospheric air”
Well, nothing to unexpected for cheap chinese stuff. If i understand correctly the thing works, there are just some quirks about the range. Is this true? I’m still not sure if i should buy this one or a more expensive device.
I bought Sensair once read this article…
I have a MH-Z19b with ESP-easy (https://www.letscontrolit.com/wiki/index.php/ESPEasy), and I disabling the ‘ AutoBaseCalibration(ABC) ‘locks’ the ppm. To calibrate, have ABC on in a well ventilated area without the sun(=IR lightsource) on it for some hours.
if it helps, automotive gas analysers use replaceable sensors and they measure CO, CO2, 02, NOx and HC . im sure these could be a source of reasonably priced and accurate test elements.
But is it not so that automotive gas sensors only function at high temperatures? If one looks up “oxygen sensor”, the only thing that comes up is an automotive type that seems to be intended for use in the combustion stream. And when one finally does find a normal, 5v, room temperature type, it costs the moon.
there are two types of lambda sensors, the old binary sensor which only “toggles” between 0,1volts and 0,9V with some hysteresis for a specific amount of oxygen (that’s why they are called binary, they just indicates if the mixutre is either lean or rich in oxygen) and the newer wideband sensors which gives a more reliable analog readings, although are a bit more tricky to interface since they operate as a current source instead of a voltage source. There are specific ICs meant to control those wideband sensors but there is not much documentation aviable since it’s usually bosch propietary technology and not much is out there. They have a built-in resistive heater that the engine control unit turns on when the engine is cold and after a while it just PID’s the heater when the exhaust gases are hot enough. I might be wrong but the wideband ones don’t require such a high temp to operate although they are designed to be pluged into the exhaust pipe so…