LM317 Adjustable Regulator Circuit Guide with Wiring and Calculations

lm317 voltage regulator circuit diagram

The TO-220 package variant of this three-terminal adjustable IC handles currents up to 1.5 A while maintaining line and load regulation within 0.1 %. Connect the input pin to unregulated DC between 3 V and 40 V; the output pin will deliver a stable reference 1.25 V below your chosen set-point.

Select a feedback divider that positions the wiper between the output and ground pins. For a 5 V supply, place 360 Ω between the output and adjust pins, then 1.1 kΩ from the adjust pin to ground. This yields a 1.25 V drop across the upper resistor, lifting the output to 5.25 V–trim the lower resistor to 1 kΩ for exact 5 V. Keep trace lengths under 20 mm to minimize noise pickup.

Bypass capacitors are non-negotiable: 0.1 µF ceramic disc at the input and 1 µF tantalum at the output, both mounted within 5 mm of the device. For transient loads, increase the output capacitor to 10 µF. Thermal shutdown activates at 125 °C, but ensure the tab remains below 60 °C under full load by attaching a 20 °C/W heatsink.

Reverse polarity protection is achieved with a single 1N4007 diode across input and ground; its 1 µA leakage is negligible. For input voltages above 35 V, add a 1 W zener diode clamping the input to 33 V, preventing over-voltage damage. Calculate worst-case dissipation using (VIN – VOUT) × ILOAD; exceed 2 W and switch to the TO-3 package variant.

Current-limiting behavior is inherent: short-circuit output clamps at roughly 2 A. To override this and drive inductive loads, insert a 0.33 Ω resistor in series with the input; this shifts the fold-back point to 500 mA. When paralleling multiple units for higher currents, match the feedback resistors within 1 % and tie all adjust pins together to prevent hysteretic oscillations.

Building a Precision Adjustable Power Supply

Select a 120Ω resistor between the ADJ pin and output terminal to establish a 1.25V reference baseline for stable performance. Pair this with a 5kΩ potentiometer in series to the ground–this combination enables fine-tuning across a 1.25V to 37V span, handling up to 1.5A while maintaining thermal stability. Avoid exceeding 40V input differential to prevent internal degradation.

Component Selection for High-Reliability Configurations

Use tantalum capacitors with a minimum 1µF value at both input and output stages to suppress noise and prevent oscillation at load transients. For transient response enhancement, replace the standard 1µF ceramic output cap with a 10µF low-ESR polymer variant, effectively reducing voltage ripple by ~60% under dynamic loads. Ensure the input capacitor is rated for at least 50V to accommodate supply fluctuations.

In configurations demanding sub-5V outputs, bypass the ADJ pin with a 10µF capacitor to ground; this mitigates reference drift induced by thermal variations, preserving accuracy within ±2% across a -40°C to +125°C operating range. For board layouts, route the ground trace directly beneath the ADJ pin to minimize parasitic inductance, and keep feedback loops shorter than 1cm for optimal thermal coupling.

How to Select Input and Output Capacitors for Stable Linear Adjustable Supply Performance

Install a 0.1 µF ceramic disc capacitor directly between the input pin and ground to suppress high-frequency noise and prevent oscillations. Ensure the capacitor’s voltage rating exceeds the maximum input supply by at least 20 %–for a 12 V source, a 16 V or higher rated device is required. Select a low-ESR (equivalent series resistance) capacitor; surface-mount X7R or X5R dielectric types typically yield stable operation across temperature variations.

Input Capacitor Considerations

If the supply lead exceeds 10 cm, add a bulk electrolytic capacitor (10 µF–100 µF) in parallel to the 0.1 µF ceramic. This combination prevents voltage sag during transient load steps. Avoid tantalum capacitors if the input exceeds 20 V due to their voltage derating curves and potential failure under reverse voltage spikes.

Output Capacitor Selection

Connect a 1 µF solid-tantalum or low-ESR aluminum electrolytic capacitor from the output pin to ground. Values between 1 µF and 10 µF maintain stability while reducing ripple to under 5 mVpp. Ceramic capacitors of the same value work but may introduce small voltage shifts due to their microphonic sensitivity under load transients.

Step-by-Step Wiring Guide for Adjustable Output Power

Begin by connecting the input pin to a DC source between 3V and 40V. Ensure the supply’s current rating exceeds the maximum load by at least 30%. A 12V adapter with 1.5A capacity works for most setups. If the input fluctuates, add a 1μF ceramic capacitor between the source terminal and ground to stabilize spikes.

Place a 240Ω resistor between the output and adjust pins. This fixed resistance sets the baseline for the adjustable range. For finer control, pair it with a 5kΩ potentiometer in series. The combined resistance determines the minimum delivered amperage–calculate it using:

  • Minimum resistance = (Reference drop / Desired current)
  • Reference drop ≈ 1.25V for most variants

Measure with a multimeter before finalizing connections.

Attach output capacitors to reduce ripple. A 1μF tantalum or 10μF electrolytic capacitor from the output terminal to ground improves transient response. For loads above 500mA, add a 0.1μF bypass capacitor across the input and output. Polarity-sensitive components must align with the datasheet’s pinout–reversing them causes catastrophic failure.

Calibration Procedure

Power up the setup with no load connected. Rotate the potentiometer to verify the tuning range. Typical adjustable spans cover 1.25V to 37V, but practical limits shrink if the input-to-output differential drops below 2V. Use this formula to predict the delivered potential:

  1. Vout = 1.25 × (1 + (R2 / R1)) + (Iadj × R2)
  2. Ignore the adjustment current (Iadj) if below 100μA

