# Electronics Mini Project using Breadboard: LED Driver Using LM317

### How LM317 Adjustable Voltage Regulator IC works as Constant Current Source?

We know that, IC LM317 is a Voltage Regulator IC whose output can be varied using external resistor.
In our previous posts we had seen the introduction and working principle of the LM317 IC. It is highly recommended to read about the Basics of LM317, Pin Identification and it's Operation.

But this IC can be used to provide constant current to the load ( ie, provides same amount of current even the load changes). In this post, let us see how can we do the simple DIY electronics mini project using constant current source concept.

#### LM317 Based Constant Current Source Circuit:

This is the simple Breadboard based DIY (Do It Yourself) project using LM317 IC and few passive components to drive the LEDs or to provide the constant current to the load.
In the below circuit, value of R should be selected depends upon the load current requirement.

#### Detailed Design Procedure:

We should remember the following two important facts about the LM317 Adjustable Voltage regulator IC

1. The Output Voltage of the LM317 is
$Vout = Vin \left ( 1+\frac{R_{2}}{R_{1}} \right )+ Iadj .R_{2}$
2. The voltage difference between Output Pin (Pin-2) to the Adjust Pin (Pin-1) is always to be maintained by 1.25V.

From the second point, we can derive that the current flows through the resistor R is given by the following equation:
$I_{R} =\frac{1.25}{R}$

From the above equation,

${R}=\frac{1.25}{I_{LOAD}}$

• So based on the preferred load current, we can place the appropriate value of resistor in the circuit.
• To get the precise output current, we can use the variable resistor in the place of resistor R in the above circuit.
• Remember that this circuit is suitable ( efficient) for load current less than 200mA.
• It is recommended to use the LM317 regulator IC mounted on the heat sink.
• Remember that the Power loss in the LM317 IC  is equal to:
$Power Loss = \left ( Vin - Vout \right )\cdot Iout$
• Aluminium electrolytic capacitor is inserted in the output side to avoid the high frequency ripples.
• In the input side, the low value (0.1μF) ceramic capacitor is used as a decoupling capacitor.

#### LED Driver Using LM317 Regulator IC:

This constant current source circuit is used as a LED driver Circuit. (We know that LEDs draws constant current from the source).

• We can drive single LED or number of LEDs connected in parallel using this circuit as shown in the following figures.
• You can build these circuits in breadboard.
• For this project, initially use general purpose LEDs, which draws 20mA from the supply.
• Then try Power LEDs also which draws 100mA and more from supply.

Irrespective of number of LEDs connected to the load, it will deliver same amount of current to all the LEDs as per the following formula:
$I_{R} =\frac{1.25}{R}$