Hello, I have a Bar30 sensor that I am using on a Nvidia Jetson Orin Nano Developer Kit. I have tried to use i2cdump to check if the sensor is being detected. I am not sure what to look for so I will post some of my outputs. Furthermore, I made a big assumption that it is being detected and used the library for the sensor. GitHub - bluerobotics/ms5837-python: A python module to interface with MS5837-30BA and MS5837-02BA waterproof pressure and temperature sensors.
I am trying to run the example.py file in order to see if I can read from the sensor but I get these errors can someone walk me through on where I should start the debugging process?
Hi @washedsteven, welcome to the forum
You haven’t provided information or a photo about how you’re connecting the sensor to your board, which makes it difficult to help you. I also unfortunately don’t have access to that board type, so can’t run my own tests of it myself.
A few questions:
- Do you know which I2C bus you’re connecting it to?
- According to this pinout pins 3/5 are for bus 7, and pins 27/28 are for bus 1
- Have you installed
smbus2
?- It may be necessary to install through
pip
, but I’m not sure
- It may be necessary to install through
- Do you know if I2C is enabled by default on your board?
- Some hardware requires setting some configuration to enable specific peripherals/interfaces
- How are you powering the board, and the Bar30?
Note that the Bar30’s I2C address is 0x76
(not 0x40
).
Yes so for power I am using pin 1 a 3.3v.
As you mentioned I am using pins 3 and 5 for SDA and SCL.
As far as I know I successfully installed smbus2 as before I was getting an error in VSCode that mentioned it wasn’t installed so I installed it using sudo apt-get install python3-smbus2 .
I will attempt at install through pip and update you.
I will have to check if i2c is enabled by default and get back to you.
Jetson Orin Nano is powered by its adapter thats plugged straight into a wall outlet.
The bar30 sensor is powered from pin 1 which is 3.3v from the Jetson.
Thank you I found something in the datasheet that only mentions 0x40 so I assumed that was the address.
- Using pins 3/5 for SDA and SCL when I use i2cdump this is the results.
- smbus2 is installed.
- I2C is enabled by default on my board. I have also verified this by plugging in another sensor using these same pins 3/5 and I can read from this sensor.
Any ideas how I can debug from here?
@EliotBR Any idea how I can continue debugging this?
I have tested the Sensor on the Raspberry Pi 4 using the python library.
I ran i2cdetect -y 1 and once again 0x40 is detected when the sensor is plugged in on bus 1.
Could this sensor be faulty? I know the address is supposed to be 0x76 but this address never appears when the sensor is disconnected and reconnected only 0x40 does. Running out of ideas trying to get this sensor to read depth.
I have a similar problem, when I run i2cdumb -y 7 0x76 it detects the sensor but when I run the python code I get a I/O error. I am running it on Ubuntu 22 on a Jetson Orin nano
Yea sadly I am not sure how to go about this fix. I have come to the realization I am using a bar100 rather then the bar30 which is why I am able to detect 0x40 as the address. However, I am still getting the I/O error even with the proper library.