Home | Software | Rules and About | Atom feed
Admin | Edit
published: Tuesday 19 July 2022
modified: Friday 30 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

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

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):

OR

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.

EDIT: CO2 sensors that autocalibrate based off bad assumptions

Thankyou sbierwagon for writing about this , I had completely forgotten about this one.

Some CO2 chips have OK relative readings, but poor absolute accuracy. They try and fix this offset by assuming that at least once per day they will be in contact with perfectly fresh air (~390ppm CO2) and that this will be the minimum reading they see each day.

In other words: they don’t work properly if used in a modern sealed and air-conditioned office.

(That’s assuming their autocalibration process even half works in the first place. I have little faith it won’t create spurious days of crazy readings occasionally, requiring you to detect & filter our such results yourself. These sensor chips will not have enough internal storage to remember a whole day’s worth of readings, so they’ll take shortcuts to work out when a local minima is good enough to pounce on.)

You can turn this feature off, but that’s only if you know about it because you read the datasheets (and are not buying someone’s off-the-shelf complete sensor and communications product). Really you would be better off doing this feature in post processing after collection, that way you can reverse it if you realise it’s invalid.

Discussions elsewhere on the internet

Chris Sibermann has been looking at new temperature sensors for his server rooms & closets:
https://utcc.utoronto.ca/~cks/space/blog/sysadmin/MachineRoomTempMonitoring
https://utcc.utoronto.ca/~cks/space/blog/tech/USBTemper2ReadingsNotes

Lots of comments on this article with different views on the orange site:
https://news.ycombinator.com/item?id=33025995

Twitter discussions:
https://nitter.fdn.fr/thecat/status/1575630753508954112 (Google translated )
(This isn’t a problem specific to greymarket electronics from Alix/Taobao/eBay, but I’m not surprised the issue exists there too. CO2 sensor parts alone cost $50 and 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?

RA - Friday 30 September 2022

What's the consumer product gold standard?

Hales - (site author) - Friday 30 September 2022

Hello Daniel, Edward, Christian Genco and Ra,

> Are there any of the shelf products out there you can recommend to measure CO2 that doesn’t cost an arm and a leg? :)

> 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?

> What's the consumer product gold standard?

I'm not going to endorse any company's products.

Players in this industry constantly move in and out. Products change parts internally depending on what's available (chip shortages). Even if I had the time and money to buy a bunch of consumer level products and review them: most of my reviews would be worth dirt a month after publishing when either the items go out of stock or get their insides silently changed.

If you need accuracy or validity then yes I recommend building it yourself from scratch. It's the only way that doesn't involve trusting companies that have little incentive (negative feedback loops) to be completely honest with you about their product limitations. You still have to trust the individual component suppliers, but they're in an industry where detailed datasheets (with promises & errata) are the norm and there are stronger cultural negative feedback loops against dodgy vendors. Not perfect, but magnitudes better.

