How to Build a Variable Linear Voltage Regulator with LM317
Introduction
A variable linear voltage regulator like the LM317 is a useful circuit for generating a stable and adjustable DC output voltage from a higher voltage DC source. With just a few external components, the LM317 can be configured as a variable voltage regulator with adjustable output between 1.25V to 37V.
Here's what I'll cover in this guide on how to build a variable linear voltage regulator with the LM317:
How the LM317 Works
The LM317 is a 3-terminal adjustable linear voltage regulator. It works by comparing a fraction of the output voltage against a stable reference voltage of 1.25V. Based on the difference, it adjusts the pass element to maintain a constant output voltage.
The key features of the LM317 are:
- Output voltage adjustable from 1.25V to 37V
- Up to 1.5A load current
- Line regulation better than 0.01%
- Load regulation better than 0.1%
Internally, the LM317 contains the following key components:
- Reference voltage - Provides stable 1.25V reference
- Error amplifier - Compares fraction of output to reference and amplifies difference
- Pass transistor - Adjusts current flow to maintain regulated output voltage
- Current limit - Prevents overcurrent damage
By adding just two external resistors, we can configure the LM317 as an adjustable voltage regulator.
Parts Needed
To build a variable voltage regulator with the LM317, you'll need the following parts:
- 1 x LM317 regulator IC
- 1 x 240Ω resistor
- 1 x 2.2kΩ potentiometer
- 2 x 10μF capacitors
- 1 x Heat sink for LM317
- Wires, breadboard/PCB, etc.
Optionally, you can add:
- 1 x LED and resistor to indicate power
- Capacitors after the output for ripple reduction
LM317 Variable Voltage Regulator Circuit
Here is the basic circuit diagram for a variable voltage regulator using the LM317:
Let's go through each component:
- The 240Ω resistor sets the maximum output current. A higher value allows less current.
- The 2.2kΩ potentiometer adjusts the output voltage.
- The 10μF capacitors - Input and output capacitors help stabilize the circuit.
- A heatsink is vital for dissipating heat from the LM317.
The key formula for the LM317 is:
Vout = 1.25V * (1 + R2/R1) + Iadj * R2
Where:
- Vout is the ouput voltage
- R1 is the 240Ω resistor
- R2 is the potentiometer
This allows the output voltage to be adjustable from 1.25V to about 37V.
Construction Tips
Here are some tips for constructing the circuit:
- Use a suitable heatsink and thermal compound for the LM317. The regulator can get very hot.
- Ensure the input voltage does not exceed 40V for the LM317.
- Start with low resistance values for R1 and R2. Gradually increase to fine tune the adjustment range.
- Use capacitors before and after the regulator to improve stability.
- Twist wires connecting the potentiometer to reduce noise.
- Double check polarity when connecting electrolytic capacitors!
Testing and Adjustment
After constructing the circuit, test it as follows:
- Apply input power without any load first.
- Measure the output voltage as you adjust the potentiometer.
- Verify you can adjust from 1.25V up to 37V.
- Connect a load and measure regulation and ripple.
- If needed, adjust R1 to limit max current for your load.
That's it! You now have a working variable linear voltage regulator.
Example Applications
Some examples of how this LM317 regulator can be used:
- Variable bench power supply
- Adjustable bias voltage source
- LED driver with selectable brightness
- Battery charger with adjustable float voltage
- Step-down converter from 24V to 12V system voltage
With some additional components, the LM317 can provide a wide range of useful and stable DC voltages.
Summary
- The LM317 adjustable regulator provides 1.25-37V from a higher input voltage.
- Only 2 resistors are needed to configure the LM317.
- Proper heatsinking is vital to prevent overheating.
- Output capacitors improve stability and reduce ripple.
- Useful for variable voltage power supplies, battery chargers, LED drivers etc.
So that's how to build a simple variable linear voltage regulator using the LM317 IC! Let me know if you have any other questions.