0

SCD-30 NACK
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

SCD-30 NACK

by ssmoss on Fri Jun 11, 2021 9:58 pm

I recently purchased the following parts:

Adafruit FT232H Breakout (https://www.adafruit.com/product/2264)
Adafruit SCD-30 (https://www.adafruit.com/product/4867)
Adafruit BMP388 (https://www.adafruit.com/product/3966)

I have contacted the FT232H to the SCD-30 to the BMP388. I have also tried FT232H to the BMP388 to the SCD-30.

I have connected the FT232H to a NUC running Ubuntu 18.04.5 LTS (5.4.0-72-generic). I have installed the required libraries and set the FT232H to I2C mode via the toggle switch. I have verified the system can see the board.

Using the test code from (https://learn.adafruit.com/adafruit-bmp ... cuitpython) using either connection configuration:
Code: Select all | TOGGLE FULL SIZE
# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
# SPDX-License-Identifier: MIT

import time
import board
import adafruit_bmp3xx

# I2C setup
i2c = board.I2C()  # uses board.SCL and board.SDA
bmp = adafruit_bmp3xx.BMP3XX_I2C(i2c)

# SPI setup
# from digitalio import DigitalInOut, Direction
# spi = board.SPI()
# cs = DigitalInOut(board.D5)
# bmp = adafruit_bmp3xx.BMP3XX_SPI(spi, cs)

bmp.pressure_oversampling = 8
bmp.temperature_oversampling = 2

while True:
    print(
        "Pressure: {:6.4f}  Temperature: {:5.2f}".format(bmp.pressure, bmp.temperature)
    )
    time.sleep(1)

I have been able to query the sensor and get data without issue.

Using the test code from (https://learn.adafruit.com/adafruit-scd ... cuitpython) using either connection configuration:
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

i2c = board.I2C()  # 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)

I get the following error:
Code: Select all | TOGGLE FULL SIZE
Traceback (most recent call last):
  File "scd30.py", line 14, in <module>
    if scd.data_available:
  File "/home/user/adafruit/adafruit/lib/python3.6/site-packages/adafruit_scd30.py", line 155, in data_available
    return self._read_register(_CMD_GET_DATA_READY)
  File "/home/user/adafruit/adafruit/lib/python3.6/site-packages/adafruit_scd30.py", line 289, in _read_register
    i2c.readinto(self._buffer, end=2)
  File "/home/user/adafruit/adafruit/lib/python3.6/site-packages/adafruit_bus_device/i2c_device.py", line 67, in readinto
    self.i2c.readfrom_into(self.device_address, buf, start=start, end=end)
  File "/home/user/adafruit/adafruit/lib/python3.6/site-packages/busio.py", line 148, in readfrom_into
    return self._i2c.readfrom_into(address, buffer, stop=stop)
  File "/home/user/adafruit/adafruit/lib/python3.6/site-packages/adafruit_blinka/microcontroller/ftdi_mpsse/mpsse/i2c.py", line 49, in readfrom_into
    result = port.read(len(buffer[start:end]), relax=stop)
  File "/home/user/adafruit/adafruit/lib/python3.6/site-packages/pyftdi/i2c.py", line 102, in read
    readlen=readlen, relax=relax)
  File "/home/user/adafruit/adafruit/lib/python3.6/site-packages/pyftdi/i2c.py", line 694, in read
    self._do_prolog(i2caddress)
  File "/home/user/adafruit/adafruit/lib/python3.6/site-packages/pyftdi/i2c.py", line 1032, in _do_prolog
    self._send_check_ack(cmd)
  File "/home/user/adafruit/adafruit/lib/python3.6/site-packages/pyftdi/i2c.py", line 1064, in _send_check_ack
    raise I2cNackError('NACK from slave')
pyftdi.i2c.I2cNackError: NACK from slave


Any help / advice to figure out why I can't pull data from the sensor would be very much appreciated.

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

Re: SCD-30 NACK

by ssmoss on Fri Jun 11, 2021 10:15 pm

I found in another post a way to scan the I2C bus. Using the following code:
Code: Select all | TOGGLE FULL SIZE
import board

i2c = board.I2C()
i2c.try_lock()

scan = i2c.scan()
for addr in scan:
    print("Address = {0:3d}, Hex = {1}".format(addr, hex(addr)))

I only get the following output:
Code: Select all | TOGGLE FULL SIZE
Address = 119, Hex = 0x77

It seems like the board isn't being picked up. The green power light does show on the board and if I blow on it I see the orange / yellow glow. Could it be a bad connection between the SCD-30 and the STEMMA board? Since I have connected the BMP-388 though the SCD-30 it seems like the STEMMA passthrough is working correctly.

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

Re: SCD-30 NACK

by ssmoss on Sat Jun 12, 2021 12:06 am

I just tried unplugging and replugging all the boards. Again the only board to come up is the BMP388. I think my SCD-30 defective. Are there some steps I can take to confirm this and get a RMA processed?

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

Re: SCD-30 NACK

by ssmoss on Sat Jun 12, 2021 5:05 pm

I tried some more testing this morning, attempt to only connect the SCD-30 to the FT232H. Same results. It doesn't show and when searching the I2C bus for devices nor can I use the example code from the first post to pull information.

I forgot to mention that these parts are from an order I placed June 2nd using account I am posting from. The last four digits of the order number are 8762

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

Re: SCD-30 NACK

by ssmoss on Sun Jun 13, 2021 5:39 pm

Picture of how the setup is connected:

IMG_3471.jpg
IMG_3471.jpg (486.66 KiB) Viewed 254 times


The black USB cable on the left of the picture is connected to the NUC.

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

Re: SCD-30 NACK

by ssmoss on Mon Jun 14, 2021 5:06 pm

Bump

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

Re: SCD-30 NACK

by adafruit_support_carter on Tue Jun 15, 2021 10:24 am

Hmmm. OK, tested and seeing same thing. Not sure what it is. This combo may just not work well. But opened an issue for this here:
https://github.com/adafruit/Adafruit_Ci ... /issues/18

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

Re: SCD-30 NACK

by ssmoss on Tue Jun 15, 2021 11:13 am

So you are saying everything being seen is due to that 3ms delay that changed with the new spec? What is the ETA on this being resolved?

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

Re: SCD-30 NACK

by adafruit_support_carter on Tue Jun 15, 2021 11:27 am

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

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

Re: SCD-30 NACK

by ssmoss on Tue Jun 15, 2021 11:30 am

I would like a replacement item to rule that out. If that doesn’t fix it I would like a return as it sounds like I was sold an item that doesn’t work as advertised. It also seems like the item should be flagged on the website so that people buying it know it may not function as advertised.

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

Re: SCD-30 NACK

by adafruit_support_carter on Tue Jun 15, 2021 11:36 am

What's the ultimate goal with your setup / project? There are a few other options that do similar things as the FT232H.

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

Re: SCD-30 NACK

by ssmoss on Tue Jun 15, 2021 11:39 am

I would like to read data from my the SCD-30 and BMP388 on my Linux based NUC. Ideally being able to add additional STEMMA based devices to the chain if needed.

If there is a better / different USB to STEMMA board to use I am open to using that instead. At the time I placed the order the one I got was the only option.

Are you thinking I should a MCP2221A instead?

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

Re: SCD-30 NACK

by adafruit_support_carter on Tue Jun 15, 2021 11:49 am

Since all you are doing is I2C, the MCP2221 is an option:
https://www.adafruit.com/product/4471
https://learn.adafruit.com/circuitpytho ... th-mcp2221

If you have an RP2040 based board (like the Pico), you could also try using the u2if firmware:
https://learn.adafruit.com/circuitpytho ... o/overview

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

Re: SCD-30 NACK

by ssmoss on Tue Jun 15, 2021 11:55 am

Can you overnight me a MCP2221A and SCD-30. Given it isn’t clear what which part is responsible (SCD-30 / FT232H) I would like to avoid another back and forth if the MCP2221A doesn’t resolve it. I am happy to try the MCP2221A first before opening the SCD-30.

I think you should also add a warning to the the respective product pages about the incompatibility between the SCD-30 and the FT232H.

The items bought were bought for their advertised plug and play type support.

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

Re: SCD-30 NACK

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

ssmoss, we'll take a look at this
as a linux user, you're probably familiar with drivers not working always on first go based on hardware combinations. you are likely the first person to use these together.
are you willing to work with us on it?

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

Please be positive and constructive with your questions and comments.