LM317 adjustable regulator
The adjustable three-terminal regulator in its TO-220. Aliases: LM317T, adjustable regulator, variable regulator.
It has no ground leg. It holds OUT 1.25 V above ADJ, and two resistors set the
output: R1 from OUT to ADJ has those 1.25 V across it, and the same current
through R2 from ADJ to ground lifts ADJ off ground.
Vout = 1.25 V x (1 + R2 / R1) + 50 uA x R2
With the usual 240 ohm for R1 and 720 ohm for R2 the output is 5.04 V.
Pins
| Pin | What it does |
|---|---|
ADJ |
The reference leg. 50 uA flow out of it. |
OUT |
The output, held 1.25 V above ADJ. |
IN |
The unregulated input. |
The legs are drawn where TI's sheet has them: ADJ OUT IN from the left, flat face
toward you, with the tab on OUT.
While it runs
The readout is OUT above ground.
What the model gets right
The figures are the typical ones from TI's LM317 sheet (SLVS044).
The reference and the ADJ current. 1.25 V from ADJ to OUT, and 50 uA out of
ADJ, the second term of the formula. A 5 k R2 adds a quarter of a volt.
The minimum load. The regulator's own operating current, 3.5 mA, has no ground
to go to, so it leaves by OUT. With 240 ohm for R1 the divider takes 5.2 mA and
all is well. With 10 k it takes 125 uA, and with nothing else on the output the
output climbs toward the input, as a real LM317's does.
Dropout. The sheet's graph has about 1.5 V across the regulator at 20 mA and 1.9 V at 1 A; the model is 1.49 V plus 0.41 ohm, which meets both. From 12 V in, the most it gives at a light load is about 10.5 V, whatever the resistors ask for.
The current limit, 2.2 A, the sheet's typical figure with 15 V or less across the regulator.
What it does not model
The current limit's fall as the input-output difference passes 15 V (0.4 A at 40 V), heat and thermal shutdown, line regulation and ripple rejection, and the capacitors the sheet recommends. The protection diodes the sheet draws for big output capacitors are outside the part, as on the bench.
Common mistakes
A big R1. The output rises with a light load: keep R1 at 240 ohm or less, or
put a load on.
Asking for more than the input allows. The LM317 needs about 2 V across itself; TI suggests 3 V of headroom.
Getting the legs wrong. It is not a 7805: the middle leg is OUT, not ground.
See it in action
LM317 adjustable supply turns a 2 k potentiometer to set the output. Open it at /templates.
The LM317 constant current LED driver holds 20 mA through three red LEDs from 12 V or 9 V with one 62 ohm resistor.