Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Li-Po charging circuit design

Status
Not open for further replies.
Vbat is the +ve end of the battery.

The screenshot with the TP4054 shows the battery being charged from Vbus. The TP4054 is an IC that controls the charging. It is supplied from Vbus and the output is connected to Vbat.

The charging is turned on and off by IO32, but I don't know what drives that.

D2 is a diode that lets Vbus power the 5 V rail. Q1 allows the battery to power the 5 V rail. Q1 is turned on when Vbus is low, and Q1 will basically have no voltage drop. A MOSFET (Q1) is used to get the most life from the battery by avoiding the voltage drop that would come from a diode.

The 5 V rail is regulated to 3.3 V by U2.

I suspect that the 5 V rail won't actually be at 5 V. The TP4054 charges a battery to 4.2 V, so it's likely that the battery will be about 4.2 V fully charged and 3.5 V when discharged. At 3.5 V, a diode drop would be a problem because the diode drop would reduce the voltage below 3.3 V.

So when running from the battery, the "5 V" connection will be between 3.5 V and 4.2 V

Vbus is probably the USB voltage of 5 V. Charging ICs like the TP4054 are designed to run from that. When Vbus is on, there will be a voltage drop of about 0.4 V through D2, so the "5V" connection will be about 4.6 V
Thank you very much for the help. but I would like to ask, why isn't it as simple as connecting the battery to the load and the battery to the charger?
 
Thank you very much for the help. but I would like to ask, why isn't it as simple as connecting the battery to the load and the battery to the charger?
It may not be possible to power the load from the battery charger.

The battery charger will limit the charging current to the battery. That is done to avoid damaging the battery if the battery is very low, when the charging current has to be reduced. Also the battery charger will get hot, and the charging current will be reduced to prevent the charger from overheating.

If the load is connected directly to the charger, and the charging current allowed by the charger is less than the load current, the battery will be discharging, not charging and smaller load currents will cause the charging to take longer.

In a circuit where the load is connected directly to the battery, if the battery is very low (or missing) the circuit may have problems turning on. If the battery is very low, the charging current is reduced, and if the load can't be turned off, and takes more current than the battery charger allows, the circuit will never turn on.

One solution to that is to turn the load off until the battery is at least partially charged, but that means that the device can't work immediately when power is connected. It also means that there is additional complexity needed to disable the load when the battery is low, so the circuit is just as complicated as the one posted.

There are devices where the load has to be connected directly to the battery and the charger. That is usually where the load takes more current than the charger can supply. The load may be intermittent, and batteries are good at supplying large currents for short times, but a charger isn't. Cellphones are like that, and they often have the inconvenience that a really flat battery will need to have some time charging before the cellphone will work at all.
 
Thank you very much for the help. but I would like to ask, why isn't it as simple as connecting the battery to the load and the battery to the charger?

Because it will completely mess the charging up, Lithium-Ion charging is critical (or it can set on fire), and if you're feeding a load at the same time you've no idea what the charge status might be, and neither has the charger.
 
It may not be possible to power the load from the battery charger.

The battery charger will limit the charging current to the battery. That is done to avoid damaging the battery if the battery is very low, when the charging current has to be reduced. Also the battery charger will get hot, and the charging current will be reduced to prevent the charger from overheating.

If the load is connected directly to the charger, and the charging current allowed by the charger is less than the load current, the battery will be discharging, not charging and smaller load currents will cause the charging to take longer.

In a circuit where the load is connected directly to the battery, if the battery is very low (or missing) the circuit may have problems turning on. If the battery is very low, the charging current is reduced, and if the load can't be turned off, and takes more current than the battery charger allows, the circuit will never turn on.

One solution to that is to turn the load off until the battery is at least partially charged, but that means that the device can't work immediately when power is connected. It also means that there is additional complexity needed to disable the load when the battery is low, so the circuit is just as complicated as the one posted.

