# Chaining LM317s to make SLA charger

I want to make a sealed-lead-acid taper charger that charges at a constant 13.6V, but is limited to a certain amount of current. I can set up an LM317 to provide 13.6V, and I can set up another one as a current source to limit the current, but should I put the current-limiting one ‘downstream’ of the voltage regulating one, or ‘upstream’? I think that I should put the current limiting one upstream, feeding the voltage-regulating LM317, but I don’t know. There might be a problem with this whole idea.

There is a problem with this whole idea.

Your concept of setting a constant voltage (13.6V) while at the same time limiting current is backwards thinking. Remember Ohm's Law: V=IR. If you want to control V AND you want to control I at the same time that you means you are forcing R to be a certain value. What is R? The effective "load resistance" of the battery. But you can't force the battery to have a certain resistance -- it is what it is.

Think of the battery as a time-varying resistance. You apply a variable voltage (controlled with an LM317 for example) and MEASURE (not control) the current that is flowing. Too high? Then you have to reduce the voltage below 13.6V (or whatever) according to V=IR. The lower you make your voltage, the less current flows to the battery because at this moment in time, it has some effective resistance "R". As the battery charges, "R" goes up and you will find that you will need to apply higher and higher voltages to keep the same current, and finally you will reach a "constant voltage" stage of 13.6V during which the current will start to get lower and lower (I=V/R as R increases) until you reach the trickle charge stage.

-- The Ruggeduino: compatible with Arduino UNO, 24V operation, all I/O's fused and protected

Maybe I wasn't clear enough. Yes I understand that one cannot simultaneously dictate current and voltage given an uncertain load. On paper, you can't chain an ideal voltage source and an ideal current source, but voltage regulators are not perfect and I am exploiting that in this design.

What I want to do is set a MAX voltage of 13.6V. I can do that by setting up an LM317. However, if I hook this up to a discharged battery, it might pull a lot of current--more current than I want. So I would like to FEED the 13.6V stage with a say, 2A current-source, in the form of another LM317. This means that the when the battery is discharged (low load R) the voltage-stage LM317 will be 'starved' by the current-limiting one. Of course this means it will not actually be putting out 13.6V--it won't be able to. But once the overall current drops, the current-limiting LM317 will raise the voltage enough that the 13.6V LM317 will have enough voltage to operate normally and provide the actual 13.6V at whatever current the battery will take. And at this point, of course, the constant-current stage will not be putting out 2A anymore, but it will be 'trying' to do so by putting out the highest voltage it can (equal to the supply rail most likely).

What you want is a voltage regulator with an adjustable current limit, the type you find in bench power supplies. In fact I use a bench power supply for doing this, st the voltage at 13.8 and the current limit to what I want. Initially the charge current is high so the voltage produced is less than my maximum. You can't do this by cascading two regulators, you need an over current detector circuit. There are two types of these, the ones you don't want are called crow bar, these shut down things when the current goes high. You will probably have to use an other regulator, one that allows you to vary the voltage output. You will also need a current sensing resistor or shunt.

BetterSense: I want to make a sealed-lead-acid taper charger that charges at a constant 13.6V, but is limited to a certain amount of current.

Look at the first schematic (LM317) in the following link for an example of how to current limit the output from a single voltage regulator. When the shunt resistor drops more than 0.6V, the transistor will start to conduct and gradually reduce output voltage. Value of current limiting shunt resistor can be determined from the formula R = 0.6 / A-max. The variable resistor (lower half of voltage divider) is used to set the output voltage.

http://www.vt52.com/diy/myprojects/other/charger/charger.htm

That looks like exactly what I need, but I don’t understand exactly how it works. I see the transistor is hooked up to the “adj” pin along with the voltage divider, but I don’t see how it works since the base of the transistor is hooked up to ground through a 100ohm resistor. It seems to me like it would never turn on. Could I use pretty much any NPN transistor?

Current through the sensing resistor develops a voltage that turns the transistor on. The more current the more the transistor is turned on. This causes the output voltage of the regulator to drop and so limits the current and so turns the transistor off a bit. The whole stabilises at the required current or voltage for the load.

Sweet. I understand now, thanks. I'm totally building one.

Grumpy_Mike: Current through the sensing resistor develops a voltage that turns the transistor on. The more current the more the transistor is turned on. This causes the output voltage of the regulator to drop and so limits the current and so turns the transistor off a bit. The whole stabilises at the required current or voltage for the load.

I've been lurking. Even I understood that. Great explanation. Thanks Mike!

Hopefully our adulation will make you less grumpy. :D

Hopefully our adulation will make you less grumpy.

It might but I wouldn't put money on it. ;)

Is there any problem charging two 12V SLAs which are wired in series as if they were a big 24V battery, or will there be some kind of balance issue?

Much less of an issue with batteries in series than parallel but it is still not ideal. However, the current will be the same which is the most important thing.

I found this circuit which is very simple way to make a battery charger with an LM317. Not as time-efficient as transistor current-limiting or microcontrol (the output voltage rolls off more slowly, adding to total charge time) but you can’t beat the simplicity.