3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

How to Build a Bench-Top Power Supply

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.
 
Remove these adsRemove these ads by Signing Up
 

Step 1The Parts

The Parts
«
  • schematic.png
  • finished.JPG
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.
« Previous StepDownload PDFView All StepsNext Step »
261 comments
1-40 of 261next »
Apr 30, 2012. 10:23 PMyoyology says:
If I have a 400ohm pot, will the circuit still work? Will I have to change the resistor value, and if so, how much?
May 1, 2012. 10:24 AMyoyology says:
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. :-)
Mar 30, 2012. 9:27 AMVALKIR says:
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??
Mar 31, 2012. 1:38 PMaclark17 says:
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.
Apr 2, 2012. 9:03 AMVALKIR says:
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?
Apr 22, 2012. 1:14 AMlee321987 says:
The LM317 needs DC input. (though in the LM317 datasheet there is an AC circuit that uses _two_ LM317's)
Mar 25, 2012. 4:34 AMaclark17 says:
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?
Nov 16, 2011. 6:40 PMmgh24 says:
So I am brand new here. Are the numbers after the parts part numbers? Part numbers particular to a specific supplier?

Thanks
Nov 16, 2011. 7:52 PMalpe_97 says:
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.
Mar 25, 2012. 4:29 AMaclark17 says:
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.
Mar 17, 2012. 11:03 AMM0HIZ says:
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.
Feb 9, 2012. 5:36 AMDr.Alski says:
I like this layout. Is there anyway to easily add a digital display to this? Thanks...
Dec 24, 2011. 12:54 PMmgh24 says:
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.
Dec 17, 2011. 10:00 AMsholtob says:
just built this, works fine except it only goes up to 8volts, any idea what went wrong
Dec 12, 2011. 6:19 AMseanksg says:
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?
Nov 19, 2011. 5:17 PMalpe_97 says:
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?)

http://www.radioshack.com/product/index.jsp?productId=2102789
Nov 12, 2011. 9:40 AMalpe_97 says:
Hi
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?
Thanks!
Oct 28, 2011. 3:21 PMRyan McDougall says:
Can I input 30v into the citcuit, the regulator is 1.2-37v and get 1.2 - 30v out?
Please help.
Jan 3, 2011. 12:50 AMbeehard44 says:
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
Oct 27, 2011. 12:23 PMtim127 says:
if you put it in a project box you could put a knob on the potentimeter and lable it
Sep 27, 2011. 7:54 AMpfred2 says:
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.
Oct 23, 2011. 4:49 PMtim127 says:
instead of useing a heatsink do you think i could use a computer fan for everything?
Apr 28, 2010. 4:00 PMdextervonbakata says:
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)

BEWARE!! CORRECT PINOUT IS : 1 ADJ, 2 VOUT ,3VIN .

I strongly suggest you fix your instructable, which otherwise is great.
Sep 27, 2011. 8:11 AMpfred2 says:
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!
Dec 10, 2010. 4:36 PMJohnBailey says:
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.
Dec 11, 2010. 7:49 PMdextervonbakata says:
I am glad i could be of some help!!
Apr 29, 2010. 2:17 AMredyellow says:
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?

Thanks.
Apr 29, 2010. 7:56 AMdextervonbakata says:
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 ?
Apr 8, 2011. 1:32 PMlee321987 says:
It would be nice if you put somewhere in this tutorial that a lot of people solder in components, then create some of the traces by bending the extra lead length of those components -- this way you don't have to go through the extra steps of cutting/stripping wire, and soldering both ends of it.

Thank you very much for this instructable. You were great walking me through all the steps. This was my first project, and now I'm a full-on EE hobbyist.

Also -- anyone who is into programming would probably love this hobby. Once I got into it I found myself uttering the phrase, "this is basically programming with hardware". It's extremely fun! Just watch a few (or a very good one) videos about soldering, and you will probably lose any qualms you have about it!

Some really helpful youtube users I've found on this topic are:
CuriousInventor
Afrotechmods
EEVblog

