SCD30 shows incorrect CO2 readings

I bought some ESP32-C6 dev kit and SCD30 sensors, but it seems SCD30 shows incorrect ppm readings for some reason.

So I tried flashing the ESP both with Tasmota and ESPHome (I also tried writing my own Zigbee end device with esp-idf but abandoned this idea for now). And both Tasmota and ESPHome seem to show strange readings. They constantly show values like 1200-1600 ppm in my room, even when it seems to be well ventilated or with a window opened. It seems way too high. But the strange thing is that when I put it outside the window after couple of minutes it shows the correct value of around 405-420 ppm.

Is there a possibility that it has an “offset error” close to zero, but “gain error” is quite high? Or it is rather not possible given the way this sensor is built, and it might be that I’m living in a CO2 environment for years? :clown_face:

I was planning to force calibrate the sensor after flashing ESPHome (as far as I could see Tasmota does not support it?), but since it showed correct numbers after putting it outside I decided to not calibrate it for now.

ESP is powered by a phone charger. And this is my current ESPHome config for this device:

esphome:
  name: esp32co2
  friendly_name: Esp32CO2

esp32:
  board: esp32-c6-devkitc-1
  framework:
    type: esp-idf

...

i2c:
sensor:
  - platform: scd30
    co2:
      name: "CO2"
      accuracy_decimals: 1
    temperature:
      name: "Temperature"
      accuracy_decimals: 2
    humidity:
      name: "Humidity"
      accuracy_decimals: 1
    update_interval: 5s
    automatic_self_calibration: true
    altitude_compensation: 303m

Do you have an idea what could be the reason?

Unless you purchased a factory second from Aliexprees I reckon this is the likely reason:

1 Like

Opening one window might not change the level rapidly. I agree with @tom_l , you likely live in elevated co2 environment.

1 Like

gonna be hard to diagnose a sample size of one.

  • Your indoor CO2 may actually be that highIndoor readings of 1200 to 1600 ppm are very plausible in an occupied room, especially bedroom / office / small room / closed door conditions. “Window open” does not always mean the room is exchanging air fast enough. A lot of homes stay above 1000 ppm for long periods without people realizing it.
  • Automatic self calibration can become misleading indoorsIn ESPHome, automatic_self_calibration defaults to true. Sensirion says ASC only works properly if the sensor is regularly exposed to ~400 ppm air, such as a well ventilated building overnight with no people present, and the sensor typically needs about 7 days of continuous operation before ASC can apply. If the sensor never truly sees fresh-air baseline indoors, ASC can learn the wrong baseline over time.
  • Short outdoor tests are useful, but short window tests are notPutting it fully outdoors for a couple of minutes is a much better check than holding it near an open window. Near a window, the sensor can still be sitting in indoor air, especially if there is weak airflow.
  • Power supply noise is less likelySince both Tasmota and ESPHome show similar values, and the sensor drops to normal outdoor baseline, the phone charger is probably not the main issue.
1 Like

It likely is measuring what is there. Years ago, I assumed that my indoor CO2 levels were normal and that I could reduce the frequency that my fresh air intake runs. Like you I discovered that the level was much higher than I thought.

I got an scd30 and it reads normal values outside, but indicates my indoor values are much higher and never get down to outdoor levels.

Since I haven’t noticed any issues with the higher levels, I stopped worrying about it. I did not decrease the frequency of the fresh air intake.

1 Like

It wasn’t advertised as factory second, but it was from Aliexpress.

In a closed room I think it would be plausible, since the room is rather small. But the door was opened. Now I’m sitting here, the air still feels normal, and the reading is 2500 ppm. And I think it might be even above the specs of the SCD30.

I’ve put it on a window sill outside the window for more than an hour. It was showing correct values then.

Initially when flashing I was powering it from a laptop, and values were similar.

My window is not even that very well sealed. The rubber gasket is not attached properly in some places where a window blind was hang previously and I feel when it is cold outside that it leaks inside.

AliExpress is generally known for its cheap things, not for them actually being genuine. Many times people are happy with “copy” goods, since they typically work (until they don’t).

