This is a 3A LM2596HV Voltage Regulator DC Converter Buck Module, potted and heatsinked, as you can see. I designed my own but when I went shopping for components discovered I could buy a competently designed and built module for €10.38 landed, much less than paying carriage over and over on separate components. You don't need the high voltage, high current version; the 2A, lower voltage version at about half the price will do, nor is such an expansive, expensive heatsink truly necessary. I imagine that for five or six quid you can land a version that will do anything a cyclist requires. (I buy the more capable version because I build high voltage thermionic tube audio amplifiers that have high current DC heaters which pump out heat like a stallion smelling a mare, so you start with the best and then add more heatsinking and then you pray, because some of my tubes operate on 1250V.) This module is far more capable than anything you will find inside an E-Werk, Tout Terrain The Plug or any of the bicycle lamps that offer USB output.
You can put any DC voltage from about 4.5V up to 60V into the module and adjust the screw on the blue potentiometer to get out any lesser voltage up to about 30V. But, and this is the trick, the output voltage is at a heftier current than the input. This is ideal for turning the current from a bicycle hub dynamo, which is 0A5 (Americans write 0.5A) or 500mA at about 7V and a bit (6V nominal) into 5V at
more than 500mA to charge batteries, phones, GPS, iPod, iPad, whatever. I doubt you'll charge an iPad, which likes a 10W source, in a days' ride, but some stakhanovite cyclist will probably immediately tell me he never camps until he has charged his iPad absolutely 100%. Less thirsty implements take less time to charge up. Turn the screw for whatever voltage you require. USB devices want to see 5V. You can mark the blue pot casing with various voltages so that you don't need to carry a voltmeter with you. Or you can decide you will charge only at 5V, a set and forget operation.
So, what do you need besides the buck module? Not very much. You need a "low drop-out rectifier module", which is common and very cheap, to turn the hub AC output into DC before the current reaches the buck module; buy it from the same supplier on Ebay to save carriage. You need to solder or otherwise attach the wires from the dynamo and to the USB plug, and it would be neat to cover the junctions with shrink-wrap. You might shrinkwrap the buck module and rectifier module, though if mounted heatsink up the potting probably makes it water resistant enough. To get a USB socket buy a USB female to male extender cable and cut off the end you don't want. Leave enough length to lead the socket end to wherever you want it. Tying it up under the stem sounds good, because most of the devices you want to charge will be on the handlebars or in the handlebar bag. Under the stem is also a good place for the buck module. Note that mine has slots for tie wraps (after you solder on the wires, and shrinkwrap the wire and pin, you bend the pins below the level of the casework).
Splice the feed in either at the hub dynamo itself, or at the front lamp input from the dynamo simply by doubling up the wires; I clamped my lamp wires between the bullet points on the wires and their housings; it works fine. You don't need complicated switching; in fact, you don't need any switching because you just unplug the charging device when you need the lamp to shine at its brightest.
Ten bucks, ten minutes, job done.
Andre Jute
http://coolmainpress.com/BICYCLING.htmlEDITED on 2 November to restore the missing rectifier to the story
PS IanS, you don't need even this much. To turn your big lipo battery for the electric motor into a USB charger, just get an Olympus travel USB charger. The one in my hand came spare with a hundred buck camera; you can buy them on the net for a couple of quid. It weighs a few grammes and has two pins which you can saw off short after attaching the wires. You feed it the whole of the battery DC (for tidiness splice into the main feed at the controller box because you already have a wiring run from there) and the motor won't even notice it is there because it will consume so little power. Voila, USB charging. You can ignore the bit where it says on the charger that it takes 100-240V input; those are just the official mains voltages in countries around the world; the thing works well with the 40-42V (36V nominal) from your pedelec battery.