Introduction: Ultimate DIY Breadboard Power Supply

Picture of Ultimate DIY Breadboard Power Supply

For prototyping, nothing beats a breadboard! But how to provide power to the little black and red rails that fuel our designs? There are a couple of conventional options:

A bench/lab variable power supply. A must-have to be sure, but expensive, big and (arguably) overkill for low power circuit design and general hobbyists.

Jumping power from an Arduino.Useful for testing, but it adds to the jumper clutter. Also, it can be useful to save those 5V / 3.3V rails for powering something else, rather than just feeding a breadboard.

Batteries. Nothing kills maker-mojo faster than battery anxiety!

So I decided to design something that could do one job - power any breadboard - and do it really well, with enough options to make it indispensable for small prototyping projects.

Design Goals:

Save breadboard space

Removing chunky components like DC jacks, switches and voltage regulators from the breadboard frees up precious space for the actual project, along with fewer messy jumpers and wires.

Be ridiculously cheap

Rock solid power in all the commonly used voltages... but without shelling out for a variable bench power supply.

Be accurate

Having precise, stable voltages within +/- 0.05V means less troubleshooting of power related issues and ensures components are happy and healthy!

Make me want to experiment!

It should be simple, small, laughably easy to use, and let me get straight to melting capacitors and burning out LEDs.


I drew up the schematic for this project and then subsequently stumbled on kernsy's Radioshack, Adjustable Breadboard PSU. This instructable was a big inspiration for me in terms of laying out the protoboard, so consider mine a remix of his excellent work. Credit to kersny - cheers!

Step 1: Regulator... Mount Up! the LM317

Picture of Regulator... Mount Up! the LM317

Right, so there are only a handful of voltages that I find consistently useful in small applications:

  • 1.5V
  • 3V
  • 3.3V
  • 5V
  • 6V
  • 9V
  • 12V

There are a couple of options to achieve these outputs using small, off-the-shelf components. The first one that came to mind was the LM78XX (datasheet), typically in its 5 volt (7805), 9V (7809) and 12V (7812) flavours. You could have a circuitboard lining up a bunch of these, and a switch to direct current through one of them at a time. This would give rock-solid output, but only for a small number of voltage settings and at the cost of massive amounts of real estate. Pfft.

The next option is the venerable LM317 (datasheet). Using only a small number of components this bad boy can output anything from 1.5V - 37V at 1.5A. The chip has 3 terminals - input, output and adjustment. The idea is you feed power to the input, and a regulated (lower) voltage spews forth from the output. You need to feed it with at least 3V more than the amount you're looking to receive - so for 9V output, you've got to give it 12V. This lower voltage is ideally determined using a couple of resistors - one bridging the adjustment and output pins (which typically remains a static value) and another from the adjustment pin to GND.

The LM317 can therefore be used to make a variable power supply if you used a potentiometer as your second resistor, but I want to be able to flick a switch and have a stable, preset output in one of my desired voltages without fiddling with a tiny knob (chuckle).

So, the trick is to work out what resistors are needed in advance, and direct current through them one at a time.

Step 2: You Can't Resistor

Picture of You Can't Resistor

Now, there is a highly nerd-approved way of calculating the resistors needed to convince the LM317 to output a given voltage. They supply the following formula in the datasheet:

Vout=1.25 * ( 1 + R2/R1 )

If you assume that resistor R1 - between the adjustment and output pins - remains constant (the datasheet uses 120Ω and 240Ω) then you can quite easily determine the resistance value for R2 given some mathematical fiddling. Using a value of 240Ω for R1 means the formula for R2 is:

R2=240 * (( Vout - 1.25 ) / 1.25 )

So for instance, if we wanted a voltage of 5V we'd need:

R2=240Ω * (( 5V - 1.25 ) / 1.25 )=720Ω

