A friend of mine wanted to get into building electronics with a simple project. In particular they wanted to make a flashing LED for their bicycle that would be powered when they pedal. I liked the simplicity of the circuit I made, so I thought I should share it with element14.
The requirements were as follows:
1. Flashing LED
2. Must be powered only when pedaling.
3. Simplest circuit for beginners.
An excerpt from my reply:
"You can get LED flashing lights for bikes under $5. However, if you want to make one, that is easy. Get a bicycle dynamo (bike generator). This outputs "X" voltage at its peak. I suggest ebay for a cheap one.
Reading the data sheet of the LED you want to use you will find values called Voltage Drop and Current Rating.
You will use ohms law V = I * R (voltage = current * resistance) to find a proper resistor for the LED.
It simplifies to V/I = R or R = V/I
Take the voltage drop and subtract that from the peak supply. (lets say the dynamo outputs 6V and the LED voltage drop is 2.1V)
You would take 6V - 2.1V = 3.9V
The current rating is the maximum current you can safely pass through the LED without destroying it.
Let say the data sheet says 20mA. (or 0.020 A)
R = 3.9V / 0.020A = 195 ohms (Closest typical value of resistor, I suggest 220 ohms)"
A bicycle dynamo outputs AC power, 6V 3W is a typical output of one.
This changes a few things. 6V AC is the RMS value. The peak of the AC sine wave is 6*sqrt(2) = 8.5V
Then, when rectified, the voltage drops across 2 of the diodes at a time. At about 0.7 volt drop each, you get (8.5 - (2*0.7) = 7.1.)
So, let's say you will see a round 7V DC source at that time. So the above LED resistor calculation changes.
7V - 2.1V = 4.9V
R = 4.9V/0.020A = 245ohms (I recommend a 270 ohm resistor)
AC is rectified through a full wave bridge. (see drawing)
"Now for the part that makes the LED flash. I will avoid ICs and go with a simple RC oscillator circuit to turn a transistor on an off.
The 1K ohm resistor and the 330uF cap causes the transistor 2n2222 to avalanche on the emitter-base junction. (I will explain more about this another time)
What is does is causes the transistor to turn on and off."
"Simplest bike generator LED flashing circuit, I can come up with, that will only flash when you are moving. If the dynamo is on the bikes wheel. Place the dynamo along the chain or pedal sprocket to get it to flash only when you are pedaling."
Dynamo (ebay)
1Kohm resistor1Kohm resistor
270ohm resistor270ohm resistor
330uF capacitor330uF capacitor
(4) 1N4007 Diodes1N4007 Diodes
2N2222A transistor2N2222A transistor
2.1 forward drop Power LED2.1 forward drop Power LED (I chose a red LED. My friend wanted this for a tail-light.)
Cabe