LM317 Calculator

Calculate resistor values needed for the LM317 voltage regulator to achieve your desired output voltage.

Calculate Your LM317 Calculator

Must be at least 1.25V

Typically 240Ω for LM317

What is the LM317 Voltage Regulator?

The LM317 is a popular adjustable positive voltage regulator capable of supplying more than 1.5A of current over an output voltage range of 1.25V to 37V. It requires only two external resistors to set the output voltage and includes current limiting, thermal shutdown, and safe-area protection features.

Originally introduced by National Semiconductor (now part of Texas Instruments), the LM317 has become an industry standard for adjustable power supply applications due to its reliability, ease of use, and wide availability.

How the LM317 Works

The LM317 maintains a constant 1.25V reference voltage between its output and adjustment terminals. By flowing a constant current through resistor R1 to ground, this reference voltage creates a constant voltage drop across R1. The rest of the output voltage develops across resistor R2, making the output voltage adjustable by changing the value of R2.

The output voltage is determined by the formula:

Vout = 1.25V * (1 + R2/R1)

Where 1.25V is the reference voltage, R1 is typically set to 240Ω, and R2 is calculated based on the desired output voltage.

Basic Circuit for the LM317

                      R2
                       ┌───┬────┐
Input ────┬───────────┤ LM317 ├────┬──── Output
          │           └───┴────┘    │
          │                         │
          │                         │
Cin       │                        Cout
───┐      │                         ├───
   │      │                         │
  GND    GND           R1          GND
                      ┌───┐
                      │   │
                      │   │
                      └───┘
                       GND

A typical LM317 circuit includes:

  • Input capacitor Cin (typically 0.1μF to 1μF) for input stability
  • Output capacitor Cout (typically 1μF to 10μF) for output stability
  • R1 (typically 240Ω) connected between the adjustment pin and ground
  • R2 connected between the output and adjustment pin, calculated using the formula above

How to Use This Calculator

  1. Enter your desired output voltage (must be at least 1.25V)
  2. Enter the R1 value (typically 240Ω for most LM317 applications)
  3. Click "Calculate" to get the required R2 value

The calculator will provide both the exact calculated R2 value and the closest standard resistor value available. It will also show the resulting actual output voltage when using the standard resistor value and the percentage difference from your desired voltage.

Important Considerations

  • Input-Output Voltage Differential: The LM317 requires a minimum of about 3V difference between input and output voltages to maintain proper regulation.
  • Heat Dissipation: When operating at high currents or with a large input-output voltage differential, the LM317 will dissipate significant heat and may require a heatsink.
  • Bypass Capacitors: Always use input and output capacitors to ensure stability and reduce noise.
  • Minimum Load Current: The LM317 requires a minimum load current of about 10mA to maintain regulation.

Common Applications

  • Adjustable power supplies
  • Battery chargers
  • Constant current sources
  • Programmable output regulators
  • Post-regulator for switching power supplies

Frequently Asked Questions

The LM317 is an adjustable positive voltage regulator that can supply over 1.5A of current across an output voltage range of 1.25V to 37V. It requires only two external resistors to set the output voltage and includes features like current limiting, thermal shutdown, and safe-area protection.

The output voltage of an LM317 is determined by the formula: Vout = 1.25V × (1 + R2/R1), where 1.25V is the reference voltage between the output and adjustment pins, R1 is the resistor between the adjustment pin and ground (typically 240Ω), and R2 is the resistor between the output and adjustment pin.

A value of 240Ω for R1 is recommended because it sets the current through the adjustment terminal at about 5mA, which is well above the minimum current needed for proper regulation (typically 50μA) while keeping power dissipation low. This value provides good stability and performance across a wide range of operating conditions.

The LM317 requires a minimum of about 3V difference between the input and output voltages to maintain proper regulation. This is known as the dropout voltage. Operating with less than this voltage difference may result in poor regulation and unstable output.

Whether an LM317 needs a heatsink depends on the power it dissipates, which is calculated as: P = (Vin - Vout) × Iout. If this power exceeds about 1 watt, a heatsink is recommended. For higher power applications or when there's a large voltage drop across the regulator, a heatsink becomes essential to prevent thermal shutdown.

Yes, the LM317 can be used as a constant current regulator by connecting a single resistor between the output and adjustment pins. The current will be regulated to: I = 1.25V/R. This configuration is useful for LED drivers, battery charging, and other applications requiring a constant current source.

It's recommended to use a 0.1μF to 1μF capacitor at the input and a 1μF to 10μF capacitor at the output of the LM317. The input capacitor helps filter the input voltage and should be placed close to the regulator, while the output capacitor improves transient response and stability, especially when the regulator is far from the power supply.

The maximum output voltage from an LM317 is technically about 37V, but it's limited by the maximum input voltage (which is 40V) minus the dropout voltage (typically 3V). In practice, you should also ensure that your power dissipation remains within safe limits, which may require restricting the output voltage further depending on your specific application.

Share This Calculator

Found this calculator helpful? Share it with your friends and colleagues!