Battery Charger for constant current constant voltage

MrAl

Joined Jun 17, 2014
13,720
That just increases the simulated charge time, which is not really necessary to see what happens as the battery charges.
It would give a more realistic charge time, but that is easily calculated for a particular battery without doing the simulation.
Hi there,

Well it's not that hard to calculate the more realistic capacitor value, knowing it's never going to be exact anyway.

Actually things change quite a bit for charging simulations. That's because we also include another vital part: the series resistance.
Without the series resistance the battery (capacitor) is going to look like it charges in a completely linear fashion, ie a straight line. That would mean that in a simulation that included both constant voltage and 'constant' current, we would see very little or no constant voltage as the voltage got close to the final voltage. Only after it charged very close to near completion would we see the constant-voltage phase.
With a series resistance, we see the circuit simulation start to enter the constant-voltage phase quite a bit sooner before the battery (capacitor) has charged all the way up. That adds to the charge time considerably. The model in Danko's post includes this series resistance. It's also one of the more interesting facts about batteries. It's also not that hard to calculate the charge time mathematically with the series resistance.

So the charge wave would not be a straight line, it would be a sort of straight line followed by a slow curve to the full voltage. The slow part of the curve increases the total charge time. We could reduce that by including compensation for the series resistance in the charger circuit, but that relies on a measurement of the series resistance which may not be that reliable so we could end up overcharging the battery.

Check it out in a simulator with and without a series resistor. It's very interesting to see that.
 

Thread Starter

wmhakimi11

Joined Mar 28, 2023
9
Here's my sim of the circuit with the added current limit transistor.
I modified a couple of the resistor values as needed: and changed the power source for the op amp from the output to the supply voltage.
I also re-arranged the schematic to be in the conventional left-to-right signal/current flow.

The battery is emulated by the 100 Farad capacitor CBat, and resistors RTrickle and Rbat.

Initially the battery charges at the 3A limit (yellow trace) until the battery voltage reaches 54V (green trace), at which point the op amp maintains the voltage at that value, and the current then drops to the 108mA trickle charge current due to RTrickle.

Note that starting at a discharged battery voltage of 44V, the dissipation of Q1 (red trace) is initially 33W, and will require a hefty heat-sink (possibly with a fan) when charging at 3A.
That's why a switching regulator with higher efficiency was suggested for charging.

View attachment 291046
Hi @crutschow

I have a few questions to ask. This question might sound stupid hence to clear things out I need to ask.
1. To get the R6 Voltage reference of transistor 0.6V/3A?
2. What is its use or Rbat? and why the value is too small 10mili ohm? Is it the same as Rsense?
3. Is Rtrickle the same as Rsense or feedback resistor?
4. For the Cbat, do you pick a 100uF? Is it for filtering the voltage and current? Where can I get 100F is it possible?
 

crutschow

Joined Mar 14, 2008
38,533
1. To get the R6 Voltage reference of transistor 0.6V/3A?
It's the nominal base-emitter voltage of a BJT or about 0.7V.
2. What is its use or Rbat? and why the value is too small 10mili ohm? Is it the same as Rsense?
3. Is Rtrickle the same as Rsense or feedback resistor?
4. For the Cbat, do you pick a 100uF? Is it for filtering the voltage and current? Where can I get 100F is it possible?
Where is Rsense?
Rbat, Rtrickle, and Cbat are all to simulate the battery, they do not appear in the real circuit.
 

crutschow

Joined Mar 14, 2008
38,533
Well it's not that hard to calculate the more realistic capacitor value, knowing it's never going to be exact anyway.
Yes, it's trivial to calculate but superfluous, since the simulated time is not germane to understanding the circuit operation, and the actual time varies greatly, as there can be a couple orders of magnitude difference in battery capacities.
 
Last edited:

MrAl

Joined Jun 17, 2014
13,720
Yes, it's trivial to calculate but superfluous, since the simulated time is not germane to understanding the circuit operation, and the actual time varies greatly, as there can be a couple orders of magnitude difference in battery capacities.
Hi,

Yes, but the simulated charge time is not just an absolute and isolated time to consider. The comparative charge times are very interesting to understand that's why the more accurate model is better. I would not have mentioned it if it was not interesting. If you don't care about the difference then it doesn't matter, but if you want to understand why your battery is taking so long to finish charging, then you need a better calculation. The calculation of the capacitance may be trivial, but the difference is not trivial.
The charge cycle starts with a fairly linear slope as i am sure you know. It doesn't end there though as soon as it gets up to the nominal voltage. Instead, it then enters an exponential phase which takes a while to complete, and it could be significant. This i believe is even more interesting than the linear phase because for such a small difference in charge accumulation, the time is comparatively long.

