DIY hub dynamo usb charger

This is a step by step guide on creating your own USB compatible charger using your bicycle’s hub-dynamo as the power source.
It’s a work in progress and I will update this post along the way.
All images link to full resolution originals.

Requirements:

Tools:

Soldering iron + tin

(optional) Multimeter

(optional) Soldering clamp

(optional) wire stripper

Parts:

Parallel Strip Veroboard (€ 8,22) )

USB-A Receptacle (optional, a direct usb cable with micro or mini usb is also possible)

Note that these prices are ex FAT and I ordered them in larger volumes, ymmv.

Poor man’s (ms-paint) diagram

Step 1: saw a piece out of the veroboard, approximately 17 x 40 mm (the board below is too long, approx 65 in length)

Step 2: Solder the two tantalum bead capacitors on the voltage regulator. Be careful to not overheat the components, polarity is essential. Long leg is positive.
Place the 22uF Capacitor on the right, the .47 uF on the left. Negative polarity combined in the middle.
Step 3: prepare capacitor C1 with the heat-shrink tubing, bend the pins (long leg = positive) as seen in the photo. Keep the legs as long as possible for flexible placement of this component inside the ABS case.
Step 4: place the components on the veroboard:
Looking at the first picture below; the middle three parallel stripes on the board serve as the main electrical paths for the components. The stripe on the left corresponds with the positive side on the diagram.
– C1: the long leg (+) should be placed on the left of the three middle stripes. The short leg should go in the middle. (in reference to picture 1)
Picture 1:

The bridge rectifier output legs should be placed as follows: The + (as indicated on the component) should go on the left of the three middle strips.
The – (negative) output should go in the middle. The AC input legs can be placed on the outer stripes of the board. (left and right in reference to picture 1)

And finally solder the voltage regulator as well.

Before going any further, check to see if it’s working properly.
Prepare the cable that runs to the dynamo, and connect it on the input legs of the bridge rectifier. Polarity is of course of no concern as we are dealing with an alternating current. Connect the dynamo to this kit, swing the wheel and measure the output voltage on the + (Vout) and – leg of the output regulator.

We should measure around 5 Volts

If it doesn’t work, carefully check the polarity of the capacitors and other components.

We can now safely cut the remaining component legs form the veroboard, and bend C1 to fit inside the ABS case.

I connected the heat-sink using a blind rivet this is ideal as it does not need any additional space (especially height).

Before connecting the cables, drill a small hole for the Cable Gland Locknut, connect the Cable Gland Locknut and route the wires through it.

Next, connect the USB A receptacle or if you like a mini or micro USB cable directly to the voltage regulator output legs. Connect the dynamo cable to the bridge rectifier.

In order for this whole package to fit inside the box, I had to saw one of the corners from the veroboard.

When using the same ABS case as listed in the requirements section, be sure to cut the two screw holes at the bottom of the case for more room.

That’s pretty much it. I will seal the case of with a polymer resin, to make it water proof. Be sure to only do this after you are absolutely sure everything works.

If you can charge your phone by plugging it into a regular USB port, then yes. If that is not the case, it might still be possible by using the right USB cable. It seems to be necessary (for iphones/ipods) to place a resistor between the two data pins of the USB cable. I can look it up if need be.

thanks for such a detailed write-up on an immensely useful project. i plan to build the same, but i want to integrate a switch that will allow me to power a headlight (not at the same time as the gps). any thoughts? also, approximate cost for the project as listed above?

Thanks for this article. I’ve just made one of these and it works a treat.
I was thinking of putting a switch in for a headlight, but in the end I didn’t and my LED headlight works whilst my phone is charging.

Thanks for the detailed instructions. I have enjoyed building the charger and have been testing it out for the last week. I seem to be having a problem with it though. Any device that I plug in to the charger displays that it is charging, but the battery still appears to be slowly losing its charge because the device will eventually die and the device will turn off if I ride long enough. I tried it with both my cell phone and portable xm receiver, both with the same result. Any idea what is going on or what I might have done wrong? Thanks.

It’s hard to judge what could be wrong. Keep in mind that it only delivers 400-450 mA at a decent speed. It might not be sufficient for your hardware.
I would start troubleshooting by checking the current with a multimeter while driving at 16km/h.

I checked the current output and I am only getting about 200 mA when pedaling full speed, so that appears to be the problem, but I have no idea where to go from here. I am using a bottle dynamo instead of a hub, would that matter?

Yep, bottle dynamos are in general less efficient. There are more powerful bottle dynamos but they are as, or even more expensive than a decent hub dynamo. It might be worth it to order a rim which includes a hub dynamo like I did. Go for the 3Watt (vs 2.4W) version if you decide to do so.

