Bar30 Depth/Pressure Sensor

hi
I want to launch a Pressure Sensor with Arduino
But I do not have this piece => I2C Level Converter
Can I launch without this?

No. You need a logic level converter or the sensor will be damaged.

1 Like

I bought this sensor
So I can connect to the Arduino without the logical level converter?

No. The logic level converter is necessary. This product says it is 5V logic compatible, but if there is not a converter embedded in the board, they are wrong.

1 Like

hi
I want to launch a Pressure Sensor with Raspberry pi 3
I bought this Sensor
I connect the pins in this way
VCC=pin1 Raspberry pi 5V
GND=pin6 Raspberry pi GND
SDA=pin3 Raspberry pi SDA
SCL=pin5 Raspberry pi SCL
This error occurs when the Python code runs:
Bus 1 is not available.
Available busses are listed as /dev/i2c*
Sensor could not be initialized

help me

Enable the i2c interface with raspi-config.

1 Like

hi
I enabled i2c
I’m still in error

Traceback (most recent call last):
File "example.py", line 12, in <module>
if not sensor.init():
File "/home/pi/ms5837-python/ms5837.py", line 71, in init
self._bus.write_byte(self._MS5837_ADDR, self._MS5837_RESET)
IOError: [Errno 121] Remote I/O error

Run i2cdetect to check if the sensor is connected.

1 Like

i2cdetect does not work for some reason. Use i2cdump.

1 Like

I have been banging my head against this one for some hours now, with Rpi3 → Bar30… It works perfectly fine when dry, but at the instance it hits water I get the:

" if not sensor.init():
File "/home/pi/ms5837-python/ms5837.py", line 71, in init
self._bus.write_byte(self._MS5837_ADDR, self._MS5837_RESET)
IOError: [Errno 121] Remote I/O error"

I re-run the script when its submerged and it runs for 5-10 seconds before it stops with the same error. More likely a pi I2C bus issue than anything else?

How long are your i2c lines? Are you using longer wires to test underwater?

It ended up beeing a bit of a two sided matter. Yes, the wires has been extended and goes through a common DB9 connector so it deprived the signal quality.

The other factor was a ground failure (hence change in potential when submerged) as the wires was potted against the wall of the sensor housing and had been damaged during installation when I swapped endcaps.

What needs to be changed in the code to avoid it from crashing when not having a stable sensor signal? Usally something is better than nothing.