As a hacker and a maker i have many old rechargeable batteries, AC Adapters (wall warts) and other sources of DC power lying around the shop. It occurred to me that most hackers and makers like myself have a hard time throwing out wall warts and good rechargeable batteries. Since the world is full of USB powered devices and we could all use another USB power supply, i figured it was time to design a simple circuit to make use of all these available power sources. Something that is flexible enough to use an old wall wart, Car charger, laptop battery or solar panel as the need arises.
In this Instrcutable we'll cover:
Step 1: Design Considerations
Many wall warts do not output a commonly used voltage rating used by most hackers and makers in there projects. So they can be relatively useless in most cases. Most electronics typically use 5v, 9v, or 12v. But the world is full of odd adapters that use voltages like 8.5v, 10v, 15v and so on. Not to mention you have to be careful about many of those adapters. While they may state one voltage rating on the label there actual output could be higher, even under a load. Making them troublesome in some projects. If you have some solar panels the voltage output can vary throughout the day and depending on weather conditions. Many of the rechargeable batteries i have lying around are from old laptops. They can still hold a charge but the battery packs are rated anywhere between 12v and 18v. With this in mind i had to consider what specs i wanted for this circuit. Here is what i came up with.
To allow for the use of different possible input connectors i considered the typical DC jack but decided in the end a set of screw terminals would be best. So i had to include a protection diode in case people connected there power source backwards.
I was able to get the PCB layout down to a 1.5"x1.5" form factor. Small enough to fit inside of an Altoids Smalls tin as long as you lay down the Electrolytic capacitor and voltage regulator flat.
On many of today's smart phones and MP3 players the device won't start charging or use the power from USB unless it is receiving a small voltage on the Data + and Data - lines. These devices , such as all Apple iPods and Phones, are looking for 2V on the D+ and about 2.7V on the D- lines. So voltage dividers are needed to accommodate this. As you will see in the schematic R1, R2, and R3 are feeding the D- line. I found the best resistor values for this where 22K ohms on R1 and a total of 26K between R2 and R3. Two resistors are needed here because 26K Ohm resistors are hard to come by. Then we have a 22k Ohm and 15K Ohm feeding D+. Other resistor values can be used as long as the end result is close to 2V on D+ and 2.7V on D-. I've used this arrangement in past projects and know it works so i'm sticking with it for now. I've tried resistor values under 10K ohms and they don't work. So if you decide to go with a different voltage divider setup make sure the values are greater then 10K ohms.
Here is the Rev 1 Schematic thanks to Upverter.com:
Step 2: Parts List
Note: A full parts list is attached to this page. Listing the part, manufacture, part number, link to Mouser.com, quantity and price (as of the publishing of this Instructable).
Total cost in parts is less then $7 before cost of shipping is added. Making this the most versatile and affordable USB power supply you can find. Its small size allows it to be a lightweight backpack to turn any 8v or larger battery pack into an extended life battery pack for your mobile devices. It also allows you to make use of almost any would be useless wall wart you have lying around.
If you spend another $5 you can get a nice little 8x AA Battery holder and 9V snap connector and have a good 9V power pack for any USB device. Then you have the option of using regular AA batteries or rechargeable AA batteries.
Step 3: Board layout.
Show All 7 Items
The most challenging part of all this wasn't creating the schematic and deciding what parts to us. The challenge was in laying everything out on a PCB. This was further complicated by the need to create a single sided PCB layout so anyone could build this on a perforated board/ peg board/ breadboard (for the sake of this istructable we'll call it a breadboard). If i had done a two sided PCB then routing the traces wouldn't be an issue on such a basic circuit like this. In the end i played around with a couple of revisions to the layouts of the components before settling on Rev 2. Rev 1 was laid out in, what seemed to be, the easiest way i could lay it out and run the traces. With little consideration on how the user will interact with the board. On Rev 2 i decided i needed to focus more on how the user will handle it so i focused the part arrangement on placing key items like the terminal block, USB connector and power switch. I also thought it would be nicer to have the LED indicator in the middle of the board.
With a breadboard layout in mind i have included a PDF file of Rev 2's PCB layout without the copper fill. I picked up a Dual Mini Board Breadboard from Radio Shack for about $2.19. This Breadboard is just slightly bigger then my PCB layout. Best of all the PCB layout lines up to the grid of the Breadboard. So you'll be able to print off the PDF of the PCB layout below and overlay it onto the Breadboard.
Now to get things pieced together.
Once you print the layout cut it down to size and tape it to the side of the board without copper pads. Line up the bottom right corner of the layout with the bottom right corner of the board. Hold the board and layout up to the light so you can see through the paper where the holes are and get everything lined up. To help ensure the holes all line up take one of the components and use it to punch all the component holes out. If things are not quite matching up then make adjustments as needed.
For the most part you will be able to solder the components together similar to the PCB layout but there will be some sections where you may have to make adjustments. We'll get to that in the next steps. I'll break the assembly down into several steps to help insure you get everything plugged into the right places and soldered together.
I've included the PCB files for Rev 2 below in extended Gerber, PDF , and Eagle CAD files if you want to try etching your own board. I've also included a Fritzing file of the REV 1 Board which has a simple prototyping breadboard layout if you want to prototype it before putting everything onto a PCB or peg board. The finished board is only 40mm x 40mm. As you can see there is still a good bit of open space on the board. It can be made much smaller for final PCB production. I did consider having the resisters mounted on end to help shrink things down a little more. But we don't want to make things too small otherwise it becomes difficult for the hobbyist to assemble. I hope to get money together and have a small production run of boards made in the near future. I may get through a couple more of revisions before that happens.
Universal USB Power Supply Rev 2_etch_copper_bottom.pdf3 KB
Universal USB Power Supply Rev 2 PCB.zip40 KB
Eagle CAD PCB Layout.zip66 KB
Universal USB Power Supply Rev 2.fzz15 KB
Step 4: Tools Needed
Before we start piecing this together lets gather the tools we'll need for this.
Step 5: Placing the Resistors
We'll start on the left hand side and work our way across and down. The resistor leads need to be bent right at the edge of the resistor to fit in the holes. Place the resistors in there designated spot referring to the reference diagram above as needed. The resistors in the diagram are clearly labeled. The resistors them self are also clearly marked in one form or another. The 22K and 15K use the resistor color codes. All the rest have there values printed on them. With the exception of the 6K which has a larger physical size then the rest, making it easy to pick out.
Bend the leads of the resistors out so they will not fall out when you turn the board over to solder them into place. When working with breadboard like this i like to use the leads of the components to link the traces from one component to another. So bending you leads in the direction of the nearest component they will be linked to is a good idea.
With the resistors in place flip the board over and solder them in place. Don't worry about soldering the ends of the leads down as traces until we get all the components in place. But go ahead and use your pliers to bend them around to where they need to go and cut off any access so its out of the way.
Step 6: Placing Capacitors, LED, and Diode
Now place the capacitors into place. The Electrolytic capacitor goes near the terminal block area and the Ceramic goes near the voltage regulator. Pay attention to the polarity of the Electrolytic capacitor. The silver stripe down the side of the can is the negative side, (its also the side with the shorter lead) and needs to be on the right hand side if your keeping your board oriented in the same way the reference image is. You will need to fully straighten out the leads to fit in the board correctly.
With the LED and Diode its important to pay attention to which lead is the Anode and which is the Cathode. On the LED one lead is longer then the other indicating the Anode. So your short lead is the cathode and should be on the right hand side of the board. The Diode's cathode is indicated with a white line around one end of it. That line should be facing towards the left side of the board.
Like before bend the lead out a bit in the direction they need to go. Flip the board over and solder the leads into place. Then rout the leads and trim as needed.
Step 7: Placing the voltage regulator and switch
Now we will place the voltage regulator and switch in place. Check the reference images and make sure you place the voltage regulator in the right orientation. You'll be able to bend the leads of the regulator a bit but not enough to use them as a trace. So just bend them enough that it stays in place. The leads of the switch are spread out a bit wider then then holes on the breadboard. So you'll need to bend them in ever so slightly to get it to fit. Like the regulator the leads on the switch are not long enough to use as traces and you might not be able to bend them over at all to help hold the switch in place. Chances are the friction of the leads in the holes will hold it for you.
Flip the board and solder the 2 components.
Step 8: Placing the connectors
Now its time to get the terminal block and USB connector in place.
Make sure the openings of the terminal block faces out. The terminal block has a couple of plastic legs sticking out just in front of the leads. You can choose to clip these off or widen the holes in the board with a 1/16" drill bit. I suggest widening the holes since they are good for keeping the terminal block in place.
As for the USB connector you'll have to do some added work here. There are 2 clips on either side of the connector. You will need to enlarge the the holes on the board (designated as GND on the reference image above) with a 5/64" drill bit so the clips can snap into the board.
Like the switch the terminal block and USB connector leads will not be long enough to bend over and use as traces but friction should hold both part in place till you solder them. Solder everything in place.
Step 9: Soldering the traces
Now starting with one component at a time start bending the leads the rest of the way over to make contact with the components they need to link too. Where you don't have leads to help make your trace start creating solder bridges across the copper pads to the component. It may be a good idea to take some scrap wire and strip it bear to use as a trace from one component to the next. If you don't like the look of solder bridges on a breadboard then use bits of wire to go directly from 1 component to the next.
Take your time and do one trace at a time. Like they always say "measure twice and cut once". In this case check and verify the trace placement twice and solder once.
Step 10: Conclusion
There you have it. A Universal USB Power Supply. Able to use any DC power source between 8V and 35V.
NOTE: Its important to note that any voltage input above 12V will REQUIRE a heat sync on the voltage regulator. Even with only 9V input with a 700mA output i measure 180 degrees from the regulator. If you plan to mount this into a mint tin the body of the tin can be used as the heat sync.
NOTE: When connecting a power source be aware of the polarities as you connect it. If you get the polarities reversed nothing will happen due to the protection diode. So if you get everything connected and the circuit won't turn on then flip the wires around and try again. Remember the screw terminal towards the outside of the board is the ground and the one towards the middle of the board is positive. You may want to mark the polarities on your board.
As mentioned earlier this is the Rev 2 design and future revisions are in the works. I may explore a couple more layout options before moving onto some of the other ideas i have in mind for future revisions. I've included Revision 3 of the PCB layout below. It puts the Power supply within the typical dimensions of a USB thumb drive. The board layout is about 19mm X 56mm.
Plans for future revisions:
Yes i'm aware that a pair of 7805's in parallel may not be the best solution for achieving up to 2A of available current. Not to mention the total amount of heat that will be generated by both regulators outputting 1A. Other options are being considered.
universal USB Power Supply Rev 3 PCB.zip32 KB
Universal USB Power Supply Rev 3_etch_copper_bottom.pdf3 KB