Bar 30 Pressure Sensor - Remote IO error

Hi,

Hardware Setup:
Jetson Nano Dev Kit with Bar 30 Pressure Sensor connected to I2C Bus 1, 5 Switches connected to GPIO pins

Software:
MS5837 Python Library

Issue:
I have interfaced the pressure sensor using the blue robotics ms5837 library and it works well and I get the pressure values correctly. But, when the switches connected to the GPIO pins changes state from high to low, I get “Error 121, Remote IO error”.

On the oscilloscope, I have observed that the SDA line goes low when the switch changes state, sometimes the sensor recovers and works fine after giving the error. But, sometimes, the error keeps coming till I make the switch high. The other devices on the same I2C bus work fine regardless of the switch state.

Physically, there is no short/ continuity between the sensor’s SDA line and the switches. Please help me solve this issue.

Thanks.

Hi @trisRHere

I’m afraid we need more information. how are you handling the buttons in software? I suspect it is not an electrical issue.

The switch is connected to the gate of a MOSFET. When the switch is open, gate voltage is 5 V, and the drain op is 0 V which is given to GPIO. When switch is closed, gate voltage becomes 0 V and drain op is 3.3 V which is given to GPIO.

The error occurs when GPIO becomes 3.3 V. Point to note is if I remove the MOSFET, the GPIOs are always at 3.3 V, but the error doesn’t occur now.

In software, I just poll the GPIO pins and publish the data.
But, the error occurs even when I don’t run the ros node of the switches.

The 3.3 V supply is common to the pressure sensor, MOSFETs and an I2C temperature sensor that is connected on the same bus of the Jetson.
Please let me know what other information is needed and I will add it. Thanks