OR... can just head over here for a handy LM317 resistor calculator! Using this, I got the following resistor values needed for my target voltages. In addition, by using multiple resistors in series you can get a value that's more accurate - in my case, I always used 2 resistors for a compromise between accuracy and sexiness on the final protoboard. This awesome tool calculates the best combinations of resistors to match a given value.


  • 240Ω


  • 1.5V: 48Ω using 18Ω and 30Ω (perfect)
  • 3V: 336Ω using 36Ω and 300Ω (perfect)
  • 3.3V: 394Ω using 3.9Ω and 390Ω (0.025% difference)
  • 5V: 720Ω using 100Ω and 620Ω (perfect)
  • 6V: 912Ω using 2Ω and 910Ω (perfect)
  • 9V: 1488Ω using 390Ω and 1100Ω (0.134% difference)
  • 12V: to be passed through (see the schematic and description in the next step)

If you can, and assuming they're not much more expensive, use 1/4W metal film resistors rated at 1% for better accuracy. Fortunately, I have a fairly well stocked local electronics shop that could supply these odd value resistors, but use the resistor calculator to get as close as you can.

Lastly, I went anal retentive big time with regards to accuracy: My electronics shop only sells resistors in packs of 10, so... I tested them. All of them, on a breadboard, hooked up to my LM317 and the 240Ω resistor. I connected a self-powered voltmeter and started swapping resistor pairs in and out until I nailed the desired value to within 0.05V, and then grouped the winners together. Ouch. Definitely optional. (If you do this, make sure to use the same LM317 and 240Ω resistor you used during testing!)

Step 3: Design & Schematic

Picture of Design & Schematic

Okay, so here's the idea:

A simple, pluggable PSU that slots into the power rails at one end of a standard breadboard. Referring on the schematic:

Power source: almost any standard DC power brick ("wall wart") with a barrel jack, providing at least 12V should do the trick. These can be salvaged from old routers, set-top boxes and similar devices.

SW Power: A simple on/off power switch to save me from having to yank out the cable every time.

