Brake Lamp Flasher for MotorcycleIn my continuing quest for greater visibility on my motorcycle, I decided to make my own brake light flasher. Even though it would be a trivial programming project to use an Arduino Teensy or similar to do this, I decided to do it the "old fashioned" way, using a 555 timer. The 555 is a clever chip; not only will it supply the oscillator for the flashing effect, it has a reset pin that can be used to force the output to a known state (low) when (other circuitry tells it that) it's time to stop flashing. Thus the brake light will be steady "on" after a few flashes every time the brake is applied. The 555 is happy to run directly off the nominal 12 volt vehicle electrical system, so no voltage regulator is needed. The 555 is almost immune to electrical system noise, so no worries about your Arduino code going off into the weeds if there's a spike from the electrical system. The first photo shows three boards from OSH Park; one bare (as it comes from OSH Park) and one stuffed. Note: Click on the pictures to embiggen. The boards, bare and assembled. I designed the circuit on the breadboard, and then documented it using fritzing. Circuit Description:Note: this circuit is for a DC, negative ground motorcycle. This shouldn't be a problem, most of you have probably never seen a positive ground motorcycle, but in general, beware British motorcycles made before about 1980, and also some (again, old) motorcycles and scooters had AC lighting systems, and they won't work with this either. The 555 is configured as a "nearly" square wave oscillator, with R1, R2, and C2 controlling the frequency. I chose the frequency by guess; feel free to change R1 or C2 to get whatever you think is the right frequency. The reason that the output isn't a perfect square wave is that the charge current for C2 is through R1 and R2, but the discharge current is only through R1, so C2 discharges faster than it charges. The closest to 50% duty cycle will be achieved when R2 is small compared to R1, but if R2 is too small, then R2 will pull too much current from the power rail when U1 pin 7 is discharging C2. 1.0KΩ vs 100KΩ says that the duty cycle error only amounts to 1 percent, so duty cycle is close enough to 50% for this application. Pin 5 of the 555 allows modulating the 555, and we don't need that, so we just hang a 10nF cap on pin 5 as recommended by the data sheet. The output of the 555 isn't robust enough to drive an incandescent brake light, so we use a P-MOSFET (Q3) to do the switching. The chosen MOSFET has an RDSon of 0.02 Ω or 20 milliohms, so it doesn't get warm powering a brake light filament. It also has a max drain current (Id) of 52 Amps, so it'll handle pretty much any brake light you care to use on a motorcycle. (Power = I² R, so for the MOSFET is 4 * 0.02 = .08 watt, which is close enough to 0 as makes no difference.) You can also use other MOSFETS that have low RDSon as long as they have a voltage rating above 20 volts. An RDSon of .2Ω or less will be sufficient for this application; just compute the power dissipation if you have any question. Power dissipation in the MOSFET will be I²R. An 1157 lamp high filament draws about 2A, so power in the .2Ω MOSFET will be 2² * .2 = 4 * .2 = .8W, so it will get a little bit warm. R6 is there to prevent parasitic oscillations by Q2. The rest of the circuitry is there to cause blinking to cease after a few blinks. R5 and C3 establish a time delay as C3 charges; with C3 of 50uF, I get a few blinks and then the lamp goes steady on. Diode D2 is there to discharge C3 when ever power is removed (whenever the brake light is turned off). D1, a 10 volt zener, sets the threshold where C3's voltage turns on Q1 to about 10.7 volts. Feel free to change R5 to get longer or shorter blink time. I find that values of 10K to 20K are appropriate. (If you make R5 too big, the leakage of C3 may prevent it from ever charging up, but that'll happen at a large value for R5, like 1 Meg Ω. R4 keeps the reset pin of U1 high until the R5/C3 timer turns on Q1, at which time Q1 pulls U1 reset low. This forces U1 output pin 3 low, which turns the brake lamp on steady. You can use any small signal BJTs for Q1; I just used what I had in my junkbox. As long as the BVceo is greater than 16 volts (max volts expected from automotive charging system) any decent NPN (Q1) transistor should be fine. The choice for Q2, an IRF4905, is more critical; it needs to be carry current of 2 amps per brake light filament, and it needs to have a very low Rds-on so it doesn't get hot. These are cheap, however, and readily available (I bought mine on eBay). Be careful substituting another MOSFET unless you find one with a similar RDSon value. As discussed, a 0.2Ω MOSFET is sufficient for one brake filament (or an LED brake lamp), but I'd try for a lower RDSon if you have dual brake lights (as some motorcycles do). Similarly, D2 can be any small signal diode. D1 can be any zener around 10v and less than 11v; the voltage chosen isn't critical and the power is negligable. Make your ownFritzing design file is here. Fritzing board files in a zip file are here. Feel free to fool around with the parts values. R2/R1/C2 controls the blink rate; just keep R1 small with respect to R2, and I'd keep R1 above 1KΩ. R5/C3 controls the number of blinks you get before the brake goes steady on. InstallationAgain, remember, this circuit is only for DC negative ground motorcycles. Unplug (or cut) the wire that feeds the your brake light. Connect the "+12v" terminal on the modulator to the wire that fed the brake light. Connect the "Gnd" terminal to motorcycle ground. Finally, connect the "Load" terminal to the wire that feeds the brake filament. FAQQ My modulator blinks far too fast when the engine is running. Why? A Your electrical system is noisy, and the noise is "confusing" the 555 timer chip. I had this problem, and solved it by cutting the +12v trace from the input pad to all of the circuitry except the MOSFET. I bridged the cut with a 100Ω resistor (1/4 watt sufficient, I used 1/2 watt). I then soldered an 8μF 20v capacitor across pins 1 and 8 of the 555 timer, with the positive side of the capacitor on pin 8 of the 555. This will filter the +12v supply to the 555 timer and solve the noise problem. In answer to the question "how did I choose 100Ω and 8μF": I guessed. DisclaimerRealize that if you undertake to build and install this, you do so entirely at your own risk. If your brake light fails to work, it could be extremely dangerous. Track Back
William Dudley
|
Views |