There are probably more, that I haven't found yet.
Sep 27, 2011. 7:38 AMpfred2 says:
Just don't let it lead to this OK?
Apr 23, 2011. 9:05 PMofrancis says:
just wondering how you can change the voltage, what parts would i have to change so it say puts out around 14-18v or something around those numbers? thanks.
Sep 27, 2011. 7:33 AMpfred2 says:
When I want an LM317 to be a fixed voltage either I use a small trim pot for R2 and don't adjust it after having set it, or I put a potentiometer in the circuit for R2, adjust to voltage, power the circuit off, remove the potentiometer, and measure it with a multimeter to get the resistance I need for the voltage I want. Then I replace R2 with a fixed resistor of the value I measured my test potentiometer to be. Usually I just go with a trim pot and don't fiddle with it though.
Jun 12, 2011. 8:16 PMLacrossanator1 says:
I NEED HELP! The schematic only has 1 1n4001 diode, whereas the parts list says that you need two! The D2 in the schematic says that I need a 1n4004, but there isn't any 1n4004 on the parts list! Am i supposed to use a 1n4001 for both or do I need one of each? I WOULD BE GREATFULL FOR SOME HELP!
Sep 27, 2011. 7:25 AMpfred2 says:
Examine this:
http://www.national.com/ds/LM/LM117.pdf

The first typical application is the bare minimum parts for making an LM317 an adjustable regulator. Yes, the LM117 is the same as the LM317 just the military version of the device. All it means is it is rated to withstand greater temperatures and voltages compared to the commercial series. Other than that they're functionally the same. They probably are the same, just Nat-Semi kicked some around a little then stamped those with different numbers.

But stick with the ratings as nothing else is guaranteed to work.
Jun 13, 2011. 3:42 PMBegradoo says:
I had the same question my self.
I found a data sheet for the 1N4001 to 4007 series. The only difference I can see between them is a high rate of voltage they can handle.
based on that I would say use two 4004s.
Nov 13, 2010. 11:08 AMcarebare47 says:
Ok, just a thought (don't have the time to try and build it at the moment) but could you, theoretically, build one of these and connect it to the +3.3v, +5v and +12v lines on a computer power supply using a 1 pole-three way switch? Then maybe add an extra ground and a -12V socket to the PSU and you have a more precise variable power supply with a slightly larger range?
Jul 25, 2011. 1:19 AMrwaqar says:
i want to add -10v to my pwer supply but have no idea how to do so any ideas??? please help
Sep 27, 2011. 7:08 AMpfred2 says:
This:

http://i.imgur.com/UmUBn.jpg

http://i.imgur.com/aRAAf.jpg

http://i.imgur.com/zExGy.jpg

Is a dual adjustable positive negative power supply.
Sep 27, 2011. 7:04 AMpfred2 says:
I have some bad news for you I'm afraid. Your supply won't power all of my electronics projects! I passed LM317's current capacity decades ago. But it is where I started. I agree with you that even a supply like it is a huge step up from using batteries.

I think I made my first LM317 supply when I was about 13 or so. I used the schematic on the back of the Radio Shack blister pack I bought it in. That must have been around 1977 so I guess the good old LM317 is just that now, old!

Mine is a horrible mess but I'm still proud of it and last time I tried it it even still works! So I'll post a link to a picture of it because it has to inspire someone else here to try their hand at making one. I mean if my horrid first one worked how much worse could theirs possibly be?

http://i.imgur.com/Y9BWW.jpg

I know it is rough but hey it was the first power supply I ever built in my life and I was a little kid when I made it. Now who here knows what that metal chassis I used for it was? Whoever knows will really be showing their age.

Sep 5, 2011. 4:28 PMJimmacle says:
Would you think a 450mA 12V transformer (here) would work for just powering a breadboard/Arduino? I'm planning to use this project for a portable electronics workbench :)
1-40 of 261next »

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
25
Followers
2
Author:greyhathacker45