DIY Modulated Brake Light -- So close!

Thread Starter

Hunter Hach

Joined Jul 17, 2018
7
Hello folks!

I am in the process of making my own flashing brake light for my motorcycle.

I have a 5 volt regulator (L7805) that takes the 12v battery down for use with a 555 timer circuit. The timer circuit drives a 2N4401 transistor (NPN) that then drives a relay. For a relay I am using the "beefcake" relay kit from Sparkfun combined with two 1N4001 flyback diodes. I wasn't sure what I should connect them to so I have two diodes in there.

This in turn powers a 12V led strip which should be pulling 2.4 amps. The lights stay on, then when I hit the brake pedal it closes a switch which powers up the 555 circuit and makes them flash at around 4hz.

When I have the LED strip disconnected it works perfectly. I can hear the distinctive relay click click click and the light on the relay flashes. Upon adding a very short section of LED strip it also works flawlessly but when I connect the entire strip it flashes once or twice then just buzzes. I'm not sure what the issue is!

One other interesting thing is that when I measure the voltage going into the 5V regulator with a normal multimeter it works much better and flashes 90% of the time. What the heck!

I have the schematic below, hopefully it's readable. I'm pretty new to the world of electronics but this is stumping me! Any help would be appreciated!


Thank you!

Hunter

schematic.jpg
 

crutschow

Joined Mar 14, 2008
34,280
What the heck, indeed.
Did you look at the data sheet for the regulator?
It likely needs a capacitor on the input and output for stabilization.
It may be oscillating, giving the odd results you see.

Incidentally, a 555 will operate just fine from 12V.
No need for the regulator.
 

Thread Starter

Hunter Hach

Joined Jul 17, 2018
7
Thanks for the help!

I'll try adding the two capacitors around the regulator and see how it works!

Would 1uF be suitable?
 

danadak

Joined Mar 10, 2018
4,057
To make sure the transistor fully saturates you want to force the beta
on the transistor to 10 or less. That means Ib >= Ic / 10. So set
the R into base

R = (Vout - Vbe) / (Ic / 10). Vout is voltage applied to Rbase input, Vbe ~ .7V

Regards, Dana.
 

Thread Starter

Hunter Hach

Joined Jul 17, 2018
7
Thank you Dave! I did not know that!

Dana - my apologies for being new to this.

You're saying that I want the current into the base to be 1/10th the current through the collector / emitter?

The relay uses 150mA (from the data sheet.)
In this case then I believe my base current should be 15mA or greater.
Vout would be 5 volts as set by the regulator (?) and with Vbe of 0.7V I would get a resistor value of <= 287 ohms between the 555 timer and the transistor?

I'm a bit unclear as to where the 0.7V for Vbe came from, though! Is Vbe the voltage drop across the resistor?

Best,

Hunter
 

dendad

Joined Feb 20, 2016
4,451
'm a bit unclear as to where the 0.7V for Vbe came from, though! Is Vbe the voltage drop across the resistor?
The Vbe is the voltage dropped across the base/emitter junction. It is like a series diode and a diode has about 0.7V (for Silicon) voltage drop.
As mentioned above, why not run the 555 of 12V anyway?
And it is always a good idea to add bypass caps across the power pins of each IC. And the reg will need one on the input and another on the output.
Your 1uF will be ok, I "standardize" on 10uF tantalum caps. And a 100nF across the 555 power pins.
 

Thread Starter

Hunter Hach

Joined Jul 17, 2018
7
Den,

I'm running the 555 off 5 because my relay needs to be run off 4-6v!

Thanks for the information about Vb!!

I put a 10uF on each side of my 5v regulator and it works flawlessly!!

Thank you for all the help everyone. Have a nice day!

Hunter
 

dendad

Joined Feb 20, 2016
4,451
It is marvelous what a difference clean power supplies can make :)
This forum is a very good resource.
Well done. We hope to see you back here again.
 
Hey! because of the switching rate, physical (cadmium plated?) contacts, moving parts, and low voltage, using a powerful relay like this is not really ideal. It would be ideally used to use a small low power circuit to control line voltage devices at very low frequencies (ideally switching maybe a few times a day if you want it to last a while). Have you considered using just a nice plump to-220 mosfet and a heat sink? As I understand it you are using a length of LED tape that draws 2.4A continuously when it is in the on state. What duty cycle does it have? Is it sufficient to be on 30% of the time as long as you get your 4 flashes per second? perhaps even less? 2.4A at 12V is almost 30 watts when on, so if you have a 30% duty cycle, you're using 8.64 watts overall, which could power a rather decent flashlight continuously.
 

danadak

Joined Mar 10, 2018
4,057
You're saying that I want the current into the base to be 1/10th the current through the collector / emitter?

The relay uses 150mA (from the data sheet.)
In this case then I believe my base current should be 15mA or greater.
Vout would be 5 volts as set by the regulator (?) and with Vbe of 0.7V I would get a resistor value of <= 287 ohms between the 555 timer and the transistor?
Yes, the base I wants to be ~ 15 mA to force the transistor into saturation, hard on.
That way it functions as a switch, has low drop across it, hence the power it has to
dissipate is low. Ptrans ~= Ic x Vcesat =~ .15A x Vcesat =~ .15A x ~.3 V ~= 45 mW =
no heat sink needed. The x 10 factor, Ib = Ic / 10, is transistor dependent, just an
old rule of thimb.

A transistor in saturation - https://electronics.stackexchange.com/questions/13063/how-do-i-saturate-an-npn-transistor

Vout is the output voltage of timer when it is high sourcing 15 mA.

A great basic reference on transistors - https://www.americanradiohistory.com/Archive-Catalogs/GE/GE-Transistor-Manual-No.-5---1960.CV01.pdf

Regards, Dana.
 

Thread Starter

Hunter Hach

Joined Jul 17, 2018
7
Kevin, that would be a good idea!

By 30% duty cycle I assume that means the light is on for 30% of the time then the off flashes are 70% -- not some sort of 30-70 PWM while the light is on?

Dana, thank you for that good looking resource! I hope to tackle that soon! :)
 

KMoffett

Joined Dec 19, 2007
2,918
To go with a different circuit, I used this in the third brake light in 3 different vehicles over 10 years.

Ken


BrakeLight01.gif

Note: switch Q2 top to bottom. Source to +12V and Drain to lamp
 
Last edited:

AnalogKid

Joined Aug 1, 2013
10,986
KM - is Q2 reversed? You show a p-channel FET with the source as the output. For a source-follower you want an n-channel FET, or reverse the p-channel part for a drain output acting as a saturated switch.

ak
 
Ooo Mr Fancy using the correct symbols! I usually just guess =). Anyone have a good resource describing the functions of transistors and mosfets and such and their relations to their symbols? I understand obvious things like the ones with an added bypass diode but...
 
Top