• Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Astable then steady light - transistor question

moejoe

New Member
Hello everyone! I'm new to electronics, I've have only had a circuits 1 course (I'm ME so that's all I'll get), and I want to see if this would work.

I'm trying to make an in-line board between my brake light switch and my brake light on my bike so that when the brake is pressed the light will flash a couple times, then stay on until released. I plan on using a LM3914 driver that switches power to pins based on a signal voltage and a capacitor between the 12v input from the brake switch to the signal pin. I know this would work but I want the rate between flashes to be constant so the capacitor needs to be charged with a constant current source. After a bit of searching found a basic way of using a transistor (2n2222) to create a constant current source but using it this way is different than the example circuit I saw. Am I on the right track?
circuit.png
 
Last edited:

AnalogKid

Well-Known Member
Most Helpful Member
Your circuit will not work as you intend. Also, if the brake light is a single bulb (or LED assembly), and you want it to blink two or three times then stay on steadily until you release the switch, I don't think a bar graph display driver is the way to go.

Lotsa people will say to use a microcontroller (uC), but I disagree.

I think a counter circuit will give you what you want. A CD4060 oscillator/divider can be configured to deliver three pulses (constant width and spacing, such as 1/4 second on and 1/4 second off) then a steady on signal. What are the voltage and current requirements for the light?

ak
 

moejoe

New Member
I was going to parallel every-other output of the LM3914 in dot mode to switch a relay that provides full power to the light. As the voltage rises 0-12v every-other output would switch a NO relay and at the last output the relay would remain closed.

I'll look at the data sheet for a CD4060
 

gophert

Well-Known Member
Most Helpful Member
Hello everyone! I'm new to electronics, I've have only had a circuits 1 course (I'm ME so that's all I'll get), and I want to see if this would work.

I'm trying to make an in-line board between my brake light switch and my brake light on my bike so that when the brake is pressed the light will flash a couple times, then stay on until released. I plan on using a LM3914 driver that switches power to pins based on a signal voltage and a capacitor between the 12v input from the brake switch to the signal pin. I know this would work but I want the rate between flashes to be constant so the capacitor needs to be charged with a constant current source. After a bit of searching found a basic way of using a transistor (2n2222) to create a constant current source but using it this way is different than the example circuit I saw. Am I on the right track?
View attachment 121188
I agree with you that flashing lights attract more attention that the solid brake light. However, any off state on a brake light makes a driver think you are just tapping your brakes until the constant brake light comes on. In the tailgating chain of cars flowing down the highways around major cities these days, I would hate to give the impression I am only tapping my brakes for a 1/3rd of a second before the driver behind me realizes I am really braking HARD.

You may be better off adding supplemental brake lights - your main brake works as normal but additional LEDs activate with a flash to attract attention - but read the next paragraph first.

Also, please check local, state and or federal laws. In my state, any flashing lights except turn signals are a violation. Headlight modulators are allowed but only on motorcycles and only in daytime - modulation means brightness is varied but the light never turns off. (Only emergency vehicles get to flash lights here).

Good luck, have fun, and stay safe. .
 
Last edited:

audioguru

Well-Known Member
Most Helpful Member
Your transistor in the first post does not charge the capacitor because it is not a current "source". Instead it is a current "sink".
The capacitor does not pass DC anyway so if you fed the capacitor from a current source then the output of the capacitor into the SIG pin would produce only one pulse. Constant DC current into a grounded capacitor would produce the rising voltage you want.
 

crutschow

Well-Known Member
Most Helpful Member
Here's the LTspice simulation of an LM3914 circuit similar to what you proposed.
The capacitor is connected to the 12V so a grounded NPN constant-current transistor could be used to charge the capacitor from 12V towards ground.
This means the pulse sequence starts from LED 10 and goes down.

The discharge (and thus the pulse) rate can be changed by varying R4.

The LED current is controlled by the values of R13 and R14 (higher values gives a lower current).
The values should be changed in the same proportion if you want to change the LED current (100mA maximum LED current).

Edit: Opps, I see an error, back to the drawing board.
Edit 2: Okay, corrected.
Edit 3: Double opps. Corrected D2 capacitor discharge diode location.

1571554421053.png
 
Last edited:

moejoe

New Member
Wow, just got on after last night. Thank you all for the help, and thank you crustchow for that schematic!

So I did a simple calc to adjust R4 for the desired rate, the 0.6 is what I was the told the voltage drop would be through the transistor. It seems to line up to your graph. But hey, I thought my first circuit would work.

Pic.png

gophert - I plan on using it for a supplemental brake light, so the larger main light will function normally. From my understanding there are very few restrictions related to lighting where I live, basically don't try to emulate police/emergency lighting.
 

AnalogKid

Well-Known Member
Most Helpful Member
You could do a similar thing with a CD4017 with the 5th output going to clock inhibit to make it constant.
Only if you OR together multiple outputs. Plus, you would need a second chip for a clock source.

ak
 

Gamma Ray

New Member
There is a ready made unit for LED lights on eBay in the UK,
I've used one to provide extra reversing lights (for those idiots who ignore hazard warning lights and stop right behind me!).
 

Pommie

Well-Known Member
Most Helpful Member
Only if you OR together multiple outputs. Plus, you would need a second chip for a clock source.

ak
I was thinking diodes to the switching transistor/relay or (probably) both.

Mike.
Edit, and a 4093 oscillator.
 

AnalogKid

Well-Known Member
Most Helpful Member
Here is a first pass at a circuit based on the CD4060. R2-C2 reset the counter each time power is applied. R1-C1 set the oscillator frequency, which is divided by 256 for a calculated output pulse width of 0.28 seconds. The output flashes twice than remains steady on until power is removed. Adjust R1 to change the pulse width.

There probably is no need for a power MOSFET as big as the one in the schematic; I just grabbed one in my library.

Rather than drive a relay that drives the light, it is better to have a power MOSFET drive the light directly. Is the "other end" of the light (the end not driven by the switch) connected to Vbat or GND? Depending on the answer, the output stage might change.

Update - corrected schematic with correct times, all 5% resistors, and correct power-on-reset circuit.

ak

Brake-Flash-1-c.gif
 
Last edited:

Latest threads

EE World Online Articles

Loading

 
Top