2S Li-ion / Lipo protection, charging, monitoring circuit - Page 1
Forum section: electronics / projects

author: okaresz
author_rank: Newbie
timestamp: May 13, 2014, 01:35:18 pm
content: Hi,I'm designing a full-fledged battery management solution for a 2S Li-po battery pack in a custom consumer electronics device. The peak current draw can be up to 4A, the average is around 0.5A (uC, motors, LEDs).The battery pack I use is a bare 2S puch cell pack withnointernal protection circuit.- I definitely need some kind of battery protection (under-, and over-voltage, over current, short-circuit)- I also need a charger solution with 1.5-2A charging current. (The supply will be an external 12V wall charger)- And I need the State of Charge of the battery, preferably with a coulomb-counting based method, as the OCV (open circuit voltage) -based solutions are inaccurate, especially during charge/discharge.- Optionally, a balancer solution would enhance battery life and safety.I did my research on the various IC-s of different manufacturers (TI, Linear, Microchip, Maxim, ..), but often they are wildly complex for my application, or expensive, and I would prefer leaded packages for hand soldering, which narrows the possibilities.My quetsions- Do I need balancing? My understanding is that the average discharge rate is below 1C, balancing is not crucial. Balancer IC-s are rare, and ofter part of a complex monitor chip. I am surprised that I haven't found a single charger IC with balancing capability!- Is there a simpler / cheaper / more integrated solution? Other than building the whole circuit from 3-4 different chips?- Best way to measure SoC? I don't need ultimate precision, but enough to keep the user happy with more or less reliable reports, and to be able to fully utilize battery capacity.I read about custom charger and monitor solutions with voltage references, op-amps, ADC-s with a single microcontroller, but to develop a reliable and accurate custom solution from ground up seems a whole lot of work, knowledge and experience in this area. And when we talk about li-ion safety in a consumer device, I would rather not take reliability lightly.Any opinions, experiences, tips are welcome in the topic.regardsokaresz

author: retrolefty
author_rank: Super Contributor
timestamp: May 13, 2014, 01:50:10 pm
content: Why not consider a single cell and utilize a DC/DC switching boost regulator. Makes charging simpler and you get a regulated output voltage.