A genuine scd30 is going to cost $30-$60. The $15 one you get from AliExpress is the equivalent of the Rolex you can get from the guy on the street. It kind of looks the same from a distance, but it really isn’t the same.

I got mine from Digikey years ago and it reads values that seem high, except when I put it outside. Have you read the datasheet and looked at calibration. As I recall that is just the zero (400ppm) point calibration. There is a way to provide it barometric pressure so it is more accurate. There is also a way to adjust the temperature offset, but I have heard that causes it to read CO2 less well. The temperature sensor is impacted by self heating and is used to calculate the CO2 level, so an offset will change the reading.

It seems like your clear air value is fine, so probably your CO2 level is just higher than you are expecting.

Humans typically can’t tell the CO2 level with any accuracy.

https://www.nature.com/articles/s41526-019-0071-6
That article indicates even at 5000ppm there were no effects in abilities (let alone detection). Other studies indicate 2500 is desirable upper limit, with 5000 being the limit at which real action should be taken.

Personally, I wouldn’t trust a $15 AliExpress device with much. I don’t even really trust my much more expensive one and I haven’t found something that looks better. All of the standard ones require ABC, which is unlikely to work in a home that is always occupied.

1 Like

Got it for $12.76 :sweat_smile:

I agree that AliExpress sells cheap junk and I wouldn’t trust it for critical stuff, but it is not always the case. I think it goes both ways. AliExpress sells cheap copies that do not work, but also genuine original products for way less (or good copies that are built pretty much in the same way as originals).
Almost everyone manufactures in China. Something might be more expensive, while there a high likelihood that literally comes from the same factory. Higher price is very often just additional markup for western market (of course partially to cover cost of proper QA and handling customer support, but usually it is only a small fraction of the added markup). It simply depends, and I wouldn’t deem all products bought on AliExpresss as immediately cheep faulty knockoffs.

Yes, 400 ppm is probably 0, although I think more realistic number is around 415 ppm, as it this is the average number in atmosphere right now. So the reading outside the window were strangely spot on.

I didn’t use the barometric pressure compensation but altitude compensation (set to 303 m in the esphome yml above). Which is exclusive with the pressure as per documentation.

I also tried using the temperature offset, but it didn’t have any meaningful impact that I could see.

I also connected second one with the same esp model and the same configuration next to each other and they differ a little bit, but still in bounds of expected error.
1 829 ppm vs 1 780 ppm
22.5 C vs 22.3 C
50.3 % vs 50 %

Accuracy from spec sheet is ± (30 ppm + 3%MV) so at 1800 ppm it would be +/- 84 ppm.

Maybe indeed I have constantly elevated CO2 levels in my house :fearful:

-surplus / gray-market stock
-chips that failed calibration tolerance
-fake
Considering that the price is only 1/3 of the cheapest “authorized distributor” price, I wouldn’t expect it to be genuine individually calibrated item that passed quality control.

so honestly we cant truly diagnose a single sensor as bad if we dont have readings from 2 to compare from but consider drafting a complaint to your city if you trust those readings

A very long study of various sensors. Section 3.2 talks about the results for CO2.

The tested single sensors, namely SCD40 and K30, were very strongly correlated (PCC = 0.99 for both) with the LI-COR data. The SCD40 was the most accurate as its reported peak concentration deviated from the reference just by 3%

They didn’t test the scd30 directly, but it is a decent sensor (when you get a real one). So, maybe the sensor you have is good enough and what it is reporting is really true. Or maybe what you believe about your CO2 levels is true and the sensor is not even close to correct.

If you believe the latter, turn on ABC and in a week or two you will have a display that says everything is fine.

If you believe the sensor says your CO2 levels are high, what would you do?

I had to answer that question years ago. I looked at the data and realized that anything below 2500 is really okay (not a health issue/concern) so I didn’t need to do anything extra and that it was a good thing I had a fresh air ventilation system.

1200-1800ppm doesn’t sound anything abnormal.
Human produces ~20 liters of co2 per hour, so for example 2 persons in small 120m3 apartment without (theoretically) air change would raise level to 1400ppm in 3 hours.