The Schematic

The schematic was drawn using the Circuit Shop. This is a cheap shareware program that takes one quickly off the ground but has a limited number of symbols as reflected in the figure.

Details of the Circuit

Either the dynamo or the lamps are assumed to have the ground separated from the housing. This is is normal for a hub dynamo, but not common for the front lamps. The batteries are assumed to have a capacity of 1.2-1.6 Ah and to be capable of taking a charging current of 0.5 A. The capacity matters for the part of the circuit for charging using an adapter. Regarding the charging current, I found that AA NiMH 1.2 Ah batteries from such brands as Panasonic or Energizer had too low maximal currents, as specified at the time of my construction. I ended up picking 1.5 Ah NiMH batteries from Radio Shack (23-525/23-528); from some of the Radio Shack charger application notes, it followed that these batteries could take more than enough.

In the circuit, the resistor in series with a capacitor across the dynamo represent a snubber that largely eliminates sparking across the switch. The switch is a 3PDT type (Mountain Switch 10TC285) with center off. Two back-to-back 39V Zener diodes protect the circuit from overvolting which is important in the case of the Schmidt dynamo. All the diodes in the way of the current from the dynamo are 1A Schottky, minimizing the voltage drop.

The first operational amplifier, ST low-power MC33171, compares the voltage after the diode following the MOSFET to a reference voltage set by the 1.2V low-temperature voltage reference LM285. The op-amp steers the MOSFET, N-channel low-drop NTE2984, to yield the voltage after the diode limited from above by 7.0V or so. When the batteries are drained, they take at this voltage the full current of 0.5A provided by the dynamo. When the batteries are charged, possibly to 80% or so, the current drops to the level of 1-2 mA. The Zener diode between the gate and source of the MOSFET protects the MOSFET from overvolting.

The second operational amplifier, National Semiconductor LM2904, drives the relay that switches between feeding of the lamps from the dynamo AC and from the batteries. The amplifier compares the voltages across the dynamo and the batteries. Switching in the two directions proceeds with a hysteresis. The set of resistors at the inputs and the output sets the thresholds for the two directions. The capacitors ensure that there is no rattling in the switching. The balance is quite delicate. If the amplifier were to be changed to another type, the capacitor and resistor values would need to be tweaked.

The two employed relays are NEC DPDT ED2-5NJ. Their nominal power is 50mW, but they operate in practice at 20mW! Outstanding! Their maximum switching current is 1A. Nominally, this current should create a problem. Although continuously operating lamps take just 0.5A, the batteries deliver as much as 5A when short-circuited. To resolve this, I first designed a circuit protection but in practice it brought more problems than solved and I removed it. In tests the lamp terminals have been short-circuited ad nauseam without affecting the relays. Just in case, the terminals of the relay in the MAX713 charger circuit have been connected in parallel to reduce the load.

The bottom part of the schematic is the charger based on Maxim application notes, with the added relay short-circuiting the current-sensing resistor when not in use. At the applied charging rate, you might want to use MAX712 in place of MAX713 with NiMHs. No changes in the surrounding circuit are required when replacing the chip. If the charger option were to be dropped, just the battery and the 1000uF (=1mF) capacitor from the bottom part should be switched across +V and -V.

The employed LEDs are the superbright Kingbright L53SRC and L53SGC. In the circuit they operate at relatively low currents and I found them to perform much better than some of the so-called low-current LEDs.