Here is a formula for this:
T=C*(Vout/i-R*log((b*i*R)/(Vout-v0))-R-v0/i)
where C is the capacitance and where T is the total time to charge, and R is the series resistance, and Vout is the final voltage (such as 4.2v),
and b is the ratio of the final termination current to the constant current (i) during the constant current charge phase, and
'i' is the charge current during the constant current charge phase.
So this takes into account a number of factors the most interesting is probably the series resistance R and its effect on the total charge time.
 
Last edited:

MrAl

Joined Jun 17, 2014
13,720
Okay, then that resolves the issue.
That actual charging time is not of particular interest to me.
Hi,

What got me interested in this was a long long time ago when Li-ion cells just started to become popular i was designing a charger and noticed that the charge time near the end of charge took a long time to complete even though the voltage only had to go up by maybe as little as 0.1 volts. So from 4.1v to 4.2v there was a lot of added time to complete. Since i wanted the charge to be as fast as possible, this became a concern. It's easy to understand though, it's just that the charge profile becomes exponential and so only gradually approaches the final cutoff current point. It's not easy to compensate for however and i dont think any chargers to date will incorporate that.

My first charger was back in the early 1970's when i encountered the first rechargeable alkalines. Needless to say, they were crap so it was a complete waste of time. 20 years later things changed as better rechargeable alkies came out. They were better but nothing compared to the then workhorse NiCds. As time went on from there, i found that the other types like those don't work well so stick to the tried and proven types like NiMH and Li-ion and the like.
I've had success with the NiMH types too and of course lead acid.

Thanks for the discussion.
 

Danko

Joined Nov 22, 2017
2,172
Since i wanted the charge to be as fast as possible, this became a concern. It's easy to understand though,
it's just that the charge profile becomes exponential and so only gradually approaches the final cutoff current point.
It's not easy to compensate for however and i dont think any chargers to date will incorporate that.
If needed, it is very easily to solve that problem.
See how works circuit from post #30, where R4, C1, D3 and U3 are added:
1683973381651.png
ADDED: Diagrams for Cbat = 14,400F:
1683993012082.png
16-seconds part of diagram:
1683992273162.png
 

Attachments

Last edited:

MrAl

Joined Jun 17, 2014
13,720
If needed, it is very easily to solve that problem.
See how works circuit from post #30, where R4, C1, D3 and U3 are added:
View attachment 294111
ADDED: Diagrams for Cbat = 14,400F:
View attachment 294128
16-seconds part of diagram:
View attachment 294126

Hello there,

Thanks for the info. I know there are compensation techniques, but right off i dont know what you are shooting for here. Perhaps you can elaborate on the theory behind your modifications.
At first it looks like you turned to a switching regulator, but it cant be just that, so i await your explanation.
It does look very interesting.
 

Ya’akov

Joined Jan 27, 2019
10,258
The practical solution to the exponential charge time is to overrate the battery and only charge to 75%. This is a common strategy and makes safe and effective "quick charging" possible since it never touches the difficult part of the curve and actually extends battery life.
 

crutschow

Joined Mar 14, 2008
38,533
Since the charge voltage near the end still looks exponential, I don't see how that bang-bang output significantly reduces the charge-time.(?)
 

MrAl

Joined Jun 17, 2014
13,720
The practical solution to the exponential charge time is to overrate the battery and only charge to 75%. This is a common strategy and makes safe and effective "quick charging" possible since it never touches the difficult part of the curve and actually extends battery life.
Hello there,

Yes that sounds like the best solution and Samsung suggests 85 percent and some of their phones have a built in setting for that they call "protect battery" (ha ha) that stops the charging at 85 percent, and if you plug in the charger it shows on the display, "Charging paused, Protect battery limits you to 85 %". You can turn that off so it goes to 100 percent if you like though. Interestingly, they also have a setting to disable "fast charging", so it charges at a slower rate.
I actually keep mine set at 85 percent most of the time since these batteries are a really big pain to change out when they get weak.

I am not sure what you mean by "overrate" battery though. It seems that if you know the battery capacity and only go to 85 percent or 75 percent it should work ok.
 
