https://halestrom.net/darksleep/blog/048_indoorairsensing/ Home | Software | Rules and About | Atom feed[atom] Admin | Edit published: Tuesday 19 July 2022 modified: Friday 23 September 2022 author: Hales markup: textile Many indoor air quality sensor products are a scam (temperature, humidity, pressure, CO2, TVOC) I have not posted for a very long time. Writeups on this site often take dozens of hours. Time for something lower effort! By "product" I mean a final assembled device with comms, not the individual sensor chips themselves. Someone asks for advice on humidity measurements ... on the OpenWRT forums? i am seriously struggling with such "triviality" ie how to measure room temp/ humidity. I used 4 different devices, and all are reporting different values Thankyou lenovomi for asking, I am more than happy to be nerdsniped. I design electronics for a living. Some of them use environmental sensors such as temperature and humidity. I've also evaluated other companies' designs for indoor air quality monitoring. Some of these I won't mention (companies died), others I can't remember because it's been a while ago, but the ones I'm working on at the moment face the same issues (I work in mosquito research now, long story). Short answer Photos of small environmental sensing ICs. They appear as small boxes, some transparent like glass with wires inside, others solid black with a small window Sensing chips are very small, cute and cheap. These ones are only a few mm by a few mm. Specs on these parts are often really nice. These things are not the source of the problem. The industry of indoor air quality monitoring is broken and they don't care because few customers ever realise their products are trash. Congrats for actually comparing measurements from different devices lenovomi, you are doing better than many large business' that roll these things out. All of your devices are lying to you unless they come with documentation that specifies their error (accuracy & reliability), expected product lifetime (aging) and how to use them properly (validity). If they don't come with this very basic info then treat them as a scam. It is hilariously easy to inadvertently design a device that measures temperature with an error of 5degC, humidity error of 50% and pressure error of equivalent to 1km in altitude. To make a wifi-connected device better than this requires quite a lot of thought. Few designers realise this. After all, measuring indoor air temperature sounds simple and we have cheap glass thermometers that do it. The size of the brand name on the product matters ziltch. Even if you have brand loyalty: most environment sensors products are badge engineered, designed by outside houses or as intern or junior projects because they are less complex and important than a brand's bigger products like routers or phones. If the product has connectivity (eg wifi or bluetooth) but does not have an arrow on it saying "mount it this way up" then it's almost guaranteed to be garbage (see long answer). Long answer Photo of several environmental sensor ICs on a home-made circuit board. I put together this home-etched PCB to quickly evaluate some sensing chips. I wanted to find out which are pains in the arse to communicate with. Some of them are primadonnas that trample over the I2C communications of other chips if you don't have lots of error handling code >:( It's very easy to make a device that measures temp/humidity/pressure by taking an off the shelf sensor component (eg BME280, 2SMPB-02E, ENS210, APDS-930x) and throwing it onto a PCB with a microcontroller or chipset that has wifi. It "works": it measures things and gives you numbers. Measuring temperature should be simple, after all? These individual sensor chips are really cheap, very abundant and are often really nice parts. Their manufacturers guarantee them to specific % and absolute accuracy in their datasheets, often much better than what you need (with some fun exceptions I'll describe later). They even tell you their limitations and how to use them properly in your products. I have seldom seen these chips used correctly. For a temperature measurement to be a valid measurement of your room's air: you need to keep it far away from any other power-using electronics on your board. Even the smallest amount of heating (eg 0.5W) from a main micro + wifi chipset will change the temp of the nearby sensor. This error might be a few degrees C when there is no airflow in your room and less than 0.1degC if you force airflow through the sensor casing using a computer fan. Even gentle breezes vary the error arbitrarily, so you can't just calibrate it out. Once the temperature of the air has been modified: the humidity changes too. By "humidity" I mean relative humidity which is measured as a percentage, it's the most common units (but technically even absolute humidity can change too). Percentage humidity is referenced to the max water capacity of air at its current temperature. Changing the temperature of air by a few degrees changes how much water can be stored in it, so your % humidity will read incorrectly. Pressure sensors need to know their own temperature to compensate internal readings and provide the correct answers. Datasheets for each part explain how to do this, often an equation is provided and you have to perform the correction calculation yourself in the micro. It's easy for this to be done incorrectly in a number of ways, eg using a temperature measured from a different part on your board for the correction calculation, or using round-down integer arithmetic and simply never noticing (because the result are still valid-looking pressure measurements, at least as far as you know). To "correctly" use a temp/press/humid chip you need to (at a minimum): * put it FAR away from the rest of the chips on your board * NOT put it above other chips on your board (convection in still air makes the heat rise) * Label the product with an arrow that says "mount it this way up otherwise the readings will be wrong" OR force air through it with a constantly on fan. * NOT have any copper fill near this chip (conducts heat through the board very effectively even over long distances). * put lots of ventilation holes in your case on opposite sides (to allow cross-flow) or exposure the sensing chips + PCB directly to the outside world. OR * skip using a wifi/radio/etc chipset and instead make the device using super low power chips that sip milli-watts or micro-watts of power, like they do in digital thermometers with LCD screens that run off button cell batteries. All of this is for ziltch if you then don't test and verify your device's behaviour against other measurement devices. A cheap, digital uncalibrated house thermometer is very useful as a first test step, your sensor should track it within a few degrees at all times and airflow levels. Try that before moving onto anything more expensive or complicated. Entertaining sidenotes on sensing chips You really have to read the datasheets carefully before using a part in your design. Multi-sensors mislead Pressure sensors often include temperature sensors too, but this temperature reading is not intended to measure room temperature. It's intended to measure the temperature of the pressure sensor itself (some of them self-heat notably) so you can use this reading in a correction equation (specified in the part's datasheet). Real, dedicated room temperature sensor chips only sip milliwatts of power (at worst) so they don't notably self-heat. Even cheap and common ones will give you much better than +/-0.5degC of accuracy and reliability over the long term. LOL they sometimes straight up lie too I once saw a sensor chip that claimed to measure both CO2 and TVOC (total volatile organic compounds). After finding some further documents on the part I discovered it was a total scam. It only actually measured one of those things, then it used this measurement to look up an expected value of the other in a table the manufacturer made based off "common indoor measurements". You could do this yourself in software, but you wouldn't, because it's completely garbage. CO2 and TVOC are only correlated when the only source of both in your room are averaged breathing humans. Once you factor in the TVOC outgassing of building materials (like paints and carpets) or variability in humans due to different behaviours (office work, gyms, etc) then all bets on this relationship are off. Chips disappear and require you to redesign Bosch Sensortech makes lots of nice sensing chips. Sadly they shut down and went brick quiet over COVID. Lots of electronics designers were angry They didn't reply to any requests for parts for something like a year, then started slowly fulfilling earlier orders. Retailers couldn't get them to reply either so Bosch parts were out of stock everywhere for a very long time. Apparently some (digikey?) slapped the label "NO ETA, FACTORY UNRESPONSIVE" on their parts pages. How do you even trust things you can't verify? I wanted to evaluate the claimed performance numbers of some TVOC chips once, as they claimed they could read into the parts per billion (ppb) in air. I asked some chemists for advice. Their answer: it's going to be almost impossibly difficult. Even setting up a controlled chamber and introducing a measured amount of a known TVOC won't work. A large proportion of it will stick to the walls of the chamber rather than stay in the air. Oh and the best bit: the TVOC measuring devices are not that great at discriminating between different TVOC chemicals. They try their best, but that ppb is probably the best case scenario where only one (known) TVOC is in the air or some averaged quantity. I never worked out if this was a validity issue or not, we gave up. --------------------------------------------------------------------- Daniel - Friday 30 September 2022 Thanks for your post! I once ordered a CO2 sensor off Amazon and it looked decent and showed a bunch of values and acted to my breathe when I tested it, but what do I know Are there any of the shelf products out there you can recommend to measure CO2 that doesn't cost an arm and a leg? :) Edward - Friday 30 September 2022 >I once saw a sensor chip that claimed to measure both CO2 and TVOC (total volatile organic compounds). After finding some further documents on the part I discovered it was a total scam. It only actually measured one of those things, then it used this measurement to look up an expected value of the other in a table the manufacturer made based off "common indoor measurements". Ha, I think I designed that exact part into a hobby project board, and had it all soldered up before I realized. (Always read the datasheet!) Very eye-opening on how difficult it actually is to calibrate and get absolute measurements out of MOS heater based sensors. I will say that many cheap particulate counter sensors for PM2.5/PM10/etc. seem reasonably accurate for home/DIY use. Even the ones that are less accurate for certain particle sizes can be calibrated against a more accurate measurement. I remember seeing a whitepaper that got reasonable success correlating the measurements. Christian Genco - website - Friday 30 September 2022 Ok but then how should I be measuring my indoor air quality? Do I need to design one of these things from scratch or is there not a single well-designed air quality monitor on the market? --------------------------------------------------------------------- Add your own comment: Name: [ ] Email (optional): [ ] URL (optional): [ ] Enter the word 'irrlicht' (antispam): [ ] Leave this box blank (antispam): [ ] Comment (plaintext only): [ ] [Post Comment] If you provide an email address: it will only be used for the site admin to contact you, it will not be made public. If you provide a URL: your name will hyperlink to it. \ : o / o- - o - --o /^^^\ . / ' \ \ / \/ /'\\ o / \ . / '\\ _ ~ ~ ~~~ ~~~ ~ ~~~ ~~~