Home        Store        Docs        Blog

MS5837-30BA - Readings not correct (NodeMCU Board)

Hello, i have a MS5837-30BA sensor, it is connected to my NodeMCU (ESP8266) with SDA,SCL, 3.3V and GND. I also have a seperate board with a BME280 pressure sensor, to get refference values.

The first question i have is, how is it ment to be if i want to measure the depth underwater? Because what i figured is, that if the (air)pressure changes (weather), the shown depth will change to even if the sensor has not been moved at all. So is there a way to measure the absolut depth (not changing with air-pressure changes)?

Diagramm

In the graph you have the following color coding:
blue = air pressure 1 (BME280)
black = air pressure 2 (different pressure sensor)
yellow = measured depth of the MS5837 in cm
red = difference of the air pressure 1 and the MS5837-pressure both in mbar, so the difference is equal to cm - depth

You can see that the red line is almost perfect, constant but there are some movements. The tiny changes are measure “inaccuracy” which is fine and about +/- 1cm, but at the beginning when i submerged it, there have been quite some changes with up to 5 cm difference.The depth in this entire graph is 18,5 cm

Hope to get some help from you :slight_smile:

Hi @Surfer2010,

Thanks for the post! This is a really cool plot and it’s interesting to see the comparison with air pressure. It’s nice to see that a lot of the overall movement and short spikes are caused by changes in air pressure, not sensor noise in the MS5837.

To answer your first question, water depth measurements are affected by the atmospheric air pressure, but the normal range of air pressure has relatively little affect on the water depth measurement. If you’re trying to measure to centimeter accuracy then it starts to matter.

As far as total accuracy of the MS5837, you’ll see in the datasheet a table showing the accuracy for various pressure ranges. These accuracies are assuming that you did a one-point calibration against atmospheric pressure.

The accuracy in the 0-6 bar range is +/- 50 mbar (+/- 0.5 meters water depth) so the variation you are seeing is within range and fairly typical. If you want more accuracy you could consider the MS5837-02BA, which can only go to 10 meter depth, but has much tighter resolution and accuracy.

I’m not familiar enough with how the MS5837 works to know where the inaccuracy comes from or what affects it.

-Rusty

Thanks for your quick reply.

For the MS5837-02BA i can’t find any ready to use breakoutboard for this sensor. I don’t dare to solder the sensor itself to a board yet, so i would love to have a board which has 4 Pins and is ready to use. Can you help me on that?

Besides this … the changes in airpressure will also be affecting this MS5837-02BA sensor?! So how can i measure better in cm? Won’t it have the same reaction on air-pressure changes? How do they do different?

Hi @Surfer2010,

We have this sensor on a small breakout board available here: https://www.bluerobotics.com/store/sensors-sonars-cameras/sensors/bar30-sensor-pcb-r1/

You are correct, the changes in air pressure will affect the 02BA version of the sensor as well. The only way to account for that is to monitor air pressure in your application or use an alternate means of measuring depth. I think it’s fairly unusual to require centimeter precision in depth, so most users don’t have this issue!

Is it practical to measure air pressure in your application?

-Rusty

The link you send me is also using the MS5837-30BA, and not the 02BA version.

yes i for sure can measure the airpressure, that’s what i did in the diagramm.
Red Line = Depthpressure minus airpressure … both in mbar, so the result of this is equal to cm of depth.

The question i had was why is this curve (red) changing “so much” at the beginning (putting it underwater) ? Between 2 a.m. and 2 p.m. it changes more than afterwards … Any Idea about that?

I do need a 5 cm accuracy … don’t know if the 02BA version can do this any better than this one does?

I also found this sensor: MS5803-14BA
how is this different? better? more accurate? less?

@Surfer2010,

We also have the 02BA version in breakout board format: https://www.bluerobotics.com/store/sensors-sonars-cameras/sensors/bar02-sensor-pcb-r1-rp/

I’m not sure why the curve changes more initially! That would be a question for Measurement Specialties I think.

Here’s the accuracy chart for the 02BA version:


(note that in the application notes it says the sensor must be dried once per day for this accuracy)

At the range you’re operating in, it has +/- 0.5 mbar accuracy, which is 100 times better than the 30BA version.

The 02BA version will be better than the 14BA version as well.

-Rusty

Link broken? or not correct?

Thanks

MS5803-01BA

Is this even more percise?

Link fixed!

Hi there,

i have your Sensor build into my Test-Setup with a NodeMCU and i’m wondering why it’s measurements vary so much in a constant way … (check out the picture)

dark blue = pressure
grey = sensor.depth

why do they constantly go up and down?! How can i minimize this or clear it?

Here is the plan … NodeMCU and the left is the depth sensor (which is actually 28 cm underwater) and the right element is the BME280, both connected to a seperate I2C Channel as you can see.