Source: https://www.ktverkko.fi/~msmakela/electronics/dynamo5v/
Timestamp: 2019-04-25 00:08:26+00:00

Document:
In 2006, I equipped my bicycle with a SON dynamo hub and a B+M D’Lumotec Oval Senso Plus headlight.
For years, I was thinking of acquiring a GPS/GSM navigator-phone that would be useable on the bicycle. Having been frustrated of losing my way enough many times and having seen the coverage of OpenStreetMap (see my involvement in OpenStreetMap), I finally acquired one.
In 2008, it was time to equip the bicycle with a power socket for electronic gadgets, such as a mobile phone, and in 2009 it was time to acquire a bicycle navigator. For a basic phone, the utility is questionable expect for very long rides outside cities. Back in 2008, there were no useable commercial products on the market. Even as of 2010, the DIY bicycle charger can outperform commercial products in many aspects, even price.
Navigators are rather power-hungry: typical operating times with an illuminated display are a few hours. On the other hand, the power potential of the dynamo hub would be wasted when light is not needed. On long bike journeys, it would be very useful to supply power to the navigator from the dynamo hub.
Manufacturers seem to have agreed to equip future devices with a USB connector for charging, as defined in the USB-IF Battery Charging Specification, Revision 1.0, 8th March 2007, which was also referenced by the OMTP specification Local Data Connectivity, Version 1.0, 17th September 2007 . This means that 5 volts should be a suitable charging voltage for the foreseeable future. Coincidentally, this voltage also works with Nokia GSM phones (3 mm or 2 mm plug).
Unfortunately, as of June 2008, many USB devices still do not follow the Battery Charging Specification. As of 2012, some Nokia phones use Micro-USB for data transfers, but a proprietary connector for charging. Luckily, both my Garmin Edge 705 navigator and SonyEricsson Xperia™ active smartphone comply with the specification.
Non-compliant devices usually require that some resistor be connected between some USB lines. Compliant devices would detect a stand-alone charger by the fact that the D+ and D- lines are connected together. The situation will most likely be improved when new generations of products will make use of SoCs whose built-in USB interfaces implement the specification.
The current version of the specification appears to be USB-IF Battery Charging Specification Revision 1.1, 15th April, 2009.
A friend gave me a broken Nokia ACP-8E charger. I cracked its case open and modified the circuit. The first test circuit consisted of a full-wave diode rectifier bridge and a capacitor, both rated for 230 VAC input. I connected the input to a SON dynamo hub and measured the output. When I rotated the wheel by hand (approximately 15 km/h), the unloaded output reached almost 100 volts.
Next, I connected a linear voltage regulator 7805 to the output of the rectifier bridge and measured the regulated voltage. At approximately 15 km/h, the regulator did not supply enough power for charging a mobile phone. It was clear that there were significant voltage losses across the diode rectifier bridge and the regulator.
Some years later, the simple 7805 circuit was brought to the market as Dahon Reecharge. It self-destructed in the German test Steckdose unterwegs by Andreas Oehler of Schmidt Maschinenbau.
In 2007 and 2008, I reduced the voltage losses and built a circuit with a MOSFET rectifier and low-dropout regulator. It is compact and works well with small loads, such as the Garmin Edge 705, which typically draws less than 100 mA. For over-voltage protection, it uses two 7.5 V 5 W zener diodes across the dynamo input. They can get hot when the headlights are turned off and there is no load at the output.
In our low-dropout linear regulator circuit, the main disadvantage is that the MOSFET rectifier bridge only tolerates 20 V. Because of this, the over-voltage protection has to be very agressive: two 1N5343B zener diodes (7.5 V, 5 W) connected head-to-head across the dynamo terminals. These diodes will consume power already at very low speeds.
The linear regulator circuit can also interfere with a headlight. For example, some B+M dynamo headlights are usable with batteries, with the optimal voltage at 7.2 V. Under load, our low-dropout linear regulator should not let the dynamo voltage rise above some 6.8 V. If our circuit had a threshold voltage of, say, 9 V, it would only consume the surplus electricity, not weakening the light output.
A step-down switching regulator addresses both issues. Usually, step-down regulators will not switch on until the input voltage is a few volts above the output. With a higher input voltage, the voltage losses across a conventional silicon diode rectifier bridge (Graetz circuit) are proportionally smaller. Besides, the current should be smaller for the same amount of power transferred, further reducing the voltage losses. Because a diode rectifier bridge can easily withstand the voltages produced by a dynamo hub, it suffices to rely on a zener diode on the DC side for over-voltage protection as the last line of defence .
The AC input of the circuit will be connected to a bicycle dynamo hub (nominal output 6 VAC, 3 W) in parallel to the headlight wires. The DC output is limited to 5 VDC. Both the input and the output of the circuit can be hot-plugged (disconnected or connected) at any time.
For the time being, probably the best way of installing the circuit is to protect it from moisture by enclosing it in heat-shrink tubing or electrical tape, and to shove it to the head tube of the bicycle (the tube between the handlebars and the front wheel) from the bottom. The cables would be run from one end of the package. I did not install any power switch. The dynamo is always connected to both the lamp and the circuit.
A safe and visually attractive route for the dynamo cable is inside the front fork. There often is a 3 mm hole on the fork tube near the mounting point of the hub. In the depicted fork, I laid a 0.5 mm steel wire from the top to the bottom and helped it out with a 2.0 mm crochet hook. My attempts with a sewing thread and a vacuum cleaner were unsuccessful on this fork, because it is somewhat difficult to access the top hole.
Once you have got something laid through the fork, pull a thin electric cable up through the hole. Finally, solder one wire of your lamp cable to the top end of the thin cable, and pull the lamp cable down with the thin cable. Be careful not to break the solder joint, and try to form the lamp cable so that it is as thin as possible.
It is advisable to equip the circuit with a female USB-A socket, just like on a computer, so that the device being charged can be connected via the supplied USB cable.
The USB-A socket could be installed on a specially designed circuit board, or it could hang from a cable, somewhere where the mud-guard (fender) meets the head tube. I chose the cable solution, because a circuit-board mounted USB socket would require a specially built water-proof case around the circuit, making the circuit bigger and more expensive and making it challenging to deattach the USB cable when the case is installed inside the head tube. Tout Terrain chose to place a user-visible USB socket on top of the head tube in The Plug.
In early 2009, when I came up with the idea of installing the circuit inside a headlight, there were no commercial solutions for that. The Axa Nano was brought to the market in late 2010. Note that many LED dynamo headlights are sealed.
The Busch&Müller LUMOTEC IQ Cyo is a LED headlight that has just enough space for the circuit inside. The aluminium heat sink on the top can be removed by opening the screw at the bottom. Inside the lamp, I had to connect the two 1N5343B zener diodes to the circuit board with a short cable. The zener diodes are on the left side of the case and the rest of the circuit on the right side. All in all, it was a very tight fit. Brave souls may even remove the reflector from the plastic case and connect the power supply cable inside. Since I was not brave, I connected the power input externally.
In the picture, you can see an improvised headlight mount, a triangular aluminium plate attached to the handlebar mount. The cables are attached to the front brake cable and further to the front fork by a wireless tachometer sensor. The power output is connected to a sacrificed USB extension cord. The USB cord is so short that it won’t be able to touch the bicycle frame or the front wheel. The cable from the navigator or phone will be plugged in the USB socket. Under the USB socket, you can see the heat-shrink tubing that covers the power input connection.
The lamp turned out to interfere with the wireless tachometer, even when powered off and without the circuit installed. Laying the cable inside the fork helped somewhat, but still the cable or lamp caused interference if they were brought closer than about 20 cm from the handlebar. The Schmidt Edelux works without problems thanks to its metal enclosure and coaxial power cable.
You may want to install a power switch that allows the output of the dynamo to be switched between the regulator circuit and the lights. However, the built-in power switch of the headlight may suffice, that is, the charging circuit can be always on .
Originally, I wanted to equip the circuit with a LED indicator for over-voltage ( battery fully charged ) and a power switch. Since I wanted to hide the circuit within the head tube, it would have been challenging to find a suitable installation place for these components. In the end, the indicator was deemed unnecessary, because the power draw of the idle circuit is negligible. The switch is not needed either, because the circuit works when connected in parallel with the lights. The circuit might interfere with incandescent bulbs, causing the light to flicker when the output is heavily loaded. White LEDs typically illuminate at around 4 V, but incandescent bulbs do not reach full brightness below 6 V. Luckily, any interference can be cured by disconnecting the output or the input of the regulator circuit. The simplest cure is to unplug the load. Thus, the only externally visible part of the circuit can be the power output connector.
The lights in my bicycles are equipped with a darkness sensor and a power switch on their own. When I ride through a tunnel, the lights will switch on automatically. If I clear the tunnel fast enough, there will be no drop in the regulated output voltage.
A further circuit board layout could be developed for a board-mounted USB-A socket. However, this would require an enclosure that would likely be too big to fit inside the bicycle frame. It could work when integrated in a LED headlight or in the headset, as in later commercial products.
Two competing projects are based on batteries. The obvious advantage is that the batteries would supply power even when the bicycle is parked. I would not want a large box on my bicycle, and the batteries might not survive the Finnish winter temperatures (often −10°C, occasionally −30°C). The presented linear regulator circuit can be left on the bicycle at all times. In bad weather, the wire can be run to the rider’s pocket, which would protect the device being charged.
In issue 23/2007 of the German magazine c’t, the article Strom auf’m Fahrrad: Mit dem Nabendynamo Akkus aufladen features two circuits: a MAX1771-based step-up/down regulator and a DS2715-based charger for four NiMH cells. If you are interested in this circuit, you can order the parts kit at SEGOR electronics. The device would be mounted in place of a bottle holder.
Some German hobbyists are presenting Forumslader, a battery charging circuits for bicycles. As of this writing, the most advanced version charges a 12 V battery from a diode rectifier circuit, and a switching regulator will step down the voltage to 5 V. It may also be possible to use power adapters built for automotive use. This approach is bulkier and more expensive than our linear regulator, but it may have a better overall efficiency, because it can harvest power also when riding slowly.
The featured 12 V accessories include an adjustable step-down switching regulator and a charger for four AA NiMH cells.
The German test Steckdose unterwegs by Andreas Oehler of Schmidt Maschinenbau produces a good overview of the available commercial charging products as of July 2010. This section lists some of the first products, and some later products that I find interesting.
The JaWeTec BikeCharger was based on a switching regulator. Alas, its large case is not waterproof and will not fit inside the head tube.
The Zzing features a NiMH battery pack that looks like five AA cells. The circuit may be similar to our linear regulator, with two things connected in parallel to C1: the battery pack, and a driver circuit for a small LED. Again, the case is not waterproof, and it occupies precious space on the handlebar. The Zzing’s built-in battery pack can charge other devices when the bicycle is parked. However, charging and discharging the internal battery could waste more than a third of the energy.
The products of PedalPower were initially based on a battery. Their universal cable , which can be used without a battery, is probably similar to our linear regulator circuit. It may optionally be connected to a battery, presumably four AA NiMH cells parallel to the load, or five AA cells in parallel to C1, as in the Zzing. It looks like the PedalPower circuit would be connected in series between the dynamo and the lamps, while our circuit can be connected in parallel to the supply cable of a headlight.
The Busch&Müller Ride&Charge charges the four NiMH cells inside an IXON headlight. As far as I understand, these gadgets should be waterproof, but there is no USB-A power outlet. I would rather not change batteries outdoors, and few gadgets would accept NiMH cells anyway. It would also be better to integrate all electronics in the headlight.
The Busch&Müller E-WERK is close to our design, because there is no built-in battery. The successor product USB-WERK is equipped with a battery. The design is likely based on a switching regulator, because there is an adjustable current limit and output voltage. A drawback of the E-WERK and the USB-WERK is that they could be thief-magnets due to their size that prohibits installation inside the bicycle frame.
The case of the Nokia DC-14 bicycle charger kit doubles as a handlebar holder for a mobile phone. It requires a further accessory (CA-146C charger adaptor) to charge USB devices. I fear that having such a bulky device on my handlebar could attract vandals or thieves. It is also questionable if the phone holder strap is compatible with all handlebar tube diameters or with riding in varying weather and road conditions.
The Axa Nano headlight features a USB charging socket. Some user reports suggest that charging is not possible while the light is switched on.
The Plug by Tout Terrain or Supernova installs into the head tube. The power connector is a USB-A socket at the top of the headset. The circuit does not feature any batteries, even though some would fit in the head tube. In my test, The Plug 2 not deliver a steady current until the speed reached 25 km/h. The test load switched on when the output voltage exceeded 4.2 V. At 30 km/h, it sank 490 mA.
The Busch&Müller Lumotec IQ2 Luxos integrates a battery and a USB-A power outlet into a dynamo-powered lamp. The battery can be useful when charging power-hungry devices that are picky about under-voltage conditions. It remains to be seen how well the battery works in winter conditions.
This section is not directly related to the presented circuit, but it may be useful for those who wish to use electronic gadgets on bicycle rides.
Being a proponent of open systems and free software, I would prefer a navigator device that is based on free, end-user-modifiable software, preferrably open hardware as well. I would also prefer robust, weather-proof hardware and support for bicycle sensors. As of this writing, there is no such device, but some devices based on the Android operating system are getting close. You may want to watch the Linux for Bicycles page at Tuxmobil for updates.
MyTourbook is good for visualizing and analyzing bicycle rides. GPS traces are also useful for editing OpenStreetMap.
The hardware of my Garmin Edge 705 that I acquired in January 2009 lasted almost 3 years with one warranty replacement. The USB data transfers ceased working, so I can no longer record tracks, but I can still update the map and use the device for navigation.
The Garmin hardware and firmware are about as closed as they can be, but it consumes little power, is weatherproof, has a decent handlebar mount, and has nice logging features (when it does not crash or corrupt the data), including cadence and heart rate. The interfaces are based on open standards: USB Mass Storage and XML. The proprietary map format has been largely reverse-engineered, and there are many OpenStreetMap based maps generated with the open-source tool mkgmap.
Many interesting smartphones are based on the Android operating system and something like the TI WiLink™ 7.0 chipset. Both support GPS, GSM and ANT+Sport. So far, only select SonyEricsson (or Sony) Xperia models support ANT+Sport. If measuring heart rate, cadence or power is not important for you, there are other rugged Android devices that lack ANT+Sport support.
Many logging and navigation applications on Android require a real-time Internet connection. Uploading route information to cloud services can be handy when doing long rides, but I prefer to have some privacy. Therefore, I prefer offline applications, such as My Tracks for logging and OsmAnd+ for maps and navigation.
I acquired the water-proof Xperia™ active in December 2011 and the SportyPal bike holder in March 2012.
Sony does not have a good reputation in the free software community, but SonyEricsson has had a somewhat nicer attitude, such as providing access to the bootloader ( rooting the device ) and cooperating with CyanogenMod. The GPS receiver on the Xperia™ active is somewhat less accurate and sensitive than that on Garmin, but it is good enough even for collecting traces for editing OpenStreetMap.
Motorists are well served by windscreen mounts for mobile phones and navigators, but there are few options for bicyclists. Stowing the device in a handlebar bag may obscure the screen or controls, but will also protect it from rain. Some holders may be unsafe when riding on bumpy roads or off road. I will try to collect convincing solutions here. The best option so far is a purpose-built bicycle computer, which will firmly remain in place and can be easily operated in varying riding and weather conditions.
These ship with handlebar mounts. The Edge 800 features an easy bayonet mount similar to Sigma bicycle computers. These devices are waterproof and work also in the cold.
The third-party SportyPal bike holder for this water-proof Android phone is light-weight, simple, sturdy and easy to use. I am a little skeptical if the plastic can snap in winter, but then again, I would keep the phone in my pocket when it is colder than some -5°C. All buttons and interfaces except the camera will remain accessible.
There are some third-party waterproof cases and mounts and ANT+Sport dongles for the iPhone.

References: V. 
 V. 
 V. 
 V. 
 V. 
 V.