The schematic. It's a combination of two designs available on the internet. The general dynamo light design is from Pilom. The USB charging is available on the internet if you do some searching. I'm not an EE so I'm not that great at designing this stuff, but I do understand it. The dynamo is a 0.5A current source. It produces AC (alternating current) voltage. A full bridge rectify is use to convert the AC to DC. That's what the four diodes are doing. Diodes only allow current to flow one direction. Since AC is a wave that goes positive to negative, the diodes direct the positive voltage to the positive side of the circuit and the negative voltage to ground on both waves. It effectively takes the normal wave and takes the negative potential of the lower half of the wave and makes it positive. Schottky diodes are used to reduce the voltage drop across the diode. Then C1 cleans up the row of humps so it is a flatter line. This is how flicker is reduced in the LEDs. C2 and C3 are acting as a voltage boost. The resistor just biases the capacitors since they are polarized. Then on the light side it just puts the positive through the LEDs and goes to ground. The reason it must be converted from AC to DC is because of the LEDs. LED stands for light emitting diode. As explained earlier, current can only flow one direction through a diode. If you put a diode in backwards it goes into what is called breakdown and it is no more. Putting a capacitor in backwards makes them explode.
The USB charger side of the circuit is pretty simple. C4 and C5 are just noise filters and the LM2940 is a voltage regulator. It will output approximately 5v. Only one side of the circuits need to be switched. The ground can be shared since there is no potential without a complete circuit.
You can see the full bridge rectifier in the center of the board. The metal rectangle is the LM2940. The three big cyclinders are C1, C2, and C3. C4 and C5 and hidden by the LM2940 in this pic.

The four LEDs epoxied (using thermal epoxy) to an aluminum disc. My dad cut these out of some scrap aluminum he had laying around. Thanks Daddy. The disc is a heatsink so keep the LEDs alive for longer. They don't produce as much heat in this application because the dynamo limits the current to 500mA. Many battery powered lights use 700mA to 1A. This creates a bit more heat. The bolt is what I call the spine. It holds the LEDs, then spacers go on and the electronics go on there and then the bolt goes into the housing and supports everything. The cap puts pressure on the optics to support the front.


Secondary spot beam optic on the LEDs.

The underside where all the soldering happens. It's pretty messy and not done in a manner that would be considered proper but it works and reduces the amount of wires needed to connect them. If I was going to manufacture these I'd want a pre-printed board so I would just have to solder in the components. Maybe go to the extreme of having a chip made with all the capacitors and diodes integrated into the board.

A little better view. You can see C4 and C5 now. They're the little yellow bulbs. It's another style of capacitor usually only used on smaller capacitors. You can see about half of the resistor between the capacitors.


All done. The white nub is a cover over the switch. The black bosses are waterproof bungs for the wires. The brown goes to the dynamo and the black is the female USB plug. The metal piece is the mounting bracket. Everything is siliconed together after everything is tested to make it more water resistant. I wouldn't submerge it but I haven't had any issues in the past year using dynamo lights. It's kinda messy of a method but it works.