Martin is a good mate…I found out back in the day, that his bottle dynamo circuit could be used to get way more power from a Shimano hub, 12w infact…told Martin, he was very surpised….

We have work on many varaitions of his basic circuit together, I now have adapted my own version and power curve, that I like…his system is very conservitive, as that’s the way he work…he is a very smart guy.

If u use a smaller boost cap other than the one he uses, 470uf, and use say 200uf you should see a higher current, for the circuit I use with out the Lin 5v reg, direct to my LEDs it works a treat, I can get 11v @1A

I just puts it to to the max, that’s me…so get way more power from the hub than him buy having peaker curves…

I say 100uf bipolar for road, 200 bipolar for off road…

Check out my old website…on the specs page you should see power curves ect of the 100 & 200uf system…

Thanks, it’s definitely something to try out. The the temps are on the rise here so it’s about time to install my charger again. A bit more juice is appreciated as my HTC Desire sucks the battery dry in no-time. Will report back.

Hi Ktronik. This post is quite old, so as I see your page has changed and I can not find anything about dynamo-usb charger.
Could you share it with word?
I do not have electronic knowlage, but I would like try to make it 😉
It would be wonderful to get som how-to…
Thanks for all.
/Damian

But use not 2 big caps and blead resistor, but 2 small 100Uf bi-polar in parellel (200uf) or just one for a fast power curve (100uf) in same place, we used bigger ones as they have a higher overall ripple rating, not really needed for low powered USB stuff.

your unloaded circuit will give 1v per 1km/hr and could blow the head off the voltage reg, to help here, just put a switch on the AC side of the dynamo, thus to stop any power getting to the circuit, its then OK remove the load

Hi Arend, have you tried this out on the HTC Desrie HD? If so how did it perform and is there any mods required to overcome the power consumption of this phone. Any diagrams etc will be appreciated. Thanks.Jim

have a look at the bottom pic (no LEDs for your one, 5v reg in its place) see how I have orientated the 4 diodes, bi,polar on the back of that, then smoothing cap and reg…tiny…below pic is of what it looks like rather than a circuit diagram…

Think of the four AA batteries as a big capacitor between your generator and your device. It’s not really the efficiency of it. It’s more for the safety of the attached device.

Depending on the battery chemistry, you really want a constant current to charge your phone/gps/etc. The batteries between your charging circuit and your device take care of that. And of course there’s the battery power when you’re not moving. Finally, it’s much better to ruin $5 or $6 worth of AA nimh batteries than your Iphone battery.

I am guessing your circuit probably takes care of “cleaning” the power, it’s just not constant with the starts and stops.of riding.

Hey Arend.. I’m a first year engineering student and we had to come up with a mechanical cell phone charger and then theoretically design and test it. I just wanted to ask your permission to use your intellectual property, with the proper recognition of course? I’d appreciate it if you’d get back to me on that. Thank you.

All I can say is that I have used, and still use this setup without problems on my HTC Desire, and previously on my HTC Touch HD (Blackstone). In my opinion, the 100v is never able to reach the USB-connector as it is regulated by the LM2940CT (even though it has a max input of 26V). Frying the LM2940CT will probably break the electrical path to prevent damage to the load. This could easily be tested and will only set you back the cost of one LM2940CT.

The “new build” that I might try only has an additional boost cap. I am not interested in an additional battery in front of the battery already in my phone.

Unloaded means that nothing is plugged into the USB circuit…not a issue if you just add a switch as in bottom of this post… 😉

I am now developing a battery system that will be charged via the dynamo hub, and offer USB 5+ and 12v out for a separate charger, and full LED battery level indcator, so you can use the power you collect when you now moving, in the tent, doing it for a customer on a 5000km trip, dynamo hub is on the rear of his bob trailer…

your unloaded circuit will give 1v per 1km/hr and could blow the head off the voltage reg, to help here, just put a switch on the AC side of the dynamo, thus to stop any power getting to the circuit, its then OK remove the load

hi, i was trying to change this circuit and adding separate control for the lights, and an extra 9v exit for a sw/mw radio. since i see your project is very similar i would really need a few clues on the best schematics. i am a bit disorientated on wich is the best place to place the battery, since i would only need it when i am not riding. also, i will make this with a bottleneck wich i have measured spinning the weel with the bike upside down and at maximum gave 28V so i think i have to change a lot of the components from this circuit.
the problem is that i’m not too sure on wich components i can be sure to use.
i thought for c1 a few 50V 470uF that i got from old electronics wired in parallel
then from the positive before the 5V regulator i was thinking of placing the 9v regulator wich charges a 9v battery (and a switch before it).

