NewAI Part GeneratorFree to get started
FREE TOOL

LM317 constant current calculator

Get the set resistor for a current source or LED driver from this LM317 constant current calculator, with the current spread the data sheet allows. It also shows the resistor power, the minimum supply voltage and how hot the regulator will run.

Solve for
Examples
A
V
V

For LEDs, the sum of the forward voltages.

Resistor series
%
°C

E24 set resistor (current at or below target)

13 Ω

Exact resistance
12.51 Ω VREF ÷ (I − IADJ)
Current with 13 Ω (typical)
96.2 mA -3.8 % vs target
Current range (data-sheet limits)
91.4 mA to 101 mA VREF 1.2–1.3 V, IADJ ≤ 100 µA, ±1 % resistor
Set resistor power
120 mW 131 mW worst case
Set resistor size (2× margin)
1210 (3225 metric), 1/2 W
Minimum supply voltage
10.25 V load + 1.25 V + 3 V headroom
Voltage across the regulator
4.75 V
Regulator dissipation
457 mW
Load power
577 mW
Efficiency (load ÷ supply power)
50 %
Junction temperature at 25 °C
52.2 °C SOT-223 (DCY) new chip RθJA 59.6 °C/W
Most power at 25 °C ambient
1.68 W

Enter the load voltage at the operating current (for an LED string, the sum of the forward voltages). The LM317 holds the current whatever the load voltage does, as long as the headroom is there.

Regulator dissipation against supply voltage
00.20.40.60.878910111213141516Supply voltage (V)Regulator power (W)min 10.25 VVIN 12 V

Nearby E24 values

ResistorCurrent (typ.)vs targetResistor power
11 Ω114 mA+13.7 %142 mW
12 Ω104 mA+4.2 %130 mW
13 Ω96.2 mA-3.8 %120 mW
15 Ω83.4 mA-16.6 %104 mW
16 Ω78.2 mA-21.8 %97.7 mW

How do you calculate the resistor for an LM317 constant current source?

Use R = 1.25 V ÷ I, with the resistor between OUTPUT and ADJUST and the load from ADJUST to ground. For 100 mA that is 12.5 Ω, which rounds up to 13 Ω in E24 and gives 96.2 mA. The supply must be at least the load voltage plus 4.25 V.

LM317 current source formula

The LM317 holds VREF between OUTPUT and ADJUST. Put one resistor there and connect the load to the ADJUST pin: the resistor current is fixed, and it flows on into the load.

I = VREF ÷ R + IADJ     R ≈ 1.25 V ÷ I
R
set resistor from OUTPUT to ADJUST, in Ω
VREF
1.25 V typical, 1.2 V to 1.3 V
IADJ
ADJUST pin current, 50 µA typical, 100 µA maximum
I
load current in A

The resistor always drops VREF, so its power does not depend on the supply:

P(R) = VREF² ÷ R

The input must cover the load, the resistor and the regulator headroom:

VIN(min) = VLOAD + 1.25 V + 3 V

The rest of the supply is lost as heat in the regulator:

P(reg) = (VIN − VLOAD − VREF) × (VREF ÷ R) + (VIN − VLOAD) × IADJ     TJ = TA + P(reg) × RθJA

LM317 constant-current circuit examples

Example 1: 100 mA into a 6 V load from 12 V

R = 1.25 V ÷ (100 mA − 50 µA) = 12.5 Ω. Rounding up to E24 gives 13 Ω and 96.2 mA. The resistor dissipates 120 mW. The supply must be at least 10.25 V, so 12 V is enough. The regulator dissipates 457 mW; in a SOT-223 at 25 °C the junction reaches about 52 °C.

Example 2: TI’s 50 mA battery charger, 24 Ω

TI uses 24 Ω for its 50 mA constant-current charger: 1.25 V ÷ 24 Ω is 52.1 mA. With the data-sheet limits and a 1 % resistor, the current can be anywhere from 49.5 mA to 54.8 mA. A 6 V battery needs a supply above 10.25 V, matching TI’s VI greater than VBAT + 4.25 V.

Example 3: 350 mA into a 9.6 V LED string from 15 V

1.25 V ÷ 350 mA rounds up to 3.6 Ω in E24, giving 347 mA and 434 mW in the resistor. The regulator dissipates 1.44 W. In a TO-263 (RθJA 41 °C/W) at 25 °C ambient the junction reaches about 84 °C, which is within the 125 °C limit on the data sheet’s figure.

LM317 set resistors for common currents

E24 values, rounded up so that the current is at or below the target. Current is typical, including 50 µA of ADJUST current. The resistor power uses the 1.25 V typical reference.

TargetExact RE24 RCurrentResistor power
20 mA62.7 Ω68 Ω18.4 mA23 mW
50 mA25 Ω27 Ω46.3 mA57.9 mW
100 mA12.5 Ω13 Ω96.2 mA120 mW
200 mA6.25 Ω6.8 Ω184 mA230 mW
350 mA3.57 Ω3.6 Ω347 mA434 mW
500 mA2.5 Ω2.7 Ω463 mA579 mW
700 mA1.79 Ω1.8 Ω694 mA868 mW
1 A1.25 Ω1.3 Ω962 mA1.2 W
1.5 A833 mΩ910 mΩ1.37 A1.72 W

How much current before the LM317 overheats

