Introduction: How to Build a Bench-Top Power Supply

Picture of How to Build a Bench-Top Power Supply

A key component of any electronics project is the electricity. You could use endless amounts of batteries, or use a simple, compact power supply to power all of your electronic projects. This is a great beginners electronics project for those just getting into electronics, or a fun project for those who haven't wanted to drop the cash for a commercial model. This circuit is capable of supplying a variable voltage output from 1.5 volts to 12 volts.

Step 1: The Parts

Picture of The Parts

All of the following components can be found at your local RadioShack. You can also scavenge most all of these parts fairly easily from old electronics.

1 LM317T Adjustable Voltage Regulator - 276-1778
This is the adjustable voltage regulator. It takes input from two resistors (R1 and R2) and then ratchets the voltage down accordingly. I recommend you take a look at the datasheet if you want to learn more about this part.

1 0-5K Linear Potentiometer - 271-1714
This is R2, and will allow us to control the voltage output.

1 560 Ohm Resistor - 271-1116
This is R1.

2 1N4001 Diodes - 276-1101
There are two diodes to protect against short circuits. D1 will protect the regulator from the capacitors discharging if the input power is short circuited. D2 will protect the regulator from the capacitors discharging if the output power is short circuited.

1 .1 uf Capacitor - 272-135
This capacitor (C1) acts as a smoothing capacitor. It should be only a ceramic disk capacitor.

1 10 uf Capacitor - 272-1013'
This capacitor (C2) improves the transient response of the regulator. It should be electrolytic.

1 PCB mount SPST switch - 275-645
Allows you to turn the power on and off without unplugging the wall-wart.

1 PCB mount terminal strip - 276-1388
This is mounted directly to the PC board and is an easy way to connect your power supply to many different circuits and components.

1 12v Wall-Wart
Provides the power to the circuit. RadioShack has a nice selection, but I recommend salvaging your own as I did. Anything will work as long as the output current is no more than an amp. I choose one that has an 800mA output, but anything over 500mA should cover most basic electronics projects.

1 Small Perfboard - 276-148
This particular board is the perfect size for this circuit, and my layout is based on it. This is a perfboard, but if you wanted to make your own PCB, feel free to use the attached EagleCAD schematic to generate your own layout.

1 Heat Sink - 276-1368
A good precaution. The regulator has built in protection to prevent it from burning itself up, but it does that by limiting current. If you didn't have a heat sink, you might find that you have less current output than you expected. Any piece of metal will work as long as you can attach it metal-to-metal on the tab. Even a large alligator clip will provide decent heat dissipation.

Step 2: The Tools

Picture of The Tools

These are the standard tools for assembling almost all electronics projects. Not all of these are absolutely necessary, but they make the job a lot easier.

Soldering Iron
Not a soldering gun. Soldering guns make semiconductors cry tears of melted plastic.

Hot glue doesn't count. I've seen it. No joke.


Wire strippers



Not required if you don't think you're going to make mistakes.

Small flat-headed screwdriver
To tighten the screws on the terminal strip.

Helping hands
These are those funky things that hold stuff while you're soldering. These are useful for way more than electronics.

Solid core wire
You need this to create the traces. It must be solid core!

Step 3: Breadboard

Picture of Breadboard

Breadboarding isn't mandatory if your confident things are going to work out, but it's probably a good idea to do it anyway. If a problem arises now, you can fix it before it's set in lead. Make sure to test the output voltage to insure nothing is out of line.

Step 4: Dry Fit the Components

Picture of Dry Fit the Components

Your going to want to lay everything out on the perfboard before you solder it. Your welcome to use my layout. One is normal and one is reversed so you can see where the components are when you are looking at the soldered side. The black dots show where the pins go through the board. The black lines are copper traces. The red lines are solder bridges. I got the templates from

At this point, your also going to want to bend the copper traces. Use the wire strippers to strip all of the insulation off of a length of wire, and bend them to the correct length. Bend all copper traces except for the ones that lead to the terminal strip. These are more easily added after all the other components have been soldered.

Step 5: Solder Stuff

Picture of Solder Stuff

Now your ready to solder the components on. Start with the copper traces. Then, the resistor, switch, potentiometer, capacitors, diodes, and finally the regulator (in that order.) It's easier to solder the regulator with the heat sink already installed. Plus, it will protect the component from the heat of the soldering iron. Don't solder the wall wart or the terminal strip yet. Remember that polarity needs to be noted for components like the electrolytic capacitor (C2) and the voltage regulator. Don't solder them in backwards!

Step 6: Solder More Stuff

