Trying to come up with a transistor based circuit for my bicycle lights.
The idea is illustrated in the attached drawing.
If the wheels are spinning and hence generating a voltage on the dynamo (far left), the first set of transistor (from the left) would receive a positive signal at their base and would isolate the battery from the main circuit, when the dynamo stops spinning a low voltage is present at the base and the batteries come on line.
The other side of the circuit would control if the charge from the dynamo goes to the led's or battery for charging, as before a high and low voltage signal would control the base of the other two transistors. I was wondering if it would work and if I need a reference voltage for the transistors to work?
Why not just arrange it so the battery lights the LEDs and the dynamo charges the battery? You would just need a diode to ensure that the battery does not discharge through the dynamo and probably a linear regulator to ensure that the dynamo does not overcharge the battery.
It all seems a bit over-complicated and could easily be achieved using simple OR diodes as follows :
Throw away the transistor idea.
Battery -ve connects to gen -ve and LED cathodes
Generator +ve connects to battery +ve via a blocking diode (D1)
Generator +ve connects to LED switch via diode (D2)
Battery +ve connects to LED switch via diode (D3)
Whichever is the greater of generator versus battery feeds the LED switch and hence the LEDs
edit : Darn it beaten to it whilst I was typing up my suggestion
Check your bicycle "dynamo", all the ones I have seen are actually alternators, i.e. they produce AC not DC. If it is an alternator, then the simplest solution is to buy or make a bridge rectifier (using Schottky diodes for low voltage drop) and use this to charge a NiMh rechargeable battery, which powers the lights. To avoid overcharging the battery if you cycle with the lights off, use a double pole switch so that you disconnect the dynamo at the same time as disconnecting the lights.
If you don't want to use a rechargeable battery, then have the dynamo drive the lights through the bridge rectifier, and the battery drive the lights through a single Schottky diode.