Li-Ion battery charger circuit - Page 1
Forum section: electronics / projects

author: UncookedCorn
author_rank: Contributor
timestamp: November 02, 2023, 03:19:42 am
content: Hello.I am trying to design a Li-Ion buttery charger for a circuit that draws roughly less than 3A (when initiated) powered by an ESP32-C3. So I would need 3.3V and 5V from the battery. My main concern is having it supply power to the circuit even while the battery itself is charging.Basically we need everything to go from a 5V USB to charging the battery, a way to turn power off/on to the processor and components, a way to operate while charging, battery safety features, LDOs to 5V with 3A and 3.3V with 2A, and small led indicators so the user knows its powered on and what the battery level is.I have looked into the MCP73831, although simple to build it does not provide power while charging. Other options I looked into were the BQ2409x and the ADP5061, but to be honest I'm not entirely sure how I would implement/build those into my circuit. I am trying to design this on KiCad to be printed on my PCB.The battery I was looking into was the 3.6V 3500mAh battery:https://www.digikey.com/en/products/detail/us-electronics-inc/USE-18650-3500PCB/15998173But if there are better options I am open to replacing it. Any help would be great!Tjank you!

author: Peabody
author_rank: Super Contributor
timestamp: November 02, 2023, 04:33:00 am
content: What gives you power to the project while charging the battery is called a load sharing circuit, aka power path circuit, which consists of a P-channel mosfet, a schottky diode, and a resistor. Below is a typical example that charges at 1 amp, but the load can draw more than that. It seems the battery you selected is a protected battery, so you wouldn't need the protection parts shown in the schematic.As shown, if you really need 5V you will need a boost converter to provide that.Notice that the battery can be charged even when the load is switched off.For three amps or more, you will need a beefier schottky diode than the one shown.Anyway, the circuit shows the basic design for a charger with load sharing.

author: UncookedCorn
author_rank: Contributor
timestamp: November 02, 2023, 04:50:03 pm
content: Appreciate the assistance! So this circuit already provides a 3.3V source without requiring any LDO? All I would need is to boost it to 5V?And this should be good for any mAh rated battery of the 18650 family?

author: Peabody
author_rank: Super Contributor
timestamp: November 02, 2023, 05:14:59 pm
content: No, you would need a 3.3V LDO to the right of the switch. The circuit shows three of them ganged together, but how you handle that would depend on the current you will need at 3.3V.At the switch, the circuit voltage could be anywhere from about 3.5V to 4.2V if the battery is supplying power, or about 4.7V if the external 5V supply is turned on. So for 3.3V the LDO would need to have very low dropout voltage.

author: Peabody
author_rank: Super Contributor
timestamp: November 02, 2023, 05:18:25 pm
content: Forgot to say that the TP4056 charger shown in the schematic can provide a range of charging currents, which is set by the value of a particular resistor. But its maximum charge current is 1 Amp. So charging a 3.5Ah battery might take some time.

author: UncookedCorn
author_rank: Contributor
timestamp: November 02, 2023, 05:58:40 pm
content: What is the purpose of having those 3.3V LDOs in parallel like that?It looks like I'll be going with the BQ24074, it has a max charge current of 1.5A. If I were to implement LEDs to indicate the battery charge level, how would I go about doing that?Thank you.

author: Peabody
author_rank: Super Contributor
timestamp: November 02, 2023, 09:23:49 pm
content: They used multiple LDOs because they wanted 1A output at 3.3V, and the LDO they chose does less than half that. So they use three in parallel. Of course that's not exactly a school-approved solution, but what happens is that one of them will carry the entire load until it starts to sag, and then the second one kicks in, and so forth. It's hard to find high-current output LDOs which also have low dropout voltage. This was a design from the Far East, and that's how they solved the problem.That BQ part looks pretty good. But it comes in a QFN package, which does me no good as a hobbyist. It looks like the only indicator it has is pin 9 which tells you if it's charging or not, but not the state of charge.