Close

SCD41 support, and a zoo of sensors that refuses to agree

A project log for SensorStation3

Open-source ESP32 CYD environmental station: T/H/pressure/CO2eq on a touchscreen, MQTT (HA autodiscovery, ThingsBoard, Domoticz), OTA

viacheslavViacheslav 08/03/2026 at 19:280 Comments

I finally got my hands on an SCD41, added driver support for it, and landed a few other improvements along the way. The sensor arrived together with a couple more CYD boards, so the fleet is now five stations: one BME680 (with BSEC), two BME280, and two SCD41.

That's when the party started.

The setup

Units running the same sensor agree with each other closely, so there was no point comparing all five. I narrowed it down to three devices, one per sensor type, all sitting in the same spot with the sensing elements inside a 3 cm radius of each other. Same air, same room, same moment.

The SCD41 runs in periodic measurement mode (one reading every 5 s).

The numbers

DeviceTemperatureDelta
SCD4126.4 °C−1.0
BME28027.4 °C0.0 (arbitrary zero)
BME68028.2 °C+0.8

Almost 2 °C spread. The zero point is arbitrary — I picked the BME280 purely so the numbers are easy to read in both directions, not because I think it's correct.

Humidity is worse, and CO2 from the BME680 and the SCD41 might as well be measuring different rooms.

What is not the problem

Two BME280s and two SCD41s both stay inside their datasheet specs relative to their twins: ±0.3 °C, ±5 % RH, and ±50 ppm for the SCD41. Pressure across all the BME parts differs by no more than 1 hPa. If everything were that well-behaved, I would not be writing this.

So the disagreement is between sensor types, not between boards.

Then it got more interesting

I hooked all of them up to a server running Domoticz, Home Assistant and ThingsBoard to collect proper telemetry, and left them alone for a day.

The next evening I sat down to work out how to reconcile them and pick a reference. And the floor fell out again: the difference between sensors is not constant. It drifts, over a fairly wide range, and the largest divergences line up with the moments when the room temperature is changing fastest.

A constant offset is easy — you calibrate it out once and forget about it. A drifting one means something in the system is modulating the readings, and I don't yet know what.

Working hypotheses

No conclusions yet, only suspects:

None of these obviously explains a drifting offset in a room that is otherwise thermally boring, which is the part that bothers me most.

About humidity

Relative humidity is a function of temperature, so with the units reporting temperatures up to 2 °C apart, some of the %RH spread has to be an artefact rather than a real disagreement. I checked dew point for exactly that reason — and it differs substantially too. So the humidity readings genuinely disagree; the temperature offset is not the whole story.

About CO2 and references

Worth stating plainly, because it comes up every time: the BME680 does not measure CO2. BSEC outputs a CO2 equivalent, estimated from the VOC signal. The lack of correlation with the SCD41 is not an anomaly — it is the expected result. Subjectively the SCD41 behaves far more sensibly; the BME680's estimate feels like it's reading tarot cards.

The reference for CO2 is not another sensor, it's fresh outdoor air at roughly 420 ppm, used via forced recalibration, plus letting automatic self-calibration do its job. For humidity, the cheap and genuinely useful reference is saturated salt solutions — NaCl gives 75.3 % RH, MgCl2 gives 33 % RH at 25 °C. A spirit hygrometer is not accurate enough to arbitrate this.

Plan

Go on holiday, let the stations pile up data, and come back and actually analyse it — specifically, correlate the inter-sensor delta against time of day and rate of temperature change, rather than staring at absolute values.

If you've done this comparison, or have experimental data, or just a hypothesis I've missed, I'd like to hear it.

P.S. SHT35/45 are already queued up to join the zoo.

P.P.S. OTA update endpoint, if you want it: http://iot.scorpionzzz.com/sensorstation3/firmware/sensorstation3.latest.bin




Discussions