Adjust R2 (the potentiometer) while monitoring with an oscilloscope to catch oscillations–add a 10μF capacitor between the adjust pin and ground if noise persists.

Cooling Requirements

Thermal shutdown triggers at 175°C. For currents exceeding 300mA, mount a heatsink rated for at least 10°C/W. TO-220 packages dissipate less heat than TO-3, so recalculate:

  • Power dissipation = (Input – Output) × Current
  • Junction temperature = Ambient + (Power × Thermal resistance)

If the junction hits 150°C, derate the current or improve airflow. Silicone grease between the device and heatsink reduces thermal resistance by 20%.

Test under load before finalizing. Connect a 1kΩ resistor as a dummy load and verify the output holds steady. If the potential sags, increase the input or reduce the load. For variable loads, add a 4.7μF electrolytic capacitor at the output to prevent voltage dips during transient events. Label each wire and document the resistance values used–replicating the setup later requires exact duplicates.

Calculating Resistor Values for Precise Output Control

Set the reference divider between the ADJ pin and ground with R1 (fixed at 240 Ω) and R2 (adjustable). Multiply the target potential difference by 1.25 V−1–subtract 1–to obtain R2/R1. For example, 5 V output requires (5 / 1.25) − 1 = 3, so R2 = 720 Ω. Maintain a feedback current > 5 mA to prevent drift; use R1 ≤ 240 Ω and R2 ≤ 2.4 kΩ for robust stability.

Common Output Potentials & Exact Resistor Ratios

  • 3.3 V: 240 Ω ∥ 1.0 kΩ = 192 ΩR2 = 384 Ω
  • 5 V: R2 = 720 Ω
  • 9 V: R2 = 1.5 kΩ
  • 12 V: R1 = 240 Ω, R2 = 2.07 kΩ
  1. Measure Vout with a 1% tolerance multimeter.
  2. Adjust R2 in 10 Ω increments until |ΔV| .
  3. Thermal drift ≤ ±2 mV/°C; use 1% metal-film resistors for R1 and R2.

Critical Errors When Assembling Precision Adjustable Supply Blocks

Skipping heat sink calculations leads to thermal shutdowns. A TO-220 package dissipates 20W max under ideal conditions, yet air cooling reduces this to 5-8W for sustained loads. Use a 10°C/W sink for 1A loads; 5°C/W for 1.5A+. Clip-on sinks underperform–machine a direct-mount aluminum block instead. Apply thermal paste–0.05mm layer cuts junction rise by 30%.

Choosing resistor values outside standard E-series invites output drift. 240Ω-5kΩ pairs from E24/E96 ranges yield ±0.5% accuracy. Common 1kΩ-2kΩ combos hit 5V precisely; 330Ω-1kΩ targets 12V. Carbon-film resistors shift ±500 ppm/°C–metal-film (±50 ppm) or thin-film (±15 ppm) are mandatory. Avoid trimpots for fixed setups; mechanical vibration alters wiper contact by ±2%.

Input capacitors must handle surge currents–low-ESR types (tantalum, ceramic) prevent voltage sag. 10µF minimum; 47µF+ for noisy supplies. Negative rails forget decoupling? A 0.1µF ceramic 2mm from the case stabilizes transients. Electrolytics age–derate by 50% voltage; 25V caps last 10k hours @ 50°C, but 16V types fail faster in 12V circuits.

Layout Pitfalls

Trace Length Max Current Vdrop/mm
10mm 1A 0.7mV
20mm 500mA 1.2mV
50mm 200mA 3mV

Separate high-current and feedback loops. Ground returns should converge at a single star point–violation injects 50-200mV noise. Keep switching converter wires ≥3cm away; routing over battery traces couples 1-3mV ripple. For SMD builds, use 2oz copper; 1oz traces melt at 2A.

Disregarding load capacitance triggers oscillations. Minimum 1µF output capacitor stops ringing; 10µF+ for loads >500mA. ESR under 0.5Ω prevents loop instability–tantalum types resist this better than aluminum. Omit it entirely and spikes reach 2x the set level during load steps. Test with a 10Hz-1MHz scope; 20dB peaks signal marginal stability.

Input voltage must exceed output by 2.5-3V minimum. Margin shrinks to 1.5V at 1.25A, but efficiency drops below 40%. Dual-supply setups often undershoot–verify with a 1ms transient loaded. Powering from 9V batteries? Rechargeables sag to 7.5V; alkaline idle at 9.3V–design for 7V minimum headroom.

Protection Oversights

lm317 voltage regulator circuit diagram

Reverse polarity destroys the die instantly–blocking diodes are non-negotiable. 1N4007 handles 1A continuous; 1N5822 for 3A+. Short-circuit current peaks at 1.5x rated load for 10ms–add PTC fuses (5Ω @ 25°C) to limit damage. Thermal shutdown activates at 170°C, but junction temps above 125°C degrade long-term reliability. Mount a 100°C cutoff thermostat on the heatsink.

Trimming the feedback loop demands a 4-wire Kelvin connection. Single-ended adjustments introduce ±0.2% error from lead resistance. For microvolts precision, use a 16-bit DAC with buffered amplifier; software calibration offsets board parasitics. Forget ESD precautions and human handling spikes above 2kV–install 15kV TVS diodes across the adjustment pins.