Hacker News new | ask | show | jobs
by CoastalCoder 1441 days ago
I think the elephant in the room is calibration of the CO2 detector.

When I looked into this a few years ago, I couldn't find any accuracy guaranties for CO2 meters marketed for households / greenhouses.

The closest thing I could find were laboratories that could test CO2 meters in chambers with known CO2 concentrations. But IIRC the pricing for those labs was prohibitively expensive.

- There were literally no guaranteed accuracy bounds for the meters I looked at. So they could be off by 3x reality for all I know.

- Their calibration systems relied on an assumed CO2 concentration for outside air. But even if the calibration system ensured that the meter would report the right number for that CO2 concentration, there was no information about how accurate the calibrated meter would be at other CO2 concentrations. Nor information about how the meter's numbers would be off when the CO2 levels observed during calibration differed from the level assumed by the calibration logic.

These limitations might not be a problem for some applications. But they could be an issue when people want to relate their meters' readings to the numbers used in various research publications.

9 comments

The auto-calibration systems on cheaper consumer sensors also cause issues if they rarely see air that has low CO2 levels. Because these sensors can't measure absolute CO2 levels, only relative CO2 levels, they provide an absolute figure by looking for the lowest CO2 concentration they've seen over a period of time, usually around a 72 hour rolling window.

This works acceptably if the sensor is frequently exposed to outdoor air, but in a residential environment that's not always guaranteed, particularly in winter when it's not uncommon to keep windows closed to retain heat. In these situations the sensor will consider the lowest level to be around ~400ppm, even if it's actually much higher. This, of course, scales all other readings, so a sensor might read between 400-800ppm, leading you to believe everything is fine, when the actual indoor range is 800-1600ppm.

Because the auto-calibration happens over a period of time, it can be quite difficult to determine that your sensor is misreading, and the only way to fix it is to expose it to fresh air to reset the baseline.

The best solution I found to this is a dual-NDIR sensor which measures two different light frequencies, one which is absorbed by CO2 and one that isn't. This allows the sensor to know the absolute CO2 concentration, rather than the relative CO2 concentration, and avoids the need for auto-calibration. (I believe for absolute accuracy it still needs calibration for altitude, but for consumer use this makes such a small difference to be irrelevant).

Unfortunately, when I last looked, I couldn't find any consumer-grade sensors which used dual-NDIR sensors, only more expensive and less aesthetic commercial sensors. In the end I built my own using a CDM7160 sensor connected via I2C to a ESP8266, which reports over MQTT.

> Unfortunately, when I last looked, I couldn't find any consumer-grade sensors which used dual-NDIR sensors, only more expensive and less aesthetic commercial sensors. In the end I built my own using a CDM7160 sensor connected via I2C to a ESP8266, which reports over MQTT.

Looks like that's been discontinued. [1] Any advice for folks trying to build one now?

[1] https://www.figarosensor.com/topic/2020/11/Discontinuance-of...

That's a shame, they've worked well for me. Unfortunately I can't recommend any others without doing some research, I found quite a few dual-NDIR sensor modules when I was looking and chose this one primarily based on availability and a reasonable datasheet.

A sibling post[1] mentioned a sensor that is listed as being dual-NDIR so should give reliable readings, and has a USB interface, so that sounds like one possibility.

[1] https://news.ycombinator.com/item?id=32122301

Manual for this unit is at https://cdn.shopify.com/s/files/1/0019/5952/files/Manual-RAD...

I assume 'dual-beam' is the same as dual-channel? Does the calibration technique mentioned in the manual indicate dual channel operation?

Auto calibration can be disabled, popular sensors that can do this are MH-Z19 and MH-Z14 (also cheap ones).
This is true, but I don't think any consumer-grade sensor systems offer this as an option? I guess it might be useful if you're building your own sensor, and can't afford/justify a dual-NDIR sensor.

My understanding is that with single-NDIR sensors (like the MH-Z14 and 19), the auto-calibration is intended to overcome gradual particle buildup and beam degradation in the sensor chamber. While disabling it will prevent the scenario I described, you'll instead end up with gradual sensor shift as the sensor ages. I guess this could be minimised by manually calibrating the sensor outdoors on a regular basis.

Dual-NDIR sensors split a single beam into two chambers, so any degradation of the sensor beam affects both measurements, and the particle buildup in both chambers should also be approximately equal over time, so they should remain accurate over an extended period without any requirement for calibration. I built mine about 4 years ago and I do occasionally check to make sure they read ~400ppm when placed outdoors, last check was around 420ppm which suggests they're behaving reasonably well as they age.

I have a few CO2 meters from very different sources (professional exetech, consumer product, electronics component) and they have always reported levels within 10% of each other.

For my purposes I don’t really care about accuracy under 50ppm, higher precision for trends is useful but as long as the measures value is accurate to within 50ppm I’m just fine for effects on a human. If I was doing research to publish an actual calibrated meter for 10x the price would be warranted but having three separate measurements agree gives me the trust I need.