Last edited:

MrAl

Joined Jun 17, 2014
13,720
Since the charge voltage near the end still looks exponential, I don't see how that bang-bang output significantly reduces the charge-time.(?)
Hi,

Not sure i understand what you are saying. How would it look exponential if it never gets to the exponential phase?
In theory it does not get to the exponential phase until the 'internal' voltage of the cell reaches Vmax-ICCcharge*Rseries. For a regular Li-ion Vmax would be 4.200v and ICCcharge might be 1 amp, and Rseries can vary a lot from cell to cell probably 0.020 Ohms and up for one cell with 0.1 Ohms more typical.
 

Ya’akov

Joined Jan 27, 2019
10,258
I am not sure what you mean by "overrate" battery though. It seems that if you know the battery capacity and only go to 85 percent or 75 percent it should work ok.
By overrate, I mean when it is specified. If they want to rate the resultant battery at, say, 1Ah, then they specify a 1.25Ah battery and call 1Ah “100%” on the fuel gauge.
 

MrAl

Joined Jun 17, 2014
13,720
Hi,

Well, sorry to say but that's just a graph of two lines. What i would really need is the theory behind this.
What mechanism allows us to get rid of the exponential part?

I also ask because i had designed switching regulator chargers for Li-ion myself and i noted that the switching itself does not do anything by itself to improve the charge time, except for maybe a tiny amount. The problem seems to boil down to being able to increase the charge voltage beyond the normally acceptable maximum charge voltage (considering the 1 percent criterion as well) and that runs into the danger zone if not done perfectly right.

Thanks.
 
Last edited:

MrAl

Joined Jun 17, 2014
13,720
By overrate, I mean when it is specified. If they want to rate the resultant battery at, say, 1Ah, then they specify a 1.25Ah battery and call 1Ah “100%” on the fuel gauge.
Oh ok i see what you mean now. If we have a battery that is rated for 1.25AHr, we pretend it is a 1Ahr battery that way it looks like it is charged sooner than it really is, which is what happens when we limit the charging to 85 percent (or 75 percent).

I guess we could do the same by limiting the cutoff current point to a lower value. A typical value is C/20 which for a 1000mAh battery would be 50ma. That would take us into the exponential phase. By limiting it to say 100ma (or something higher than 50ma), that should end the charge while still in the constant current phase.
 

Danko

Joined Nov 22, 2017
2,172
Well, sorry to say but that's just a graph of two lines. What i would really need is the theory behind this.
What mechanism allows us to get rid of the exponential part?

I also ask because i had designed switching regulator chargers for Li-ion myself and i noted that the switching itself does not do anything by itself to improve the charge time, except for maybe a tiny amount. The problem seems to boil down to being able to increase the charge voltage beyond the normally acceptable maximum charge voltage (considering the 1 percent criterion as well) and that runs into the danger zone if not done perfectly right.
Circuit in post #48 works by this way:
----
1
compare V_battery with V_reference
If
V_battery < V_reference
Then
send to battery charging pulse with fixed current and duration (3 A, 20 ms)
Endif
Goto 1
End
----
Because voltages are comparing in absence of charging current,
inner resistance of battery does not affect on process of charging.
 
Last edited:

MrAl

Joined Jun 17, 2014
13,720
Circuit in post #48 works by this way:
----
1
compare V_battery with V_reference
If
V_battery < V_reference
Then
send to battery charging pulse with fixed current and duration (3 A, 20 ms)
Endif
Goto 1
End
----
Because voltages are comparing in absence of charging current,
inner resistance of battery does not affect on process of charging.
Hello again,

Thanks for the extra information.
Since this has to work with the internal dynamics of the cell i am curious as to what battery model you are using for testing the charging scheme.

BTW, i like your avatar picture it's pretty cool did you invent that or something? if you did, I have a feeling you are familiar with the works of M. C. Escher.
 

Danko

Joined Nov 22, 2017
2,172
Since this has to work with the internal dynamics of the cell i am curious as to what battery model you are using for testing the charging scheme.
I used @crutschow's circuit with his model of battery.
My work was to convert it to pulse charger by adding few parts (U3, R4, C1, D3):
1684159807672.png

BTW, i like your avatar picture it's pretty cool did you invent that or something? if you did, I have a feeling you are familiar with the works of M. C. Escher.
I like Escher's works, but unfortunately I am not artist, I found picture for my avatar HERE.
 
Last edited:
Top