author: poorchava
author_rank: Super Contributor
timestamp: May 13, 2014, 02:12:26 pm
content: I would use protected batteries based on cells from reputable manufacturer like Panasonic or LG-Chem (those are not exactly cheap - >10€ per 18650 battery is normal if you're shooting for higher capacities). This relieves you of dealing with safety critical stuff and in general protects your cells from deterioration, damage or destruction.Balancing circuitry is definitely needed, if you want to keep your batteries in good shape. There are some application notes from Cypress semiconductor. Google for AN2294, AN2309. There are also references to AN2258 and AN2267 but I have been unable to download those from Cypress website (or any other site for that matter).In general in those appnotes Cypress shows how to build a charging and balancing circuit with fuel gauge capability with their PSoC chips.

author: okaresz
author_rank: Newbie
timestamp: May 13, 2014, 03:01:45 pm
content: Quote from: retrolefty on May 13, 2014, 01:50:10 pmI'm not sure about using a switching boost PSU to supply DC motors with 1-1.5A peak current need. I have bluetooth 4.0 and some analog circuit on board, which needs stable supply rail. Maybe I'm wrong, but something tells me I would need a horribly large capacitor/inductor to decrease noise to acceptable amount at those loads.poorchava: thanks, I will look into those app notes.

author: poorchava
author_rank: Super Contributor
timestamp: May 13, 2014, 08:15:42 pm
content: You can use a big boost converter for powering motors and a separate one for powering logic. Most logic nowadays runs fine from 3.3V, and some even from unregulated li-io voltage. 3.3V is somewhat inconvenient, because in order to get that from a single cell you need a buck-boost converter as the cell voltage varies roughly from 2.9V to 4.2V. There are specialized ships that do just that, even with single inductor. LTC3440 comes to mind, and also one from Maxim, but I cannot recall the number right now. Other major players like TI, ON, NXP or Microchip should also have something. Or you use separate boost converter to generate ~4.5-6V and then drop it with linear regulator.Boost converter for motors can prove to be rather beefy, as Iin>Iout*(Vout/Vin). Peak currents could be handled with larger output cap, but that depends on expected length of the peak. To be on a completly safe side you'd have to calculate boost converter such, that it can continuously output peak current.I'd still go with multiple cells and custom charger/balancer.

author: okaresz
author_rank: Newbie
timestamp: August 21, 2014, 08:53:25 am
content: Thanks for all your advice. Just as a follow-up and feedback, I would like to share the results of the development so far.I decided to use two li-ion cells. As I would like to quickly charge them, I implemented a switching mode charger circuit using the LTC4002, set to 2A charging current. This of course requires an external 12~20V power adapter.As the time being, I use bare cells, so I need some kind of battery protection. I considered integrated solutions as well (fuel gauge + protection), but couldn't find any with considerable prize and easy handling (I wanted to avoid BGA and leadless packages). So I settled for the S8232 IC, which is a japanese product, found in a tons of commercially available battery protection circuits. It does it's job, cheap, and comes in a TSSOP packaging. Perfect.As for the fuel gauge, I hadn't got high expectations. There are many advanced IC-s (mostly TI, maxim, microchip ...) with patented fuel gauge algorithms, but of course for a higher price. I need only a rough estimate for the battery life, and not by far the precision that for example modern smartphones offer. I've chosen the Maxim DS2438, which is a basic fuel gauge with current measuring and accumulation, onboard ADC converter (can be used to measure cell voltage), a proprietary one wire protocol, and a handful of user registers for storing arbitrary data in EEPROM.I attached the schematic of the battery management.Results so far:The S8232 does it's job, I've tested the under and over voltage and also the short-circuit behavior.There is one (yet unsolved) problem: when connecting the battery, the S8232 immediately opens the discharge transistor, so no current can flow, the board doesn't power up. I can only think of the over current protection kicking in due to the inrush current. When I short over the transistor, the system powers up and all is OK. What's interesting is that on subsequent power cycles when the battery doesn't get disconnected from the S8232, but the system is powered down then back up, the system can boot normally.The charger works perfectly. Be careful however when selecting the freewheeling diode and pass transistor, so that heat dissipation won't be a problem.Also, I tried to leave out the input rectifying diode, but nope. Don't. Without it, the battery voltage will appear on the charging plug and can be shorted to ground if the plug is damaged or used incorrectly. Also, sensing the presence of a charger (voltage on the input) will be more difficult (or impossible) because there will always be voltage on the input!The fuel gauge is a very usable chip. After implementing the 1wire protocol (which is not so easy, but with a little experience, it can be figured out from the documentation), everything is quite straightforward. I can measure the battery voltage with the onboard ADC, the instantaneous current (bi-directional), and the accumulated current flowing into and out from the battery.

author: brianjaod
author_rank: Newbie
timestamp: September 25, 2015, 03:59:30 pm
content: Okaresz:Thanks for the follow up info, especially about the S-8232 chip. I'm also using that chip in a design and have seen some weird behavior. One item was what you described when the battery is first connected. Regarding that, datasheet says "When connecting batteries for the first time, the IC may fail to enter the normal status (is not in the status to charge). If so, once set the VM pin to VSS voltage (short between VM and VSS or connect a charger) to return to the normal status." Like you, I can get it to work by shorting across those fet pins, but not by "connecting the charger" as the datasheet says. This is really annoying, especially in production. Have you found a way around this problem?Also, the weirdest problem that I've seen is that when there's an overdischarge event and the battery drops below the discharge cutoff voltage, it disables the battery (as expected), but then won't come out of that mode, even after connecting the charger for a while. Outside of shorting across the fets (since this isn't possible for the end customer), how do you get it to go back to normal status? When I connect the charger and monitor battery current, there is no charging taking place and so the battery cells are never going to increase and pull out of the overdischarge status. I was under the impression that the charging fet would stay on in the overdischarge state so that battery charging could still take place, but that doesn't seem to be the case. Any ideas?Thanks!Brian

author: PChi
author_rank: Frequent Contributor
timestamp: September 25, 2015, 05:56:33 pm
content: Which version of S-8232 is it? Some of them deliberately disable recovery if the cell voltage has dropped too low.

author: brianjaod
author_rank: Newbie
timestamp: September 25, 2015, 09:20:52 pm
content: PChi, thanks for the response! It's the ABFT version. My circuit design is exactly the same as that in the datasheet (Figure, including the 4.7M resistor for R5. Any ideas?

author: okaresz
author_rank: Newbie
timestamp: September 25, 2015, 10:47:05 pm
content: Dear Brian,In short: I have no clue what could be the problem, so I will just guess a few.Initial shorting of FETs:Yes, that's necessary still, I haven't found a way around it, and I'm prepared to do it in production in the testing and programming phase with a bed of nails ICT board.While playing with the prototypes however, I noticed that sometimes the battery worked ok after initial connect, and sometimes when I left it on the table for the night in the "locked up" state, by morning it was "released" and working. Who knows?... My only guess maybe is that because of the quite large capacitance of the circuit (which is normal, as you would decouple your supplies generously), the IC senses low impedance and is trapped somehow in a lingering overcurrent state..No overdischarge release:That's curious... I had no such problem. I presume you are aware of the hysteresis of the discharge protection logic, so while eg. the ABFT version cuts off at 2.3V/cell, it will only release at 3V/cell. But it should never switch off the charging FET along with the discharge, you should definitely investigate that one closer. Maybe your FET's specifications are not so ideal to this situation? Watch out for the polarity you connect them (body diodes!), min-max ratings, and gate threshold voltages, so that the S8232 can drive them properly.One additional detail: The datasheet notes that if the series resistors on VCC and VC pins are too large, it can throw-off the specified threshold voltage levels. But I doubt this would be the problem here. (I use 470R now.)A hint for testing (sorry if these are obvious for you): test with a bench supply as battery, you can simulate the mid-cell voltage with two equal voltage divider resistor. You cannot test the charging this way, but should be able to measure the threshold voltages and proper FET driving behavior.Also: I would recommend ditching the 8232 for the currently active counterpart S8252. See seiko's site for details, and with a little luck you can find a proper distributor near you (check the seiko website for those), who deals with these chips.Good luck!regardsokaresz

author: PChi
author_rank: Frequent Contributor
timestamp: September 26, 2015, 06:04:14 pm
content: Quote from: brianjaod on September 25, 2015, 09:20:52 pmOK thanks for the clarification of which part it is. My interpretation is that the ABFT version should be able to charge cells starting from 0 V. I have only tested a version that has the 0 V battery charging function unavailable (the circuit includes R5) and if the Battery 2 voltage drops below the threshold (from memory 0.6 to 0.8 V) connecting the charger doesn't turn on the MOSFETs so works as described.I think that the data sheet description of R5 is confusing. My interpretation is that it should only be fitted for parts that have the 0V battery charging function unavailable.I have found that it does turn on the MOSFETs if the cell voltages are just above the 0 V battery charging function unavailable threshold. The MOSFET gate drives are pretty weak. Could the problem be gate to source leakage current?

author: brianjaod
author_rank: Newbie
timestamp: September 29, 2015, 06:43:05 pm
content: Hey all, thanks for your input and suggestions. After a lot more troubleshooting, I've found the problem! It was my fault. The 8232 IC is working normally. The problem was that my charger chip enable pin was tied to the system VCC, instead of Vusb. Therefore, when the 8232 goes into overdicharge status and it cuts power to the system, there is no VCC and therefore no charging taking place. By tying that enable pin to Vusb, the charger chip is always enabled when the charging cord (USB) is connected, and therefore allows the charging to take place, which allows the 8232 to enter the normal status again. I've also found that this same thing fixes the original issue with needing to short the fets upon initial battery connection. Now, no shorting is required, just connecting the charger will kick the 8232 into its normal operating mode. Thanks again all!Brian

author: PChi
author_rank: Frequent Contributor
timestamp: September 29, 2015, 08:26:22 pm
content: Thanks for the update. It's good to read that it is now working.

author: Fungus
author_rank: Super Contributor
timestamp: September 30, 2015, 09:44:52 am
content: Quote from: poorchava on May 13, 2014, 02:12:26 pmI'm just looking at something similar to this and decided to use 18650 cells with these little boards:The boards are about $0.60 eachon ebay. Soldering is easy. All you need is a 5V supply to charge them and a voltage booster to get your final voltage. If you have multiple motors you could maybe have a separate battery per motor.The chips on at are:DW01Li-Po battery protection ICML8205ADual MOSFET paired with the DW01 (see typical application circuit in the DW01 datasheet)TP4056Battery charging chip.You can pretty much figure out the schematic by looking at that pic (it's lifted straight from the datasheet...)Connect the booster like this:nb. Don't skimp on the batteries anddon'tbuy anything marked "Surefire" on eBay. Get Panasonic/Sony branded batteries and remember that no 18650 has more than 3400mAh (if it says "6000mAh" or whatever then it's a lie).

author: JayB
author_rank: Newbie
timestamp: May 06, 2016, 12:50:52 pm
content: Thanks for posting this very clear photo and for linking all the relevant data sheets. I am going to integrate this protection circuit directly to my next PCB. No need for reinventing the wheel. You find all the IC´s on eBay quite cheap. I might even desolder them from this 60ct board - I should get more training on my hot air station anyway.