How-to: ‘usb Battery’ V2

usb battery v2

thanks to everyone’s great feedback, i’ve now got a usb battery that’s much more efficient and capable of delivering more current to a portable device.  like i promised, i put together a slick little case to finish this hack off right.  read on for some tips on building your own.

 

quick improvement

as mentioned by several readers, you’ll want to use a 5 volt regulator ic instead of the resistor/zener-diode combo i discussed previously.  you’ll be able to charge your device faster while it is running and it’s much more efficient, which will give your 9 volt a longer battery life.

the best part is that it’s easier and cheaper to do it this way.  just grab an lm7805 from your local hacker store and wire it up.  connect the positive battery terminal to the 7805 input pin, the positive usb pin to the 7805 output pin, and connect the negative battery terminal and the usb ground pin to the 7805 ground pin.

which is which?  if you hold the 7805 with the text facing you and the pins downward, the pins from left to right are: input, ground, output.  it looks like this:

lm7805

for the female usb connector, look down into the end of the connector so that it is oriented like so:

usb connector

pin 1 is the positive (5v) terminal (which goes to the output of the 7805) and pin 4 is ground (which goes to the 7805 ground pin).

 

easiest way to test

several people were wondering how to tell if you are going to fry your device.  here’s the easiest way to test when you are all done wiring:

  1. cut a standard usb cable in half.

  2. plug the male end into your usb battery.

  3. connect the positive and negative ends of your multimeter to the red and black usb wires respectively.

  4. if it reads something very close to 5v then you are wired correctly.

 

making a case

usb battery case 1

i chose to make my case out of polystyrene plastic.  you can find this stuff in sheet form at most hobby stores.  it’s the same kind of plastic used in your standard plastic model kit and the sheet form lends itself nicely to making flat sided objects