There are devices where the load has to be connected directly to the battery and the charger. That is usually where the load takes more current than the charger can supply. The load may be intermittent, and batteries are good at supplying large currents for short times, but a charger isn't. Cellphones are like that, and they often have the inconvenience that a really flat battery will need to have some time charging before the cellphone will work at all.
ohh ok, so how does the circuit in the screen shots I shared work? (P.S I haven't designed it, I got it from the internet to understand charging technologies)
 
ohh ok, so how does the circuit in the screen shots I shared work? (P.S I haven't designed it, I got it from the internet to understand charging technologies)

It's only a few partial circuit scraps, but presumably it simply charges and powers separately?.

It's obviously possible to charge and power at the same time (phones and tablets for example), but it's a lot more complicated and probably more limiting?.
 
why isn't it as simple as connecting the battery to the load and the battery to the charger?
Because the charge controller needs to be able to measure the current in to the battery. If anything else is connected while it is charging, the charger would not work correctly.

The concept is what I described back in post 13.

Imagine a 5V supply, which feeds the charge controller and that feeds the battery.
Then just add a diode direct from 5V to your load, and another (schottky) diode from the battery to the load.

If you need eg. a 5V supply for your device, the "load" would probably be a boost converter, after the device on/off switch.

If the 5V supply is not connected, the battery feeds the load, at around 400mV less than the battery voltage because of the diode.
If the 5V supply is connected, that feeds the charge controller and battery, but also feeds the load with about 4.6V through its diode. The diode from the battery to the load is reverse polarised so no current is taken from the battery.

In a microcontroller based device, the diodes can be replaced by small power FETs to reduce voltage drops - that's typically done in smartphones etc.

(And why they do not instantly fast charge if the battery is dead and the CPU has crashed - no "intelligence" to control the charge switching, so they have to rely on a minimal trickle charge system. to get a few percent power into the battery so the CPU can run).
 
1623821120485blob.png

Thank you, I would also like to ask I am designing it myself, but I have a 5v coming from a MicroUSB and the BATT is connected to a MCP73831T-2ACI/OT to the VBAT pin. I am not sure if I am doing it right, I think I have to connect pin 1 of the diode to pin 1 of the MOSFET and the 5V in to pin 2 of the MOSFET, but let me know if this is also right, I am also running the other components of this board on 3.3V, I can also share the entire schematic if you wish
 
Last edited:
The circuits that you posted in post #19 would have worked. The schematic you just posted won't work.

The MCP73831T is designed to charge Li-Ion batteries at 4.2 V, so it needs more than 4.2 V to fully charge the battery. You have supplied it with 3.3 V so it won't even start to charge the battery.

The circuit with the BAT20JFILM and the Si2371EDS will never conduct current in either direction.

The circuit that you posted in post #19 would have worked fine. Even if you change the ICs, the idea of those circuits is good, and you can adapt the ICs that you are using to that.

The first picture of post #19 is a "Wired-OR", which takes either the USB supply via the diode, or the battery via the MOSFET, and supplies the +5V line (which will not be at 5 V, it will be a bit less, but that's fine)

The second picture of post #19 is the charging circuit to charge the battery from the USB supply.

The third picture of post #19 is the regulator that takes the +5V line and regulates it to 3.3 V.

If you want the same functions, you should replicate the blocks that are shown in post #19

I have drawn out the circuit suggested below.
charging.png


I have added a 10k resistor to ground on the input. That is to make sure that the VBUS is very low when the USB is disconnected. Without that, the MOSFET might not turn on properly. The 10k resistor might not be needed, but without it the VBUS could be at about 3 V.

The 100 k resistor in series with the LED will mean that it is very dim.
 
The circuits that you posted in post #19 would have worked. The schematic you just posted won't work.

The MCP73831T is designed to charge Li-Ion batteries at 4.2 V, so it needs more than 4.2 V to fully charge the battery. You have supplied it with 3.3 V so it won't even start to charge the battery.

The circuit with the BAT20JFILM and the Si2371EDS will never conduct current in either direction.

The circuit that you posted in post #19 would have worked fine. Even if you change the ICs, the idea of those circuits is good, and you can adapt the ICs that you are using to that.

The first picture of post #19 is a "Wired-OR", which takes either the USB supply via the diode, or the battery via the MOSFET, and supplies the +5V line (which will not be at 5 V, it will be a bit less, but that's fine)

The second picture of post #19 is the charging circuit to charge the battery from the USB supply.

The third picture of post #19 is the regulator that takes the +5V line and regulates it to 3.3 V.

If you want the same functions, you should replicate the blocks that are shown in post #19

I have drawn out the circuit suggested below.
View attachment 131967

I have added a 10k resistor to ground on the input. That is to make sure that the VBUS is very low when the USB is disconnected. Without that, the MOSFET might not turn on properly. The 10k resistor might not be needed, but without it the VBUS could be at about 3 V.

The 100 k resistor in series with the LED will mean that it is very dim.
Thank you very much, ill put this into my schematics. My only concern was to not drive the LED with too much current. So what I understand is, the MOSFET and diode act as an 'OR' gate, whichever is higher than the other it will take power from that. Am I right?
 
So what I understand is, the MOSFET and diode act as an 'OR' gate, whichever is higher than the other it will take power from that. Am I right?
That is correct, but it is not all of what is happening.

The body diode in the MOSFET and the diode act as an "OR" gate, as you had said.

The additional function is that when the USB voltage is low, and the battery voltage is high, the MOSFET will turn on. If there is a load of 100 mA, the body diode in the MOSFET will give a voltage drop of about 0.6 V. With the MOSFET on, the voltage drop would only be about 0.008 V. That is why the MOSFET is used, when a second diode would be cheaper and simpler.
 
Hello everyone, I would like to ask a question, should I add a Li-ion battery protection IC? Would it be useful?
 
Protection ICs are normally built into the battery.

Not really - you 'can' get batteries with some small degree of protection built-in, but they are fairly rare (and more expensive), the protection is also fairly limited. Far better to add an external protection board, which allows you to include balancing for battery packs.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top