0

SCD-30 NACK
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Re: SCD-30 NACK

by ssmoss on Tue Jun 15, 2021 1:12 pm

I willing to work with you on this to a point. What are you looking for me to try and what are you anticipating the time to resolution would be? I ask because in one of the previous responses it was stated there might not even be a resolution and I would like to get my project up and running in a timely fashion or I need to start exploring other options.

adafruit_support_carter wrote:At this time it is unknown what is causing the issue. No ETA on resolution (if any).


Given that I am using x86 which is a standard architecture along with the provided code examples I wouldn't have expected something this glaring to not be caught. The SCD-30 isn't a cheap I would have expected that basic functionality worked out of the box much like the BMP388 did.

ssmoss
 
Posts: 14
Joined: Wed Jun 02, 2021 3:53 pm

Re: SCD-30 NACK

by adafruit2 on Tue Jun 15, 2021 1:47 pm

correct, we dont want to promise a solution before we've worked on it! we will be able to know for sure if its resolvable this week

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

Re: SCD-30 NACK

by ssmoss on Tue Jun 15, 2021 2:00 pm

So by the end of the week we would know that the SCD-30 works with the FT232H? I am fine to wait, provided that if the code change doesn't resolve stuff you are able to overnight replacement parts.

ssmoss
 
Posts: 14
Joined: Wed Jun 02, 2021 3:53 pm

Re: SCD-30 NACK

by adafruit2 on Tue Jun 15, 2021 2:29 pm

try this 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 adafruit_scd30
import busio

i2c = busio.I2C(board.SCL, board.SDA, frequency=1000)  # uses board.SCL and board.SDA
scd = adafruit_scd30.SCD30(i2c)

while True:
    # since the measurement interval is long (2+ seconds) we check for new data before reading
    # the values, to ensure current readings.
    if scd.data_available:
        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)


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

Re: SCD-30 NACK

by ssmoss on Tue Jun 15, 2021 2:48 pm

Thanks for the really fast code tweak; this seems to look good:
Code: Select all | TOGGLE FULL SIZE
import time
import board
import adafruit_scd30
import busio

i2c = busio.I2C(board.SCL, board.SDA, frequency=1000)  # uses board.SCL and board.SDA
scd = adafruit_scd30.SCD30(i2c)

print("Temperature offset:", scd.temperature_offset)
print("Measurement interval:", scd.measurement_interval)
print("Self-calibration enabled:", scd.self_calibration_enabled)
print("Ambient Pressure:", scd.ambient_pressure)
print("Altitude:", scd.altitude, "meters above sea level")
print("Forced recalibration reference:", scd.forced_recalibration_reference)
print("")
print("CO2:", scd.CO2)       
print("Temperature:", scd.temperature)
print("Relative Humidity:", scd.relative_humidity)

yielded the following output
Code: Select all | TOGGLE FULL SIZE
Temperature offset: 0.0
Measurement interval: 2
Self-calibration enabled: True
Ambient Pressure: 0
Altitude: 0 meters above sea level
Forced recalibration reference: 400

CO2: 584.362548828125
Temperature: 25.194931030273438
Relative Humidity: 46.331787109375


How does this differer compared to the setting up the board with board.I2C()?

ssmoss
 
Posts: 14
Joined: Wed Jun 02, 2021 3:53 pm

Re: SCD-30 NACK

by adafruit2 on Tue Jun 15, 2021 3:00 pm

it slowed down the data transfer

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

Re: SCD-30 NACK

by adafruit_support_carter on Tue Jun 15, 2021 3:22 pm

Updates are in the 2.2.0 release:
https://github.com/adafruit/Adafruit_Ci ... /tag/2.2.0

But the main enabler here for the FT232H is the slowed down I2C clock rate. See new example also:
https://github.com/adafruit/Adafruit_Ci ... 32htest.py

adafruit_support_carter
 
Posts: 20648
Joined: Tue Nov 29, 2016 2:45 pm

Re: SCD-30 NACK

by ssmoss on Tue Jun 15, 2021 3:59 pm

Excellent. Thank you committing the fix so quickly. I have been playing with the sensor for the last couple of hours and they both seem to be working as expected.

ssmoss
 
Posts: 14
Joined: Wed Jun 02, 2021 3:53 pm

Please be positive and constructive with your questions and comments.