# Understanding this LM317 LED Driver circuit

I came across this simple LED Driver circuit ( I am aware of the power losses but just wanted to understand its working) . Now in a Voltage regulator configuration , ADJ is connected to a voltage divider which sets the voltage output at the OUT pin .

This image(below) is the regulator configuration . Now in this image R2 is replaced by an LED(Which has very low resistance) and R1 is the control potentiometer which helps us control the brightness to the LED .

Can someone explain how exactly does the LED Driver circuit work ? The part I get confused is the wire to the ADJ pin. Does it behave like a feedback of sorts to get a voltage on the o/p ?

• It should be noted that this circuit is horrible for battery use as it has 'headroom' of 1.25V for the sense resistor, plus the dropout voltage of the LM317. That's a total of 4.25V recommended, more like 3.25V typically at moderate current. So if your LED requires 3V then your regulation will start to fail at around 6.25V so the efficiency is guaranteed to be less than 50%. Jul 25, 2015 at 22:29
• Thanks Spehro , I am aware of it not being an efficient circuit. I just posted this to understand the circuit Jul 26, 2015 at 7:45
• Sure, and you said so explicitly up front. I just wanted to add a comment so others in the future would realize what exactly you meant by "power losses". Jul 26, 2015 at 12:01

The voltage across R will be adjusted to a specific value (about 1.25V for the LM317T) by the regulator. Since the resistance is constant and the voltage across it will be held constant, the current through it will also be constant. The adjust pin takes a very small amount of current (usually less than 100uA), and the rest flows through the load.

• yup there's always a fixed 1.25V drop between VOUT and ADJ. The size of the resistor determines the amount of current delivered to the load (in this case an LED). Jul 25, 2015 at 21:55
• So basically its just a voltage divider at the output with LED being the lower resistor in the divider, and the Wire to the ADJ pin doesn't get affected as its already constant . ? Also in the first sentence do you mean voltage across R+LEDR ? Jul 25, 2015 at 21:55
• @DallasCarter: It's not a divider at all. The voltage is measured between the output and ADJ, therefore only R is taken into account. Jul 25, 2015 at 21:57
• @DallasCarter, no the LM317 regulates such that VOUT - ADJ = 1.25V. Jul 25, 2015 at 21:57
• The battery's voltage decreases as it drains. The CC driver compensates for that. Jul 25, 2015 at 22:13

Simply stated, the value of the resistor must be selected such that with the desired current through the LED (and the resistor, since they're in series) the voltage across the resistor - Vref - will be 1.25 volts.

Then with, say, 20 milliamperes through the LED, using Ohm's law to find the value of R gives us:

$$R = \frac{Vref}{I} = \frac{1.25V}{0.02A} = \text{62.5 ohms.}$$

Vout will then be:

$$Vout = Vref + Vled,$$

and assuming a white LED with a Vf of 3.5 volts with 20 milliamperes through it gives us:

$$Vout = Vref + Vled, = 1.25V + 3.5V = \text {4.75 volts}.$$

According to Texas Instruments' LM317 data sheet the input to output differential voltage (headroom) can go as high as 3 volts, so:

$$Vin \geqq Vref + Vled + Vhr = 1.25V + 3.5V + 3V = \text {7.75 volts}.$$

There's another small current, about 100 $\mu A,$ which is used by the reference but, for the purpose at hand, can be ignored.