When cycling, I regularly use my smartphone to check whether I’m still going in the right direction. The frequent GPS-usage has the downside that my phone runs out of juice very quickly. This problem is exasperated on longer trips, where finding a power outlet isn’t always guaranteed. Hence, I needed a way to recharge my phone on the fly or at least to reduce the discharge rate of its battery.
The idea: charge your phone whilst cycling, using your idling hub dynamo!
It seems as though many have already thought of this but I couldn’t find any commercial products and so decided to try my hand at some DIY electronics. My bicycle has a Shimano DH-3N30 hub dynamo, which doesn’t do much most of the time I’m cycling and will be re-purposed to charge my phone.
Luckily, there are some very good instructions flying around the internet. I found this blog post and its comments very informative. Much of the information therein and in this post is based on information in this forum post by Simon Galgut.
Armed with some vague knowledge and enthusiasm, let’s get started:
Note: I am providing these instructions without any warranties. There may be errors and if your phone blows up because of them, I am in no way responsible! Try at your own risk!
I’ve got 2 main objectives for this project. It has to:
- conform to the USB specification so it’s safe to charge most smartphones.
- be able to switch between headlights and the charging circuit. Winter is coming and I don’t want to have to pedal in the dark.
The hub dynamo generates AC power, which will need to be rectified to DC and then controlled to make charging delicate electronics safe. Smartphones have a charging circuit built-in – so there is no need to worry about overcharging the battery – but the supply voltage must be 5V . I want to make my charger confirm to the USB specification, which allows a device to draw up to 500mA at 5V .
It turns out that it’s tough to dig up a proper datasheet for the Shimano DH-3N30. I don’t want to open mine up to poke around the insides and risk breaking it. If anyone has a link to one, please share it in the comments. The DH-3N30 generates up to 3W of AC power at 6V . I’ve counted the poles by counting the ‘cogs’ when spinning the wheel for one revolution: there are 28.
The first step is to rectify the AC coming from the dynamo . We’ll be using a bridge rectifier since these are cheaply available and have a small size.
After adding a shunt capacitor across the regulated DC line and ground, we obtain a voltage like the one shown in the picture above. The remaining ripple in the DC voltage can be seen in the diagram above. We want to reduce this as much as possible to safeguard delicate phone electronics! This is can be accomplished by changing the capacitor value as we will see.
The equation for the ripple voltage is:
With a dynamo, the problem is that the frequency will change depending on how fast one cycles. If cruising along at 10km/h, the wheel and dynamo will spin significantly slower than if cycling down a hill at 50km/h.
The cruising scenario is probably the lowest speed the charging circuit should work at. We need to make sure that the ripple voltage in Eqn. 1 stays acceptably low. The frequency of the alternating current produced is by my dynamo can be calculated as follows:
Where N is the rotational velocity of the dynamo, P the number of poles and f is the frequency of oscillation of the generated AC. At a speed of 3m/s (10.8km/h), my bicycle wheel spins at around 79 rpm. Assuming that I counted right and the DH-3N30 has 28 poles,
Substituting that and the wanted current (500mA) and the value of my large capacitor (2.2F) into Eqn. 1 yields a ripple voltage of 0.0123V. Consequently, the supply voltage should be between 6 and ~5.99V.
The rectified and smoothed DC will then need to be regulated down to 5V using a voltage regulator such as the LM2940. This should theoretically result in perfectly smooth 5VDC.
I have added a SPTT switch to switch the whole circuit off or power the charger or the headlights from the handlebar.
If you are wondering where C2 and C3 come from, they are specified in the LM2940 datasheet and are required for the voltage regulator to work correctly. If you use a different voltage regulator, you will probably need capacitors with different values.
Here’s the list of parts I’ve used. Note that some items have a minimum order size of 5 but you might be able to find them somewhere else.
|C1||2200 µF capacitor||Farnell 9693629||£2.20 (5)|
|VR||LM2940-CT 5V regulator||Farnell 9490191||£2.02|
|C2||0.47 µF capacitor||Farnell 1457606||£1.21 (5)|
|C3||22 µF capacitor||Farnell 1457616||£1.21 (5)|
|BR||Bridge rectifier||Farnell 9381449||£1.55 (5)|
|SPTT switch||Farnell 9381449||£1.55 (5)|
|Shimano hub connector||Ebay||£2.50|
The total cost comes to £10.69 and you’ll have some parts to spare if you accidentally blow a capacitor. I find Farnell quite useful as they usually have links to the components’ datasheet but note that they have a minimum order size of £20. You could also try a local Maplin’s for some of these parts. In any case, this should give you an idea of what you need.
You will also need some wire and a bit of vero board, a soldering iron, solder and some basic tools.
After a bit of soldering, this is the end product. I haven’t optimised spacing at all yet, that will come later. It works, which is the main thing!
So, lets do some testing and see what happens!
This first video shows the regulated voltage put out by the circuit: a constant 4.99V! The fluctuation in the volt reading at lower speeds can probably be attributed to my uneven wheel spinning. As you can see from the speedometer readings, a stable voltage can be expected at speeds above 8km/h.
The second video shows the charger in action. It works!
There are still several improvements I would like to make to my phone charger, namely:
- Reduce the overall footprint and mount it on the bicycle.
- Fabricate a male plug for the headlights connector.
- I need to do some in-depth testing of the circuit under different conditions to see how it holds up.
 This is the case for almost all smartphones available. If your smartphone can be charged using your computer via a USB port, then this should work for you.