Automatic Bicycle Full Beam Switcher
Purpose
If you own a modern hub generator like the SON and you would like to drive a second headlight from it, this circuit is for you. The SON is able to provide the normal 500 mA/6 V for a common 2.4 W bulb and the rear light at very low speeds like 10 km/h. If you go faster than 20 km/h, it is even able to provide 12 V with the same current on a normal 28" wheel. This circuit automatically handles the switching of a second headlight depending on the speed of the bike.
Function
The presented circuit consists of a bistable relay and an at90s2323 microcontroller that switches the second headlight depending on the speed of the bike. Manual override is possible. The microcontroller measures the current frequency of the power supply, calculates the driving speed and compares it to two saved values to realize a two-level controller (default values 23 and 27 km/h). For headlamps that use gold caps for parking light, a small timeout on boot is integrated to compensate for the voltage drop during the charging.
The relay switches the second lamp between the ground wire (GROUND) from the generator and the ground wire that goes to the first headlight and the rear light (NEW_GROUND). Take care to connect the rear light correctly, otherwise it might get exposed to 12 V. To simulate a second rear light (0.6 W), resistors R2/R9/R10 are used. Use the jumpers SV2/SV7 to modify the value, leave it off to get a brighter full beam or do something different like illuminate your bike computer display.
The circuit is designed to fit into a small 37x53x21 mm box.
Usage
Press the button once
- during the initial timeout to go directly to automatic mode,
- during automatic mode to switch the lamp on or off manually,
- during manual mode to switch the lamp on or off manually.
Press the button twice
- during automatic mode to switch the lamp to manual mode while keeping the lamp on or off,
- during manual mode to switch the lamp to automatic mode.
Do a short button press followed by a long button press (>1s) to save new limits to the EEPROM memory. If the full beam is enabled while the button is pressed, this modifies the upper, otherwise the lower limit.
Circuit
Experiences
The circuit works perfectly. The changing of the speed limits while driving is not well tested and has still some bugs. It may work with other hub generators than the SON, maybe it will be necessary to modify the source code to correct the number of poles used for speed calculation.Download
Eagle files and source code for the full beam switcher. Released under GPL.
References
SON Hompage. Schmidts Original Nabendynamo.
Olaf Schultz bike page. Very diverse bike stuff.