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?
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
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
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.