ArduSub support for Bar02 depth/pressure sensor? Depth hold not functioning

Hi there,

I have 2 related issues:

  1. BAR02 SUPPORT in ARDUSUB
    I am getting strange values using the Bar02 connected to a PixHawk running ArduSub. For the record I am running ArduSub 3.5.3.

In air at around 40m above sea level, our Bar02 is reading ~20500 mbar via QGC. We have a spare Bar02 that we have connected to the raspberry pi and are reading values via the Blue Robotics python library. This also gave us values of approximately ~20340. Then we changed the Barometer initialisation in the first few lines of example.py from

sensor = ms5837.MS5837_30BA()

to

sensor = ms5837.MS5837_02BA()

This meant that we now received values of approx 1017 mbar, which is still not accurate for our altitude in air but nevertheless a lot closer to what we expect.

Is there an equivalent change we can make in ArduSub so that it calculates correctly for the Bar02? Can we change a parameter in QGC that specifies which barometer we are using? Or perhaps Ardusub does not yet have support for the Bar02?

  1. DEPTH HOLD ISSUE
    Underwater, depth hold does not function (tested in a pool ~2m deep), with the Robot desperately trying to surface regardless of its starting position or any force holding it down. Looking at the raw pressure values in QGC, we see press_abs values in the order of > 20000 mbar which equates to ~200m depth. However we do not have any fence parameters available and so the robot should still hold its depth.
2 Likes

ArduSub does not support Bar02. It supports the Bar30 and Bar100. Support will require changes to the code, there is no parameter available to make it work. Why do you want to use a Bar02 on your vehicle?

I am looking to build a submarine. I tried using the Bar03 temperature/depth sensor along with ArduSub and preformed a successful underwater test. Right now the sub isn’t supposed to travel deeper than 15m. The accuracy of the Bar03 affected the measurements too much. I think that the Bar 02 is a much better sensor for this application but its not supported with ArduSub. Is there a way that I can change the software or sensor program for capability.

Your help would be greatly appreciated.

I think that any performance gains to be had moving from the Bar30 to the Bar02 will be marginal to insignificant. There is a conflict that prevents me from adding support. I don’t intend to add support unless this issue is solved (there is no apparent resolution):

Can you explain your problem in more detail?

I would like to have a more accurate depth measurement than 2mm. The Bar30 sensor does not have enough accuracy. Is there a way I could improve that? The Bar02 has an accuracy of 0.16mm which would be a lot better.

I would like to have a more accurate depth measurement than 2mm.

Why? What is your application? What are you trying to accomplish?

I am working on a underwater vehicle that has sensors on it connected to a Pixhawk. There are some underwater thrusters on the vehicle that control its depth. When the vehicle is on the surface there is a GPS locator. Then the vehicle goes underwater to track characteristics of the under the water like fish, rocks, etc. I need to know the depth of the vehicle so that I can have a clear picture of what’s in the water.

Is there a way that I could have your email address to communicate? I could send you more about the project there.

I need to know the depth of the vehicle so that I can have a clear picture of what’s in the water.

The Bar30 has been proven to be suitable for the applications and depths you’ve mentioned. That’s why it is supported by ArduSub, and installed standard on all of our ROVs.

Is there a way that I could have your email address to communicate? I could send you more about the project there.

My email address is jacob@bluerobotics.com. You may also contact support@bluerobotics.com for direct support.

Because the software project is an open-source community effort, I prefer to discuss changes to the software here, in a public forum.

Hi I sent you an email but I’m not sure if it was blocked or not.

I made a mistake when I asked about depth resolution I should have used the word accuracy. The Bar30 Depth/Pressure Sensor has a relative accuracy of 204 cm in freshwater. I would like to order the Bar02 Depth/Pressure Sensor which has a relative accuracy of 4 cm in freshwater. For this project it is helpful to know to a high accuracy where the vehicle is. I was hoping that I could change something maybe in the software driver to make it compatible with ArduSub since the connector for both sensors are the same.

I got your email. This forum is the proper place for discussion.

The Bar30 Depth/Pressure Sensor has a relative accuracy of 204 cm in freshwater. I would like to order the Bar02 Depth/Pressure Sensor which has a relative accuracy of 4 cm in freshwater.

Be careful, the datasheets for the 30BA and the 02BA differ in what they specify (absolute accuracy vs relative accuracy, ie precision).

The Bar30 measurement may differ from the true pressure by +/-100mbar in the long term, but consecutive measurements are very precise (within a 1~2 centimeters). So you can consider this +/- 100mbar as a constant offset, and ‘tare’ your measurement once before going in the water.

For this project it is helpful to know to a high accuracy where the vehicle is.

In summary, we use the Bar30 on our vehicles, and it is well-suited for the application you describe.

I was hoping that I could change something maybe in the software driver to make it compatible with ArduSub since the connector for both sensors are the same.

It is possible to adjust the sensor driver to accomodate the 02BA part. You will have to do this on your own, however.

Is there are any plans to add support for Bar02?

I don’t believe so, but I’ve asked the software team for confirmation.

Do you have a particular use-case that would require it? :slight_smile:

1 Like

I bought Bar02 instead of Bar30 by mistake :sweat_smile: , this is why I’m asking about Bar02 Ardusub support.

I suggest you contact sales@bluerobotics.com and let them know what’s happened. They may be able to let you do a replacement for the sensor you actually wanted :slight_smile:

Hello,

I already own a Bar02 pressure sensor which I used previously with an Arduino on its own. This year, I upgraded to the Ardusub system with the Raspberry Pi 3B and the Pixhawk 1, and would like to implement this depth sensor to avoid having to buy a new one. I am the CEO of a MATE ROV Competition team, so we are trying to save money to spend it on travel to the world championship. Since this discussion was almost four years ago, is there any way to implement this sensor with QGroundControl now?

Thanks,
Makenna Reilly

Hi @Makenna,

The problem/limitation here is with the ArduPilot firmware, not QGroundControl. The issue Jacob linked to originally is still open, but I looked into this a bit and it seems like a solution for the main issue may have been decided on last year, so I’ve posted a follow-up in the thread there asking for clarification on whether the same approach should work to enable the Bar02.

If it’s relevant the actual problem lies in making both the Bar30 and Bar02 available as options. If you know you’ll only be using a Bar02 in your vehicle then you could technically solve your problem by compiling a custom firmware with the driver modified to support only the Bar02 instead of the Bar30, which would at least enable it to work for your vehicle, it just wouldn’t be a general solution we could merge in to mainstream ArduSub to fix the issue for everybody.

1 Like

Hello,

Thank you for the fast response. I don’t think that is a viable option considering the resources and knowledge available to our team at the moment. We have ordered a Bar30 depth sensor to replace the Bar02, and I look forward to seeing if anyone else comes up with a solution for use in the future.

Thank you,
Makenna Reilly

1 Like

Can you please let me know the process of compiling a custom firmware with the support of Bar02 pressure sensor? I would highly appreciate a swift response

Can you please tell the changes?

Can you please let me know tha changes I need to make to add support for Bar02 pressure sensor?

Has anyone successfully integrated Bar02 pressure with Pixhawk for Ardusub?
I saw this issue

But no one seemed to respond.
Can any one please help me out?