Due to high demand expect some shipping delays at this time, orders may not ship for 1-2 business days.
0

SCD30 returning 0 for C02 PPM
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

SCD30 returning 0 for C02 PPM

by gnanavel on Wed Oct 20, 2021 12:15 pm

I am trying the SCD30 sensor with circuitpython on a Raspberry PI Zero W.

I get the temperature and relative humidity, but the CO2 values are always 0 PPM.


However, when I breathe through the sensor, the value increases. I tried to do a .reset(), it does not work either.

gnanavel
 
Posts: 3
Joined: Wed Oct 20, 2021 12:11 pm

Re: SCD30 returning 0 for C02 PPM

by mikeysklar on Wed Oct 20, 2021 8:40 pm

@gnanavel,

Since you are seeing values and response from breathing this is likely a burn in and warm up issue.

https://learn.adafruit.com/adafruit-scd ... 3081081-12

Its normal for the first CO2 reading to be 0, simply ignore the first reading when logging data.

mikeysklar
 
Posts: 6231
Joined: Mon Aug 01, 2016 8:10 pm

Re: SCD30 returning 0 for C02 PPM

by gnanavel on Thu Oct 21, 2021 10:00 am

Sorry it not just the first value that's 0 PPM, all subsequent values are 0 PPM as well. I have been running for an hour, the value is still 0 PPM.

gnanavel
 
Posts: 3
Joined: Wed Oct 20, 2021 12:11 pm

Re: SCD30 returning 0 for C02 PPM

by mikeysklar on Thu Oct 21, 2021 3:12 pm

Can you post the code you are running and library version? Let's just confirm that is all up to date and you are using an unmodified example.

When you blow on the sensor does it still respond (or did it ever) to CO2 levels?

mikeysklar
 
Posts: 6231
Joined: Mon Aug 01, 2016 8:10 pm

Re: SCD30 returning 0 for C02 PPM

by gnanavel on Thu Oct 21, 2021 8:10 pm

here it the code

Code: Select all | TOGGLE FULL SIZE

# SPDX-FileCopyrightText: 2020 by Bryan Siepert, written for Adafruit Industries
#
# SPDX-License-Identifier: Unlicense
import time
import board
import busio
import adafruit_scd30

# SCD-30 has tempremental I2C with clock stretching, datasheet recommends
# starting at 50KHz
i2c = busio.I2C(board.SCL, board.SDA, frequency=50000)
scd = adafruit_scd30.SCD30(i2c)
# scd.temperature_offset = 10
print("Temperature offset:", scd.temperature_offset)

# scd.measurement_interval = 4
print("Measurement interval:", scd.measurement_interval)

# scd.self_calibration_enabled = True
print("Self-calibration enabled:", scd.self_calibration_enabled)

# scd.ambient_pressure = 1100
print("Ambient Pressure:", scd.ambient_pressure)

# scd.altitude = 100
print("Altitude:", scd.altitude, "meters above sea level")

# scd.forced_recalibration_reference = 409
print("Forced recalibration reference:", scd.forced_recalibration_reference)
print("")


while True:
    data = scd.data_available
    if data:

        print("Data Available!")
        print("CO2:", scd.CO2, "PPM")
        print("Temperature:", scd.temperature, "degrees C")
        print("Humidity::", scd.relative_humidity, "%%rH")

        print("")
        print("Waiting for new data...")
        print("")

    time.sleep(0.5)



when I blew, the values went up by 400 PPM and then decreased to 0 PPM

gnanavel
 
Posts: 3
Joined: Wed Oct 20, 2021 12:11 pm

Re: SCD30 returning 0 for C02 PPM

by adafruit2 on Thu Oct 21, 2021 10:06 pm

put it outside and run a 'calibration' - see if that helps
https://learn.adafruit.com/adafruit-scd ... alibration

adafruit2
Site Admin
 
Posts: 20357
Joined: Fri Mar 11, 2005 7:36 pm

Please be positive and constructive with your questions and comments.