## LM317 Voltage Regulator Calculator

#### The basic LM317 circuit. See the datasheet for advice

on adding capacitors and other enhancements.

Enter the required output voltage and value of the R1 resistor to calculate the R2 resistor. Then use the nearest available value (listed at the bottom of the page) or a smaller resistor and series trim-pot for greater accuracy. Maximum output is 37V.

R1 can be changed but should be kept in the range 100-1000 ohms. The regulator should have a minimum load of 10mA for the worst-case specified accuracy; the 240 ohm resistor commonly used gives a 5mA loading which is usually OK.

The second calculator can be used to see the calculated voltage resulting from your stock value resistors. Resistor values must be entered in ohms, '1k' won't work. Sorry.

*(Due to voltage losses in the LM317 regulator chip, the input voltage should be at least 2V more than the required output voltage.)*

### Why is my output voltage a bit off?

The formula used to calculate the regulated voltage is:

#### V_{out} = 1.25(1 + R2/R1)

However,

- The Reference Voltage is only
*nominally* 1.25V and for different components it can vary from 1.20–1.30V; so with a 12V aim, the end result will be 12V ±0.5V.
- The resistors won't be exactly what they say. The cheaper gold-banded are ±5%, brown-banded metal film not much more expensive and ±1%.
- There's a small error term Iq * R2 to add to the result. Iq, the Adjustment pin current, is typically only 50µA (0.00005), so it doesn't usually make much difference compared to the two factors above; only 5mV if R2=1k.

If you need high accuracy, use an adjustable trimpot for all or part of R2.

### E24 resistor series

The E24 series is widely available and goes up in roughly 10% steps as below:

**10 ohms, 11, 12, 13, 15, 16, 18, 20, 22, 24, 27, 30, 33, 36, 39, 43, 47, 51, 56, 62, 68, 75, 82, 91...**

and decades of the above, eg 120 ohms, 4,700 ohms (4.7k).