Servers by jDrones

LiFePo4 Battery Monitoring

Hello everyone!

I am working on a project that uses a 12V 100Ah LiFePo4 battery and a Pixhawk. I want to use YDHC current sensors [Link below] and an Arduino as a battery monitor setup and send that value to Pixhawk via MAVROS for failsafe mode triggering.

My questions are:

  1. Can I actually measure LiFePo4 battery percentage status using Pixhawk? I read everywhere that Pixhawk works with LiPo batteries. The discharge curves for both batteries are different, would that not affect the battery estimation logic?

  2. Can I by any chance, skip the Arduino and use YHDC current sensors to directly send current measurements? In this case, are there any voltage sensors that are recommended for LiFePo4 batteries that I can use to provide voltage readings to Pixhawk?

YHDC Current Sensors - https://www.aliexpress.com/item/32836805934.html?spm=a2g0o.productlist.0.0.14d1185chF40Zn&algo_pvid=390cd496-76e9-4ebb-b80e-2a22407b6a9a&algo_expid=390cd496-76e9-4ebb-b80e-2a22407b6a9a-2&btsid=0bb0623f15994879363543703e4d35&ws_ab_test=searchweb0_0,searchweb201602_,searchweb201603_

Thanks in advance!

  1. We do not store any chemistry dependent discharge curves. So the logic will not be affected.

Hi, thank you for responding.
So I can directly hook up any standard power module that powers Pixhawk and is connected along the mainline and I’ll get my battery status accurately as long as I configure those few parameters?

yes. It will work as good as with LiPo.

oh nice, can I use hall effect sensors like YHDC sensors to send current values and a separate voltage sensor to send voltage values to Pixhawk?

You can use them, if you write the Ardupilot firmware device drivers to support them.

Oh I see. That sound arduous :joy: Thank you for your help!!

Or you can pick one of the many proven battery monitors described in ArduPilot`s wiki.

Sorry for the delay in replying.

I am limited by other factors in the system that is preventing me to use those battery monitors at the moment, hence I was thinking of using a sensor like YHDC. What if I use an Arduino in between to decipher the data more easily and send that to Pixhawk from Arduino.

What type of current and voltage reading is Pixhawk expecting would be the question essentially.

Thank you again!

I may be ignorant here, but couldn’t you just setup the battery monitor as an Analog Voltage and Current monitor. Then connect the output from your hall-effect sensor into Pin 3 and Pin 4 for the voltage sensor on the Power Connector. This assumes the output from from your hall-effect doesn’t go above 3.3V. https://ardupilot.org/copter/docs/common-pixhawk-overview.html#power

Then if you have a multimeter follow this guide to set the amps per volts value. https://ardupilot.org/copter/docs/common-power-module-configuration-in-mission-planner.html#calibration

Also you can change the pins that are used for battery monitors to alternative ADC pins.

1 Like

@Goutham_Raj: You could see if BatMon is appropriate for you: rotoye.com/batmon

Hey, thanks for replying.

I have seen and considered Batmon before, but it’s very expensive. I would not be using all of its features to justify the cost. I have other components like an ATX on board helping with Power Distribution across different voltages.

But I think amilcarlucas answer was a relief. I still need to test if I can send values via Arduino to Pixhawk. If that works, then my problem is eliminated.

Hi Josh,

Sorry for the late reply. That’s what I thought I would do as well. I’ll test this out and notify my findings here for anyone else looking at hall effect sensors integration with their build.

Servers by jDrones