đ§ LM317 â Basic Adjustable Linear Regulator
đ What is the LM317?
The LM317 is a very simple linear voltage regulator. It takes a higher DC voltage (like 9â24V) and outputs a lower, adjustable voltage.
It is called linear because it works by dropping excess voltage as heat â not by switching like modern buck converters.
Output range: 1.25V â ~37V (depending on input voltage).
đ LM317 Pinout
The LM317 has three pins:
IN â This is where you feed the input voltage.
OUT â This is the regulated output voltage.
ADJ â This pin adjusts the output using resistors.
âī¸ Basic Adjustable LM317 Circuit
This is the simplest LM317 adjustable regulator circuit:
The output voltage is set using two resistors:
R1 â A fixed resistor (usually 240Ί)
R2 â A variable resistor (potentiometer)
Turning the potentiometer changes the output voltage.
đ How to Calculate Output Voltage
The LM317 always keeps 1.25V between OUT and ADJ.
The formula is:
Vout = 1.25 Ã (1 + R2 / R1)
Example:
R1 = 240Ί
R2 = 720Ί
Vout = 1.25 Ã (1 + 720/240) = 5V
This is why the LM317 is popular â the math is extremely simple.
đģ Voltage Drop (Dropout Voltage)
The LM317 needs the input voltage to be at least 3V higher than the output.
Vin âĨ Vout + 3V
Example:
Desired output: 5V
Minimum input: 8V
If Vin is too low, the LM317 cannot regulate and the output will drop.
đĨ When Does the LM317 Need a Heatsink?
Because the LM317 is a linear regulator, it burns off extra voltage as heat.
The heat is:
Power Dissipation = (Vin â Vout) Ã Load Current
Example:
Vin = 12V
Vout = 5V
Load = 0.5A
Heat = (12 â 5) Ã 0.5 = 3.5W
Anything above 2â3W usually requires a heatsink.
If the LM317 becomes too hot to touch â you need a heatsink.
đ ī¸ Quick Summary
LM317 is a linear regulator
Adjustable from 1.25V to ~37V
Needs Vin âĨ Vout + 3V
Output voltage set by R1 and R2
Heatsink needed if (Vin â Vout) Ã Iload > 2W