>>> Join Us in the Fight Against Air Pollution

AirGradient Forum

Indoor CO2 Sawtooth Pattern

We have two AirGradient air quality sensors - one indoor unit (AirGradient One) and one outdoor unit (AirGradient Open Air). Both have been running for a few months now.

The indoor unit is installed in a building that’s currently under construction. It is ~400 square feet (35m^2) and very close to air-tight. We can easily see CO2 spikes when the building is occupied, and the levels gradually drop back to ambient outdoors once the building is vacated again.

However, I have noticed a strange behavior when the building has been vacant for a period of time. The CO2 levels drop to around 400ppm and then show a sawtooth pattern - dropping to around 380ppm and then spiking back up to around 400pm before slowly dropping down again.

See the image below, which also includes a gray line from our outdoor unit. Please ignore the brief data blips in the middle of the chart - we had some connectivity issues yesterday.

Any ideas why we are seeing this behavior, and what we can do to eliminate it? In terms of calibration, the building is largely unoccupied so does converge to outdoor ambient CO2 levels at least once per week.

Do you have HVAC set to run automatically? I’ve seen spikes of CO2 when the blower fan turns on and circulates the air around the house. It could cause spikes or dips, depending on the situation of the building and room that the sensor is in. If it is naturally exchanging air with the outside, then the blower fan turns on and start circulating air from room that aren’t as naturally ventilated, it could cause an increase.

No, there’s no ventilation or other HVAC equipment yet installed in the building. It’s just an empty, almost perfectly sealed box. The air exchange with outside is very slow - it takes a couple of days for CO2 to drop back to ambient after we’ve been inside and it has raised up to >1,000ppm.

The only equipment presently in the building is a small server rack using ~100W and a small upright freezer that consumes ~300Wh per day. I have power monitoring on the freezer and the sawtooth pattern of the CO2 does not correspond to the cycling of the freezer compressor either.

To me it feels like the CO2 sensor is somehow correcting itself when it drops down to 380ppm, but it’s unclear why. It only does the sawtooth pattern when the value is ~400ppm. We were in the building for about 45 minutes this evening so I’ll share the graph tomorrow showing the spike to ~720ppm and subsequent slow recovery.

Here’s a chart showing the CO2 levels yesterday.

You an see where we were in the building from around 4:30pm until 5:15pm, and briefly again at around 8:30pm. Assuming the building remains vacant today, the CO2 levels will gradually drop, as expected. However once they eventually reach ~400ppm, the sawtooth pattern will start again.

What is your setting for the automatic baseline calibration? Can you try and switch it off and see if that makes a difference?

It was turned on. I’ve just turned it off so once the CO2 levels get down to ~400ppm (probably tomorrow), I’ll check on if to see how it’s doing. Thanks for the suggestion!

1 Like

@matt I am curious, did this pattern disappear now?

@Achim_AirGradient I haven’t forgotten!

However, we’ve had to go into the building a couple of times, and even a brief (~1 minute) visit raises the CO2 levels enough that it hasn’t made it back down to ~400ppm yet. Unfortunately we’re going to be in and out over the next few days working, so I doubt it’ll get back down to ambient until next week.

This is the last couple of days for reference.

However, I’ve been thinking about it some more, and I think this will probably “fix” the issue. My guess is that because the natural airflow in the building without the HRV installed is so low (~150ppm CO2 decay per 24 hours), it probably doesn’t reliably see ambient outside CO2 levels once per week. Therefore my guess it had calibrated to an artificially high baseline at some point after installation, and is “correcting” itself when it gets to ~380ppm by jumping back up to 400ppm. I’m not sure whether this is something that the ESPHome firmware is in control of, or rather it’s something in the CO2 sensor itself.

However, I’ve been thinking through what the desired behavior would be in an ideal state. I think that if there were a way to detect that the new baseline has deviated significantly from the previous baseline, it shouldn’t run a new calibration. My hypothesis is that the deviation over time is relative minor so don’t run an automatic baseline calibration until the level is, for example, <500ppm. I don’t know if that would have unintended consequences.

Short term, I’ll keep monitoring and assuming that this does fix my issue, I’ll keep the automatic calibration disabled for now. Once we have the HRV installed, not only do we expect to significantly reduce the amplitude of the CO2 spikes, but we’ll also have active air exchange so the CO2 decay will be faster.

Bottom line, if my assumptions and hypothesis above hold true, the system is working as designed, but I’ve stumbled into an edge case where the ABC shouldn’t be used.

This calibration is a sensor thing. The only options firmware has is to manually start the calibration process, to enable/or disable automatic such process and set the interval. It always calibrates to 400ppm background. It looks like there is also a way to (manually) calibrate the 0ppm point.

You are running the ESPHome firmware and not the stock AirGradient firmware? Or is this a mistype?

@MallocArray I am using the ESPHome firmware, yes. Thank you for your hard work on it!

Apologies for the delay in an update. The CO2 levels in the building change so slowly, that it’s taken a little while to see if disabling the Automatic Baseline Calibration has taken effect.

The good news is that in the last 48 hours, it has dropped to around 370ppm and has been hovering around that level. I then manually triggered the calibration through Home Assistant and, as expected, the level jumped to 400ppm. That was a couple of hours ago and it seems to be hovering around that level.

So in summary, I think the sawtooth pattern was because at some point the ABC had triggered at a level somewhat higher than 400ppm. Consequently, as the levels dropped over time, the ABC would kick in each time levels dropped to around ~380ppm, resetting it to 400ppm, and creating the sawtooth pattern I was seeing.

In the short term, disabling the ABC has “fixed” this issue. Longer term, when the building is finished and the ventilation system is operational, the CO2 levels should recover much more quickly and I should be able to re-enable ABC.

@MallocArray I understand that the sensor itself always calibrates to 400ppm, but it would be interesting if the ESPHome firmware could apply an offset - perhaps based on global averages or an outdoor sensor.

This is actually already supported:
airgradient_esphome/packages.md at main · MallocArray/airgradient_esphome

You can add a line under substitutions to add or remove a static value from your CO2 values, but the global value changes constantly so there isn’t really a fixed number, only an average, so I personally find this to be of limited value
co2_offset: '0'