SW 12V: This switch basically turns the LM317 on or off. Position 1 provides the full 12V (or whatever you're providing) to the breadboard, while position 2 sends the current to the LM317 to be regulated down. This prevents the LM317 from having to regulate down to 12V, which would have meant providing at least 15V.

Dip switch: A 6 position DIP switch is connected between the adjustment pin of the LM317 and GND, each path leading down to my series of preselected resistors to achieve the desired voltage. Position 1 is 1.5V, right up to 9V at position 6.

Vcc OUT: Each of these outputs (left & right) refer to the breadboard rails we're supplying power and GND to.

SW Dual Output: This switch toggles between only the left rail on the breadboard receiving power, or both the left and right. This saves on jumper mess, while also making it super quick and simple if both sides of the board need juice.

LEDs: These LEDs indicate which rails are receiving power. Also, they dim/brighten depending on which output voltage is selected - the full 12V passthrough makes them the brightest, while the 1.5V gives them barely enough food for a dim illumination. This is a small visual clue as to which output voltage has been selected, while also an indication that the PSU is actually on.

Capacitors: Lastly, three smoothing capacitors help keep a nice, stable output voltage.

Step 4: Parts List

Picture of Parts List

Check out the images for more detail, but the parts we'll need are:


☐ A minimum 12V DC power brick/wall wart with a DC barrel jack.

☐ A cheap, standard size 26 x 19 hole protoboard. Single sided is perfect.

☐ A DC barrel jack to match the one on your power brick (5.5mm is typical)

☐ The LM317T voltage regulator

[Optional]Heatsink (with mica, top-hat, bolt and nut, and thermal paste if you're feeling anxious)

[Optional] Diode (14N00X) - entirely optional, can be placed just after the power input to help prevent house fires. I left it out :)

☐ 3 x smoothing capacitors: 100uf, 10uf and 1uf.

Switch: on/off (SPST)

Switch: SPDT, 3 pin

Switch: DPDT, 6 pin

☐ 6 position DIP switch

☐ 2 x 2-pin male SIL headers

Resistor: 240Ω (for "R1")

Resistors: each of the calculated resistor pairs (for "R2"). If you're using my design, you'll need:
2 ... 3.9 ...18 ... 30 ... 36 ... 100 ... 300 ... 2 x 390 ... 620 ... 910 ... 1100

Resistors: 2 x 360Ω (for the LEDs)

☐ 2 x 3mm LEDs

4 screws and standoffs


Total cost for all the components was R92.72 (South African Rand). This is about +/- $6 USD. Aww yeah.

Step 5: Board Layout & Preparation

Picture of Board Layout & Preparation

I fired up the ole' Inkscape, mapped out my board and placed each component to make sure I'd have enough space to lay them all out. My layout in the image above, and assuming you're using the same components as me, is hole-perfect.

1. I highly recommend doing a "dry fit", adding each component to the board before soldering to double check you have enough room. I wanted this to be as compact as possible, so you may have better luck starting with a bigger board. The standard 26 x 19 hole board is literally just enough space. Use some helping hands to make this easier - those component leads can get fussy.

2. The DC barrel jack has oversized tabs instead of pins, so there is some drilling to do: Mark the holes that need expanding and drill them large enough to fit the jack. While you're at it, drill the mounting holes larger as well, and space for the heatsink screw if you're using one.

3. Speaking of the heatsink, apply a thin layer of thermal compound to both sides of the mica. Then line it up on the heatsink, add the LM317, and secure with a top-hat, bolt and nut. The LM317 can be mounted vertically or placed flat - I preferred to lay it flat to minimise the vertical height of the final board, which meant bending the pins 90 degrees down.

Step 6: Solder Time!

Picture of Solder Time!

Starting with the smallest components (the resistors, diode, capacitors) and working your way up to the biggest (switches, IC, DC jack) and start soldering it together!

1. Another source of inspiration from kersny's post was the use of masking tape to hold the smaller components in place before flipping and soldering. Again, a good set of helping hands works like a charm here - attach components, secure, flip, solder. Repeat, repeat, repeat!

2. After each batch of components, do yourself a favour and use a multimeter to perform some continuity tests on your joins, just to make 100% sure you don't have any cold solders.

3. Don't be too quick to trim the component leads - keep them around to make interconnecting easier. I try to avoid making solder-bridges where possible, preferring to use the leads themselves. For larger bridges, I used colour coded solid core wire ("scooby doo wire") to keep things visually distinguishable.

Step 7: The Completed Board

Picture of The Completed Board

Step 8: Testing - Mounting to a Breadboard!

Picture of Testing - Mounting to a Breadboard!

The two sets of pins simply slot into the first row of power rails on either side of the board. When the DC jack is plugged in, the LEDs indicate which side of the board has power. Easy!

Step 9: Testing All the Options

Picture of Testing All the Options

1. Flipping the dual-rail switch provides power to the other rail on the breadboard.

2. With the 12V passthrough switch enabled, we get the full 12V DC fed through.

3. Disabling the 12V passthrough switch means we're feeding the LM317. Together with varying positions on the DIP switches, we get some rock-solid DC voltages on the breadboard. Simple!


aka_daryl made it! (author)2017-11-29

I made one and included a bridge rectifier for polarity protection and to allow for usage with 24vac power supplies

scifideity (author)2017-10-07

HI Abzza, Great Instructable. Very well written and detailed. Excellent job! I had have a question and read through the comments searching to see if it had been asked but did not find it so forgive me if I overlooked it. Have you considered a version of this with dual output? Basically a dual mode device where you can feed same voltage to both sides or one voltage for one side and another for the other side (if needed). Situations like this don't always come up but I recently had a project needing 24v and 12v so that project came to mind while reading your Instructable.

ToddS14 (author)2017-07-18

Wow great job! I couldn't help but wonder though, if you have seen the $3 version of the same thing.

scifideity (author)ToddS142017-10-07

How does that $3 version change the voltage output? From looking at the pic it seems like its the pot at the top of the board opposite side of the display. Abzza's intent was to remove the need for using a pot and having to find the right spot for each voltage. Just flip the proper dip switch and done. I can't argue with $3 though. It doesn't plug directly into the breadboard but cheap is always good :D

YetAnotherMike (author)2017-07-22

I made one change to make it idiot proof - I used a rotary switch to
select the resistive dividers. There was too much of a chance of having
more than one switch on at a time. I also added a third LED and
resistor combination across the input power.

Can you provide more details on what rotary switch you used and any photos how this affected the layout of components? Really curious and I want to do this as well!. Thanks!

abzza (author)YetAnotherMike2017-09-17

Beautiful, elegant solution!

šušuluskZ (author)2017-09-20

Please can you tell me what software do you use to prototype the board layout?

hayatrajani (author)2017-09-19

Hey, excellent instructable!! I had a small question though. Say, if I were to modify the design so as to obtain different output voltages on the two power rails, I would need a second LM317 to regulate the voltage, right? Can you suggest any other way to achieve this?

dgregson (author)2017-08-03

cannot wait to start this project... just one thing tho.... I don't understand the switches. SPDT, DPDT? Looking around there are loads of what look like the switches but I don't want to order the wrong item. Can you give me more information please? If someone could point me in the right direction?

I'm in the uk. Perhaps a link to a site where I can order them?

Any help would but appreciated. Thank you

abzza (author)dgregson2017-09-17

Sure thing. SPDT/DPDT are a shorthand to describing both the number of terminals that a switch connects, as well as the number of connections those terminals can make.

For instance, a simple ON / OFF rocker switch might be a SPST (single pole, single throw) switch. It would have one terminal connected to the circuit in the ON position, and no terminals connected to anything in the OFF position.

A power switch that needs to connect or disconnect both the LIVE and NEUTRAL wires might be best suited as a DPST switch (double pole, single throw). In the ON position, both wires are each connected to the circuit, and in the OFF position both wires are connected to nothing.

Finally, a switch that has to route two terminals to different parts of a circuit might be a DPDT switch. In the A position two terminals are connected to one part of the circuit, and in the B position the same two terminals connect to a different part of the circuit.

Sparkfun has a good explanation here:

dgregson (author)abzza2017-09-17

Thank you. I'm half way through building it. Love the fact you have put loads of pictures and explained things as you go. Again thank you

AaronD44 (author)2017-07-23

Could I use potentiometers in lieu of resistors in order to give a wider range of voltages? I figure 2k and below should be adjustable enough. If I add a voltmeter to the board would it give accurate reading on the output or would I lose voltage by powering it? Thanks

abzza (author)AaronD442017-09-17

Spot on - you'd need to select the potentiometers quite carefully, but that would work no problem. As for a little on-board voltmeter you would almost certainly have a small forward voltage drop you'd have to work around, but of course with the potentiometers you can just dial it a little higher and maintain the output you need.

ukdiveboy (author)2017-07-25

Great idea for a portable psu to throw in the toolbox. I might make one.

For me, rather than the dip switches, I'd use a row of jumpers - to limit the chances of selecting more than one at a time!

Thanks for sharing.

abzza (author)ukdiveboy2017-09-17

Thanks for the feedback - yeah, no doubt jumpers are the safer option. I like to live dangerously, apparently! Fortunately I haven't had a DIP switch accident yet ;)

misterxp made it! (author)2017-08-31

I finally made it but used an LM350 instead (get 3Amp even if I don't think I will need it for this particular module). The other components are the same (except the resistors). I also used jumpers instead of switches to select the 2nd output. However, it was a bit of a mistake because it is easy to put them round the wrong way and cause a short. I will probably change this later. I also made one using an LM2576 reg. It was more difficult and, when I finally got it to work, I dropped it and one of the legs broke off the LM2576!. I am waiting for a couple of new ones to arrive. Thanks for the very useful and interesting instructable. I am new to electronics and it was a good exercise. I also did not follow your suggestion to layout the components first and paid the price. I ended up having to start again at one stage!

abzza (author)misterxp2017-09-17

Ha ha, blowing stuff up and starting again is all part of the fun. Thanks for sharing your build - seriously cool stuff. Jumpers are also a good idea - probably a safer option than my DIP switches.

JanT14 made it! (author)2017-08-13

Hi Abbza!

Thank you for sharing this great instructable! I found this such an interesting and useful idea I decided to make my own version of it, "mobile" and 5volt only. A 18650 cel will provide power endlessly, an USB module makes 5V and watches over the cell.



abzza (author)JanT142017-08-24

Awesome! Looks great - love the inclusion of the battery.

MiroslavV9 made it! (author)2017-07-23

Nice and simple design, just finish one myself, works perfectly fine. Not as precise, as I'd like, but whenever i'll get better resistances it will be.


abzza (author)MiroslavV92017-08-06

Awesome, looks great!

Zenock (author)2017-07-25

Using a linear regulator to provide power 1.5V of power from a 12 volt power supply isn't going to be anywhere close to efficient. You end up with a 10.5 volt volt drop across the regulator being burned off as heat. If your circuit uses 1 amp, then your circuit is using 1.5 Watts of power and your power supply is using 10.5 Watts. 7 times more than your circuit and a total of 12 watts of power. When you are burning that much power you are going to need a big heat sink on your 317. At lower currents, it might not be that big a deal but any time you have it set to 1.5 your power supply is going to be using 7 times as much power as your circuit whether it's 100 mW and 0.7 Watts or 1 Watt and 7 Watts.

Might want to consider a variable switching regulator. While they are more expensive, in my opinion they are worth the cost.

QazW2 (author)2017-07-23

while a very good idea, this definitely is low on safeguards. not only lack of amperage regulation (the LM317 itself appears to be the best safeguard here) but i consider the dip switch a fatal flaw. while errors (more than one open) would not be fatal in and of themselves, the unexpected voltage could be just as big a pain as the "first noob question" every repairman should ask (is it plugged in). l suggest that neither beginners nor complacent pros be allowed near the final project. . . . .

i understand the dip switch (a 6x1P1T) is used for its compactness but a 1T6P slide switch would make selection idiot proof as not only would just one be on but also the larger size gives space for labeling (traditionally dip packages are unlabeled due to lack of extra space) printing that would fit a dip would need a magnifying glass to read. On the other-hand, it does create a problem, 1T6T switches are hard to find in retail,,,,,, but they are available wholesale (i found alibaba selling them for 10¢ but in 2000 lots) and scrap recovery. . . .

I would like to see you make a 2.0 version addressing its short-comings and definitely look for a contest to enter them in..... concept is not only practical but cool too.

YetAnotherMike (author)2017-07-22

I made one change to make it idiot proof - I used a rotary switch to
select the resistive dividers. There was too much of a chance of having
more than one switch on at a time. I also added a third LED and
resistor combination across the input power.

Johnbowman (author)2017-07-21

Hi there Power supply for breadboard does this come in Kitset form , Looks Good Regards John

Dinsy (author)2017-07-20

Nice job. This looks great for slapping a quick project together for testing ideas. This could fit the bill for many of my small jobs. Now, where did I put that book on building my new PCB etcher?

frarugi87 (author)2017-07-20

A few comments.

1) using 6 dip switches here can be, IMHO, a problem. You can leave two of them on (then what is the voltage you will have?), or you can open the connected one, maybe to switch the voltage, thus putting the output to 10+ volts, which may fry the board. Maybe it was better to put a switch also on the output..

2) you made a board that could arrive to two lanes. Why didn't you make this dual channel? It is much better to have two power supplies...

