Guides › What Is an IREF Resistor? Setting Current in LED Drivers and Current Sources
What Is an IREF Resistor? Setting Current in LED Drivers and Current Sources
Many LED driver ICs and constant-current circuits set their output current with a single external resistor. Depending on the vendor the pin is called IREF, ISET, RSET or REXT. Inside the IC a circuit holds a fixed reference voltage (Vref) across that resistor, and the resulting current sets the output current.
The basic formula
I = Vref / R → R = Vref / I
It is just Ohm's law. This site's calculator takes the target current (mA) and reference voltage (V) and computes R = Vref / (I / 1000) in ohms. The default 1.25 V is the reference voltage of adjustable regulators such as the LM317.
| Target current | Vref 1.25 V | Vref 1.2 V | Vref 0.6 V |
|---|---|---|---|
| 10 mA | 125 Ω | 120 Ω | 60 Ω |
| 20 mA | 62.5 Ω | 60 Ω | 30 Ω |
| 50 mA | 25 Ω | 24 Ω | 12 Ω |
| 100 mA | 12.5 Ω | 12 Ω | 6 Ω |
| 350 mA | 3.57 Ω | 3.43 Ω | 1.71 Ω |
Check the datasheet for a gain factor (k). Many LED driver ICs multiply the small IREF pin current internally, so the formula becomes I_out = k × Vref / R and the resistor is k times larger. The calculator assumes k = 1; if the datasheet gives a gain or its own formula, use that.
Example: LM317 constant-current source
The LM317 always keeps about 1.25 V between its OUT and ADJ pins. Put resistor R between them and connect the load at the ADJ side, and a constant current I = 1.25 / R flows through the load (the roughly 50 µA ADJ pin current is negligible).
- 20 mA LED: R = 1.25 / 0.02 = 62.5 Ω → standard 62 Ω (about 20.2 mA)
- Resistor power: P = Vref × I = 1.25 × 0.02 = 25 mW → a 1/8 W resistor is enough
- The LM317 itself dissipates (input voltage − LED voltage − 1.25 V) × I, so higher currents need a heatsink.
Choosing a resistor: standard values and tolerance
- E24 series (5%): 10, 11, 12, 13, 15, 16, 18, 20, 22, 24, 27, 30, 33, 36, 39, 43, 47, 51, 56, 62, 68, 75, 82, 91
- E96 series (1%): finer steps, e.g. 61.9 Ω, 63.4 Ω
- If the LED must not exceed its current, pick the next higher resistance so slightly less current flows.
- Resistor tolerance becomes current tolerance; use 1% parts when several LED channels must match in brightness.
- A high temperature coefficient (TCR) makes current drift with temperature; precision circuits should use 100 ppm/°C or better.
Power rating
P = Vref × I = I² × R = Vref² / R
Choose a resistor rated at least twice the calculated power. Example: 1.25 V at 350 mA gives 0.44 W → use a 1 W resistor.
Related: current-sense resistors
Switching LED drivers and motor drivers put a small resistor (tens of mΩ to a few Ω) in series with the load and regulate on the voltage across it. Same formula: R = V_sense / I. Sense voltages around 0.1-0.2 V keep losses low, but with such small values the trace and solder resistance matter, so precision designs use 4-terminal (Kelvin) connections.
Why LEDs need constant current
A small change in LED voltage causes a large change in current, and as the LED warms its forward voltage drops and current rises further (thermal runaway). Holding the current constant, not the voltage, keeps brightness stable and extends life. Simple circuits limit current with a series resistor; efficient or precise designs use a constant-current driver.
Try it now: IREF Resistor Calculator (runs in your browser, no data is sent anywhere)