LATEST: New posts daily — circuits, tech news, and DIY builds from CircuitMasters
Build a $10 Adjustable Power Supply with LM317
Electronics DIY Circuits Power Supply LM317

Build a $10 Adjustable Power Supply with LM317

4 min read

Every electronics workbench needs a good adjustable power supply. Not because it's flashy — but because without it, you're constantly scavenging wall adapters, hoping the voltage is close enough. That stops today. The LM317 adjustable voltage regulator is one of the most elegant ICs ever made: feed it anything from 4.25V to 40V in, dial in your output from 1.25V to 37V, and it holds that voltage rock-solid regardless of load. This project costs under $10, teaches you real power supply theory, and produces something you'll actually use for decades. Let's build it.

What You'll Need

Keep your parts list tight. Every component here earns its place:

  • LM317T voltage regulator IC (TO-220 package)
  • 100μF 16V electrolytic capacitor × 2
  • 0.1μF ceramic capacitor × 2
  • 240Ω resistor × 1 (sets minimum output voltage)
  • 5kΩ linear potentiometer × 1 (output adjustment)
  • 1N4007 diode × 2 (protection)
  • DC barrel jack (input)
  • Binding posts or output terminals × 2
  • Heatsink for LM317 (essential — don't skip this)
  • Perfboard or breadboard for prototyping
  • 12V–24V DC wall adapter or bench input source
  • Multimeter

How It Works

The LM317 has three pins: INPUT, OUTPUT, and ADJUST. Here's the beautiful part — the IC constantly works to maintain exactly 1.25V (its internal reference voltage) between its OUTPUT and ADJUST pins. That's it. That's the whole secret.

You exploit that behavior by placing a resistor divider between OUTPUT and ADJUST and ground. A fixed 240Ω resistor (R1) connects OUTPUT to ADJUST, and your 5kΩ potentiometer (R2) connects ADJUST to ground. The output voltage follows this formula:

Vout = 1.25 × (1 + R2/R1)

With R1 = 240Ω and R2 sweeping from to 5000Ω, you get an output range of roughly 1.25V to 27V from a 24V input. The two 1N4007 diodes protect the IC from capacitor discharge if the input is suddenly removed. The capacitors smooth out ripple and keep the output stable under changing loads. Simple. Elegant. Bulletproof.

Electronics circuit detail
A closer look at the circuit in action

Step-By-Step Build

  1. Orient your perfboard horizontally. Mark a clear power rail (positive) at the top and ground rail at the bottom.
  2. Insert the LM317T near the center of the board, flat face forward. Pin 1 is ADJUST, pin 2 is OUTPUT, pin 3 is INPUT.
  3. Attach your heatsink to the LM317's metal tab now, before soldering. This is non-negotiable — the IC will overheat within seconds under load without it.
  4. Solder the 240Ω resistor (R1) between pin 2 (OUTPUT) and pin 1 (ADJUST).
  5. Connect one leg of the 5kΩ potentiometer to pin 1 (ADJUST) and the other leg to your ground rail. The wiper doesn't connect here — this is a two-terminal rheostat connection.
  6. Place the first 100μF 16V electrolytic capacitor between the INPUT pin and ground. Observe polarity — positive leg to INPUT.
  7. Place the second 100μF 16V electrolytic capacitor between the OUTPUT pin and ground. Same polarity rule applies.
  8. Solder a 0.1μF ceramic capacitor in parallel with each electrolytic. These handle high-frequency noise the big caps miss.
  9. Install the first 1N4007 diode from OUTPUT back to INPUT — cathode (banded end) toward INPUT. This protects against reverse discharge.
  10. Install the second 1N4007 from OUTPUT to ADJUST — cathode toward ADJUST.
  11. Wire your input DC barrel jack: positive terminal to the LM317's INPUT pin, negative to ground rail.
  12. Wire your output binding posts: positive from pin 2 (OUTPUT), negative from ground rail.
  13. Double-check every solder joint. Cold joints on power circuits cause maddeningly intermittent behavior.

Testing & Calibration

Before connecting any load, verify your build in stages. Set your multimeter to DC voltage.

First, connect your input source (12V or 24V). Measure across the input capacitor — you should read your supply voltage cleanly. No reading? Check your barrel jack wiring.

Now measure across the output terminals with the potentiometer turned to minimum resistance. You should see approximately 1.25V. Slowly rotate the potentiometer — watch that voltage climb steadily. At full rotation with a 24V input, you should reach somewhere near 27V. If the sweep is smooth and stable, your circuit is healthy.

Connect a simple load — a 10Ω 1W resistor works perfectly. Set output to 5V and confirm voltage holds steady under load. A drop of more than 0.2V suggests a weak solder joint or undersized input source.

Electronics engineering
Engineering precision — every component counts

Troubleshooting

  • No output voltage: Check that your LM317 is oriented correctly. Pin 3 is INPUT — confirm your supply voltage reaches it with a meter probe.
  • Output stuck at 1.25V and won't rise: The potentiometer connection is likely open. Resolder the joints at the ADJUST pin and verify the pot itself measures variable resistance with your meter.
  • Output voltage unstable or oscillating: One or both electrolytic capacitors are missing, reversed, or faulty. Electrolytic orientation matters — positive leg to the higher-voltage node.
  • LM317 gets burning hot immediately: You're missing a heatsink or asking it to drop too much voltage at too much current. Power dissipated = (Vin - Vout) × Iload. Reduce the input voltage or add thermal compound under the heatsink.
  • Voltage drops heavily under load: Your input power supply can't deliver enough current. The LM317 itself handles up to 1.5A — make sure your wall adapter matches or exceeds your current needs.

Upgrades & Modifications

Once the basic circuit is running, the fun really starts. Here's how to evolve it:

  • Add a digital voltmeter module: A cheap 3-wire DC voltmeter display wired across the output terminals turns your supply into a proper bench tool. Now you see exactly what you're delivering without reaching for a multimeter.
  • Parallel an LM338 for higher current: The LM338 is the LM317's big brother — identical pinout, same formula, but rated to 5A. Swap it in, upgrade your heatsink, and you can power motors, LED strips, and more demanding projects.
  • Add a current limiting circuit: Place a 0.1Ω sense resistor in series with the output and wire a comparator circuit to fold back voltage when current exceeds your set limit. This protects both your supply and whatever you're building. It's the difference between a toy and a proper instrument.

You've just built something real. Every time you reach for those binding posts and dial in exactly the voltage a circuit needs, you'll feel the satisfaction of having made the right tool yourself. That's what this craft is about.

Watch the full build walkthrough on CircuitMasters YouTube →

▶ Watch more on CircuitMasters YouTube