Ultimate DIY Breadboard Power Supply





Introduction: Ultimate DIY Breadboard Power Supply

About: DIY audio, Arduino and whisky enthusiast

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

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

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Ω


...you 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

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

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

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!

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

Step 8: 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

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!

5 People Made This Project!


  • Clocks Contest

    Clocks Contest
  • Water Contest

    Water Contest
  • Creative Misuse Contest

    Creative Misuse Contest

104 Discussions

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.

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

File_000 (12).jpeg
1 reply

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

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.

2 replies

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!

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

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?

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

2 replies

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:

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

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

1 reply

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.

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.

1 reply

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 ;)


11 months ago

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.


11 months ago

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.

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.

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


11 months ago

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?