I am planning to make a simple constant current lead acid battery charger with LM317. I am little confused with how it remains 'constant current' supply over time with rising battery voltage. I mean, if I measure 12.5v on the battery and build the charger to supply 1 amp current, will the battery charge upto 13.8 volt utilizing the same rate of current? And 17.5 or 18.8 what would be the best input voltage to the circuit to achieve 1amp constant current rate throughout the charging process0? Can I even increase the input voltage above 18.8v without harming the battery?

Please note, I am kind of experimenting with the alternatives. So I would definitely keep measuring the battery voltage manually after certain interval and manually stop the charging process when 13.8 is reached.

The schematic


If you wire the LM317 as you showed, it will try to regulate the output voltage to maintain the 1A current level as long as possible. If the battery voltage rises too high compared to the supply voltage and 1A current can't be maintained, then it will start passing lower current. Said another way, if the supply voltage is too low relative to the output (battery) voltage, the same thing will happen.

So if you have for example 30V at the input with a battery starting at 10V, the 1.25 Ohm resistor between OUT and ADJ you would need to set up a 1A current would have a voltage drop of 1.25V. The regulator is always trying to maintain a 1.25V difference between those two pins. There is also a minimum dropout (or headroom) voltage you need to include of 3V. So the battery (and ADJ pin) is at 10V, the output pin is at 11.25V, so the minimum Vin pin voltage would be 14.25V.

