Home        Store        Docs        Blog

BA02 Sensor only reading to nearest mb


#1

I have attached a BA02 pressure sensor to my Arduino Fox 1200, and used the Blue Robotics example code. At the moment its running on my desk.

I altered the code for the 02BA sensor and for seawater (since eventually want to put it under water) as suggested in the documentation
sensor.setModel(MS5837::MS5837_02BA);
sensor.setFluidDensity(1029); // kg/m^3 (freshwater, 1029 for seawater)

Some screen copy from serial output:
Altitude: -171.24 m above mean sea level
Pressure: 1034.00 mbar
Temperature: 25.57 deg C
Depth: 0.21 m
Altitude: -171.24 m above mean sea level
Pressure: 1034.00 mbar
Temperature: 25.57 deg C
Depth: 0.21 m
Altitude: -171.24 m above mean sea level
Pressure: 1034.00 mbar
Temperature: 25.57 deg C
Depth: 0.21 m
Altitude: -171.24 m above mean sea level

Question:
Why is the pressure sensor only reporting pressure to the nearest mb?

It is also reading about 23mb higher than another atmospheric pressure sensor I have running on another Arduino unit.

Any suggestions?

Thanks


(Jacob) #2
  1. https://github.com/bluerobotics/BlueRobotics_MS5837_Library/issues/7
  2. The relative accuracy on the sensor is very good. The absolute accuracy appears to be +/- 2mbar. What is the accuracy of your other pressure sensor? You can ‘zero’ the measurement like taring a scale by subtracting the pressure measured in air from all of your measurements in water.

BA02 sensor now producing strange results
#3

Thanks for the reply,

I might be missing something here, since I do not fully understand the results from my sensor and how the driver converts the sensor values.

I have been testing this in air on my desk.
The documentation says that in air it should give 13cm resolution in the altitude result.

If I lift my sensor up by over 1m I do not see a difference in the altitude result.
Also, its hard to see how the sensor can determine the altitude (with resolution of 13cm) with the pressure result only reporting to the nearest mb.

For example, say pressure at MSL is 1013.25mb, and temp of 10degreeC
If sensor reports pressure as 1012.00mb, then that would give an altitude of 10.23m
If sensor reports pressure as 1011.00mb, then that would give an altitude of 18.42m

Another way of looking at it would be to calculate air pressure with altitude (MSL 1013.25mb, at 10degreeC), so for
1m altitude the resulting air pressure would be 1013.1278mb
1.13m altitude the resulting air pressure would be 1013.1119mb
1.26m altitude the resulting air pressure would be 1013.0960mb

Perhaps the driver conversions are only relevant once the sensor is under water pressure. I have yet to test that since it would mean potting up the sensor and I wanted to make sure its working correctly first.
Please could you post some of your bench results on the forum e.g., results from the running the example script, with a reference to your local altitude, and then what happens if you move the sensor to 1m above the bench.

Many thanks


(Jacob) #4

All of your observations and concerns are related to the issue linked above. We will try to fix it soon.