LM317 LED driver with varying DC input

SgtWookie

Joined Jul 17, 2007
22,230
That does pretty much take care of the current variation in the LEDs, but you wind up with widely varying current through the 390 Ohm resistor; ~17.4mA @ 12v and ~22.6mA @ 14v. That's kind of unfortunate, as at the high end you wind up dissipating roughly 20% of the total power in that one resistor.
 

Wendy

Joined Mar 24, 2008
23,421
OK, my last take on the subject. I've added this schematic to my albums.



It has a much lower dropout than the other design, and better thermal stability. For best performance it should be the same currents throughout, otherwise you will be operating in a different part of the transistor curve, which will cause some variations.

It is slightly different in that the LM317 sets the current. 20ma is the usual minimum for a LM317T, however there are LM317 that go much lower (down to 5ma), such as the LM117.

BTW, 12VDC to 13.7VDC is not a 10% variation, more like 12.4% (worse if you figure 12V as the norm). This is why regulators and dropout is a big deal, I am fighting the 3X blue LEDs in an automotive application all the time (though not here, it is against TOS). 3.6V X 3 = 10.8V, which leaves very little overhead. This circuit would compensate for that nicely. I learned something new, thanks.
 
Last edited:

thatoneguy

Joined Feb 19, 2009
6,359
OK, my last take on the subject. I've added this schematic to my albums.



It has a much lower dropout than the other design, and better thermal stability. For best performance it should be the same currents throughout, otherwise you will be operating in a different part of the transistor curve, which will cause some variations.

It is slightly different in that the LM317 sets the current. 20ma is the usual minimum for a LM317T, however there are LM317 that go much lower (down to 5ma), such as the LM117.

BTW, 12VDC to 13.7VDC is not a 10% variation, more like 12.4% (worse if you figure 12V as the norm). This is why regulators and dropout is a big deal, I am fighting the 3X blue LEDs in an automotive application all the time (though not here, it is against TOS). 3.6V X 3 = 10.8V, which leaves very little overhead. This circuit would compensate for that nicely. I learned something new, thanks.
Your In and out are backwards on the LM317

Wookie had the LM317 sinking constant current: input from the Transistor in Diode Effect, with out and adjust connected by a 120Ω resistor, tied to ground.

It is a most excellent design, 160μA variation from 11.5V to 14.5V and 0 degrees C to 40 degC.
 

Wendy

Joined Mar 24, 2008
23,421
Look again, it is correct. Vcc is positive, and it is a positive regulator.

I generally design a sink, not a source. It is usually an arbitrary choice.
 

SgtWookie

Joined Jul 17, 2007
22,230
Bill did in fact correctly "flip" the circuit upside-down; PNP-> NPN

A couple of tiny suggestions; have the OUT terminal on the LM317 on the right-hand side and the IN terminal on the left - either that, or use a physical layout of the LM317 (newcomers often get the pins on regulators wrong).

It has a much lower dropout than the other design, and better thermal stability. For best performance it should be the same currents throughout, otherwise you will be operating in a different part of the transistor curve, which will cause some variations.
That brings up a good point, as I currently (pun intended) am using 20 Ohm resistors for the LED mirrors, and a 39 Ohm resistor on the mirror on the left side, so that puts them in different parts of the curve. If one wants the least variation possible, all of the emitter resistors need to be the same value, and then the LM317 sets the current as:
Iled = Vref/R1
where:
Vref = nominally 1.25v, but may vary from 1.2v to 1.3v on an LM317 and still be within manufacturers' specifications. If you want to be certain about your Vref, measure it.
R1 = max of 120 on an LM317, 240 on a LM117 or LM317L; min of Vref/1.5 for LM317/LM117 and Vref/0.1 for LM317L.

The trade-off is a further loss in efficiency. It's not all that wonderful to begin with due to it being a linear regulation scheme; they are just not very efficient when used on a system where the voltage may vary so widely.

This would be a good circuit to test on a bench where one had not only a variable supply, but means to vary the circuit temp.

It is slightly different in that the LM317 sets the current. 20ma is the usual minimum for a LM317T, however there are LM317 that go much lower (down to 5ma), such as the LM117.
I'm sure you meant to type 10mA for the LM317, as that is what the actual minimum current is. The LM317L is the exception at 5mA minimum; it's really a different regulator as its' max current is 100mA, and max power dissipation is 625mA (limited by the case design).

I am fighting the 3X blue LEDs in an automotive application all the time (though not here, it is against TOS). 3.6V X 3 = 10.8V, which leaves very little overhead.
A caution here; the LM117/LM317 should not be used in an automotive environment as transients may exceed 60v during load dumps. The absolute maximum voltage across the LM117/LM317 is 40v; that's from the IN to the OUT terminal. So, use of these regulators in such an environment would exceed their maximum voltage specifications.

Additionally, the LM3904/LM3906 are not suitable for automotive use in such a circuit, as their maximum Vceo ratings would be exceeded by a considerable margin during transients.

This simply highlights another reason why we no longer discuss "automotive modification" type circuits here; as they are a lot more difficult to design for than one would expect.
 
Last edited:

Wendy

Joined Mar 24, 2008
23,421
While I show a 10ma circuit, I also show how to modify it. There are a few LEDs that require a lot less than average current, and as mentioned there are LM117 that can drive a lot less current.

If I truly had to worry about 60V on a car harness I suspect I would have to put a MOV on it, or a large zener. Given the amount of electronics, and the fact it is increasingly more common such high surges are going to be less common. Given this is for a boat it is even less likely.

When BH first showed this circuit I missed the advantages of the low dropout. It can be extremely low, down around 0.2V. Possibly less, though I think that would be pushing it.

I'm probably going to incorporate it into my LEDs article before it is done. It is not my favorite design, but it definitely has its uses.
 
Last edited:
Top