GTO3x2 (author)2017-07-18

I don't want to criticize, but I feel power supply is the "power pack" (in relative terms of consideration - i.e. not the power company), and this is a breadboard-mounted voltage selector. I was excited to make this to have on-hand, but it needs a power pack?? I see its need, but straight from wall A/C would be nice. Amperage capacity specifications would be helpful also. Nice device though.

ToddS14 (author)GTO3x22017-07-19

Check this rig out. Bad pic, it was to show something else but has on board 7v battery, 1-variable3-18v supply and one rail mount 3.7/5v supply

abzza (author)GTO3x22017-07-18

Fair enough :) My next immediate project is a mains-transforming variable bench supply for higher voltage projects, so will only really be diving into that (for the first time) soon. Thanks!

caesar2164 (author)abzza2017-07-18

May I suggest using a computer ATX PSU?

(Mine requires no modifications to the ATX, it's just plug and play!)

abzza (author)caesar21642017-07-18

Phwoooar, that is a seriously cool design - love the plug-n-play idea there. Such great work!

caesar2164 (author)abzza2017-07-18

Thanks! In case it helps with your project, mine is inspired by:

and the case is actually a vintage 8mm/16mm film reel carrier! :)

DieCastoms (author)2017-07-19

I have an idea ..

Why not add two pins at the leading edge of the board that will line up with one of the strips that would be hidden by the board anyways, and make the board a part of the circuit .. so that if you pull the thing off the breadboard, it simply turns off? Basically, the one strip of breadboard that would be hidden anyway in effect becomes a power switch?

