Home        Store        Learn        Blog

Bar100 sensor MRO Control Zero integration problems

Hi,
I am trying to use the Bar100 pressure sensor with the MRO Control Zero autopilot running ArduPilot. I configured the autopilot to use an external barometer and set the barometer driver to Keller. But for some reason I don’t see any output from the pressure sensor. I also tried using it with the CubeBlack and had the same problem. Any ideas on what I could be missing?

Thanks.

Hi @Andrii_Hlyvko,

Here is the ArduSub section on Autopilot boards.

We have only thoroughly tested the Pixhawk 1.

Nobody at Blue Robotics has tested a Control Zero, but for the CubeBlack, you can try it on the I2C 1 port (I2C connections on the GPS 1). It won’t work on I2C 2.

Ok I’ll try on the I2C 1. Any Idea why it doesn’t work on I2C 2? So far I’ve only connected it to the I2C 2 port on the CubeBlack.

There was an early issue a few years ago about eternal sensors not working on the I2C 2 bus. I thought it got merged, but I’ve never been able to get our sensors to work on a CubeBlack on I2C 2.

Ok. I tried connecting the Bar100 to the I2C on GPS 1 port on CubeBlack and it still did not work. I also tried the I2C on GPS 2 port. I am setting GND_PROBE_EXT to 256 for Keller and I have GND_EXT_BUS set to -1 to probe both I2C buses. Any ideas why I am still not getting any readings? All I get is press_abs and press_abs2 which are both internal barometers on CubeBlack.

@Andrii_Hlyvko can you find a schematic for the board? or do you know which firmware file should be used?

Try some different values for GND_PROBE_EXT like 0, 1, 2… and reboot

I am using the latest ArduSub firmware that I upload using Mission Planner.
GND_PROBE_EXT is just a bitmask for what sensors to probe for on the I2C port so I don’t understand how changing it will fix the problem.
I used a digital protocol analyzer and saw that there is some communication happening with the Bar100 when the MRO Control Zero autopilot boots up but after that the communication stops. Seems to me like a Keller driver bug in ArduCopter or a bug related with how I2C sensors are detected/managed.
Do you know by any chance who wrote the Keller Bar100 driver for ArduPilot?

I’m sorry I meant to ask you to change GND_EXT_BUS

It was me. I can help you more if you tell me which firmware file you are using or provide a schematic for the autopilot hardware.

I made changes to the Keller driver code and I got it working. The problem was in the _read() function.
I changed
if (!_dev->transfer(0x0, 1, data, sizeof(data)))
to
if (!_dev->transfer(nullptr, 0, data, sizeof(data)))
and it works now. I was able to determine that the autopilot was sending wrong read measurement requests to the sensor by using a digital protocol analyzer.

I also had to change AP_Baro.cpp so that I am able to use the sensor on other configurations and not just ArduSub.
Thanks for your help.
Best, Andrii.