Here is a bicycle dynamo regulator and battery charger circuit which is suitable for 6V/3W generator systems and 6V NiCd/NiMH rechargeable batteries. Other purpose of the circuit is controlling the power source that supplies the bulbs. When the dynamo is idle, it connects the bulbs to the batteries till the dynamo starts generating voltage again. The circuit also prevents the bulbs against high voltage and uses the excess voltage to recharge the batteries
The 12V and 15V zener diodes are for protection. All the other diodes except D1 are 1A Schottky diodes and D1 is a general purpose 1A diode.
The relay used in the circuit is a DPDT (double-pole double-throw) type and a running generator changes the state of the relay quickly.
An additional charger jack allows you to recharge the batteries by using an external source.