Lipo battery monitor for 1s-6s packs - Page 1
Forum section: electronics / projects

author: kasunt
author_rank: Newbie
timestamp: December 18, 2012, 12:37:42 am
content: Hi guys,I want to be able to output lipo battery voltage (doesnt have to be cell level) to a display the remaining juice in the battery much like a fuel gauge. It has to work for 1s to 6s batteries and it would be ideal if the solution uses an AVR microcontroller (as im familiar with AVRs). A lot projects out there are focused on 1s batteries and they normally use a voltage divider connected to ADC. From what I have read I think a voltage divider will drain the battery.Its even better if the solution allows the detection of voltage close to accurate. I want to be quickly breadboard this and prototype so would be good to use non-SMT parts.Any schematics or thoughts about how I can achieve this voltage sensing ?PS: I do have an Atmega 2560 board.

author: Things
author_rank: Regular Contributor
timestamp: December 18, 2012, 01:50:00 am
content: Hehe, unfortunately doing this isn't really as easy as it would appear at first. I'm working on something that needed to dot he exact same thing.At the bare minimum to do it properly, you're going to need an analog mux with enough inputs for all of your cells, and a few differential amps.However, Linear Tech produce a chip, the LTC6803 series, that'll do all this for you and output the data over SPI. Much easier than doing it manually, but it is a little spendy.If you still wanna do it manually, take a look at the Turnigy charger teardown vid Dave put up a while ago. He goes over the schematic, and included in that schematic is a way of monitoring cell voltages with a standard AVR. However, there is a problem with this method, and it's that the battery can't be powering the circuitry reading the cells, you'd have to use an isolator. The LTC chips would avoid this.

author: kasunt
author_rank: Newbie
timestamp: December 18, 2012, 02:11:23 am
content: Thats fantastic Things. Thanks.Not too worried about the cost at this stage. Only problem with this chip is its in a SSOP package

author: kasunt
author_rank: Newbie
timestamp: December 18, 2012, 02:12:35 am
content: By the way are you saying the only way to measure voltage accurately is to look at ever cell ?

author: peter.mitchell
author_rank: Super Contributor
timestamp: December 18, 2012, 08:29:42 am
content: Quote from: kasunt on December 18, 2012, 02:12:35 amYes, depending on each cells internal resistance they will charge and discharge at different rates

author: Psi
author_rank: Super Contributor
timestamp: December 18, 2012, 08:50:22 am
content: This thread might help youhttps://www.eevblog.com/forum/projects/mapping-a-voltage-range

author: BravoV
author_rank: Super Contributor
timestamp: December 18, 2012, 08:53:30 am
content: Quote from: kasunt on December 18, 2012, 02:12:35 amYep, if you want the whole series of batteries to perform at their best, cause when working at > 1 cells, those battery cells might not have "identical" condition and capability.For example in 2 cells configuration, say one cell is a bit weaker at 3.9 volt while the other at 4.1 volt, total is 8 volt, and in this particular scenario you just cannot assume each cell's voltage is 8 volt / 2 cells = 4 volt.If you drain it say until 6 volt as cut off voltage with the "assumption" they are identical, this condition might ruin the weak cell since it might drained below safe voltage say like 2.7 volt while the other stonger cell still at 3.3 volt.Especially Li-xx based battery that has very strict lower voltage limit when discharging, without monitoring "every" cell's voltage, the battery pack's life will be shortened really fast and the weakest cell will die sooner, same requirement also applies in charging mechanism.Now, this above example is only for 2 cells, imagine in 6 cells, thing will become nastier real fast if cell monitoring is not properly done.

author: bfritz
author_rank: Regular Contributor
timestamp: December 19, 2012, 08:50:17 am
content: If as you said in the first post, all you want to do is measure the entire pack voltage, this can be done with a resistive divider, a couple FET's so that you only turn the divider on when you made the measurement, and a GPIO pin on your processor to enable the divider.The DS2788 uses this idea of enabling the divider only when the measurement needs to be made.http://datasheets.maximintegrated.com/en/ds/DS2788.pdfRefer to page 6.You would use the circuit consisting of the BSS84, SN7002, 2 10K R's, the divider R's (shown as a divide by 10 in the schematic). You would attach the gate of the 2N7002 to the GPIO pin of your micro, and the Vin pin shown on the schematic would go to your A/D. When you drive the 2N7002 gate high, it conducts, which generates a gate to source voltage on the BSS84 P-Channel FET, turning it on, which then energizes the resistive divider. You will need to wait for the circuit to settle a short period after turning the divider on, as it will take some time for the filter resitor on the Vin pin to come to equilibrium. The cap is there as most A/D's consume some current during the conversion, so if the input is high impedance it can throw off the measurement.Anyway, if all you want is to measure the pack voltage, for a couple pennies for FET's and resistors, you can do this with the micro you plan to use.Enjoy!