Baro30 Pressure sensor and Pixhawk4


I have some problems with connecting Baro30 pressure sensor to Pixhawk4 FMU5.
I’ve connected wires from sensor to i2c A port of Pixhawk. Version of ardusub installed is 4.0.3.
As i understand from other topics, i should have seen SCALED_PRESSURE2/3 mavlink packet in mavlink inspector in QGC, but i can see only SCALED_PRESSURE from internal sensor. Changing GND_EXT_BUS parameter gives nothing.

Did any1 able to make this sensor work on PX4? Will be appreciate for any help.


I was able to see SCALED_PRESSURE2 in mavlink inspector (changed default external bus id to 3). But now, messages with depth and temperature mostly consists of repeating garbage values (depth -38.6m, -49m, - 24.1m an temperature(-111,3C, 50C) and sometimes correct values (depth 0.0m and temperature around 26C). Calibration of pressure sensor was successfully done, but still garbage values appear?

What can cause it?

Hi Alex,

If you’re sometimes getting correct values and other times incorrect ones then that seems unlikely to be an issue with ArduSub or your Pixhawk, and more likely to be an issue with the sensor itself. Presumably you don’t have a spare Pixhawk or Bar30 to test with, so could you try hooking up the Bar30 you’ve got to an Arduino or Raspberry Pi (could use the companion computer if need be) and see whether you’re able to get consistently correct readings with it?

If it does turn out to be broken you can contact about a potential replacement or refund, and link them to this thread :slight_smile:

Hi Elliot.

I was able to “repair” values from barometers sensor by reducing frequency of grabbing data from sensor (in AP_Baro lib in ardupilot). I don’t know how, but no garbage data now.

1 Like

Interesting. Without having looked too deeply into the sensor firmware, perhaps the bad readings are from data requests while it’s part-way through filling up the reading buffer or something, or if it hasn’t yet had a chance to measure a new value since the last one was asked for.

Glad you managed to sort it out for now :slight_smile:

I was able to “repair” values from barometers sensor by reducing frequency of grabbing data from sensor (in AP_Baro lib in ardupilot)

Hi Alex, I’ve just managed to get my Cube Purple to recognise the Bar30 but it also seems the readings are not making sense. What values did you change in AP_Baro to get yours working?

Hello @petegreg. In file TSYS01.cpp i’ve changed from: _dev->register_periodic_callback(50 * AP_USEC_PER_MSEC, FUNCTOR_BIND_MEMBER(&TSYS01::_timer, void));
to : _dev->register_periodic_callback(500 * AP_USEC_PER_MSEC, FUNCTOR_BIND_MEMBER(&TSYS01::_timer, void));

In file AP_Baro_BS5611.cpp i’ve change from: _dev->register_periodic_callback(10 * AP_USEC_PER_MSEC,FUNCTOR_BIND_MEMBER(&AP_Baro_MS56XX::_timer, void));
to _dev->register_periodic_callback(100 * AP_USEC_PER_MSEC, FUNCTOR_BIND_MEMBER(&AP_Baro_MS56XX::_timer, void));

Hey alex how are you , i am having the same situation you had and i’ve changed the values like you did in AP_BARO lib but i didnt find the AP_Baro_BS5611 file , but i changed the value in the AP_Baro_MS5611 file ,i then compiled and uploaded thr firmware to the pixhawk4 , nothing changed .
Can you help with that ? or recommend a way to solve it ??

Hi @islamwael,

Assuming you’re already on development (directly using the master branch),

You may need to reset your parameters to their defaults before setting the other parameters will work correctly.