UART battery monitor

Good morning,

I am currently using a LiFePo battery with my vehicle due to safety issues with LiPO. The thing is that these batteries have a pretty constant voltage so it is not easy to monitor the capacity of the battery. The thing is that I have connected a sensor that has an UART output. I’ve been trying to send the information to the PixHawk but apparently I can’t. I’ve also tried using lua scripts but I cannot pass the battery voltage to the FC.
Any ideas on how to make the UART battery monitor work?

Thank you,

Hello @Magix, I may not get you at this point. Why constant voltage make it difficult to monitor tha battery capacity - here I assume that “capacity” means mAh

There are several ways to “feed” the Ardupilot battery information

  1. Using Mavlink: You need to have intermediate hardware (such as microcontrollers, embedded PC) to read the battery and send the BATTERY_STATUS messages to Ardupilot
    Some useful links about how it goes:
    Simple way MAVLink and Arduino: step by step
    Battery status message Battery Protocol · MAVLink Developer Guide

  2. Using UAVCAN: https://uavcan.org/specification/UAVCAN_Specification_v1.0-beta.pdf#batteryinfo this is more difficult to implement compared to the 1.

  3. Why just simply use the Analog voltage/current measuring feature from Ardupilot: Power Monitor/Module Configuration in Mission Planner — Copter documentation

Hope this helps.
Vu.

Hi Vu thank you for your quick reply,

The thing is that I am trying to have sort of a “smart” battery, so that the same battery had the information of its charge. I was hoping I could avoid using an arduino by purchaising a comercial sensor that has a TTL output, however it seems like I will need to introduce a microcontroller.

Thank you for your help!

I have requested support for common UART BMS boards, but you probably won’t see support until the summer

Oh thanks, GeoMuir, good to know. I’ll keep an eye on this feature. For the moment it looks like I’ll have to use an Arduino in the middle.