Now, because the actual Vin voltage is 30V, the voltage must be dropped. This is done inside the regulator, where the pass transistor is put in a mode where it acts like a variable resistor. The 1A current also passes through this transistor, and it dissipates the power resulting in dropping the voltage from 30 to 11.25. In this case it would be 18.75W. (This is why other people answering are saying it's not a good charging solution.)

As the battery takes the 1A charge current and builds voltage, the output voltage also increases, and the voltage drop across the regulator decreases, while maintaining the 1A current. E.g. if the battery voltage goes up to 11V, then regulator output voltage goes up to 12.25V and the drop across the regulator is 17.75V. This means the power dissipated also drops. This can continue until the output voltage reaches 27V (30 - dropout voltage). That of course may destroy the battery if left alone.

If the supply voltage is 15V instead, the output voltage would only be able to go up to ~12V, meaning for full current the battery could only be as high as 10.75V. If it goes above that, the current will start to drop because the regulator can't maintain regulation with the voltage difference. The battery voltage would eventually settle at about 12V.

A better modification to your circuit would be to add a couple more resistors which would limit current and voltage, so in the case of the high input voltage, current would be limited initially, but then voltage regulation would take over so you don't have to monitor the voltage and disconnect it when it gets to high. Take a look at figure 17 of this datasheet to see what I mean.

To answer your specific question about raising the input voltage above 18.8V, it is as the example I gave with 30V input. The battery will be fine (assuming it can handle 1A charge current), as long as the regulator output voltage is not too high for the battery. The large voltage drop is handled in that case by the regulator. But remember the power dissipation. If you use 18.8V and the battery is at 10V, the resistor will dissipate 1.25W (so make sure it's rated properly), and the regulator will dissipate 18.8-11.25 = 7.55W. Because of thermal resistance, if you leave the regulator in free air, the temperature would rise 7.55x23.5 = 177degC (assuming the TO-220 KCS package). The regulator would shut down long before that. So you would require a very good heat sink to dissipate the heat. A lower voltage would also help.

  • \$\begingroup\$ This answer, specially the example of 30V input which can lead the battery to rise upto 27V makes it clear to me how it works. I made the circuit today and observed the phenomenon. The output current didn't remain constant as the battery started charging. Because my battery was nearly charged to 13.7V already when I started charging with 18.8V. \$\endgroup\$ – sribasu Feb 21 '17 at 20:02

Battery charging can get complex. There are various charging profiles and many types of batteries.

Bottom line, I doubt you want to use a LM317. There are a ton of chips made just for charging batteries.

Learn about batteries and charging them here: Battery University: About Chargers
There are 17 charger articles.

For schematics and chip select go to Digikey and search for battery charger evaluation boards Digikey and search for battery charger evaluation boards

  • \$\begingroup\$ LM317 with its limitations as a linear regulator is the only available solution which I can use here. Thanks for your response. But my actual question is how exactly LM317 works in constant current mode. Battery charging is the application, which has created some doubts in my mind, unlike a linear resistive load. That's why I asked the question. \$\endgroup\$ – sribasu Feb 21 '17 at 11:17
  • \$\begingroup\$ That's okay. I often see the LM317 misused like this as an LED driver. It makes a poor LED driver and an even worse battery charger. I want others that view this post to understand that. \$\endgroup\$ – Misunderstood Feb 21 '17 at 14:30

The LM317 continuously measures the voltage across the output resistor, which allows it to know the current flowing through the resistor( I = V/R ) and it can adjust its output accordingly. If you keep a careful watch on the voltage of the battery, the charging system should work with both 17.5 or 18.8 input voltage, both should work fine providing 1A, although that depends on the supplies specifically. I certainly wouldn't recommend charging it this way, instead you should use a CC/CV charger that would charge at a constant 1A until the battery reaches 13.8V and then holds it at 13.8V indefinitely. Then again I work on lithium-ion batteries so I'm not an expert with lead acid, however they are typically safer to work with and not as dangerous when over charged.

  • \$\begingroup\$ Thanks for the response. What if I supply 24v input? I mean, I knew there should be a 5V difference factor. Is it max 5v, constant 5v or min 5v difeerence? \$\endgroup\$ – sribasu Feb 21 '17 at 11:25
  • \$\begingroup\$ As long as the voltage across the battery doesn't exceed the 13.8V and the supply can provide enough current to charge the battery, you should be fine with any supply voltage. \$\endgroup\$ – Redja Feb 21 '17 at 13:46

Constant charge current can be accomplished like this:


simulate this circuit – Schematic created using CircuitLab

as long as you have adequate heatsinking for the LM317 (otherwise, it will go into thermal limit). The accuracy of this scheme, though, is wasted on the battery. It can take high-ripple input, it'll still charge when the current isn't regulated to 5%.

A lab-style power supply, with both voltage and current limits, can be adjusted for 13.8V and 1.0A, and that's a more versatile charger if you really want to experiment DC variable power supply.

  • \$\begingroup\$ Can a lab power supply simultaneously work in constant current, constant voltage mode, regardless of load? I knew, it couldn't. You can set either mode and the other config works as a max limit. For example in CV mode, if 12v 1A is selected. It supplies 12v and no more than 1 amp current. Not 1 amp constant current. Otherwise, Ohm Law would become wrong. Is this understanding not right? \$\endgroup\$ – sribasu Feb 21 '17 at 11:21
  • \$\begingroup\$ My power supply has independent voltage set and current limits. I haven't used the one I referenced, but it is likely it works the same way (the front panel has two indicators, which presumably allow the user to know which of the two settings is dominant). There is no different 'mode' for the two settings, just dependence on the load condition. \$\endgroup\$ – Whit3rd Feb 21 '17 at 11:24
  • \$\begingroup\$ Please give it a try. I think you can choose either of them to be constant. The non constant attribute's value (which is set using pot) then behaves as max limit. If you have different findings, please let me know. It would be really interesting to know how is that possible. \$\endgroup\$ – sribasu Feb 21 '17 at 11:27
  • \$\begingroup\$ No, I choose both. Neither is 'constant', though, they are both upper limit settings; the load applied to the supply determines which of the two limits dominates. Low load resistance, it becomes constant-current. High load resistance, it becomes constant-voltage. A battery isn't a resistor, of course... so on a low battery it would start as constant current, switching to constant-voltage when the 'float' voltage is reached. \$\endgroup\$ – Whit3rd Feb 21 '17 at 11:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.