The LM317 is an adjustable three-pin linear voltage and current regulator whose specs allow it to be used in switching circuits of regulated power supplies. It is used very often in LED devices. In this article you will learn the basic features of this IC, its pinout, technical parameters and working principle. You will see how just a few radio components can be used to achieve the necessary output parameters.
Pinout
Manufactured in a universal transistor package that allows you to place it on a board or heat sink. The most common model LM317 is found in a TO-220 package with a “T” at the end of the marking. The letter “t” denotes the type of package.

The pinout of the LM317 regulator is made by the three contacts. If you look at the device from the front, the first pin on the left (Adj) is the regulated lead, the middle pin (Vout) is the output, and the last pin on the right (Vin) is the input.
- Vin is the output, it is the input voltage to be regulated. For example, it might have 12 V applied to it, which the device will step down to 10 V on Vout.
- Vout is the pin to which the voltage is output. The heat sink surface is connected to this pin of the IC.
- Adjustable (Adj) – This is the pin that allows you to adjust the output voltage through a sub-line resistor.
It is found in different types of packages.

Pin numbers of different types of IC packages.

Specifications
Technical specs of the LM317 at an ambient temperature of +25 °C:
physical:
- TO-220, TO-220FP, TO-3, D2PAK, SOT-23 packages;
- package material – plastic;
electrical:
- range 1.25 to 37 V;
- output current not more than 1.5 A;
- instability on the output up to 0,1 %;
- reference (Vref) from 0.1 to 1.3 V
- current flowing from the trim output (Iadj) from 50 to 100 μA (µA);
internal protection:
- from short-circuit (Internal Short-Circuit Current Limiting);
- Thermal Overload Protection;
- maximum power dissipation limitation (Output Safe-Area Compensation);
The presence of the Output Safe-Area Compensation parameter means that the IC has “thermal limiting” sensors, which limit the maximum power dissipation, if it is exceeded it will shut down and will not be affected.
All overload protection systems remain fully functional even if the control input is disabled.
LM317 Circuit
Knowing the pin numbers and their purpose it is possible to reduce the voltage applied to the input of the IC to the desired value. To do this you need to change the resistance of R1 connected to the regulating pin Adj. Let’s see what this looks like.

As you can see in the schematic, you have to connect two resistors R1 and R2 to the Adj pin of the LM317. They determine the voltage that the regulator lowers and outputs. Let’s look at the following formula for the output voltage.
VOUT=1.25*(1+R2/R1)
It can be seen from the formula that the value of Vout depends on the value of the resistor R2. The more the value of the resistor R2 increases, the higher the output voltage will be.
An example of a voltage regulator on the LM317
Suppose you want to supply 12 volt to the IC and adjust it to 5 volt. Using the formula above, for the LM317 to output 5 volts and act as a voltage regulator, R2 must be 720 ohms.
Assemble the above circuit. Then use a multimeter to check the output voltage by placing the probe on a 1 uF capacitor. If the circuit is assembled correctly, the output will be about 5 volts.
The input capacitor C1 can be omitted if the IC package is located at least 15 centimeters from the input smoothing filter. The output capacitor C2 is added to smooth the transients
Now replace resistor R2 and replace it with a 1.5 kOhm resistor. The output should now be about 10 V. This is an advantage of these ICs. You can adjust them to any voltage within the range specified in its specifications.
How it works
Let’s аssemble a simple voltage regulator using the LM317 according to the circuit diagram.

Connect a DC power supply to the input of Vin. As already written earlier you need to connect to these pins input voltage, which the IC will then step down depending on the load. It should be higher than the output voltage.
Let’s say using this circuit we need to get 5V to the load. Therefore you have to supply more than 5 volts to the input Vin. Typically, unless the LM317 is a low dropout regulator, the input voltage should be about 2V higher than the output voltage. Since we want 5 volts on the output we will supply 7 volts to the regulator.
A low-voltage-drop regulator is a device with a low voltage drop at the junction, about 1 to 1.5 volts. A single npn transistor is usually used as the regulating element.
Pin Adj allows you to adjust the output voltage to the level we need. Let’s calculate what value of resistance R2 will give at the output of the device 5 volts. According to the formula for the output voltage, we find the value of the resistance R2.
5(B) = 1.25*(1+R2/240 Ohm)
Since the resistance R1 is 240 ohms and the output voltage is 5 volts, R2 will be 720 ohms according to the formula. Thus, with R2 = 720 ohms, the LM317 will output 5 volts when more than 5 volts is applied to its input.
Current Driver
The current driver (LED Driver) maintains the current and voltage in the load circuit, regardless of the constant power supplied to it. It is known that the LED is a semiconductor device, which should be powered with the current specified in the specifications of the LED.
Using the regulation circuit as shown in the Datasheet you can build a simple current driver circuit on the LM317.

To make it work, knowing the current consumption of the LED, you need to pick up the resistance of the trimmer resistor R1. Low-power LEDs have a current consumption of about 20 mA or 0.02 A. To select the required resistance use the formula, where Iout is the current at the output of the IC, required to power the LEDs.
R1(Ohm) = 1.25/IOUT(A)
According to the formula, we obtain the value of the resistor with a resistance of 62.5 ohms. To avoid overheating of the IC select the required power of the resistor according to the formula.
P(W) = IOUT2(A)*R1(Ohm)
Assembling the circuit and supplying power, you get the simplest current stabilization driver for LEDs. The LED will turn on, with the required brightness, which will not depend on the applied DC power to the input of the IC.
The required resistor R1 can be selected using a standard 0.5 kOhm wirewound resistor. To do this, first check its resistance between the middle and any of the outermost pins. Using a multimeter, rotating the adjusting rod, achieve a resistance value of 500 ohms, so as not to burn the connected LED when you turn it on.
Then connect to the circuit with the LED. To select the appropriate resistor rating, after the power is applied, change the resistance of the trimmer resistor to the required LED current.
How to check the lm317 with a multimeter?
You can’t test a IC with a multimeter because it’s not a transistor. You can certainly test something between the contacts, but this does not guarantee the serviceability of the ICs, since it contains a large number of different radio elements (transistors, resistors, etc.) which are not connected to the pins directly and do not “test”. The most effective way is to assemble a simple test bench using a breadboard for testing and powering everything from a battery. The test bench should be the simplest stabilizer (a couple capacitors and resistors).
Equivalents
Alternatives and equivalents to the LM317 IC are:
- GL317;
- SG317;
- UPC317;
- ECG1900.
A very well known Russian equivalent of 1m317 with fixed voltage is the KP142EH12 IC. If you need an adjustable linear regulator, the KPEH12A (you can also use B) will do.
Safety in operation
The maximum voltage between the input and output should not exceed 40 V. Power dissipation should not exceed 20 W. Soldering temperature should not exceed 260 °C, while observing the distance from IC’s case more than 1,6 mm and heating time up to 10 seconds. Device storage temperature should be within the range from -65 to + 150 °C, operating temperature should not exceed + 150 °C.
These are the maximum values that can damage the device or affect the stability of its operation. The IC is well protected against thermal overloading and short-circuiting of the contacts. However, do not exceed the allowable parameters during operation, to avoid its failure and to achieve maximum reliable operation.
Manufacturers
The LM317 is produced by many well-known manufacturers, a Datasheet from each can be downloaded in the following section.