If you're a beginner: don't be afraid to try buying some and testing them with an Arduino. Some are simple to talk to, others are stupidly complicated (but they're all mostly cheap so just buy a few and find out by trying them). A harder hurdle for the unprepared will be SMD soldering. You will need a breakout board (you might have to order a small custom PCB that turns the SMD pins into bigger 2.54 pins you can plug yours wires onto). Checkout https://www.sparkfun.com/tutorials/59 for tips, hotplate reflowing is by far the easiest method in my experience.

Proper CO2 sensors (that don't guess based off TVOC) cost at least $50 or so and are bulky looking things.

Temp, pressure, humidity and TVOC are all relatively cheap individual sensor chips (a few dollars each) and tend to be only a few mm big.


> I will say that many cheap particulate counter sensors for PM2.5/PM10/etc. seem reasonably accurate for home/DIY use.

I'll have to buy some PM sensors, I don't think I've tested those much yet. Those were out of scope for my previous work.

Diego - Friday 30 September 2022

This article is eye opening. I also struggle to actually know the actual temperature on my own bedroom. Sometimes, when I saw 24 (centigrade), I feel slightly hot, but on the other times, I shivers from cold, especially on the feet, even though the relative humidity level is very similar (although the reading also came from the same unit). I don't even know which device I can't trust, my Air Conditioning, the temperature and humidity sensor, or both. I would be very eager to build my own device at this point, but I have minimal knowledge on electronics as a whole. I did learn some basics of soldering, reading specifications of diode and other basic components, but that's about it. I never touched Arduino and basically zero knowledge on sensors. Do you have any recommendation to learn the required information I need to build my own sensor? Also, if possible, if you can provide some names for off-the-shelf sensor components you mentioned on your replies above will be very appreciated.

Hales - (site author) - Friday 30 September 2022

Hello Diego,

You will not find one magic temperature or RH level that will make you comfortable in all conditions. Human homeostatic desires change constantly depending on a million factors that vary throughout every day. When you feel cold or hot you then intentionally make decisions to try and rectify this, this is "negative feedback" and it means you are working as designed. If you never feel hot or cold then something is seriously wrong with your health.


> I don't even know which device I can't trust, my Air Conditioning, the temperature and humidity sensor, or both.

"Trust" is a contract, your desired need to match what the devices can do.

The first important question is validity: what are you actually trying to measure? Room temperature? There is no such thing, different parts of your room have different temperatures.

A single digital thermometer somewhere easy to see if often enough for most people, perhaps one per room if you notice big differences, but I suspect you won't have need to do much more than that if it's just for personal comfort understanding.

Air con thermometers are often positioned in specific spots related to the aircon air flow (eg away from it). If you're sitting in the airflow then it's not a useful measure. Thermometers near where you actually sit or sleep are probably more valid.


The second important questions are accuracy and reliability. Don't even bother chasing these until you sort out the above (validity).

In my experience: small, battery-powered digital thermometers are often reasonably accurate and reliable (+-1degC or so). This is the type where the batteries last months or longer (ie they're low power so they don't notable self-heat). Their humidity measurements however can often be garbage, one will say 60% and the other will say 80%.


> I never touched Arduino and basically zero knowledge on sensors. Do you have any recommendation to learn the required information I need to build my own sensor? Also, if possible, if you can provide some names for off-the-shelf sensor components you mentioned on your replies above will be very appreciated.

There are sites with guides and products targeted specifically to beginners. Try sparkfun.com and adafruit.com for starters, there are lots of others too.

The only sensor part name I know off by heart is the DS18B20, but be wary it's cloned a lot so don't buy it from greymarkets (Alix/eBay/Taobao/etc). Normally I find parts by category on sites like Digikey and LCSC, then read datasheets until I find something I like. Parts go out of stock all of the time and there are many subvariants of each model too, so there is not much point in me writing an arbitrary list of part numbers here, buy what you can get and get working.

Nate - Saturday 1 October 2022

The TVOC sensor inferring CO2 levels is a problem. You want an NDIR sensor. Those are usually expensive, but some cheap CO2 meters do indeed have NDIR sensors recently.

You can tell if it's a TVOC sensor by putting it next to some rubbing alcohol or similar substance. CO2 shouldn't go up. If it does, don't use that for CO2 monitoring. However, the only way to be sure the sensor is accurate is to test it alongside a known good CO2 meter like the Aranet.

I later did test the meter found here and it mostly corresponds with the Aranet.
https://twitter.com/rootlabs/status/1542977836079730688

kuro68k - Monday 3 October 2022

I guess the question is if these measurements are at all useful. I'd say that despite their issues they are, as long as you are aware of those limits.

For example with CO2 sensors, even if the absolute value isn't vey accurate, the shape of the curve is useful. When there is a lot of CO2 you will notice it yourself, but that's usually only the peak. If you have the sensor controlling HVAC it can be enough to prevent the concentration getting to the level that it affects you. You can also ignore the absolute value and just look at the rate of change, and act when you see a slow and sustained increase.

I use some BME280s, kept well away from sources of heat although the whole thing is battery powered with a segment LCD I got off AliExpress, so very low power. Having sub 1C accuracy has been quite an eye opener. Another trick I found is to have two sensors next to each other, facing in opposite directions. One gets the breeze, one is shielded from it. When the difference is large enough you can feel a breeze, or a chill. With a couple of them placed carefully around the room you can detect when lack of circulation is causing uncomfortable uneven heat build up.


Add your own comment:

Name:
Email (optional):
URL (optional):
Enter the word 'irrlicht' (antispam):
Leave this box blank (antispam):

Comment (plaintext only):

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.