Introduction: Pocket-Size Power Supply


I am a big fan of garage sales, flea markets, and thrift stores. They are great places to find used parts and materials for your next project. But one problem that I often run into is not being able to test battery powered electronics to see if they work. Because there are so many different combinations of batteries that are used in portable electronics, it isn't really practical to carry around batteries for testing. One device may need 6 AA's and another may require 4 D's. So I came up with this simple pocket-sized variable power supply. It can plug into either a 9V battery or a 12V battery pack. You can then adjust the output voltage to match the device that you want to test and attach the output wires to the end terminals on the device's battery connectors. This lets you power the device long enough to see if it works.

Step 1: Materials

Materials
LM317 Adjustable Voltage Regulator
0.1 µF Capacitor
1 µF Capacitor
220 ohm Resistor
7 x 270 ohm Resistor (preferably 1/8 watt)
8-Position DIP Switch
Perf Board
9V Battery Connector
2 x Alligator Clip Wires

Note: All these parts are available at Radio Shack. I highly recommend using 1/8 watt resistor because they take up less space on the board which makes it easier to fit everything into a smaller space. Unfortunately I only had five 1/8 watt resistor so, I had to use two 1/4 watt resistors.

Step 2: The Circuit

The standard LM317 regulator circuit uses two resistors to set the output voltage according to this formula:

Vout = 1.25V x (1 + (R2/R1)) + (Iadj x R2).

Since Iadj is small (about 0.1 mA), the formula can be simplified to Vout = 1.25V x (1 + (R2/R1)) as long as R1 is also relatively small. Because of this, R1 is generally kept to about 240 ohms (you can substitute a 220 ohm resistor). R2 is then selected to get the desired output voltage. Often a a variable resistor is used for R2 to make the circuit adjustable. 

The circuit for this project has one major modification to it. The variable resistor R2 is replaced by an array of resistors and switches. This allows the output to be adjusted in discrete increments. I did this to more easily simulate individual batteries. Each switch effectively represents a battery being connected or disconnected.

Turing on switch 1 turns on the circuit and brings the output up to 1.25V. Then with switches 2 through 8, turning the switches off in order will each increase the output voltage by about 1.53 volts. 

Example: Initially switch 1 is off and switches 2 through 8 are on. Turning on switch 1 gives an output of 1.25V. Then turning off switch 2 gives an output of 2.80V. Then turning off switch 3 gives an output of 4.33 and so on.

The circuit can use either a 9V battery or a 12V battery pack as a supply voltage. The output will max out at about 1.5V below the supply voltage (7.5V for a 9V battery or 10.5 for a 12V battery pack.) But this isn't a problem because if you need the full supply voltage of the battery, then you can just hook the battery up to the circuit directly. 

Step 3: Solder the Circuit Together

After testing the circuit on a breadboard, I soldered the circuit together on a small perf board. You can either follow my layout or make your own.

Step 4: Finished Circuit

Now you have a miniature power supply. Wrap the wires and the battery connector around the circuit board and it will easily fit in your pocket. To use it, connect the battery, dial in the desired voltage and attach the alligator clips to the battery terminals on the device. This should let you power it long enough to test it to see if it works properly.

Comments

author
Bobibo3 made it! (author)2017-02-25

I'm still prototyping on my breadboard, but it doesn't seem to work. Here are the soldering connections I was planning to use and have translated on my breadboard. Am I forgetting something?

Spiegelbeeld.png
author

What is it doing? What kind of output are you getting?

author

Wonderful tutorial btw!

author

Oh! Thanks for the response, but I've already fixed it. You can see the result in another reply

author
Bobibo3 made it! (author)Bobibo32017-02-26

I've found the problem, the C1 shouldn't be connected to itself (ah-duh). Here's the final breadboard result with an on/off switch. I've used a 3-switch DIP and, in my case, R1 is 150 ohm.

20170226_133122[1].jpg
author
davehartles69 (author)2014-01-18

Im currently working on a breadboard version would you like a pic when finished?

author
Bobibo3 (author)davehartles692017-02-23

Did the breadboard setup work?

author
EET623 (author)davehartles692014-10-03

Did you ever happen to complete the breadboard setup?

author

Sure. If you want to post it in the comments, it might be helpful to other people.

author
b1aflatoxin. (author)2017-01-14

Question: Say the output is set for 1.5v, will it be converting the execs voltage form the battery
into heat? In simple terms, what is the efficiency of this neat little
build?

(I'm 99% sure I know the answer) Its not a high-efficient buck converter; but Jason's idea has elegance is in its size and simplicity!

This is a great project! Thanks for sharing this Jason. :)
author

Yeah. Any time there is a voltage drop, the energy is converted to heat. So the more you reduce the voltage, the less efficient the system is.

author

Makes sense. -Thanks for passing knowledge.

author
tiger12506 (author)2016-12-12

I've been meaning to make something similar to this for a very long
time, for exactly the same reason. I like your DIP switch idea. Awesome!

author
njmalhq (author)2016-08-29

Awesome! Why didn't I think of that?

author
JB95 made it! (author)2016-01-23

Works well, great Instructable! :)