—,–*—,—————–5v—,—,– +
| sw | | |
c1 9v——°, | c2 c3
| | 9Vbatt | | |
—‘–*—-‘——°———-‘—-‘—-‘– –
where i connect the lights in * and the 9v plug in °
this is just a sketch as you can imagine but any help would be appreciated 🙂

Many thanks for theses intructions. I have just built mine and it looks like its working. I’m about to leave for a big bicycle trip and was dearly looking for a way to get all this otherwise wasted energy put to good use.

Something to consider while building this unit is adding a 200 Ohm resistor between the D- and D+ data pins of the USB connection. This allows your PDA to switch between USB charging and a more powerful charging mode. After adding this resistor (you can also short the pins, not sure what difference it makes) the charge bumped from 380 mA to 450 mA at 23 km/h

Hi,
Thanks for the circuit info. I have built it, and it seems to work, but unfortunately only for about 10 seconds, and then the phone stops charging. I’ve tried it on an ipod touch and HTC Wildfire S. Testing with a multimeter and I still have +5V on the USB output, so it seems to be something about the devices I’m charging. I’ve set 2V on each of the data pins to get the ipod to charge as suggested. Would be interested to hear if anyone else has come across this.
Cheers

Hi,
thank you very much for the tutorial, I like it for its simplicity. I’ve just finished my USB charger and it works although I had nothing to do with electronics before. I would like to share this tutorial with other people in Poland if you don’t mind. Do you think that I could translate it to polish? I’d like to show it to people at Bike’s Day in Kraków, so that they see how simple it could be and that advanced knowledge is not essential. Please answer if you have anything against.
Jacek

For every compenend you linked to the farnell website, which is great.
However for the C5 22uF Tantalum bead, this is not the case. Can you also create a link to the farnell website for this?
I would like to order the components.

For me it was just about simplicity and I didn’t have hub powered lights. But a simple switch (charge/light) shouldn’t be hard to implement. Using light and charging together, I think, does not work well as there isn’t enough”juice”

Hi,
Have you actually tried this circuit without the phone connected? There is no overvoltage protection, and unless you have one externally (like in the generator or something like Shimano’s DH10) this circuit is likely to give smoke.

I have used this circuit for quite an extended period with and without a connected phone. No problem. (Shimano DH-3R30) The LM2940 also has over-voltage, mirror-image insertion and thermal overload protection.

i had no knowledge about circuit design
but i wish to build a dynamo handphone charger based on yours
can i ask what is the function of capacitor in this thing
and why you use two type of capacitor
that is tantalum and electrolye
what is the different ??

Hello,
i wanted to built my own bicyclecharger this way. I built it up like you’ve shown, but now I have a problem: if I connect my mobile on it, it changes all the time between “charging” and not “charging”. This also occures if I connect the Charger to a 9V DC battery instead of my dynamo. Only if I put in 12V DC it charges my mobile the rigth way… do you know how to solve this?
– my dynamo output ist 6V
– my voltage Regulator ist the LM2940 5,0V+ 1A
thanks for your guide,
I’d be happy if someone could help me
Christian

It might be because of a low current. It would be interesting to know how much current is being drawn from the circuit. Also monitoring the voltage (drop) might give hints to what is happening. What kind of device are you charging ?

Thanks for your Answer 🙂
i tried tree devices: two MP3-players which show the charging icon when connected and I also connected a Motorola Mobile with mini-USB connection. This is the device that doesn’t get loaded…
unfortunately I have no equipment to check the current and voltage..
Christian

Hmm, it will be difficult to narrow the problem down without a multimeter. It might not provide enough juice for your mobile device, or the voltage may not be stable enough. You can get a simple multimeter for 10 euros, or even less. It doesn’t have to be very accurate.

that would be a good way to tell what the 12V DC is doing. I know the iphone 3gs requires a slightly higher than 5v output. I was looking for boost chargers that worked with my 3gs and the two I found that did – both outputted a little more than 5v (I forget the amount).

It could be that this increases the voltage and/or current when you plug the 12V DC in. An alternative is to use one of the booster devices, as they charge off 5v usb no problem, then use them to top up your phone! Keeps your phone safe from frying etc (not sure how much of a risk that is with this circuit?)

I haven’t tried a Multimeter yet, but at the moment I test the charger with another mobile – Galaxy Ace. It displays “charging” but I’ll wait one hour and then look whether the battery is fuller or not

hey, thanks for this great article!
i have a question: the datasheet of the lm2940 says that the input voltage has to be between 6v and 26v. but there are many people saying that the voltage of an hub dynamo could rise up to 70v and more… isn’t there any possibility to save my device by integrating a flyback diode or something like that?
thanks for your help