331 thoughts on “How-to: ‘usb Battery’ V2

  1. Don’t know if anyone is still reading this thread, but I just build one of these.

    I used 4x AA batteries. I plugged in a cheapo MP3 player to test it out. I got about ten minutes of battery life. The multimeter revealed why. Before I plugged in the player, the input voltage from the batteries was 5.9V and the output was 5.03v . After ten minutes, the input voltage was 5.06v and the output voltage was 4.2v . And the voltage regulator was quite warm.

    I wanted to try this with a 9V cell to compare, but I didn’t have any new 9v’s lying around. But I suspect the reason for the fast drain is the high amperage of the batteries, and the inefficiency of the linear regulators, and that the batteries are only 1V above the output of the regulator, and the regulator need quite a bit more than 5v to be able to output 5v (6v is enough, but 5.5v probably isn’t. 5.06v definately isn’t)

    One other thing, the regulator I used was a 7805CT, if that makes any difference. (which I doubt )

  2. response to post 105:
    4xAA gives about 6V. The 7805 requires 2 volts of “drop-out” to create 5V. In other words, you need at least a 7V input for the 7805 to reliable output 5V. If the input is less than 7V, it may or may not work. also when you attach a “load” to the battery, the battery output voltage will appear to drop slight due to the internal battery resistance.

    response to post 99 & 103:
    i was thinking of using the MAX1675 step-up DC-DC (http://www.maxim-ic.com/quick_view2.cfm/qv_pk/1878). It will operate on as little as 0.7V input and is very efficient (up to 94%). that means it will work with a single AAA (as in very light charger). it is also very cheap (~$2). the only problem is that it is surface mount, so it’s hard to work with. the 78SR105 solution looks interesting though. it is no longer recommend by ti though. they suggest the PT78ST105 .

    btw, i am an electrical engineer working on a battery powered device at work, so i know a little about this stuff.

  3. i used the lm7805 and put it together just like the artical said, bought a brand new 9v and when i pluged it into my 20g ipod all it does is make the screen lite up and the charging thing dosent move, some times right after i unplug it the batter life meter on the ipod drops? Help!!!!!!!!!!!!!!!!!!!!!!!!!!

  4. In response to post 106.
    That seems like a great idea. The 9V nimh I’m using now have very poor power density. A couple of AAA or AA should be around the same size and pack much more power. Any idea on how to wire up the MAX1675? Not only is it surface mount, it’s really tiny as well.

    As for the PT78ST105, it’s not suitable as it requires a minimum 9V input. May not work properly with a 9V battery.

  5. I used a USB to PS/2 Converter as the Converter has a female USB.

    When I try to charge my ipaq, it makes the backlight come on and shows charging, but the battery continues to drain, no matter what I turn off. Doesn’t seem to be charging. Am I missing something? Connected to 1 and 4 on the usb and getting 5v out.

  6. #111:

    If your Ipod has USB imput, then sure you could. you’d just need a different solution for batteries thats all….
    two 9V might work if you stepped the voltage down, and you’d have a pretty fair amount of battery life with these too.

    Or you could use 8 AA or AAA’s to get 12V

  7. RE #113 and #111

    The ipod (3g i’m sure about, probably also applies to 4g) are not designed to charge AT ALL through the USB port. I don’t think it is very likely, but it is possible that the ipod completely ignores all power coming through the USB.

    Based on my (very limited) knowledge of the way these things are designed, I think that it is VERY LIKELY that the USB controller inside the ipod pulls power from the USB port. In which case, connecting it to a USB that outputs 12v wuold almost certainly kill the USB controller and probably the entire ipod

    Does your ipod come with a wall plug? If so, you could sevre that half way, solder a barrel plug onto the power adapter end, and a barrel socket onto the ipod end. And make a battery pack that produces 12v and has a barrel plug for power output. Just make sure you use the same polarity on all three (positive center is usually used)

    SO: If you fry your ipod by connecting it to 12v through the usb, it’s your own fault. I think that its a very stupid thing to do.

  8. #114
    tanx for the reply. You’ve enlightened me (and prolly saved me from frying my ipod). Think i’ll scrounge around and find a firewire port and build something like the ipod altoid batt pack.

  9. #115
    My recomendation: if you can’t find a store that sells firewrite connecters, find and buy a firewire card for your pc that includes an internal firewire port, like this one:
    http://cgi.ebay.com.au/ws/eBayISAPI.dll?ViewItem&category=3666&item=5178936708&rd=1

    As if you’re ever going to open up your PC just to plug in a firewire device. So use some desoldering braid to de-solder the internal firewire port. If you do it properly (don’t short anything on the card AND don’t desolder anything else) you should atill be able to use the card.

    (Here in Australia, I couldn’t find a store that sold USB sockets. So I had to vandalize a USB extension cord to make my USB battery.)

    On another note, I now have an ipod shuffle, but its the 1GB version and i don’t want to take the risk of plugging it into my USB battery. Aside from the AU$230 I have to scrounge up to replace it, it is very hard to find a store that has them in stock. For anyone else in Brisbane, Australia, Infinite Systems ( http://infinitesystems.com.au ) had stock last Wednesday, but I doubt they still do.

    So, at least for now, my usb battery will not be tested with my shuffle. I might buy that external battery pack that apple sells.

  10. Hi Ive built a usb charger and attached LED. For some reason the voltage drops too low to charge the phone can someone pls help. And can anyone tell me where I can get some parts (usb) for this project

  11. #117
    Buy a 5v power supply and wire it to a USB cable. You probably should not try to make your own power supply unless you know what you’re doing, as it can be dangerous. The power supply unit should be rated for at least 500mA.

    #119
    Did you connect the LED in series?

  12. #117 and #120
    i fried the wall supply for my HPC a while back (it was purchased overseas and rated at 120v, and I plugged it into a 240v outlet)

    Anyway, the output from the supply was 5v at 1 amp, and none of the electronics stores I visited sold 5v wall warts. I still used the thing for a couple more years, but only for solitaire (it was powered by two AA batteries)

    anyway, moral of the story is, 5v supplies are imposible to get except with devices that use them. The best such device to try would probably be a USB hub.

    Or you could attach a barrel socket to a circuit similar to the one in this article, and attach any old wall wart to that. It should be at least 7 volts, and more than 1 amp (I would suggest 1.5 amps)

  13. #119: what type of power supply are you using for this? I originally used 4 x AA, but found they didn’t supply enough voltage. A 9 volt battery is far more effective.

  14. re #123
    yes it is possible. solar cells produce about 4w, so you should be able to do it with one or two cells. However, I would recommend using at least 4.

    You would have to wire them up the right way to get the right voltage and amperage. And personally, I would hook the cells up to a voltage regulator.

    It won’t work (at all) unless the panels are directly facing the sun AND there is no cloud cover. So if you build one, you won’t be able to use it in the middle of a city. Or even on the outskirts. I’m guessing you want this for a long drive? You wouldn’t be able to generate enoguh power unless it was on the roof of the car AND aligned properly.

    If you want this for a long car journey, buy a cigarette lighter plug, and connect that to your voltage regulator. Power the whole thing off the car’s battery. Because most cars have a generator to recharge the battery, you’ll be able to use it as long as there is petrol in the tank.

  15. Belkin makes a cigarette lighter plug adapter for cars that has a USB port, and a red LED. It puts out 5.5V and one sticker said 700 mAh at input of 12 to 24V. I use it to charge my PDA. I tested it with 9V from 6 AAs on the input and it appears to put out 5.5V and charge my Sony PDA’s 3.7V Li Ion battery through its USB cable. You can pull out the ciruit board and put it in a box, or make a box with a cig lighter port for this to plug into. They have a PCB with a switching chip and several diodes, resisters and caps. I have found these for $1 at the 99 Cents store (packaged with cellphone and PDA USB cables) and for $1 at an electronics swap meet.

  16. #120, #122 thanks for the suggestions I was able to get the LED working once I connected it in series. However, I added a 10A 125 VDC spst switch and for some reason the battery get very hot can anyone pls help with some specific directions

  17. #126
    What I meant was that you should check to ensure your led is not connected in series. If you connect the led in series, there will be a voltage drop, and your phone will not get the full 5v. The led should be connected in parrallel with a resistor to limit it’s current, and the led and resistor together should be in parrallel to the 5v supply to your phone.

    Depending on how much current your phone draws, it may be normal for your battery to run a little warm. But I think it’s more likely that something is shorted here. Check your wiring again.

  18. 129:

    Well, you’d have to figure out on what voltage the PSP charges and get the appropriate adapter. If it was, say, 12 VDC, you could get 2 6v batteries hooked up to a diode (so the current doesn’t reverse!) then hooked up to an adapter that fits into the PSP’s charging socket. If it’s less/more than 12 VDC, add/remove batteries and add a voltage limiter if needed. I’d imagine that it’d charge rather slow, since the current isn’t too strong, but it should work.

    Anyone know what voltage PSP’s charge on? I should make one of these for a friend with a PSP (heh, lucky fucking bastard)

  19. Someone mentioned above that pins 2,3 and 4 need to be soldered together. I cannot figure out why this should be done, since pins 2 and 3 are data pins. Will the charger work if pins 2 and 3 are left bare (specifically on a 20g iPod)?

  20. *sigh*

    AFAIK, only IPOD SHUFFLE can be charged through USB.

    Any other IPOD requires a firewire or other charger. USB won’t charge it.

    So #131, get yourself two 9v batteries, a lm7812 or similar, and a firewire port. Wire the 9v batteries up in series.

    The reason pins 2,3,4 aparently need to be soldered together is because of the way the shuffle works. Some element of its design requires this. I’m not sure why. I’m not prepared to risk plugging my shuffle into my USB battery because I don’t want to fry it.

  21. I just purchased a pcmcia usb card in order to add usb ports to an old pre-usb notebook, and wouldn’t you know it, *the card needs a usb port to power it* (catch-22)! Geez.

    So I went searching online for a way to power it with an external battery pack, and found your article. Can’t wait to try it. (I’ll have to canabalize an old USB/PS2 keyboard adaptor for the female usb recepticle because they are impossible to find.)

    Keep up the good work.

  22. i made one of these hoping to power my bus-powered 2.5 USB external Drive. the LED lights up, but the drive doesn’t start up.

    then i tried it without the voltage regulator. using 4AA NiH batteries to get 4.8 volt. it starts up.

    i was hoping to use the voltage regulator so i wouldn’t have to carry my charger with me

    any ideas to get this setup to work with a bus-powered hard drive?

  23. #137

    Do you have a multimeter? If so, measure the voltage and amperage WITH the voltage regulator, then measure the voltage and amperage WITHOUT the voltage regulatr. Let us know what the results are.

    If its like most 2.5 inch HDDs, it will require 0.5A at 5v. It is possible that your voltage regulator is using too much power.

  24. #139

    no i don’t have a multimeter

    i’m trying to use the 9V setup since i tested the harddrive with a several configs.

    i tried
    3AA alkaline = 4.5V. (HD doesn’t start)
    4AA alkaline = 6V w/ VR (doesn’t start)
    4AA alkaline =6v [no] VR (doesn’t start)
    6AA alkaline = 9V w/ VR (HD starts up)
    4AA NiH = 4.8 (starts up)

    so since the 6AA=9volt worked. I’m using a 9Volt battery since it takes up less space than 6 AA. since my current set up is like the one described here using a 9volt battery.
    can someone measure the amp output?

  25. hi cain,
    the 7805 needs at least a 7 volt input to function correctly. this is why it works with 6 aa batteries but not with 4.

    if you are using alkaline batteries, 9-12 volts on input is probably about right. as alkalines are used their voltage drops fairly steadily. as soon as it drops below 7 volts, the regulator will not function.

    if you use nicad or nimh batteries, you may not need quite as much of a voltage head above 7 volts.. 7.2 is cutting it a bit close, but they do tend to hold their voltage more constant until they near the end of their charge (where it begins to drop rapidly).

    the higher your input voltage, the more waste heat is produced by the 7805, so it’s a bit of a tradeoff between getting the most out of your batteries and using them most efficiently

    good luck and let us know how it works out!

  26. I own a 40 gig Ipod and I charge it every day thruoght the USB port. It is a fourth generation so maybee usb support is new. I built one of these and it doesnt seem to work right. I wired it correctly am getting 5.2 volts out but my Ipod doesnt take a charge from it. The backlight comes on when I unplug it. I havent tried shorting the data pins yet, will let you know if this works.

  27. I tried it and she still no work. Ive double and triple checked every thing and it still dont work. So I thought maybee I fried the IC but It still puts out 5v. Is it possible for them to fail in a way that it puts out the proper voltage but thaen when current is drawn it goe son the fritz?

  28. Ok, I’m assuming the last few of the comments are frustrations with the author’s design, not another design mentioned in the comments. The USB spec, as most of you know, if not all of you, can handle up to 500 mA peak. If the voltage across the regulator is 5V, then there must exist a voltage drop between the regulator and the load (the device). Check for grounding problems. Make sure the soldered circuit is clean and make sure the solder job is clean, too. What’s best to do, if you haven’t done it already, is measure the voltage when the load and regulator are both connected. If you measure a voltage drop, then you know that there is a grounding problem. Check the wires and make sure there’s no damage to the insulation. That’s the key, insulation.

  29. Nice! I’m not very experienced with electronics, so the simplicity of this project really worked for me. I used a multimeter correctly for probably the first time ever.

    I meant to mount the assembly inside a small ferrara pan jaw busters box (the kind that costs 25 cents), but without a glue gun that was hopeless. Instead, I ripped the plastic handle off a spoon and mounted the stuff to that with some garden wire (to secure the 9V battery clip) and a lot of electrical tape. I call this “the gimp”:

    http://www.extrafire.net/pictures/2005/april/IMG_2816.JPG

    This project is especially useful for me because I used to work in A/V support, and we threw out 9 volt batteries (from the handheld mikes) like it was our job. For a couple months now, I’ve had a box containing 500 or 600 9V batteries just sitting in my living room, gathering dust. They’re going to power my palm Tungsten T3 now instead.

  30. This is just for those who want to use this for a psp battery.

    4 nimh rechargable batteries in series provide a peak voltage around 5.4 volts. during their power discharge curve, they tend to level out around 4.8 volts, and when they start to run out of juice (roughly less than 10%) their voltage starts to fall rapidly around 4.65 volts. Of course, these values will be different depending on the brand of battery.

    The psp power supply I have outputs 5.4 volts, so the rechargable batteries should not overvoltage the psp, and using an adjustable power supply, the psp will continue to work (without the internal battery) until the voltage drops to about 4.65 volts.

    So, now I am going to simply plug 4 batteries (nimh) to the psp power input. I figure it should work, and from my estimates, it should last as long a the standard internal battery. to keep currents low I plan to use this as a supliment to a fully charged psp internal battery.

    On a side note: Usb specs state that a usb port will need to provide 5 volts within a range of 4.75 to 5.25. any usb device worth working with should be able to hande this range also, to it should give you some margin of freedom to play with. I hope this tidbit helps.

Leave a Reply to MattCancel reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.