Does Ardupilot Support INA219 I2C Battery Monitoring?

For monitoring a second battery in Ardupilot does the generic-smbus setting (or any other setting for that matter) support the use of the INA219 V/I/P monitoring chip please? I have some of these and if suitable for the firmware they are an ideal solution to my monitoring.

My monitor device is something like this:

FYI my Ardupilot FC is a Matek F765WING, with external GNSS receiver/magnetometer, 0.96" OLED and airspeed pressure sensors on the two existing I2C links.

If this is unsupported I will make arrangements to use analog inputs for V & I.

Thanks :slightly_smiling_face:

From what I can tell that sensor would not be drop in supported by the generic-smbus monitor type as the registers are different for volts & current. It might be as easy to change the registers for that device and adapt some unused methods.

These are the smart battery registers we conform to.
http://sbs-forum.org/specs/sbdat110.pdf

Otherwise I’ve heard that scripting can do custom I2C devices and found an example here.

Thanks for the prompt reply. I will dig into the supported units, and also have a look at adding that to my LUA scripting.

Cheers!

1 Like

This might be close enough:

4 Likes

Thanks Peter. I will have a look and consider it for future revisions of my hardware. I am only breadboarding currently so have started grafting in analog power monitoring to the FC.

Nice! Ask and you shall receive around here! :laughing:

Saving this part number for later projects. How well did it work?

I just merged support for the INA231 battery monitor. I haven’t looked at the 219, but I expect it will be fairly close

1 Like

Yay! Thanks heaps for expending your effort on this :slightly_smiling_face: . That’s a nice capability to add.