LM317 battery-charger circuit

Thread Starter

Chris Ryu

Joined Jun 29, 2017
3
Hi!
I would like to find battery charger design with li-po.
Looking at the data sheet to use the LM317, the expression for the basic formula and the battery-charger circuit is confusing. I would appreciate if anyone could explain Equation 2.

Typical circuit


Equation 1.

Battery-Charger circuit



Equation 2.


Equation 3.


Equation 4.
 

danadak

Joined Mar 10, 2018
4,057


If I short the output of this circuit to ground the LM317 will regulate
to its internal Vref, which is 1.25V nominal.



So Iout(short) = 6.25A, which is crazy for a LM317 as that surely will drive it into thermal limiting
in most applications. So datasheet should have qualified equation for higher Rs. Its basically a
2A device so Rs should be stipulated as ~>= .625 ohms

So above equation is correct (Rs qualified). Note this ignores adj pin current drop
across ~ 240 ohm, which is quite low. 100 uA, ~ 240 ohms = 24 mV. As application
design current drops this could become a significant error. But for an Rs of .625
ohms thats only an error of ~ 38 mA out of 2A.

Regards, Dana.
 
Last edited:

Thread Starter

Chris Ryu

Joined Jun 29, 2017
3
hi Chris,
Welcome to AAC.
With your charger circuit how do you plan to detect the charge/voltage end limit.?
View attachment 153991
Check out this link.
https://rogershobbycenter.com/lipoguide/

E

Equation 1 is correct.
Equation 2 is not.
The value of R1 and R2 determine the charge voltage limit, do they not?
Thank you for reply,
All of the above examples are from TI LM317 datasheets. Equation 2 is that the datasheets is wrong?
 

ericgibbs

Joined Jan 29, 2010
18,845
hi Chris,
Could you post details of the LiPo batteries you plan to charge.? ie: voltage, AHr rating etc.
As you may know, great has to be taken when working with LiPo batteries.

E
 

dendad

Joined Feb 20, 2016
4,474
Have a look at the cheap LiPo charger/battery protector boards available on Ebay. Just using a regulator is a good way to burn your house down.
 

danadak

Joined Mar 10, 2018
4,057
Thank you for reply,
All of the above examples are from TI LM317 datasheets. Equation 2 is that the datasheets is wrong?
I believe there is an error, maybe they cut and paste from a 5A or 10A reg datasheet.

Keep in mind equation is approximate, with limitations. The equation tells you
to use common sense, that is if Rs was .01 ohms, and a dead short on output,
the Isc would be 125A, which of course is silly. They should have qualified that
as an issue and the case where LM317 is set for a small current, say 100 mA
or less, and the error that Isense would producer in Isc. But they didn't.


Regards, Dana.
 

wayneh

Joined Sep 9, 2010
17,498
Hi!
I would like to find battery charger design with li-po.
You're off to a bad start. A constant voltage circuit using LM317 is a viable approach for lead-acid – it works, with limitations – but it's piss-poor for other battery chemistries. The right charging strategy for lead-acid can be constant-voltage. I have one running right now in my garage. This is not appropriate for other chemistries and will overcharge and damage the battery, or worse.

These days a purpose-built IC is available for any battery chemistry you choose and will be more efficient to boot than the LM317 linear regulator. I'm with @dendad on this - just get the right IC or a pre-built PCB based on it, and go with that.
 

crutschow

Joined Mar 14, 2008
34,412
So Iout(short) = 6.25A, which is crazy for a LM317 as that surely will drive it into thermal limiting
in most applications. So datasheet should have qualified equation for higher Rs. Its basically a
2A device so Rs should be stipulated as ~>= .625 ohms
The short circuit current will be limited by the LM317 intrinsic limit of about 1.7A.
But with the LM317 set for a 4.2V output and a battery connected with a starting discharge voltage of 3.7V, the maximum current is ≈700mA, tapering to zero as the voltage rises to 4.2V as shown below.

That charging profile may not be optimum, however, for a Li ion battery.

upload_2018-6-9_11-16-10.png
 

danadak

Joined Mar 10, 2018
4,057
The fixed limit is 2.2A (TI) -

http://www.ti.com/lit/an/snva513b/snva513b.pdf

From datasheet -

upload_2018-6-9_14-59-34.png

From the reference -

The overload protection circuitry on the LM117 includes current limiting, safe-area protection for the internal power transistor and thermal limiting. The current limit is set at 2.2A and, unlike presently available positive regulators, remains relatively constant with temperature. Over a −55°C to +150°C temperature range, the current limit only shifts about 10%.

At high input-to-output voltage differentials the safe-area protection decreases the current limit. With the LM117, full output current is available to 15V differential and, even at 40V, about 400 mA is available. With some regulators, the output will shut completely off when the input-to-output differential goes above 30V, possibly causing start-up problems. Finally, the thermal limiting is always active and will protect the device even if the adjustment terminal should become accidentally disconnected.
Regards, Dana.
 

crutschow

Joined Mar 14, 2008
34,412
My LM317 model limits at a lower current level, so that's why I stated that value.
It has no effect on my simulation as shown.
 
Top