Picture of Solder More Stuff

Now, solder the terminal strip into place. Then, solder in the traces to the strip. Note that the positive trace is routed over the negative trace next to it, so you will need to leave a little insulation on the positive trace to avoiding creating a short circuit. Then, solder the wall wart wires on, noting polarity. Clip all the long leads close to the solder joint with the side cutters. Finally, make all the solder bridges to connect the components to the traces. Take care with sensitive components like the diodes and the regulator. These are sensitive to heat.

Step 7: Quality Control

Go over each and every trace and make sure that you have good tight joints, and that no accidental solder bridges are present. Using a multimeter on the resistance setting is an easy way to see if joints are touching.

Step 8: Moment of Truth

Picture of Moment of Truth

Plug the wall-wart in and flip the switch. If smoke pours out of the voltage regulator, you got something wrong. If nothing happens, things are probably in your favor. Hook up your multimeter and test the voltage. Make sure the potentiometer can adjust the voltage. If everything checks out, congratulations! You're ready to start a long life of powering circuits.

Step 9: Possible Improvements and Modifications

This circuit is highly adaptable. You can adjust the values of R1 and R2 to suit whatever components you have on hand. I actually designed my personal circuit to use a 0 - 4K pot that I had on hand. If you want to change the resistors, use the following formula:

VOUT = 1.25 * ( 1 + ( R2/R1 ) )

The value of R1 should be between 10 ohms and 1000 ohms. Anything higher and the voltage regulator won't behave. If you decide to make any changes to the circuit, you should refer to the datasheet for the finer details. This site is another good reference for using the LM317T.

Ideas from the comments
-You could enclose the entire circuit in a plastic project box. That would prevent the back side of the board from shorting out if it came in contact with a metal tool.
-You could buy a multimeter that is to be used only for tuning the output. Cut off the probes and solder the wires directly to the outputs for a permanent solution. If the multimeter had interchangeable probes, you could buy an extra set for use with other projects.


MalcolmA3 (author)2016-11-10

Awesome project! I have got mine mostly working but when i turn it on all that happens is in the case of testing it with an led it blinks at me. is there a good explaination for this?

Sunnyhiht (author)2016-11-02

i have to make a variable power supply ranging from -12v to +12v dc output from 240v ac wall input... i am using LM317 and LM337 ... please help me out with the transformer ratiing to be used and which rectifiers diode to be used and values of capacitors and resisters...

AMIN72 (author)2016-06-05

What is that electric current 4-20 mA circuit?
Help me please

eshklrtbs (author)2016-05-20

i made it but it is giving only 3.66v at maximum plz help me to understand what is wrong

Sethgaming46 (author)2015-12-26

Since you're using a regulated ac-dc supply as the power source of your circuit, I'm pretty sure you wouldn't need to have the power-smoothing capacitors in your circuit. Correct me if I'm wrong but I believe that is correct since your circuits supply is already regulated to hold a steady voltage under loads.

AshleeJ made it! (author)2015-08-30

Great tutorial thank you very much this was my first project

Mr Mrs RJD (author)2014-12-18

Need a/c output. How to make 12v ac 1800ma supply???? Just fried the one for my Xmas tree stand. It runs a small 12 a/c motor and a m16 lamp. Any suggestions, any ideas, Please.

Image of data sticker.

Thank you

Testas.T (author)Mr Mrs RJD2015-08-11

for regulated power supply you just need DC power supply. If you just want that AC power supply for something else then just buy transformer 12v 1.8A or 2A put it in box and you are ready to go because you don't need any external parts to get AC.

Mr AbAk (author)2015-05-16

Nice Ible....

steelcity74 (author)2015-02-13

I made one of these also. Its a neat and very useful gadget to have. You can find mine here:

Mine is set up to use batteries..instead of a wallwart.

dudes (author)2014-08-01

I made one, but with a lm317lz instead of a lm317t. it works great but can only handle up to 100mA, good for LEDs less than one watt. great instructable.

neutralityy (author)2014-05-04


Not required if you don't think you're going to make mistakes."

*Gets 20 solder suckers*

JasjotSingh (author)2013-07-13

Do soldering guns really make semiconductors cry tears of melted plastic. Greyhathacker45?

blerpherp (author)2013-02-25

Can I use a 10K potenciometer instead of a 5K?? And, will a 1N4005 diode work as well?? Please help.

tutdude98 (author)blerpherp2013-05-29

any silicone diode should work and yes you can use 10k pot and resistor is 1k

Coindude19 (author)2013-03-28

Could you hook up a solar panel to this. 9 volt at 100mA?