throbscottle (author)2017-07-19

It's a shame you haven't entered this in a competition, because I would definitely vote for it!

I love dip switches, just never had a reason to use one! So now I have :D

abzza (author)throbscottle2017-07-19

Dang, will keep that in mind ;) Thanks for the feedback!

JeremyH117 (author)2017-07-19

Great job! I really like this. Having something small and easy to power a breadboard is extremely useful. I will probably make this at some point (or some variant).

abzza (author)JeremyH1172017-07-19

Awesome, thanks very much! Hope you get around to making one (or something like it) soon!

misterxp (author)2017-07-18

Hi Abzza,

I am quite new to electronics and have read through your instructable a couple of times and love it. Your attention to detail, your neat and tidy work and precision. I agree with some of the comments that there are, perhaps, other ways to get the same / similar results but, for me, the instructable is a success if someone can learn from it and enjoys it. For me your instructable achieves both goals. I want to make a power supply and have looked at using an old ATX but I like the way your little unit sits on top of the bread board and ensures good contact. I also was interested in the part regarding the layout of the board and soldering plus the calculations for resistors etc. I must get a little volt meter too!

Even if I connect it to a 9V battery or an old router / modem power supply, I can change easily to the voltage I require without having a bulky ATX stuck on th table. I think I will give it a go and make one, mainly because:

