Skip to content
RFrftools.io
General

LM317 Resistor Calculator

Calculate R2 resistor value for LM317/LM338 adjustable voltage regulator output voltage, with actual Vout and resistor power dissipation.

Loading calculator...

Formula

R2=VoutVrefVref/R1+IadjR_2 = \frac{V_{out}-V_{ref}}{V_{ref}/R_1 + I_{adj}}

Reference: Texas Instruments LM317 Datasheet (SNVS774)

VrefLM317 reference voltage (1.25V) (V)
R1Output to ADJ resistor (Ω)
R2ADJ to GND resistor (Ω)
IadjADJ pin current (A)

How It Works

LM317 resistor calculator computes R1 and R2 for adjustable voltage output — essential for bench power supplies, battery chargers, and prototype voltage regulators. Power supply designers, hobbyists, and test engineers use the LM317 for its simplicity and wide voltage range (1.25V to 37V). Per Texas Instruments datasheet (SLVS044) and the LM317 JEDEC registration, the regulator maintains 1.25V reference between output and adjust pins: Vout = 1.25V × (1 + R2/R1) + Iadj × R2, where Iadj = 50-100μA (typically 50μA). Thermal design follows JEDEC JESD51 standards for IC thermal characterization. The design methodology is detailed in Erickson & Maksimovic 'Fundamentals of Power Electronics' (3rd ed.) Chapter 6 as an example of linear regulator analysis. The standard design uses R1 = 240Ω (TI recommendation) with R2 calculated for desired output. Load regulation is 0.1%/A; line regulation is 0.01%/V. Dropout voltage is 2-3V depending on load current, requiring Vin > Vout + 3V for proper regulation.

Worked Example

Design LM317 regulator for 5V output at up to 1A. Using standard R1 = 240Ω: Vout = 1.25V × (1 + R2/240). Solve for R2: 5V = 1.25V × (1 + R2/240), R2/240 = 3, R2 = 720Ω. Select 750Ω (E24 series): Vout = 1.25V × (1 + 750/240) = 5.16V (3.2% high). For exact 5.00V, use R2 = 720Ω (E96 series) or 680Ω + 47Ω trim pot. Power dissipation at Vin = 12V, Iout = 1A: Pd = (12V - 5V) × 1A = 7W — requires heatsink. TO-220 θJA = 50°C/W; at 7W, Tj rises 350°C above ambient without heatsink. Add heatsink with θSA < 5°C/W to keep Tj < 125°C per JEDEC thermal guidelines.

Practical Tips

  • Use 1% resistors for ±1% output accuracy — the 1.25V reference has ±4% tolerance, adding to resistor ratio error
  • Add 1N4002 protection diodes: cathode to input for input short protection, cathode to output with anode to adjust for output short protection per TI datasheet
  • For current limiting, add 0.7V/I_limit resistor between output and adjust pin — at I_limit = 1A, use 0.7Ω (or use LM317 current limit which activates at 1.5A)

Common Mistakes

  • Forgetting input capacitor — LM317 may oscillate without 0.1μF ceramic at input pin; place capacitor within 1cm of regulator per TI application note SNVA558
  • Ignoring dropout voltage — LM317 requires Vin > Vout + 2-3V; for 5V output, minimum input is 7-8V. LDO alternatives (LM1117) have 1.2V dropout
  • Omitting output capacitor — while stable without, 10μF output capacitor improves transient response from 10ms to 100μs settling time

Frequently Asked Questions

1.25V (minimum, R2 = 0) to 37V (maximum, limited by package). Input voltage range: 3V to 40V. Input-output differential: minimum 2-3V (dropout), maximum 40V. For voltages below 1.25V, use LM317L (same function, lower current) or dedicated low-voltage LDO.
Yes for LM350 (3A version) and LM338 (5A version) — same 1.25V reference and formula. For LM1117 (LDO): Vout = Vref × (1 + R2/R1) with Vref = 1.25V. For TL431: Vout = 2.5V × (1 + R1/R2) — note different reference voltage and resistor position.
240Ω provides optimal balance: low enough to swamp Iadj error (50μA × R2 term), high enough to minimize quiescent current (1.25V/240Ω = 5.2mA). Lower R1 improves accuracy but wastes power; higher R1 increases sensitivity to Iadj variation. Range: 120Ω to 1kΩ acceptable.
Efficiency = Vout/Vin × (1 - quiescent/Iload). For 12V to 5V at 1A: η = 5/12 × (1 - 0.005) ≈ 41.5%. For better efficiency, use switching regulators: TPS563200 achieves 92% at same conversion ratio. LM317 is suitable for low-power (<2W) applications where simplicity outweighs efficiency.

Shop Components

As an Amazon Associate we earn from qualifying purchases.

Resistor Kit (1%, E24)

Precision 1% thin-film SMD resistor assortment, 0402 package

Ceramic Capacitor Kit

MLCC ceramic capacitor assortment in 0402 package

Solderless Breadboard

Full-size breadboard for circuit prototyping

Related Calculators