MS5037-02BA sensor drift / unreliable results

Hello everyone.

First off, thank you for making such a resourcefull community!

I am a Electronics Engineering student working on my bachelor thesis project where i am making a automated hot water tank control system.

To measure liquid levels, i am, amongst other sensors, using a MS5837-02BA pressure sensor.

The set up of this sensor is pretty straight forward. I have quadruple checked the values i get out of the sensor with those expected from the datasheet from TE and they all look good.

The problem i am having is a very unstable sensor. Sometimes it drifts upwards, sometimes downwards. Sometimes it gives me really bogus values.

Sporadically, with no set time interval or cause - it starts giving me really low pressure values.

TE datasheet (linked above) tells us that the Example/Typical value for D1 (uncompensated pressure) should be around 6465444.

When my sensor starts fussing, it gives me 4182461 and lower values, which when ran through all the calculations, results in a very erronous value.

Value D2 (uncompensated temperature) returns 7642822, which is closer to its Example/Typical value of 8077636 in comparison with D1.

I have searched through this forum, through google and all other resources i can find and i cannot find anyone in the same situation as me.

I am running the code on a STM32H7B3I-DK using STM32CubeIDE in C++.

The code i am using is posted here:

I would love to hear other peoples experience with this sensor.
So far, i am not impressed as it behaves very unreliable.

Sometimes it works fine for hours, then all of a sudden it just poops itself.

I have spent well over 300 hours trying to figure this sensor out, but no luck so far.

Best regards,
Slexs.

Hi @slexs,

Have you tried our Arduino/Python examples ?