a)I like your instructable

b) good exercise

c) useful to have and neat device.!


abzza (author)misterxp2017-07-19

Thanks so much for the kind words, and I'm glad it was useful to you. Good luck, looking forward to seeing your results ;)

misterxp (author)abzza2017-07-19

It will take some time before I am able to do it but I will surely post the pictures. Thanks again!

JohnE12 (author)2017-07-18

Great project, great idea; thank you.

abzza (author)JohnE122017-07-19

Thanks John!

gm280 (author)2017-07-17

I understand your circuit and it will work. But you can remove all the switches and resistor and install a pot and you will have every voltage you listed and everything else in between. Just a thought.

abzza (author)gm2802017-07-17

True! I mention this as an option in Step 1, but I prefer the utility and speed of just being able to flick a switch and get my preferred voltage. Also, a pot would probably require some sort of voltmeter built in to ensure the correct voltage is set... This way I always know (for instance) that setting 4=5V. Quick and easy, but certainly more complicated to build than just using a potentiometer :)

JohnE12 (author)abzza2017-07-18

The reason I like your design is specifically because it does avoid using the potentiometer! I have an LM338T based liner power supply (I cheated and built if from a kit from banggood) but it always takes a while to get a precise voltage from it, as you say; fiddling with the pot. DIP switch rules OK! Thank you.

abzza (author)JohnE122017-07-19

Precisely - it's extremely useful to just set a value immediately and get going. Thanks for the comments!

JonBush (author)abzza2017-07-18

Perhaps having a 7 dip switch with one spot for a pot for full range of 0-9v would be a happy medium. Always getting your precise voltages with your current method with added flexibility. Not a criticism, because I think you did an excellent job. Just a potential add on to satisfy gm280's thought.

abzza (author)JonBush2017-07-18

Great idea! The more versatile the better. I find I only really need a variable output when working with higher voltages - almost all the projects I tinker with need 3.3, 5 or 9 volts - but this would go a long way to catering for the more niche scenarios.

About This Instructable




Bio:DIY audio, Arduino and whisky enthusiast
More by abzza:Headphone Dummy LoadDIY External Volume ControlTales From the Chip: LM386 Audio Amplifier
Add instructable to:,,,,,,,,,,