The highest current that keeps the junction at or below 125 °C at 25 °C ambient, for a given voltage across the regulator. RθJA values are the data sheet’s figures: new chip for SOT-223 and TO-263 (the legacy chip is 66.8 and 38.0 °C/W) and legacy chip for the TO-220. A real board can be better or worse, and the regulator is rated to 1.5 A at most.

Across regulatorSOT-223 (59.6 °C/W)TO-263 (41 °C/W)TO-220 (23.5 °C/W)
3 V559 mA813 mA1.42 A
5 V336 mA488 mA851 mA
10 V168 mA244 mA426 mA
15 V112 mA163 mA284 mA
20 V83.9 mA122 mA213 mA

What goes wrong in a real LM317 LED driver circuit

Headroom is the usual failure. If the supply sags or the LED voltage is higher than you assumed, the regulator drops out and the current falls, so check the worst case: lowest supply and highest load voltage. Heat is the second: the regulator dissipates everything the load does not use, and it has thermal overload protection, so an overheated driver will shut down and restart rather than hold its current. Check the shorted-load case too: the LM317 keeps regulating the same current, but nearly the whole supply now sits across it, so the dissipation can be several times the normal figure, and above 15 V across the regulator the guaranteed current limit falls below 1.5 A. Very small currents are the third problem: below 10 mA the result is not guaranteed. Finally, the 1.2 V to 1.3 V reference spread gives up to ±4 % on its own, so if you need better than that, use a dedicated current-regulator part.

Glossary

VREF
The voltage the LM317 holds between its OUTPUT and ADJUST pins: 1.25 V typical, 1.2 V to 1.3 V over the rated conditions.
IADJ
The current out of the ADJUST pin, 50 µA typical and 100 µA maximum. It flows through the load, in addition to VREF ÷ R.
Set resistor
The single resistor from OUTPUT to ADJUST that programs the current.
Headroom
The voltage across the regulator, VIN − VOUT. The LM317 needs up to 3 V to stay in regulation.
Dropout
What happens when the headroom is too small: the regulator stops controlling the output and the current falls.
RθJA
Junction-to-ambient thermal resistance in °C/W, as listed in the data sheet. Your board will differ.

Related guides

Frequently asked questions

What resistor sets the current in an LM317 current source?

R = 1.25 V ÷ I, between the OUTPUT and ADJUST pins, with the load from ADJUST to ground. 100 mA needs 12.5 Ω, and 500 mA needs 2.5 Ω.

How much power does the LM317 set resistor dissipate?

P = (1.25 V)² ÷ R, which is the same as 1.25 V × I, whatever the supply voltage. A 13 Ω resistor dissipates 120 mW. TI asks for a power rating greater than this figure; twice the figure is a sensible margin.

What supply voltage does an LM317 constant current source need?

At least the load voltage plus 4.25 V: 1.25 V across the resistor and up to 3 V of headroom across the regulator. TI states the same thing for its charger circuit, VI greater than VBAT + 4.25 V. A 6 V load therefore needs 10.25 V.

What is the minimum current for an LM317?

The data sheet gives a minimum load current of 3.5 mA typical and 10 mA maximum at 40 V across the regulator, and specifies VREF only from 10 mA. Design for 10 mA or more; below that, the calculated current is not guaranteed.

Why is the current slightly different from 1.25 V ÷ R?

The ADJUST pin current (50 µA typical, 100 µA maximum) adds to the load current, and VREF can be anywhere from 1.2 V to 1.3 V. A 24 Ω resistor with 1 % tolerance gives 49.5 mA to 54.8 mA across those limits, not exactly 52.1 mA; this LM317 current source calculator reports that range.

How hot will an LM317 constant-current LED driver get?

Regulator power is about (VIN − VLOAD − 1.25 V) × I, and the junction reaches TA + P × RθJA. For 457 mW in a SOT-223 (RθJA 59.6 °C/W, the data sheet’s new-chip figure) at 25 °C ambient that is 52 °C, against a 125 °C limit.

Is an LM317 a good LED driver?

For small currents and a supply close to the LED voltage, yes: it is cheap and simple. Every extra volt is lost as heat, though, and the 4.25 V overhead is large at low LED voltages, so a switching constant-current driver is a better choice above a few hundred milliamps.

How do you wire an LM317 LED driver circuit?

Put the set resistor between OUTPUT and ADJUST and connect the LED string from ADJUST to ground, so R = 1.25 V ÷ I sets the LED current. The supply goes to the regulator input and must be at least the LED string voltage plus 4.25 V.

How does an LM317 current regulator work?

The LM317 holds VREF (1.25 V typical) between OUTPUT and ADJUST. With one resistor there and the load connected to the ADJUST pin, the resistor current is fixed and flows on into the load, along with the small ADJUST current.

Can an LM317 work as a current limiter?

Yes: the same circuit keeps regulating the same current even into a shorted load, so the load current stays near 1.25 V ÷ R. With a short, nearly the whole supply sits across the regulator, so check the dissipation for that case too.

More free PCB tools

See all free electronics tools →

Sources

Design the whole board, not one number

ProtoFlow is free AI PCB design software: describe a circuit and get a schematic with real parts, PCB layout with an autorouter, SPICE simulation and Gerber files. Native KiCad, Altium and EAGLE import and export. Free on macOS, Windows and Linux.

Get for Mac

Free to start. No card required.