temp_1048003391.jpg
author
Not_a_robot10110101 (author)2015-11-25

If I cant find a 1 µF Capacitor what would be the next best thing?

author

Well, strictly speaking the capacitors aren't really necessary because the power source is a battery (DC). It is only necessary for really sensitive circuits that need a very steady power supply. But if you want to use a capacitor, then any value that is bigger than 1 micofarad will work just as well.

author

Thanks. What value would you recommend?

author

It really doesn't matter. Use whatever you have on hand, or just leave it off.

author
m.hemanth made it! (author)2015-08-28

Hi, thanks for this project. Now i have all range of voltages from (1.23 - 9)v .above that its tiny and fits in my pocket well. love to hear such a projects from you. Here's an image that i had made.

WP_20150828_001.jpg
author

Awesome

author
manny123007 (author)2015-06-09

hi i am a student and i need power supply for my tons of projects,
sir i want to ask u can i use a 12 v power supply, then what specifications do i need so that this project run smoothly,
do i have to increase number of 270 ohm resistor or increase my capacitance,i hope you would guide me....

author

You can use any voltage supply up to the voltage regulators max rated limit. So yes you can use a 12 volt battery or a 12 volt supply without changing anything. However you need to keep in mind that the maximum output will be slightly lower than the supply voltage as the regulator chip drops the voltage a little.

author
ArtTech86 made it! (author)2015-03-09

I appreciate you creating this instructable! I will benefit from having made one of these. I also know quite a few people who would also benefit from having a pocket power supply so I plan on making some more to give as gifts. Thanks, I will be checking out more of your work.

Pocket Power Supply.jpg
author
christopher.sales.18 (author)2015-03-09

Im only able to source stripboard, does this make the build more complicated or would it be the same please?

author

It might be a little more difficult to get all the connections right. You may need to use a knife to cut some of the etched lines to make it easier.

author
christopher.sales.18 (author)2015-03-08

Hi there, I came across this project and thought that it would be perfect for a complete noob. After purchasing some parts and discussing it in my local electronic parts supplier, I came upon a problem where I couldn't Identify what types of capacitors you used, please could you list the types too for total novices?

author

The type doesn't matter. As long as you have the right values, it doesn't make a difference.

author
makeosaurus (author)2015-02-19

Could you do this with a 4 switch DIP because this is what I have???

author

Yes. You will just have fewer voltages to select from.

author
davidwhitt46 (author)2014-12-16

hi i am confrese i put in the LM317 Adjustable Voltage Regulator and the 8-Position DIP Switch and the 7 x 270 ohm Resistor now do solder the wire and the red wire and do and do i solder all to pin of the swich togladed and the Resistor bottens

20141216_143052.jpg
author

If nothing else, just try to match the pictures.

author

floowed the pic and got 8v and 1.25v but nuffing betwins what i doing rong

20141216_195709.jpg
author

Sorry. But I am not really sure what is going wrong.

author

ok thing it the 8 resistors as im unsure on thank go to swich but ends unsure wher go the wing goings if can do on the pic and wher go be nice of you

kjy.png
author
MagicTK (author)2014-10-21

Pretty cool, simple design. I like the fixed DIP switches for set voltages. I came across this after posting my adjustable regulator, and thought I would show my appreciation for your design.

author
EET623 (author)2014-10-03

is there a more detailed picture of where everything was soldered together on the back?

author

I have added a new picture of the soldering to step 3

author
Arduino Tech (author)2014-09-20

this project is from MAKE

author

Yes. I work for Make. My name is Jason Poel Smith. I create projects for them and post them to several sites for a wider exposure.

author
davehartles69 (author)2014-01-17

Do you have a picture of breadboard setup?

author

Sorry. This was one of the rare occasions when I skips prototyping and went straight to the finished circuit board.

author
agis68 (author)2013-12-19

awsome!!! since the lm317 can handle up to 40V is suggested to use 12V A 23 mini battery? What changes have to do on above circuit


thanx

author

You can use a 12V battery without making any changes to the circuit. You would just want to use a different battery connector.

author
Wo0kiE (author)2013-10-17

Brilliant!
I only have one Q?
How do you know how much current is being supplied across the circuit?

author

The voltage regulator keeps the output voltage constant regardless of how much current is being drawn (up to its operating limits). If you really wanted to know the current, you would probably have to use a current meter at the output.

author
DragonDon (author)2013-10-13

This is a great idea!

author
wkoepp (author)2013-09-07

Even though the idea of this was to test electronics at say a yard sale, this design is excellent for breadboard projects if you don't have a heavy duty power supply or just don't want to pull it out. This is a nice little project I plan on doing soon. thanks.

author
atharva12 (author)2013-08-20

thanks

author
nathan622167 (author)2013-08-18

Please send me the schematic diagram... Thank you.

About This Instructable

120,231views

1,275favorites

License:

Bio: My name is Jason Poel Smith I am a Community Manager here at Instructables. In my free time, I am an Inventor, Maker, Hacker, Tinker ... More »
More by DIY Hacks and How Tos:How to Make a Festivus PoleAdd Wings to an Infant's Halloween CostumeBubble Bath That Never Runs Out Of Bubbles
Add instructable to: