SGP40 I2C address 0x59 not showing up in scan

Breakout boards, sensors, other Adafruit kits, etc.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
User avatar
DrCashberg
 
Posts: 12
Joined: Fri Mar 16, 2018 5:01 pm

Re: SGP40 I2C address 0x59 not showing up in scan

Post by DrCashberg »

Just as a side note, I'm not using CircuitPython but C(++).

Here's a photo.
Attachments
Pins.png
Pins.png (485.8 KiB) Viewed 370 times

User avatar
adafruit_support_carter
 
Posts: 29168
Joined: Tue Nov 29, 2016 2:45 pm

Re: SGP40 I2C address 0x59 not showing up in scan

Post by adafruit_support_carter »

Thanks. That soldering looks good.

Can you try loading the CircuitPython firmware real quick:
https://circuitpython.org/board/raspberry_pi_pico/
And see if you can repeat the same scan from above.

We don't have any support for C++ usage.

User avatar
DrCashberg
 
Posts: 12
Joined: Fri Mar 16, 2018 5:01 pm

Re: SGP40 I2C address 0x59 not showing up in scan

Post by DrCashberg »

The good news is, it worked with CircuitPython, thank you very much.
The bad news is, this escalated (quickly) to become a support ticket for what I'm doing wrong in my C code, which works for all other sensors...

At least I know that the hardware is working, that's great news! Thanks again.

User avatar
DrCashberg
 
Posts: 12
Joined: Fri Mar 16, 2018 5:01 pm

Re: SGP40 I2C address 0x59 not showing up in scan

Post by DrCashberg »

Having tried every other I2C pin combination I'm still not able to find the sensor using the C code provided in the Getting started document. The sensor can be detected when using the I2C scan function in CircuitPython, though. Does someone have an idea what I could try to get it to work with my C(++) code? I'm confused as to how this can be language-dependant....

User avatar
defiant12
 
Posts: 2
Joined: Sat May 22, 2021 7:11 am

Re: SGP40 I2C address 0x59 not showing up in scan

Post by defiant12 »

I have the same problem using raspberry pi 3b+
I've checked the signal on the scope and I see an Ack. See attached photo you can see the 0x59 address followed by a read bit and then ACK.
Attachments
NewFile68.png
NewFile68.png (49.02 KiB) Viewed 307 times

User avatar
defiant12
 
Posts: 2
Joined: Sat May 22, 2021 7:11 am

Re: SGP40 I2C address 0x59 not showing up in scan

Post by defiant12 »

Addition: a 68pF between SDA and GND flattened out that little spike before the ack bit. still - no luck.

User avatar
ThongLT
 
Posts: 1
Joined: Tue May 25, 2021 10:50 pm

Re: SGP40 I2C address 0x59 not showing up in scan

Post by ThongLT »

I am using the Orange pi zero which running on Linux but CAN NOT scan i2c address SGP40 ( command line on linux is "i2cdetect -y 1" ) but I can scan and find i2c address SHT30 at https://www.adafruit.com/product/2857

Code: Select all

i2cdetect  -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- -- 

User avatar
pmcquay
 
Posts: 39
Joined: Fri Jan 16, 2015 8:54 am

Re: SGP40 I2C address 0x59 not showing up in scan

Post by pmcquay »

I'm having this issue as well, raspberrypi 3b+, connected the sgp40 with a quiic breakout, so no soldering. i2c works with PMSA003i sensor, so things should be configured correctly.

User avatar
pmcquay
 
Posts: 39
Joined: Fri Jan 16, 2015 8:54 am

Re: SGP40 I2C address 0x59 not showing up in scan

Post by pmcquay »

I havent tested it, but this suggests that i2cdetect doesnt find this particular sensor: https://github.com/itsnils/Sensirion_SGP40

edit: I've tested this code, it appears to work correctly. My device is not detected, but it seems like it needs some data written to it before it will output anthing.

Locked
Please be positive and constructive with your questions and comments.

Return to “Other Products from Adafruit”