LM317 Resistor Calculator
Calculate R2 resistor value for LM317/LM338 adjustable voltage regulator output voltage, with actual Vout and resistor power dissipation.
Formula
Reference: Texas Instruments LM317 Datasheet (SNVS774)
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
Shop Components
As an Amazon Associate we earn from qualifying purchases.
Related Calculators
General
LDO Dropout
Calculate LDO minimum input voltage from dropout specification, determine power dissipation, and estimate efficiency at a given supply voltage.
General
Zener Diode
Calculate series resistor, power dissipation, and load current for zener diode voltage regulators
Power
LDO Thermal
Calculate LDO regulator power dissipation, junction temperature, thermal margin, and minimum dropout voltage for thermal design validation.
General
Ohm's Law
Calculate voltage, current, resistance, and power using Ohm's Law. Enter any two values to solve for the remaining two quantities.