Home        Store        Docs        Blog

BAR30 incorrect readings


#1

I just received the MS5037 and connected it to an Arduino Uno with a SparkFun Logic Level controller. And while it does communicate with the Arduino and does report the correct value for Temperature, the pressure, depth, and altitude values are all off. I’m not sure what to do to fix this issue.

Serial Monitor:

Pressure: 20149.00 mbar
Temperature: 24.90 deg C
Depth: 195.72 m
Altitude: -33957.73 m above mean sea level

code:
I’ve been using the code provided in the library’s example.

Pictures of how I have it connected:


(Kevin) #2

Hi @cerbero17 From your picture, you actually have a Bar02 sensor.

Can you double check the Arduino code and make sure it is for the Bar02, not the Bar30?

Specifically make sure this line is correct:

sensor.setModel(MS5837::MS5837_02BA);

#3

I realized that on my way home and just verified I did have the Bar02 not the Bar30. Just changed the model and it worked.

Thanks.


#4

I’m running into an interesting problem when I connect both Bar02 sensors to a multiplexer. I have 1 that’s reading fine but the other gives readings a higher than the other. The sensors read the following:

Pressure 1: 1182.00 mbar
Temperature 1: 32.15 deg C
Depth 1: 1.73 m
Altitude 1: -1317.98 m above mean sea level

Pressure 2: 1003.00 mbar
Temperature 2: 25.29 deg C
Depth 2: -0.10 m
Altitude 2: 85.64 m above mean sea level

The first pressure sensor always reads within those values even if I connect it directly to the Arduino Board. So I would guess something is off. What’s really weird is that if I move the depth equation from the library to the code both sensors read equally with negligible variation.

Pressure 1: 1182.00 mbar
Temperature 1: 32.17 deg C
Depth 1 Lib: 1.73 m
Depth 1 Calc: -10.24 m
Altitude 1: -1317.98 m above mean sea level

Pressure 2: 1003.00 mbar
Temperature 2: 25.49 deg C
Depth 2 Lib: -0.10 m
Depth 2 Calc: -10.26 m
Altitude 2: 85.64 m above mean sea level