** LM 317** is the popular adjustable voltage regulator IC commonly used to make variable power supply. It is a three terminal device with Input, Output and Adjustment pins. Actually, LM317 is an Op Amp with relatively high output current capacity. The Inverting input of the Om Amp is Adjustment pin, while the Non-inverting input is set by an internal band gap voltage reference which produces a stable reference voltage of 1.25 volts.

In function, the voltage regulator works as a Non-inverting amplifier through the resistive voltage divider between its output and ground. So that the output voltage can be adjusted to a fixed value, the reference voltage above that of adjustment pin. This makes the output voltage. LM317 can be designed as Voltage regulator and Current regulator.

**Voltage regulator**

Voltage regulator is the circuit that gives either a fixed or variable output voltage. LM317 can be used to design a variable power supply using just two resistors. Addition of two capacitors can smooth the output voltage. In the figure, the capacitor C1 removes input noise and C2 removes output transients. Output voltage range can be fixed by selecting appropriate resistors.

The given formula fixes the output voltage.

**V out = Vref ( 1+ R2/R1).**

Suppose R1 is selected as 220 Ohms and R2 4.7K. Then the output voltage will be

1.25 ( 1+ 4700/220 ) = 27.95 volts. So if the input voltage is 30 volts, the output voltage will be 27.9V. That is less than 2.1 volts than the input voltage. If Variable resistor is placed as R2, then the output voltage can be set between 1.5 volts to 27 volts.

**Current regulator**

LM317 can be used to make a Current regulator with constant output current. Figure shows a 1 Ampere current regulator circuit. Here the output voltage is fed back to the adjust pin. That is the low side resistor of the divider is with the load itself. The output current is that resulting from dropping the reference voltage across the resistor.

The value of the output current can be fixed using the formula

**Iout = Vref / R1**

Suppose we are selecting 10 ohm resistor as R1, then the output current will be

1.25 / 1 = 1.25 Amps. If we give 1 Ampere current as input, output will be 1 Amps.

Suppose we take 10 Ohm resistor as R1. Then the output current will be

Iout = 1.2 / 10 = 0.125 Amps or 125 Milli Ampere ( 0.125 x 1000 = 125 )

The figure below shows a typical Variable power supply using LM317. Output voltage can be set between 1.5 volts to 12 volts using the 4.7K Pot.

Capacitor C1 removes noise from input voltage and C2 removes transients in the output voltage.

**LM 317 Resistor value calculator. Click link**