LM317 Voltage Regulator Calculator

Design adjustable voltage regulator circuits using the LM317 IC. Calculate resistor values, power dissipation, and efficiency.

The LM317 is a popular adjustable voltage regulator that can provide a regulated output voltage from 1.25V to 37V. This calculator helps you design circuits with proper resistor values and thermal considerations.

Examples

Click on any example to load it into the calculator.

Standard 5V Supply

Standard 5V Supply

Common 5V power supply from 12V input with moderate current draw.

Input Voltage: 12 V

Output Voltage: 5 V

Load Current: 0.5 A

Reference Voltage: 1.25 V

R1 Value: 240 Ω

Low Voltage Supply (3.3V)

Low Voltage Supply (3.3V)

3.3V supply for digital circuits from 9V input.

Input Voltage: 9 V

Output Voltage: 3.3 V

Load Current: 0.3 A

Reference Voltage: 1.25 V

R1 Value: 240 Ω

High Current Supply (1A)

High Current Supply (1A)

High current 12V supply requiring proper heat sinking.

Input Voltage: 18 V

Output Voltage: 12 V

Load Current: 1 A

Reference Voltage: 1.25 V

R1 Value: 240 Ω

Precision Supply (2.5V)

Precision Supply (2.5V)

Precision 2.5V reference supply with low current.

Input Voltage: 8 V

Output Voltage: 2.5 V

Load Current: 0.1 A

Reference Voltage: 1.25 V

R1 Value: 120 Ω

Other Titles
Understanding LM317 Voltage Regulator Calculator: A Comprehensive Guide
Master the design and implementation of adjustable voltage regulator circuits using the LM317 IC. Learn about voltage regulation principles, thermal management, and circuit optimization.

What is the LM317 Voltage Regulator?

  • Basic Operation
  • Key Features
  • Applications
The LM317 is a three-terminal adjustable positive voltage regulator that can supply more than 1.5A of output current over a 1.25V to 37V output range. It's one of the most popular and versatile voltage regulators in electronics, offering excellent line and load regulation, thermal overload protection, and short-circuit protection. The LM317 requires only two external resistors to set the output voltage, making it ideal for both simple and complex power supply designs.
How the LM317 Works
The LM317 operates as a series pass regulator, where an internal pass transistor controls the voltage drop between input and output. The regulator maintains a constant 1.25V reference voltage between the output and adjust pins. By connecting a voltage divider (R1 and R2) between the output and adjust pins, you can set any output voltage above 1.25V. The formula Vout = Vref × (1 + R2/R1) determines the output voltage, where Vref is typically 1.25V.
Key Advantages of the LM317
The LM317 offers several advantages over fixed voltage regulators. It provides adjustable output voltage from 1.25V to 37V, excellent line regulation (0.01%/V typical), good load regulation (0.1% typical), and thermal overload protection. The device automatically shuts down if the junction temperature exceeds 150°C, protecting both the regulator and the load. Additionally, the LM317 includes short-circuit protection and safe operating area protection.
Common Applications
The LM317 finds applications in virtually every area of electronics. It's commonly used in bench power supplies, battery chargers, audio amplifiers, microcontroller power supplies, and industrial control systems. The regulator is particularly popular in educational and prototyping environments due to its simplicity and reliability. For precision applications, the LM317 can be configured as a constant current source or used with precision resistors for high-accuracy voltage references.

LM317 Specifications:

  • Output Voltage Range: 1.25V to 37V
  • Output Current: Up to 1.5A continuous
  • Line Regulation: 0.01%/V typical
  • Load Regulation: 0.1% typical
  • Reference Voltage: 1.25V ±4%
  • Dropout Voltage: 3V maximum

Step-by-Step Guide to Using the LM317 Calculator

  • Circuit Requirements
  • Component Selection
  • Thermal Considerations
Designing an LM317 circuit requires careful consideration of voltage requirements, current demands, thermal management, and component selection. This step-by-step guide will help you create reliable and efficient voltage regulator circuits.
1. Determine Your Voltage Requirements
Start by identifying your input and output voltage requirements. The input voltage must be at least 3V higher than the desired output voltage to ensure proper regulation. For example, to generate 5V output, you need at least 8V input. Consider voltage variations in your input source—if using an unregulated supply, the input voltage may vary significantly with load and line conditions. Always design for the worst-case scenario.
2. Calculate Load Current Requirements
Determine the maximum current your load will draw. The LM317 can supply up to 1.5A, but power dissipation becomes a critical factor at higher currents. Calculate the power dissipation using P = (Vin - Vout) × Iload. For example, with 12V input, 5V output, and 1A load, the dissipation is 7W. This requires proper heat sinking to keep the junction temperature below 150°C.
3. Select Resistor Values
Choose R1 first—standard values are 120Ω, 240Ω, or 1.2kΩ. Lower values provide better regulation but increase power dissipation in the voltage divider. Calculate R2 using the formula R2 = R1 × (Vout/Vref - 1). For example, for 5V output with R1 = 240Ω and Vref = 1.25V, R2 = 240 × (5/1.25 - 1) = 720Ω. Use standard resistor values closest to your calculated value.
4. Consider Thermal Management
Power dissipation in the LM317 generates heat that must be removed. Calculate the required thermal resistance using RθJA = (Tjmax - Tambient) / P, where Tjmax is 150°C. For example, with 7W dissipation and 25°C ambient, you need RθJA < 17.9°C/W. Most LM317 packages have RθJA around 50°C/W, so a heat sink is usually required for currents above 100mA.

