Design reliable linear power supplies using the classic LM317. Calculate output voltage from resistor divider (R1/R2), find standard resistor values for a target voltage, and verify dropout, power dissipation, and load regulation
The LM317 is an adjustable three-terminal positive voltage regulator capable of supplying over 1.5A over an output voltage range of 1.25V to 37V. It uses a bandgap reference of 1.25V between the output and adjustment terminals. The output voltage is set by two external resistors R1 and R2:
VOUT = 1.25V × (1 + R2/R1) + IADJ × R2
where IADJ ≈ 50µA typical, often negligible for R2 < 10kΩ.
The formula shows that the output voltage is directly proportional to the resistor ratio. R1 is usually chosen between 120Ω and 240Ω to guarantee a minimum load current of 5–10mA, which improves regulation. The adjustment pin current (IADJ) introduces a small offset; for precision designs, include it in calculations.
A hobbyist builds a 1.25V–15V adjustable bench supply using an LM317, a 24V transformer, and a 5kΩ potentiometer as R2. Using our calculator: with R1=240Ω, R2 at maximum 5000Ω gives VOUT = 1.25×(1+5000/240) ≈ 27.3V, but limited by VIN (24V rectified ≈ 32V DC, so 27V is feasible). At 12V output and 1A load, dropout = VIN (≈20V) - 12V = 8V → PD = 8W, requiring a substantial heatsink (RθSA ≈ 5°C/W). The calculator instantly validates these numbers, preventing overheating failures.
| Target VOUT (V) | Calculated R2 (Ω) | Nearest E96 R2 (Ω) | Actual VOUT (V) | Error |
|---|---|---|---|---|
| 3.3 | 394 | 392 | 3.29 | -0.3% |
| 5.0 | 720 | 715 | 4.98 | -0.4% |
| 9.0 | 1488 | 1500 | 9.06 | +0.7% |
| 12.0 | 2064 | 2050 | 11.93 | -0.6% |
| 15.0 | 2640 | 2670 | 15.16 | +1.1% |
For outputs above 25V or when R2 exceeds 10kΩ, the adjustment pin current (50µA) produces a voltage drop across R2 of up to 0.5V. The exact formula VOUT = VREF(1+R2/R1) + IADJ·R2 should be used. Our calculator includes this term (displayed as IADJ contribution) for full accuracy. For most designs below 15V, ignoring IADJ yields <0.5% error.