0

I2C battery monitor for 7.4V LiPoly?
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

I2C battery monitor for 7.4V LiPoly?

by code_goddess on Sun Jun 13, 2021 10:32 pm

I was looking at your battery monitor for a single cell LiPoly https://www.adafruit.com/product/4712 and it looks like what my project requires except my battery is a 2S 7.4V. Other than that it's perfect. I was wondering, do you carry a similar I2C breakout board that's compatible with a two cell battery? Or know where I could find one? It's a fast discharge LiPoly to run MG995R motors for the legs of a hexapod.

One thing I noticed is I hooked up a voltage meter (item #575 in your catalog) to the little 3-pin connector on my battery and found the middle wire to either of the other wires shows a little over 3.7V, while across the two end wires there's about 7.5V. Makes me think the middle wire connects to the center between the batteries. So I wonder if the LC709203F would suit my purposes if I connect only one battery, or if there's any problem that can happen from doing that.

Thanks in advance!

code_goddess
 
Posts: 28
Joined: Sun Feb 18, 2018 12:52 pm

Re: I2C battery monitor for 7.4V LiPoly?

by blnkjns on Mon Jun 14, 2021 11:30 am

You can basically measure the battery voltage with any analog pin and a resistor divider. So get for example 3x10kΩ resistors, put them in series, and place them between de battery contacts. Now connect the solder joint between the 2 resistors closest to GND or - side, and connect that to any analog input on your microcontroller. Then:
Vbat=valueAnalogInput*boardVoltage*3/1023

blnkjns
 
Posts: 663
Joined: Fri Oct 02, 2020 3:33 am

Re: I2C battery monitor for 7.4V LiPoly?

by code_goddess on Mon Jun 14, 2021 1:29 pm

Thank you! I have an ADS1015 that I wanted to connect and get working, so this was the perfect reason to get that done, haha.

So I now see a value of about 2.46V, which if I multiply by 3 and divide by 2 indicates the average voltage of the two cells is 3.69V. There seems to be two methods to convert that to a percentage: the simple way is to subtract 3.2 and multiply by 100, that gives me an estimate of 49.2%, which seems high given the robot cannot lift all its legs at the same time. The other way is much more accurate and uses some advanced math that unfortunately I don't understand, for example: https://www.mdpi.com/2313-0105/2/2/17/pdf . I was really hoping for the on-chip math.

code_goddess
 
Posts: 28
Joined: Sun Feb 18, 2018 12:52 pm

Re: I2C battery monitor for 7.4V LiPoly?

by blnkjns on Tue Jun 15, 2021 2:59 am

The complex math is because the voltage drop is not linear. A fully charged cell is close to 4V, it goes with a slight curve towards 3 and then goes almost straigth down to zero after the tipping point.
So to avoid complex math, you could make a table with time since powered on and voltage, find the time where the voltage drop occures. Then maybe pick 90% of that time as 100% usable time (the voltage drop point is not good for your cell), and start interpolating from your table and calculate the percentage from that.

blnkjns
 
Posts: 663
Joined: Fri Oct 02, 2020 3:33 am

Please be positive and constructive with your questions and comments.