Instructables
Picture of Universal USB Power Supply Kit
IMG_3240.jpg
3329581857_91daec6bfe_z.jpg
laptop-batteries.jpg
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:
  • Design Considerations for the circuit and show the resulting schematic
  • The Parts list and give you links to a good parts source and prices. 
  • The PCB Layout and how we will use that layout to build the circuit onto a Breadboard
  • Step by step instructions on placing components onto the breadboard and soldering them into place
  • Using the leads of the components and/or wires to help create the traces and solder them into place.

 
Remove these adsRemove these ads by Signing Up

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.
  1. Input voltage range between 8V and 35V @ 500mA or greater
  2. Able to accept voltage input from many different sources (i.e. batteries, wall warts, solar panels, ect.)
  3. Support the USB spec for powering devices (5V @ +/-500mA)
  4. Small form factor so it could be easily used anywhere.
  5. Ability to turn it off and on (seams simple enough but i've forgotten to add a power switch to projects in the past, not a very green way to do things)
Obviously we need a voltage regulator that can take the incoming voltage and bring it down to the 5v we need. I chose to use the LM7805 because its a very common and cheap regulator. It can take any voltage between 7.5v and 35v and outputs 5v @ up to 1A. (The data sheet on the part says the minimum is 7.5V but I've used as low as 6V and still got a 5V output.)

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:

 
kagazwala1 month ago

I am a newbie in electronics just doing it as hobby I find this project interestiing to do. But I want to place four(4) usb charging hubs how do i modify to do so

mpilchfamily (author)  kagazwala1 month ago

This designs is good for about 2 USB devices. Most only require about 400mA to charge and of course this design only supports up to 1A. You can add a second 7805 in parallel with the first to increase the available amperage and support up to 4 devices at once. Just keep in mind the power source you use will also need to support 2A or more.

sorry for being naive but can you tell me this through a diagram or so....

mpilchfamily (author)  kagazwala1 month ago

Basically you plug another 7805 voltage regulator in the same holes as the first. Then a USB connector with 4 connections in a single part and your all set.

I really like how you put the paper circuit down first. Can you give me the Eagle dimensions please?
mpilchfamily (author)  FoamboardRC1 year ago
To do that i would have to recreate the schematic in Eagle. You'll need to get the size and spacing of the perf board you want to use and set your spacings accordingly in Eagle. It's much easier if you download Fritzing and use the file i have in step 3. You'll find Fritizing a very helpful app when dealing with some basic electronics and interfacing with an Arduino.
wz-ski1 year ago
Have you made the device that can use a AC wall wart yet? I think that you need to add some diodes or something.
Thanks,
Peter
mpilchfamily (author)  wz-ski1 year ago
Just follow the schematic in step 10. It's just placing a bridge rectifier between the input from the wall wart and the rest of the circuit.
eyu21 year ago
Hey. Thanks for this. I am planning on using a LiPo battery as the source with it outputting 15.3V. Do you think this circuit would be enough to output 5V and up to 1.5 mA? And yes a heatsink will be used. I'm worried about any capacitors failing because of the high voltage.
mpilchfamily (author)  eyu21 year ago
Look at the specs of the 7805. It can only offer a max of 1A as long as the supply is offering enough power to support it. If you are pulling a full 1A from it you will need a good heat sync and possibly a fan to keep the regulator cool . You can add a second 7805 in parallel with the first to get up to 2A from the circuit. But the supply needs to be able to support 2A or more. Otherwise you'll burn out the supply. Make sure the battery you use can support a consistent drain of 1.5A if that is what your circuit needs. If not it can overheat and possibly explode on you. At the very least the battery will drain quite fast.
You should put it in an altoids tin now for portablity :D
mpilchfamily (author)  Sargebubbles261 year ago
Left this open so you can put it in any housing you would like.
mrinsj1 year ago
Just found this article. This is great. Thanks. I have a couple of questions if someone can help answer.
1. What is the purpose of C1 and C2? Is it required by the user manual for LM7805?
2. From the same power source if I want a 1A USB and a 2A USB, should I duplicate the whole circuit and in one instance use LM7805 and in the other use an LM338? Or just one LM338 with 2 USB output circuits? And how will I ensure one USB has 1A and the other has 2A?

Thanks in advance for any help.
mpilchfamily (author)  mrinsj1 year ago
The capacitors are there to help smooth the voltage. The output voltage of the wall adapters may have a little 'noise' on the line from the AC to DC conversion. The capacitor on the output of the 7805 is there to help smooth any 'noise' in the line after passing through the voltage regulator. The capacitors are not needed but not having them may effect the operation of some more sensitive circuits.

There are multiple ways to get more amperage out of the circuit. An LM338 is a great option since it can offer up to 5A so long as the input voltage to the regulator is capable of offering more than 5A. You would only need to use 1 of them and it can replace the LM7805 in this circuit. Then you can put 2 or more USB jacks on the circuit. You don't need to worry about limiting the max current to 1A or 2A. Devices will pull the amperage they need so long as it doesn't exceed the output of the regulator. So you only have to worry about how many items you plug into the circuit so you don't exceed the 5A limit of the regulator or the limit of the wall adapter, whichever comes first.
Thanks for the explanation. I'll try it out.
mdog932 years ago
Could a lm317 be used in the lm7805's place here?
mpilchfamily (author)  mdog932 years ago
Yes. Any voltage regulator you have that will output 5V will work. But you will need to add some additional components along with the LM317 so it will output 5V. Just refer to the LM317 data sheet for how to accomplish that.
Cool, I bought some of those as I though I would need them. Alas I did not and I can use them for an overflow project with no further expense :) such is the beauty of buying 'extras' when placing a large order online... anyway I digress.

Good instructable, and thanks for replying so fast.
mdog93
Rene Artois2 years ago
I like your instructable.

Instead of using multiple 7805 you may use LM338. It hadles up to 5 A.
http://www.ti.com/product/lm338
mpilchfamily (author)  Rene Artois2 years ago
Thanks that helps out allot!
This a great idea! I think I'll make a few for gifts. Perhaps most sane people don't have as large a box as I do filled with adapters, but everyone I know has one or two that doesn't seem to work with anything.

Thanks for sharing this. I love it!
qazxsw210002 years ago
"So i had to include a protection diode in case people connected there power source backwards."

You could've used a bridge rectifier. That way, no matter how you connect the power supply, the thing would still work.
mpilchfamily (author)  qazxsw210002 years ago
If you read the last step you'll note that a bridge rectifier is coming in a later revision of the kit. One which will have a double sided PCB so the user doesn't have to worry about running there own traces on a breadboard. You'll also notice i have some other improvements lined up for the kit and another schematic reflecting these improvements.

This is an ongoing and evolving project. I hope there will be enough interest in this item to make it worth my while to have a production run of PCBs made with all the final upgrades available for it. This instructable was posted kind of mid development to be in time for a couple of contests and challenges. The Kit Design Challenge in particular offers a great opportunity to get the support i need to help bring this kit to the market. Just so you know i start to develop this the day that challenge was posted. So its been in development for a little over a week.

To put thing into perspective my first schematic didn't have a diode in it at all. Then i thought about what would happen if the polarity was reversed. So i hooked up a spare 7805 and plugged the input in wrong to see what would happen. Like many people here i'm still learning, though i should have known that one from the start. lol
SinAmos2 years ago
I really like this.