Using LM317 in LED driving applications

Lightingguy321

Enlightened
Joined
Oct 5, 2006
Messages
654
Whats a basic circuit (constant current) for driving a Luxeon V LED (VXOU bin) @ 700mA? I know that a lot of people refer to the circuit where you stick a resistor in between two of the pins and call it a day for the current limiting, but I want to have the ability to have a constant current.
 

marschw

Newly Enlightened
Joined
Apr 5, 2008
Messages
183
Isn't the LM317 strictly a voltage regulator? So to get it to drive an LED at constant current, you'd need to make any of the many adjustable voltage circuits for it, and tune it to whatever the Vf of your particular LED is at your desired current?

In any case, though wouldn't it just burn off all the extra voltage as heat (i.e. be very inefficient)?
 

Mr Happy

Flashlight Enthusiast
Joined
Nov 21, 2007
Messages
5,390
Location
Southern California
Whats a basic circuit (constant current) for driving a Luxeon V LED (VXOU bin) @ 700mA? I know that a lot of people refer to the circuit where you stick a resistor in between two of the pins and call it a day for the current limiting, but I want to have the ability to have a constant current.
When you place a resistor in between two pins of the LM317 that is not "calling it a day for current limiting", that really is a constant current circuit.

Here is a circuit diagram and discussion of using it to drive an LED.

Isn't the LM317 strictly a voltage regulator? So to get it to drive an LED at constant current, you'd need to make any of the many adjustable voltage circuits for it, and tune it to whatever the Vf of your particular LED is at your desired current?
Actually, no. Although the LM317 itself is a voltage regulator, you can configure it as a constant current source (i.e. a current regulator), as observed above.

In any case, though wouldn't it just burn off all the extra voltage as heat (i.e. be very inefficient)?
Yes, it is quite (very) inefficient. You need an additional 3 volts for the regulator, so this is not a good circuit for running high power LEDs from batteries.
 
Last edited:

HarryN

Flashlight Enthusiast
Joined
Jan 22, 2004
Messages
3,976
Location
Pleasanton (Bay Area), CA, USA
The interaction of the cells, resistor, and LED are slightly more complex, and in your favor, than you might at first think.

Please consider first to throw away that particularly poor bin and pick up something like a WXOS or WXOT from photonfanatic. He often has something like this.

Now that you have a reasonably bright, reasonably low Vf LED, drive it down a bit lower. Hook up the LED to a heat sink and power supply, and run it in for 24 - 48 hours at 700ma. If it behaves "normally", the Vf will drop well into the "S" range, making it nice and efficient to drive with a 2 cell Li Ion setup.

What you will find when using the LED, a 2 ohm resistor, and a pair of LiIon cells are a couple of interesting things
- There are VERY few drivers that can operate on such a low differential between battery voltage and Vf.
- There are VERY few drivers that can match the efficiency of this setup
- As the battery voltage drops, the LED Vf will drop also, as its Vf is not a constant, but a curve of the opposite shape of the battery discharge. In addition, there is a negative relationship between temperature and light output.

What this all means in the end, is that you will find it very hard to notice (by eye) a brightness change over a substantial part of the battery discharge - AND, it will keep running down to voltages that are substantially less than the "rated" Vf. - something very difficult for a driver.

I am not slamming drivers, I have some lights with them, but it is really amazing how far you can go with a correctly designed and matched LED and battery set.

If Photon Fanatic does not have any WXOS or similar LEDs, I have a few spares I can sell to you, but please check with him first.
 

TorchBoy

Flashlight Enthusiast
Joined
Jan 15, 2007
Messages
4,486
Location
New Zealand
The LM317 has a sense voltage of 1.25 V, but the dropout voltage is from 2 to 2.3 volts, which at 700 mA would mean 1.4 to 1.61 watts dissipated by the LM317. In some situations that's not a problem, but I wouldn't want it in a light weight headlamp, for example. What's your power source? It may be that a resistor as Harry suggests is the way to go.

Please consider first to throw away that particularly poor bin and pick up something like a WXOS or WXOT from photonfanatic. He often has something like this.

Now that you have a reasonably bright, reasonably low Vf LED, drive it down a bit lower. Hook up the LED to a heat sink and power supply, and run it in for 24 - 48 hours at 700ma.
If Lightingguy321 already has his LED and wants to use it, there's no reason he should discard it and get a brighter one. And remember he wants to make a constant current driver.

As the battery voltage drops, the LED Vf will drop also, as its Vf is not a constant, but a curve of the opposite shape of the battery discharge. In addition, there is a negative relationship between temperature and light output.
Why "opposite" shape? It'll still be heading downhill. :thinking:

I've seen a few people who became almost fixated with using the LM317, even when it didn't make much sense. A couple of examples:

Rebels for aquarium lighting. The sad thread of someone convinced that Rebels and LM317s are the way to go. :sick2:

Boat lighting. From "I'm not very experienced in electronics" to "[a resistor] does not seem as a reliable solution" to "[very complicated control circuitry in a commercially available product] is not so complex". :ohgeez:
 
Last edited:

TigerhawkT3

Flashlight Enthusiast
Joined
Jul 2, 2006
Messages
3,819
Location
CA, 94087
The LM317 and other linear regulators can be inefficient, but not in every case. With this type of regulator, Iin is equal to Iout, so we can forget current for these efficiency calculations. Examples:

1A:
1 LED, 6 alks:
(3.5*1)/9 = 39% efficient

2A:
9 LEDs, 3 12V SLAs:
(3.5*9)/37 = 85% efficient

3A:
45 LEDs, 110VAC mains rectified to 167VDC (floating regulators only, like the LM138):
(45*3.5)/167 = 94% efficient

If you use a pot instead of a fixed sense resistor, circuit efficiency goes down at lower outputs because Vf is lower (as long as you don't add more LEDs to the circuit) while Vin stays constant and the regulator has to drop more voltage. Examples:

1B:
1 LED, 6 alks:
(2.5*1)/9 = 28% efficient

2B:
9 LEDs, 3 12V SLAs:
(2.5*9)/37 = 61% efficient

3B:
45 LEDs, 110VAC mains rectified to 167VDC (floating regulators only, like the LM138):
(45*2.5)/167 = 67% efficient and wouldn't even work, because the regulator would have to drop over 50V and these linear LM-series devices can't do that.

Also, as battery voltage decreases, it approaches Vf and becomes more efficient, since it doesn't have to drop as much voltage. This assumes that battery drop was planned for, because if Vin on a fresh batt was only a couple volts above Vf, current regulation will fail once Vin drops.

Basically, a bigger array is more efficient (assuming that you try to get total Vf close to Vin), but can also lead to problems when your Vf varies (as seen in examples 3A-3B).

I hope some of this helps.
 
Top