Hi,
I’m trying to connect an SHT21 sensor (I2C) to my BeagleBone Black, but it cannot be detected by i2cdetect
.
I tried searching online, but nothing very useful popped up.
Could anyone share some advice?
PS: Just before asking this question, I started doubting the i2cdetect
tool itself.
Indeed, turns out it was all working fine (see answer below).
I will still post the question I was about to ask, as it might be helpful to somebody else in the future.
Circuit
How to reproduce
Power up the BBB and ssh into it.
Then connect the +3.3V
and GND
pins to the external circuit, and run the following command:
i2cdetect -y -r 2
Output:
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
Details about the BBB
Processor: AM3358 ARM Cortex-A8
OS: Debian 10.3 Buster IoT (without graphical desktop)
Details about the sensor.
The sensor is mounted on this breakout board:
Here’s a link to its datasheet: https://www.farnell.com/datasheets/1780639.pdf
I couldn’t find anything particularly useful there, except in section 5.1 where it states:
After power-up, the sensor needs at most 15ms, while SCL is high, for reaching idle state, i.e. to be ready accepting commands from the master (MCU)
I connected a logic analyzer to the SCL and SDA pins, and it all seemed fine.
Here’s the whole logic analyzer capture:
Here’s how the first two reads looked like, both NACK:
Here’s entire session, if you need to analyze it yourself:
sht21- session.sal (17.2 KB)
Other things I’ve tried/verified - 1
As I have two of these SHT21 sensors, I verified that both are working fine by using an ESP32 board.
On the BBB side, instead, I tried to connect an SSD1306 display (I2C) to the same circuit, and indeed it was detected at address 0x3c
Conclusion: the sensor works fine, the BBB works fine.
Other things I’ve tried/verified - 2
This sensor was used as part of the BeagleBone Weather Cape (Revision A), so there has to be a way to make it working somehow: BeagleBone Weather - eLinux.org
I couldn’t find anything special in its schematic either: https://github.com/CircuitCo/BeagleBone-Weather/blob/Rev_A/BeagleBone-Weather-RevA-schematic.pdf?raw=true