Introduction: 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

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Ω

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 38Ω (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!


Johnbowman made it! (author)2017-07-21

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

Dinsy made it! (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 made it! (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 made it! (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 made it! (author)ToddS142017-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 made it! (author)abzza2017-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 made it! (author)caesar21642017-07-18

May I suggest using a computer ATX PSU?

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

abzza made it! (author)abzza2017-07-18

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

caesar2164 made it! (author)caesar21642017-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 made it! (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 made it! (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 made it! (author)abzza2017-07-19

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

JeremyH117 made it! (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 made it! (author)abzza2017-07-19

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

misterxp made it! (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 made it! (author)abzza2017-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 made it! (author)misterxp2017-07-19

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

JohnE12 made it! (author)2017-07-18

Great project, great idea; thank you.

abzza made it! (author)abzza2017-07-19

Thanks John!

gm280 made it! (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 made it! (author)abzza2017-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 made it! (author)JohnE122017-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 made it! (author)abzza2017-07-19

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

JonBush made it! (author)JonBush2017-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 made it! (author)abzza2017-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.

LaurenceM22 made it! (author)LaurenceM222017-07-18

To get the best of both having preset and adjustable voltages I'd replace the 12V switch with a 3 position one to make a branch for a potentiometer.

Fortunate_one made it! (author)2017-07-18

I have been unable to find the heatsink you show in the photos. Could you please provide a part number for the one you used.

abzza made it! (author)abzza2017-07-19

Hi there! Yeah, I can't seem to find it online (I got mine from a local electronics store). Also, it isn't the most efficient design - you'd have better results with something like this, which is the same footprint but has slightly lower thermal resistance:

Skuttaball made it! (author)2017-07-18

There's nothing wrong with being 'anal retentive' when the finished product is beautiful to look at and gives total control ease and reliability to any project. Your tutorial is extremely thorough and easy to follow. Thank you

abzza made it! (author)abzza2017-07-19

Cheers Skuttaball - thanks for the vote of confidence! Yeah, I'm glad I was as systematic about the resistor selection as I was, given the results.

WarenGonzaga made it! (author)2017-07-18

Cool project buddy!

abzza made it! (author)abzza2017-07-19

Cheers Waren!

itzzzmee made it! (author)2017-07-18

very neat and tidy project , I read other comments and accept in most cases their points but it remains I like your concept. I thought I would suggest an alternative to those looking for multi voltage projects. Your project makes it simple too , just take away the DIP switches and provide a pin or terminal for each voltage.

As I said before nice job though :-)

abzza made it! (author)abzza2017-07-19

Thanks @itzzzmee! My variable power supply needs are a little different - I work a lot with DIY audio projects, where a higher powered amplifier can often require around ~36V, if not higher. So my DIY variable supply will need to be pretty beefy. When I get around to making that, I'll stick it on Instructables too. Thanks for the comments!

quadpoint made it! (author)2017-07-18

Clever idea. And nice job!

abzza made it! (author)abzza2017-07-19

Thanks very much!

jimdkc made it! (author)2017-07-18

Nice job!

I'm mulling over a dual-regulator version so I can have different voltages on the 2 busses...

jimdkc made it! (author)jimdkc2017-07-18

Also, if you choose 300 ohms as your R1 value, R2 can be hit exactly using standard 1% resistor values for all desired voltages:

Voltage - R2 = R2a + R2b

1.5v - 60 = 30 + 30

3v - 420 = 220 + 200

3.3v - 492 = 430 + 62

5v - 900 = 470 + 430

6v - 1140 = 750 + 390

9v - 1860 = 1.5K + 360

abzza made it! (author)abzza2017-07-19

Oh wow, this is awesome! Thanks for crunching the numbers - this is by far preferable. Well done, thanks for sharing!

jimdkc made it! (author)jimdkc2017-07-18

Those are actually all standard 2-5% resistor values, but they are all readily available in 1% resistors, too. I had all of these values in a resistor kit purchased on eBay.

Search for "1/4w 1% resistor assortment"

I bought one of the 3120 piece assortments (20 each of 156 values) for under $15 shipped.

ToddS14 made it! (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.

File_000 (12).jpeg
colinza made it! (author)2017-07-18

You should look at ditching the LM317 for an LM2596 buck regulator, the circuit design is a tiny bit more complex but not impossible but it is a much superior regulator.

abzza made it! (author)abzza2017-07-18

Amen brother! You beat me to it - I'm busy working on a little chop-shop step-down converter using salvaged parts. Will put up a walkthrough when I'm done!

JohnE12 made it! (author)JohnE122017-07-18

Warning - choppers are horribly noisy!! I was trying to power a small radio; I ended up with a 10uF and 0.1uF on the input and a 10uF, a 0.1uF and a 1000uF on the output - with the RF choke you can see in the picture...ahhh...peace at last! Thanks for a good project, I luv linears!

Leonardo2016 made it! (author)Leonardo20162017-07-18

Yes, but that's a noisy switcher, not a nice quiet linear device :-)

colinza made it! (author)colinza2017-07-18

With all the nasty cheap breadboards out there a bit of switching noise is the least of my issues :'(

Leonardo2016 made it! (author)Leonardo20162017-07-18

Strange comment - with fundamental breadboard construction with lots of parallel bus-bars inside, any supply noise would be radiated everywhere. My preference would be to minimise noise inputs when using breadboards, otherwise you would spend all your time chasing artefacts instead of learning real things. IMHO.

JimmyB68 made it! (author)2017-07-18

Good stuff ! But you dont talk about the max amp output. A breaker would be great in case of a short and like Cliffystones said a + and - rails would be a good addon !

In a bigger version, add voltage and amp output on two 8 seg displays.

abzza made it! (author)abzza2017-07-18

Yeah, my board is certainly light on protection and safety features - noted! The LM317 has a max current output of 1.5A, even if fed with more current, otherwise flipping the passtrough switch and bypassing the IC will give you as much current as your power brick can provide.

Cliffystones made it! (author)2017-07-18

This is a great and wonderfully simple idea for us experimenters. Your design uses the LM317, which can supply up to 1.5 amps. You can easily replace the 317 with an LM350 that will provide 3 amps, or an LM338 for up to 5 amps! And no need to re-design, just plug em' in. Also I believe I'll be building a negative regulator version of this for use in designing op-amp circuits, as many need a split negative and positive rail with respect to ground.

About This Instructable




Bio: DIY audio, Arduino and whisky enthusiast
More by abzza:Ultimate DIY Breadboard Power Supply
Add instructable to: