How-to Make A ‘usb Battery’

usb battery

found out yesterday that there’s a shuffle shortage and gadget battery life can only be expected to get worse.  bummer.  at least you can make the most of your waiting-for-shuffle blues and solder yourself a ‘usb battery’.  this little gizmo runs off a 9 volt battery and supplies your favorite little device with the proper 5 volts of mobile power.

in lieu of running an ipod off of it, i tested it with an mpx220 smartphone and it should work fine with any low power mobile device that can charge via usb cable.  read more for instructions on how to make your own.

here’s what you need to scrounge up:

  • 5.1v zener diode.

  • 100ohm or slightly greater resistor.  all i had was a 330ohm which works.  don’t try anything lower than 100ohm.

  • 9v battery connector and 9v battery.

  • flat female usb connector that mates with your device’s usb cable.  this is the hardest part to find.  i tore mine off an old usb extension cable.

wire it up
usb battery wiring

connect everything up as shown.  a board makes it easy, but in a pinch you could just wrap ends together.  the top two wires go to the battery and the bottom two are connected to the female half of the usb cable i butchered.  polarity matters on the diode, so check your work.

test it
usb battery voltage check
connect the battery and test the voltage over the diode.  it should be close to 5 volts.  if not, make sure you have everything wired correctly (pay special attention to the polarity of the diode).

try it
usb battery mpx220 test

still waiting for an ipod, i decided to grab my smartphone and kick the tires on the usb battery.  as you can see in the image, the device thinks it’s plugged in.  you should be able to use any low power device that charges via usb.

how it works

the zener diode conducts in the reverse direction when its breakdown voltage of 5.1 volts is reached, and the voltage across the diode will be that same 5.1 volts, so it acts to limit our 9 volt supply down to roughly 5 volts, which is what usb powers devices at.

the resistor is there to keep the circuit from shorting when the load (your shuffle) is removed.  if you use a resistor less than 100 ohms you’ll know it because it will get hot.  if you use too large a resistor, you won’t be able to supply enough current to your device.

finish the job
usb battery solder
as you can see, i’m pretty nasty at soldering.  i’m under strict orders from cl to keep this tiny and pocket sized for the ipod, so i’ve tried to cram everything as tight as possible.  as soon as minneapolis warms up enough for the ipods to migrate, i’ll be making a custom case for this.

till then, please send in your comments, ideas, and hacks.  i look forward to seeing what you come up with.

186 thoughts on “How-to Make A ‘usb Battery’

    1. Something between 45% and 100% gets waste! The looadin current ist about 10mA, normaly USB loads with 100 to 500mA. Loading takes abeouet 10 to 50 times longer with this circuit. :-(

  1. Sweet Hack! Instead of a 9V battery, would it be possible to turn this into a car charger by attaching it to the cigarette ligher in my car? (I think there’s unregulated 12-13v DC comming out of there) Any guesses if I’d need different components? BTW, I really appreciated the “how it works” section.

  2. For a car you would want to stick a voltage regulator in there because on most cars it will surge when starting the car, etc. The easiest way would be just to find a random car charger for a cellphone or something at the dollar store (anything 5v or more), chop the end off, then use resistors to get it to 5v and add a female usb.

  3. Really sweet.
    Instead of using 9V battery, you can also use 4 AA batteries (no, you don’t need 6). This is because one battery is 1.5V, so 4*1.5=6V.
    Zener diode cuts off 0.6V, so 6-0.6 = 5.4V. This should be enough.

    Rechargeable batteries are only 1.2V each, so you need at least 5 of them (5*1.2=6V).

    It doesn’t matter if you are using AA, AAA, C or D batteries, because voltage is same. There is difference only amount of power, that is, how long that battery gives power.

    Additionally, you can attach this in to cars cigarette plug (what’s correct name for that?). Voltage is only between 12-14V, so this probably is not too much.

    1. The problem with using 4 AA is you would only get about about 20% of the charge from the AA batteries pushed into the device you are charging. At that point each battery would around 1.3 to 1.4 volts leaving you with 4.9 to 5.6 volts. Now your device is not charging, but is maintaining the current charge. You have to use the device with this USB battery plugged in to get all the energy from the 4 batteries.

      I have not tried a 5.1 Diode, but using a 5 volt liner regulator and 5 AA batteries, the voltage dropped to low to charge the device after using only half the energy in the 5 AA Batteries(each battery was at 1.25 to 1.3 volts). You may be able to get away 5 AA batteries with the 5.1 Diode.

      Also, it took three 9 volt batteries to get a full charge on my cell phone. 9 volt batteries suck when you pull a lot of amps from them.

  4. A resistor and zener diode make an extremely poor voltage regulator. I wouldn’t trust it on anything of value. Do like steven already suggested and use a real voltage regulator like a lm7805. You can buy them off a peg at Radio Shack, so it’s not like they are hard to get. If you use a 7805, you won’t need a zener.

    Also, the zener does not drop 0.6V like mr. bee suggested. Forward biased diodes drop about 0.6V, but zener diodes are used in the reverse bias mode, where they drop the zener voltage, in this case 5.1v. That’s the whole point, to use the 5.1v drop as your regulated voltage. But like I said, it is a very poorly regulated voltage and I wouldn’t trust it to power my fancy new gadgets when a real regulator costs a buck or two.

    By the way, is there some sort of rule against capital letters here? It looks really stupid.

  5. It seems like it’s questionable whether this could actually charge a device. At 330 ohms, the maximum amount of current that could be flowing is (9-5.1)/330 = roughly 12mA. There are a couple things that could be done to correct this. You need to use a lower value resistor (getting a 1W resistor should help), and possibly a higher wattage zener diode. Here’s a great reference for designing a zener diode regulator:
    Just plug in your desired values, and it will show you component values and required wattage. You’ll need to calculate the wattage of the resistor on your own though, but it’s just (9-5.1)^2/R = 15.21/R. In the example above, 15.21/330 will require 0.04W. A 100 ohm resistor needs to be 0.15W. If you’re using a 1/4W resistor (which I think is what is shown in the picture), it’ll get hot.

  6. thanks paul! that’s a great resource.

    you’re right, the 330 ohm (1/2w) resistor i used limits the current to just a trickle. it seems suffiecient to charge my mpx220, but it can’t keep up when the phone is running.

    please let me know if i’m wrong, but i think that the suggested 100 ohm resistor would provide enough current (39ma) for the average low power device (cellphone, etc.) and still keep the diode from heating up.

    steven, invader zim, and khainos’ suggestions of the 7805 is no doubt the right way to go, though. i think i’ll be making a trip to the store again before i build a case for this.

  7. I agree with those above. The ic regulator is safer. And you can sample the ic from fairchild, which makes them, and you can sample the usb adaptor from molex with a bit of searching for the right model for you. You could probably fit it all in one of the altoids gum container, if the 9volt fits. You could even add a heat sink inside the container for the ic if your so inclined.

    Side note, the altoids gum container = cheapest coolest ipod shuffle case. Add a hole for your headphones, and the usb connector, with a rubber seal for the headphone hole and the tin’s case door, and its even water proof.

    Only thing is, if you use one case for the shuffle, and another for the battery pack (even though the shuffle takes two aaa batteries ~_^) you might want to get three usb connectors, all female, wire two in the shuffle tin, with one connected to the shuffle and the other in a hole outwards, and the third in a hole for the battery pack. Then get a male to male A usb cable. two tins, with extra P0//3|5!!! Plus, they look like nunchucks, or better yet, sword chucks or even better, wand chucks!!!! <3 8-bit theater....

    Or, you could just place the battery pack and the shuffle in a regular sized altoids tin. just add a plastic divider down the middle of the long side, and you only need the one usb female A connector, with a bit of cable.

    P.S.: hackaday should add a altoids/tin channel ^_^

  8. Here’s an idea for anyone out there – how bout adding a female USB connector to one of those “CellBoost” disposable cell phone chargers? They make them for all different phones…maybe the connector could be changed? Would be a good emergency charger…

    Just an idea, i have no clue how to do it…

  9. But don’t those chargers cost more then your average 9 volt? And they aint rechargeable, like you can get for a 9 volt. But, they could do in a pinch if its the right voltage and ampage, so buyer beware.

  10. You don’t need a custom enclosure. Get some 2-part epoxy from your local hardware store and coat all of the components in a nice thick blob of epoxy. It will provide your rig with mechanical strength and wile keeping it as small as possible.

  11. Very interesting hack, and EXTREMLEY well written. I really appreciate the “How it works” section, and it makes it very easy to use. I will try this before the altiods battery pack, and if that works, I will dive into that. It would be GREAT if you could either make another version of this for a firewire port, or a version to support higher voltage (ie: iPod.)

    Thanks a ton, and great work..


  12. I agree with the post about a Zener diode being a lousy regulator. You can use a 78L05 which will be good up to 100 milliamps, or a 7805, good up to 1 amp, delivering a regulated 5 volts. With these, you can go ahead and use your vehicle’s lighter or PTO, with no problems even when voltage surges.

  13. it would be cool if you could do this for a usb mini plug too.
    if you could connect it to the male end of a usb mini plug, then you could use it for all sorts of things that have the mini usb ports as opposed to normal usb ports.

  14. it would be cool if you could do this for a usb mini plug too.
    if you could connect it to the male end of a usb mini plug, then you could use it for all sorts of things that have the mini usb ports as opposed to normal usb ports.

  15. As soon as I saw “5.1 zener” I thought “bad way to go, dude”. I’ve been using 7805 since, well, since they made them. Cleanest, easiest, and cheapest way to get 5 volts. I wouldn’t hesitate to plug a 7805 regulated supply into my ‘pod.

    You can also use a 7805 with 12 v, however, you may have to add some caps if you are plugging it into a cigarette lighter (to filter out engine noise). Some inline diodes (between the 12 v. and the 7805) will help with the temp…

    Also note: the 7805 needs at LEAST 7 volts…

  16. This is about the minimum circuit all right. Neat hack!

    But using an integrated circuit voltage regulator has a huge advantage: it doesn’t waste nearly as much of the battery’s power, so it can deliver more to the phone/whatever. (see prev. posts about the resistor value, maximum mA, etc.) Best case, only about half of the 9V’s battery power will go the device; the rest will warm up that 330 or 100 ohm resistor, a shame. And the more power you try to get (by lowering the resistor’s resistance, like to 100 ohms) the more quickly you’ll burn thru a batt even with no phone connected.

    Googling the #5 post’s suggestion of the LM7805, I soon found a shop selling a parts kit for all of $2.50 (site unkn to me; caveat emptor). It comes with a 2nd part (a ‘capacitor’) to reduce static (such as from your car’s cig lighter) that might sneak in & confuse your device’s circuitry, or leave it out so the adapter is EVEN SIMPLER than the resistor/zener circuit.

    Walt says, “check it out!”

  17. i guess it is good hack from a size and simplicity point of view but from technical point of view it’s pretty sucky. it would work in a car but without protection i wouldn’t run the motor. i would suggest a simple switching converter like the lt1956, with so little power in the battery you want to make the most of it.

  18. //Matt:
    It would be GREAT if you could either make another version of this for a firewire port, or a version to support higher voltage (ie: iPod.)

    The altoids battery pack IS another version of this using firewire AND ipod. Durr…

    it would be cool if you could do this for a usb mini plug too.
    First, you can do it with any type of plug, required you use the right cables (power and ground of the connector). Hell, I can make a usb to mini 1/8 stereo jack if I wanted to.

    And Second, seeing how most items that use mini usb plugs have the miniA/B male connect to it and a usb A male to connect to the computer/power/battery, this hack would already work for it. Unless you want to have a really smaller cable connector, in which case, try to get a Molex sample of the miniA/B-to-go models. They accept both mini A and mini B usb connections.

    And about the caps, its easy. IF (A | a) then a, if (B | b) then b etc.

  19. Here in Canada there is a store called Princess Auto which sells surplus stuff, and I recently bought a bunch of 12v 2AH Sealed Lead Batteries, they’ve about 8″ long, 2″ tall, and 1 1/2″ thick, sure they are big, but they would be perfect for a backup if you didnt have any place to charge

  20. adam, how much did they cost each. And what kinda store? Military surplus or electronic? And do they have a web site ^_^ (12v batteries like that would make great model rocket ignig system power sources, along with e(lectronic)fuse cannon wire for fireworks)

  21. so i’ve read all this stuff and i jus need a straight answer on what to buy when it comes to diodes,
    this is for a reg 20gb 4g ipod
    and if i used 4 AA would it be different from 1 9volt

  22. I’m surprised nobody thought to use the altoids tin as a heat sink. just drill a hole the same size as the one in the 7805, add some heat sink grease, connect all with a nut and bolt, and presto. home made heat sink/case.

  23. That is neat. But in my opinion the zener diode burn an apreciated amount of power, which is not useful. I have some sugestion if you like. but the number of components would difinitely increase, but it would be much more efficient.

  24. Pretty good hack … I would prefer a 78XX though … better usage of the battery juice.

    Also, just arrived 2 the states from India (work … work … blah, blah) .. anywayz, pointers on local stores where one can pick up normal EE stuff (solderless boards, cold soldering irons, res, diodes, chips – 74xx,78xx, etc) ???

    Also, wondering how to do the same for my 2G iPod … any ideas what vg reqts are needed on the IEEE1394 cable? 5V/12V?

Leave a 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.