# BM30 - Mistake Sensor

**URL:** <https://discuss.bluerobotics.com/t/bm30-mistake-sensor/13843>\
**Category:** General Discussion\
**Created:** [March 8, 2023, 12:34am UTC](https://discuss.bluerobotics.com/t/bm30-mistake-sensor/13843 "2023-03-08T00:34:55Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![allacmc](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/allacmc/32/10615_2.png) [@allacmc](https://discuss.bluerobotics.com/u/allacmc)\
**Post date:** [March 8, 2023, 12:34am UTC](https://discuss.bluerobotics.com/t/bm30-mistake-sensor/13843/1 "2023-03-08T00:34:55Z")

</div>

I purchased a BM30 sensor from blue Robotics and after putting it into production I noticed that it shows inaccurate readings related to the actual sea level.

The readings are -0.5 or -1 or 0.20 - Yes they are all close to zero.

Is there a way to perform a “Reset” when I’m actually at sea level?

Something like a “Zero Tara”?

Is it in the library?

I even know the setFluid function, I’ve tested several values ​​and nothing changes the values ​​presented.

The system works well (however), I don’t have exact accuracy.

---

<div class="post-metadata">

**Author:** ![allacmc](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/allacmc/32/10615_2.png) [@allacmc](https://discuss.bluerobotics.com/u/allacmc)\
**Post date:** [March 16, 2023, 3:49pm UTC](https://discuss.bluerobotics.com/t/bm30-mistake-sensor/13843/2 "2023-03-16T15:49:45Z")

</div>

@EliotBR and @jwalser

Do you remember anything along these lines?

---

<div class="post-metadata">

**Author:** ![EliotBR](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/eliotbr/32/6937_2.png) [@EliotBR](https://discuss.bluerobotics.com/u/EliotBR)\
**Post date:** [March 17, 2023, 4:06am UTC](https://discuss.bluerobotics.com/t/bm30-mistake-sensor/13843/3 "2023-03-17T04:06:19Z")

</div>

Hi @allacmc,

We do not sell any “BM30” sensor - presumably you mean our [Bar30](https://bluerobotics.com/store/sensors-sonars-cameras/sensors/bar30-sensor-r1/) pressure/depth sensor? I will respond to the rest under that assumption.

> [@allacmc](#):
>
> Is there a way to perform a “Reset” when I’m actually at sea level?
> 
> Something like a “Zero Tara”?
> 
> Is it in the library?

The sensor itself does not do pressure offsetting, and our libraries currently use a hardcoded offset of mean sea level, so offsetting/taring to your actual ground/sea-level pressure currently needs to be handled in your own code.

That said, the feature would be convenient to have, so I’ve [raised an issue](https://github.com/bluerobotics/BlueRobotics_MS5837_Library/issues/29) about it in our MS5837 libraries, as a recommended enhancement for us (or someone else) to add when there is time available to do so.

---

<div class="post-metadata">

**Author:** ![allacmc](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/allacmc/32/10615_2.png) [@allacmc](https://discuss.bluerobotics.com/u/allacmc)\
**Post date:** [March 19, 2023, 3:29pm UTC](https://discuss.bluerobotics.com/t/bm30-mistake-sensor/13843/4 "2023-03-19T15:29:44Z")

</div>

I would like to know if anyone has this experience in any sense?

I put it like this: The fact of using the sensor in some equipment like the ROV for example. And do you need to change the data to get depth accuracy?

---

<div class="post-metadata">

**Author:** ![EliotBR](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/eliotbr/32/6937_2.png) [@EliotBR](https://discuss.bluerobotics.com/u/EliotBR)\
**Post date:** [March 22, 2023, 7:02am UTC](https://discuss.bluerobotics.com/t/bm30-mistake-sensor/13843/5 "2023-03-22T07:02:00Z")

</div>

> [@allacmc](#):
>
> … The fact of using the sensor in some equipment like the ROV for example. …

As mentioned in the issue I raised,

> [@BlueRobotics\_MS5837\_Library: Allow setting the ground level atmospheric pressure (#29)](#):
>
> This kind of offsetting / calibration is [already done in ArduPilot vehicle firmwares](https://github.com/ArduPilot/ardupilot/blob/Sub-4.1/libraries/AP_Baro/AP_Baro.cpp#L844-L853), and used regularly to set the zero-point for ArduSub vehicle depth, and the launch altitude for aerial vehicles.

The autopilot firmware we use on our ROVs includes a “pressure calibration” option that allows setting the current pressure to register as 0m depth. That firmware is much more complicated than a single sensor library though, and includes abstractions for using other pressure sensor models (including on aerial vehicles), along with code for other configurations and control of the vehicle.

* * *

Since the depth is calculated as a linear scaling of the pressure, it should be quite simple to implement this feature in your own code as a settable offset that gets subtracted from the subsequent depth estimates. If you do implement it you’re welcome to submit a pull request to the library so it can be integrated and others can make use of it 🙂