Flinchy42 (author)2012-11-20

Just built this and wired it up, and it works perfectly! thank you so much for this instructable, it was EXACTLY what I needed for my project! =D

ishmal1103 (author)2012-10-30

I just built this and whenever I turn it on, I only get about 14v, the potentiometer doesn't seem to do anything. Any ideas on where I went wrong?

M0HIZ (author)2012-03-17

Great 'ible, but why does the Wall Wart have to be less than 1 Amp when the LM317 can supply up to 1.5A?

Thanks for your help.

31mimo (author)M0HIZ2012-10-20

The stronger the better. I reused an old printer transformer 30 V - 1800 mA and added the LM317.
. The output range is 1,5V to 29V - 1500mA

sanmlight (author)2012-10-17

do you have a circuit for 10amps?


Dr.Alski (author)2012-02-09

I like this layout. Is there anyway to easily add a digital display to this? Thanks...

lukestanmore (author)Dr.Alski2012-06-05

Potentially... You just wire up an old/cheap voltage meter/multimeter in parallel with the output, then have a seperate fixed voltage from the 'power in' connected to the battery terminals of your meter, obviously at the corect voltage.
Oh, then stick it all in a box :)

Abbaheart (author)2012-06-04

This is great idea. You know what they say about a great Idea? That one good idea leads to another. I want to make a complimentary Instructable that uses a laptop charger.

I have tested to find ground. Then I tested to find voltage. Hooked up the (-) and (+) to find nothing. Just a bunch of zero's. When I connected ground to (-) I got the 19.8 volts.

MAIN QUESTION ( Is this safe to have the (-) and GND connected together? Also is the voltage normal when it says on the black box that the cord runs out of say's 19.5?

yoyology (author)2012-04-30

If I have a 400ohm pot, will the circuit still work? Will I have to change the resistor value, and if so, how much?

yoyology (author)yoyology2012-05-01

Never mind. I think I figured it out. Using the formula from the LM317 datasheet and plugging in the total resistance of my pot (which actually measures at around 420ohm), I played around with the numbers and got 47ohms for R1.

Anyone want to check my math? I was an English major, after all. :-)

VALKIR (author)2012-03-30

i don't understand if it's for AC or DC or both? i looked through the regulator's datasheet with no conclusion... does your "wall wart" have a diode bridge to convert to DC or is it just a transformer in a plastic casing?

i want to use a 200/9V transformer, but i don't know if i need to convert it before or after the rectifier??

aclark17 (author)VALKIR2012-03-31

It should say on the adapter/wall wart input ~120v input, which is ac, and output if its ac would have a tilda, like ~24v, or dc is ---24v, but thats if it doesn't specifically say ac/dc. All adapters, plugs, chargers etc have this information printed or stamped on them so just take a look at it and see.

If it doesn't by some chance have it, you can test the voltage with a multimeter, ac voltage has an average voltage of zero, so if it tests zero on the dc range of the multimeter then its ac voltage.

VALKIR (author)aclark172012-04-02

well yeah, that's common sense, but does the LM314 work with AC or DC? or both? the transformer i'm gonna use will put out around 9V AC. so my question is do i need to convert it to DC before it goes into the regulator, or after it?

lee321987 (author)VALKIR2012-04-22

