I2C Issue (Depth Sensor cannot calibrate)

Current Setup:
BlueROV2 with Navigator
ArduSub 4.1.2
Waterlinked DVL A50
External Compass BMM-150

As described above I have an external compass (a BMM150) that I have potted and attached to my vehicle externally with BlueTrail Engineering connections (highly recommend). This has been a great addition to stabilize the EMF issues that have plagued the internal compasses.

When I was testing yesterday, all of a sudden I started getting a depth sensor error. I took the vehicle apart and assumed that my connections had come loose from the depth sensor. This was not the case and after wiggling the connections, I could not get the pressure sensor to calibrate. I can see readings fluctuating and I can press my finger over the sensor opening to cause a pressure spike, but the calibration always fails. I also tried both I2C ports and no difference.

Fast forward to today, I pulled a pressure sensor off another vehicle expecting it to help and it did not. Same issue. I can run i2cdetect -y 6 and I see the sensor at 0x13 and I can still see real-time readings in QGC and BlueOS.

After some reading, I saw that the thrusters can cause interference over i2c. To test this, I plugged the raspi in via USBC, so no motor power at all, and the issue persists.

Finally, I moved towards checking my other i2c sensor (the external compass). I found that if I unplug my compass, then the depth sensor calibration immediately works. And conversely, plugging the compass back in makes it fail again.

Any help or suggestions on this would be amazing. I am completely stumped at this point. Also, note that my compass works all the time, regardless of if the pressure sensor is plugged in

Hi @cmarq -
If you have access to an oscilloscope, it may be possible to observe what’s happening. I suspect the long wire carrying I2C signals to your external magnetometer is introducing considerably inductance on the bus, which is making the I2C signals have “rounded corners” - I2C really doesn’t like long cables!
An active I2C terminator as mentioned in this guide may help, or shortening your I2C cables as much as possible…

I’ve not encountered the issues that prompted you to pursue an external compass. Have you installed additional power wires around the Navigator in a standard BlueROV2? A good calibration of the compass and gyro should result in satisfactory performance…

Hi Tony,

I think the terminator you suggested is the best bet for now. I should get it by Sunday and have updated results by Monday

I’ve mentioned the external magnetometer in previous posts. I’ve tried twisting power wires, adding ferrite cores, accounting in software, etc. If I was controlling this vehicle as an ROV, it wouldn’t matter much to me if the yaw is off by 5-10 degrees. But since I am running this vehicle autonomously with a waterlinked dvl, the yaw angle is very important so it was worth the trouble to me to make sure interference was minimal. This is the first issue I’ve had with the i2c protocol and the magnetometer. Hopefully this fixes it