Power Dissipation Examples:

  • 5V from 12V at 0.5A: P = (12-5) × 0.5 = 3.5W
  • 3.3V from 9V at 0.3A: P = (9-3.3) × 0.3 = 1.71W
  • 12V from 18V at 1A: P = (18-12) × 1 = 6W
  • 2.5V from 8V at 0.1A: P = (8-2.5) × 0.1 = 0.55W

Real-World Applications and Circuit Variations

  • Power Supply Design
  • Current Source Configuration
  • Advanced Applications
The LM317's versatility makes it suitable for a wide range of applications beyond simple voltage regulation. Understanding these variations enables you to create more sophisticated and efficient circuits.
Bench Power Supply Design
The LM317 is ideal for bench power supplies due to its adjustable output and protection features. A typical bench supply includes a transformer, bridge rectifier, filter capacitor, and LM317 circuit. Add a potentiometer for R2 to create a continuously adjustable output. Include output capacitors (typically 1-10μF) for stability and transient response. For dual supplies, use an LM337 (negative regulator) alongside the LM317.
Constant Current Source Configuration
The LM317 can be configured as a constant current source by connecting a single resistor between the output and adjust pins. The current is given by I = Vref/R, where R is the current-setting resistor. For example, with R = 1.25Ω, the current is 1A. This configuration is useful for LED drivers, battery charging, and precision current sources. The current remains constant regardless of load resistance (within the regulator's limits).
High-Current Applications
For currents above 1.5A, the LM317 can be used with an external pass transistor. The LM317 provides the control voltage while the external transistor handles the high current. This configuration maintains the LM317's regulation characteristics while extending the current capability. Proper heat sinking is essential for both the LM317 and the external transistor.

Circuit Variations:

  • Adjustable Voltage Regulator: Standard configuration with R1 and R2
  • Fixed Voltage Regulator: Use fixed resistors for specific output voltage
  • Constant Current Source: Single resistor between output and adjust
  • High-Current Regulator: External pass transistor for currents >1.5A
  • Dual Supply: LM317 + LM337 for ± supplies
  • Precision Reference: Low-noise configuration with precision resistors

Common Design Mistakes and Best Practices

  • Thermal Management
  • Component Selection
  • Layout Considerations
Successful LM317 circuit design requires attention to detail and understanding of common pitfalls. Following best practices ensures reliable operation and long-term performance.
Inadequate Heat Sinking
The most common mistake is insufficient thermal management. The LM317 can dissipate significant power, especially with high input-output voltage differentials. Always calculate power dissipation and select appropriate heat sinks. Consider using thermal compound between the regulator and heat sink for better thermal conductivity. For high-power applications, consider switching to a switching regulator or using multiple regulators in parallel.
Poor Input Filtering
The LM317 requires clean input voltage for optimal performance. Always include input capacitors (typically 0.1μF ceramic and 1-10μF electrolytic) close to the regulator. The input capacitor reduces high-frequency noise and provides local energy storage for load transients. Without proper input filtering, the regulator may oscillate or provide poor regulation.
Incorrect Resistor Selection
Resistor selection affects both accuracy and stability. Use precision resistors (1% or better) for applications requiring tight voltage tolerance. Avoid very high resistor values (>10kΩ) as they make the circuit sensitive to noise and leakage currents. For adjustable circuits, use high-quality potentiometers with low temperature coefficients.

Best Practices:

  • Always include input and output capacitors for stability
  • Use heat sinks for power dissipation >1W
  • Keep wiring short and use proper grounding
  • Select resistors with appropriate tolerance and power rating
  • Consider temperature effects on component values
  • Test circuits under worst-case conditions

Mathematical Derivation and Advanced Analysis

  • Voltage Regulation Theory
  • Efficiency Calculations
  • Thermal Analysis
Understanding the mathematical relationships in LM317 circuits enables precise design and optimization. The calculations involve voltage regulation theory, power dissipation analysis, and thermal considerations.
Voltage Regulation Formula Derivation
The output voltage formula Vout = Vref × (1 + R2/R1) is derived from the voltage divider principle. The LM317 maintains Vref between the output and adjust pins. The voltage across R1 is Vref, and the current through R1 is I = Vref/R1. This same current flows through R2, creating a voltage drop of Vref × R2/R1. The total output voltage is Vref + Vref × R2/R1 = Vref × (1 + R2/R1). This elegant relationship allows precise voltage setting with simple resistor values.
Power Dissipation and Efficiency Analysis
Power dissipation in the LM317 is P = (Vin - Vout) × Iload. The efficiency is η = (Vout × Iload) / (Vin × Iload) = Vout/Vin. For example, with 12V input and 5V output, efficiency is 41.7%. This low efficiency is the main disadvantage of linear regulators. For high-efficiency applications, consider switching regulators. However, linear regulators offer advantages in noise, simplicity, and cost for low-power applications.
Thermal Resistance and Heat Sink Selection
Thermal analysis is crucial for reliable operation. The junction temperature is Tj = Tambient + P × RθJA, where RθJA is the thermal resistance from junction to ambient. For safe operation, Tj must be below 150°C. The required heat sink thermal resistance is RθHS = (Tjmax - Tambient)/P - RθJC - RθCS, where RθJC is junction-to-case thermal resistance and RθCS is case-to-sink thermal resistance.

Advanced Calculations:

  • Line Regulation: ΔVout/ΔVin = 0.01%/V typical
  • Load Regulation: ΔVout/ΔIload = 0.1% typical
  • Thermal Resistance: RθJA = (Tj - Ta)/P
  • Efficiency: η = Vout/Vin × 100%
  • Power Dissipation: P = (Vin - Vout) × Iload
  • Minimum Input Voltage: Vin(min) = Vout + 3V