The LM317 needs DC input. (though in the LM317 datasheet there is an AC circuit that uses _two_ LM317's)

aclark17 (author)2012-03-25

I have to ask, but why wouldnt you just hook up a multistage voltage multiplier from a small transformer and regulate that voltage? Seems to me to be much easier than building a power supply, so Im thinking there must be a good reason. Better quality power?

mgh24 (author)2011-11-16

So I am brand new here. Are the numbers after the parts part numbers? Part numbers particular to a specific supplier?


alpe_97 (author)mgh242011-11-16

Welcome! Yes they are part numbers. But I don't know if there from a certain site, or all the part numbers, for each component, are the same for all sites.

aclark17 (author)alpe_972012-03-25

Part numbers like a diode 1N4001 are manufacturer codes. Different manufacturers may have different codes, but if you dont know what something is you can google it to find the datasheet.

mgh24 (author)2011-12-24

I just built this on a breadboard, and everything works just fine up to about 10.5V.

With a 12V wall-wart I am good, but with a 16V wart, anything above 10.5 just bounces all over.

Do I need different capacitors and/or resistors to use the higher voltages? The LM317 data sheet says it can go up to 37V.

Thanks! Really appreciate you posting this.

sholtob (author)2011-12-17

just built this, works fine except it only goes up to 8volts, any idea what went wrong

seanksg (author)2011-12-12

The list of materials calls for 2 1N4001 diodes, but in your schematic you have one 4001 and one 4004. Does it make a difference?

alpe_97 (author)2011-11-19

At radioshack, I bought a '5K-Ohm Linear Taper Potentiometer' and when I hooked it up, lights flashed bright from inside the Potentiometer along with a horrible smell. (Is this the wrong one?)

alpe_97 (author)2011-11-12

I am attempting to build this and I can not find a 12v 800mA, I was wondering if I can use a 12v 700mA power adapter?

tesladude123 (author)2011-10-28

Can I input 30v into the citcuit, the regulator is 1.2-37v and get 1.2 - 30v out?
Please help.

beehard44 (author)2011-01-03

i think it would be better if you use presets connected to dip switches so that you don't need to test the voltages every time you switch voltages

tim127 (author)beehard442011-10-27

if you put it in a project box you could put a knob on the potentimeter and lable it

pfred2 (author)beehard442011-09-27

Some folks at National Semiconductor agree with you and they have circuits with break away resistors in their applications guides. I've even made this circuit with radial switches connected to banks of resistors myself. DIP switches is another way to go but then you'd have to make sure you only had one switch, or possibly the correct combination of switches closed for the voltage you wanted. Confusing and prone to human error to say the least!

You can even connect this device up to digital control and those circuits are common and schematics are obtainable.

In the end a potentiometer and a meter is the simplest and most flexible configuration so I tend to use it the most. Anything else is much higher parts count and more work to build, while netting less fine control.

But yeah the uses the LM317 has been put to are virtually endless. The circuit here is excellent.

tim127 (author)2011-10-23

instead of useing a heatsink do you think i could use a computer fan for everything?

dextervonbakata (author)2010-04-28

Several other instructables refer to this same project. it is indeed a pity that, as another reader already remarked , the pinout doesn't correspond with the schematic. I did it as it appears there and all i got was 40 mah max, using the pot between pin 2 and ground. I reversed it , all is fine now. Pity i burned the only good 50k pot i had. before noticing it should go to pin 1.(All for the sake of learning)


I strongly suggest you fix your instructable, which otherwise is great.

pfred2 (author)dextervonbakata2011-09-27

ha ha that reminds me of one time I built a power supply and used the data on the back of a Radio Shack blister pack and it was wrong. What was funny was I got all done with it at like 2:30 in the morning and I was all excited and I just had to power it up before I went to sleep and blammo! One of my voltage regulators blew up like an M-80! It was a multi regulator power supply the whole thing was pretty complex.

Bear in mind I was a little kid and in my bedroom doing this at 2:30 in the morning. The device completely exploded all that remained was the center leg that is attached to the back tab sticking out of the board I had it soldered to. The rest completely vaporized.

The one that let go on me was a 7812 or some other fixed regulator. This is going back a number of years now so I cannot remember exactly. What I do remember is that thing was loud! I kept on waiting for my Mom to come into my room to see why I was lighting off fireworks in there but thankfully she must have slept through it or something I don't know.

I was pretty peeved too because I checked my work and it was "right" as per the data I used for the device. Just that information was wrong. So yeah it does happen. Even from sources you don't expect it to!

Many many thanks for the correction.

Just tried this on a breadboard as described above, and I thought the amperage was very low. Enough for a couple of LEDs.. But forget it for a motor. I was getting about 1ma from a 12 volt 1 amp wart.

Found the data sheet, and changed it like you said. Works great with even a 9 volt rechargeable battery.

Thankfully no magic smoke was released. So I'm a happy little solder monkey.

Will be soldering it up and making pretty in a day or two.

I am glad i could be of some help!!

Hi, I'm going to be building this and just wanted clarification.

The way it is in the diagram, pin 2(out)->pin 3(ground)->rest of circuit.
When you said reverse it did you mean, pin 3->pin 2->rest of the circuit?


hi, Just forget the numbers in the schematic on this page and use acording to the datasheet.
There is no direct ground conection from this component to ground, as no pin is called ground.
I repeat pin 1 adjustment, pin 2 voltage out, pin 3 voltage in.
If you did it with the mistake in this page. all you'd have to do is reverse the lm317. so that pin 1 is in the place of pin 3 and viceversa. pin 2 as it`s the center remains the same. Is it any clearer now?
other thing i don`t understand is why the author changed the resistor from 240 Ohms to 560 ohms ?

About This Instructable




More by greyhathacker45:Developing Black and White Film at HomeHow to Build a Bench-Top Power Supply
Add instructable to: