Bike light plans
October 22, 2010
Inspired by this slashdot article, I thought I should go ahead and detail what I am working on, and what I plan to work on next.
Right now, I am working on a two-board lighting system. One port takes two AC in puts from a bicycle hub dynamo, and provides controlled current to run one or more high-power LEDs (patent madness — if I said “several”, that would be limiting and exclude the “one” case). It also makes available a 5V supply, a ground, and a high-voltage DC supply that varies based on bike speed and lighting load.
The second board receives ground, high voltage, the two AC lines, and 5 volts, for running a microprocessor, and also has two attachments (if I said “wires”, that would be limiting) for a battery pack. The second board monitors the high voltage; if it falls below a threshold, it activates (electrically connects) the battery pack to the high voltage lines.
Optionally, it also monitors the wheel rotation rate by observing the two AC lines. Based on wheel rotation, it may (don’t be limiting…)
- during periods of no wheel rotation, run a timer, and if enough time elapses, disconnect the battery;
- detect a wheel rotation rate exceeding a threshold, and disconnect the battery;
- detect a wheel rotation rate exceeding a threshold, and start a timer, and if enough time elapses, disconnect the battery (this restores some charge to a rechargeable battery).
After designing the second battery-switch board and after discussing some of this on the Xtracycle mailing list, I realized several things. One was that the LED current supply could and should be separated from voltage rectification and doubling; rectification and doubling should reside with the battery switch. Second, was that the voltage doubler could be disabled when the voltage was high enough (too-high voltage is a problem sometimes), and when this was the case, that more DC current would be available, and this change in state could be signalled to the LED current supply. The on-board microprocessor controlling the battery switch, could also control this. Third, was that designed this way, it would be possible to also build a 5V supply module, which could be connected or switched on when lights were not needed, and used to charge or operate devices through a USB cable. On long bike trips, this would allow continued use of consumer electronics such as music players, some cameras, and cell phones.
And, should all these great ideas work, it should then be possible to build a unified supply board (running from the same rectifier, doubler, and battery switch board) combining both the USB and LED supplies, apportioning power appropriately between them, optionally using the USB power protocols to determine the load on that supply, and adjusting the lighting appropriately to stay within the power capacity of the dynamo hub.
It is, of course, intuitively obvious to One Skilled in the Art how to accomplish this; a simple microprocessor could act as a USB host, and power calculations are relatively easy. A simpler device might not even do the calculations, and would instead simply reply on a current monitor (and optionally, voltage doubler state information) to vary the light output as necessary to not exceed the supply current limits.
One simplifying trick that I realized was that the best way to limit voltage, is simply to dump power into the batteries if the voltage exceeds a safety threshold; modern NiMH batteries can tolerate very high charging rates and in the worst case, are cheap and easily replaced if they are accidentally ruined.