I use the same CO2 meter as the author has showcased. It's amongst the most accurate ones on the market at the moment (home grade). It uses a The Non-dispersive infrared sensor (NDIR) which is much more accurate than most sensors on devices sold online for $100-200. In fact, it actually measures instead of "estimates" the level of CO2 (as most cheap ones do).
Agreed!! I have also tried many different CO2 meters (all consumer-grade) and Aranet has been consistently the most accurate among the CO2 meters I have used.
How did you determine the accuracy of your CO2 meters?
I measured the CO2 levels in one room using several different CO2 monitors - under similar conditions (steady-state with one person in the room, windows partially open) on different days; Aranet readings were the most stable and consistent, while matching the "expected ppm".

I also tested the monitors by exhaling directly on them, and confirming the change in readings.

Well, if you take it outside, and it says a bit over 400ppm, it’s at least roughly right at that point on its sensor’s curve.
If you don't care about errors of a few percent you should be able to make your own calibration chamber.

You just need an airtight container of a known volume, a source of CO2 and a maybe a fan. Put your CO2 detector inside the box, with fresh air, your CO2 source and the fan, and see if the result matches. You may need to do some calculations.

For your source of CO2, you have a few options: combustion of a known quantity of fuel, soda bottle, dry ice, acid + sodium bicarbonate,... If you want to remove CO2, you can use calcium oxyde (quicklime).

I actually went down this path about 25 years ago, and I learned the hard way that CO2 hides in organic materials in a way that mostly invalidates the calibration.

I had a semi-sophisticated device consisting of a lightweight plastic cylinder that could move up and down when filled with gas, and a way to know the volume with accuracy (single-digit milliliter error out of five liters). I had a tank of pure CO2 and an air intake, coupled with valves that let me fill the cylinder with any desired mixture of CO2 and air. I wrote an automatic program that created a calibration curve in various proportions (100ppm CO2, 200ppm CO2, ..., up to 5000ppm) and collected the sensor value.

The results of this procedure made no sense, because the sensor reading collected during the calibration, e.g. at 1000ppm, was totally different from the sensor reading in response to a 1000ppm concentration created outside the calibration loop. After several days of investigation, it turned out that the problem was that I was using tubes of some carbon-based plastic material. Somehow the CO2 mixes with the plastic and is slowly released afterwards, altering the mixture. Everything worked fine after I replaced the tubes with silicon-based silicone tubes.

This is not easy at all. Your source of CO2 if it is a bottle will have a pressure. Your bicarb should be dry to make sure you weight it properly. If you want to measure ratios of 100 above 100ppm the home made way is decent, but for atmospheric/domestic variations that's not going to cut it. Plus as the other commenter said, CO2 creeps into plastics and leach slowly after so you have to let your system equilibrate which then opens you at the effects of porosity and diffusion.
The Aranet 4 claims it can measure up to 5000 ppm with +-3% accuracy. But you'd have to take their word for it, I guess. For $250 I'm hoping it's not a crap sensor.
The usual convention is that the accuracy refers to full-scale measurements. I.e., your device has an error of +-3%*5000ppm = +-150ppm. At ~400ppm you are about 37% off.

Human exhaust breath contains about 5000ppm CO2, so this device is decent for measuring humans. It's less decent to measure atmospheric CO2.

Edit: looking at the datasheet, the device claims +-30ppm and 3% of reading, which I interpret as "whichever is greater". Thus, the device would be +-30ppm up to 1000ppm, and 3% of the reading above 1000ppm.

I interpret the error as a sum, i.e. at 500 ppm, an error of up to 45 ppm (30+0.03*500).
>pricing for those labs was prohibitively expensive.

It's good to have reference instruments like chromatographs and infrared analyzers, where I could use reference gases to calibrate and verify.

OTOH very low-cost sensors could be ideally suited if well designed with accompanying electronics, but ultimate calibration would require the same expensive laboratory materials for reference.

I own an Awair unit, and as far as I can tell it attempts to calibrate itself based on outside atmosphere having 400 ppm... but that value is constantly going up and is now like 415, so I figure my unit must be at least a few percent off.
I may be misunderstanding, but if you claim outside is 415 and that's that, it's wildly inaccurate.

Where you live, time of day, lay of land, all matters.

Winter (no trees or vegetation with photosynthesis), and there is naturally more local CO2.

Live deep in the country, in a forest, in the summer, when trees have loads of water and are at max output? Less CO2.

At night, more CO2, for all those trees, that greenery, is breathing and exhaling CO2, with no sun for photosynthesis.

It's variable, not static.

Just how "wildly" inaccurate are we talking about? What should the outside CO2 readings actually look like under those conditions?
As an example, close to a busy road, you may as well double the number in parent. Calibration by outside air is strange.
Close to a busy road, sure.
If I understand correctly, they’re calibrated at the factory, which is probably in China, which might have vastly differing CO2 levels depending on whether the winds blowing up or downstream of any heavy industry or metropolitan centre?
You can calibrate the Aranet4 at any time by putting it outside, and it will set that as 420ppm. Obviously the ambient CO2 levels are raising slightly each year, so this is not entirely perfect.

We have tried a number of different CO2 sensors over the years (mainly from Ali Express), and recently purchased 2 Aranet4’s. We were pleasantly surprised that they report identical readings in the same location.

Not an expert, but I looked into this a bit a while back to see if one could reasonably tell emissions via differences in atmospheric CO2 concentration, iirc the conclusion was that CO2 concentrations don’t vary much outside, air mixes pretty well, pretty quickly.

Even seasonal fluctuation is just a few percent.

I don't think this is what is meant by "calibration".