Continue to Site

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.

  • 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.

LED brake light/blinker ideas

Status
Not open for further replies.
ljcox said:
Here is an electronic option that occured to me last night.

Neat. That's what I almost arrived at last night but I didn't quite make it. Thanks for the explanation!

When I simmed this in LTSpice, it occurred to me that the resistor values are fairly important if you don't want the brakes dimming the turn signals or vise versa. For me (in the sim) 47k for R3 and 56k for R4 worked OK.

It put me in mind of the various devices I've seen which dim some indicators when others turn on.

Also the sim didn't require an incandescent bulb for the flasher--I'll have to try this in real life, but in the interim, is this something which could be explained by sim/real world differences?


Thanks again,

Torben
 
ljcox said:
Here is an electronic option that occured to me last night.

It assumes that the bike has a negative gnd. If not, then NPN transistors would be required.

It also needs incadescent flasher lamps at the front to provide a path for the transistor base currents.

When the brake is applied, Q2 turns on via R2 & the left front flasher and Q4 turns on via R4 & the Right front flasher. Thus all three lamps glow

If say the left flasher is switched on while the brakes are on, Q2 is turned off while the flashing voltage is on, thus the left lamp flashes.

If say the left flasher is selected without the brakes, Q1 is turned on via R1 & the Centre lamp when the flasher voltage is on.


This design looks perfect for what I need. I am going to give it a try.
 
Torben said:
Neat. That's what I almost arrived at last night but I didn't quite make it. Thanks for the explanation!

When I simmed this in LTSpice, it occurred to me that the resistor values are fairly important if you don't want the brakes dimming the turn signals or vise versa. For me (in the sim) 47k for R3 and 56k for R4 worked OK.

It put me in mind of the various devices I've seen which dim some indicators when others turn on.

Also the sim didn't require an incandescent bulb for the flasher--I'll have to try this in real life, but in the interim, is this something which could be explained by sim/real world differences?

Thanks again,

Torben
Thanks Torben,
However, the circuit is only an outline.

The alternator in cars (and I asume bikes have them also) produce voltage spikes. Some years ago, an expert in auto electrics stated in this forum that the spikes can be as high as 150 Volt. So they will destroy unprotected transistors, ICs, etc.

Therefore, my circuit needs transistors that can with stand a Vce of at least 150 Volt and the base - emitter junctions would need diodes across them (cathode to E, anode to B).

I did not specify the resistors as I don't know what current the lamps take.

I need to know the cold resistance of the lamps as the transistors must be in saturation or close to it even when the lamp filaments are cold.

I would have thought that all of the resistors would be of the same value.

I suggested that the lamps need to be incandescent since the base currents go through them. I don't think there will be enough base current if they are LEDs.

What transistor did you use in the simulation?

Also, I'm suprised at the reisitor values you used in the sim. I would have thought that the lamp currents would be in the 1 ~ 10 Amp region and therefore you would need much lower values.

Darlington transistors would be a good choice except that they have a saturation voltage of about 1 Volt (from memory) so that would reduce the brightness of the lamps a little.
 
Last edited:
buzzardman said:
This design looks perfect for what I need. I am going to give it a try.
See my rersponse to Torben above. I need to know whether the lamps are incandescent or LED.

If the former, I need to know the resistance of the filament when it is cold.

If the latter, we may need to connect a resistor in parallel with the lamps to provide a path for the base current.
 
ljcox said:
Thanks Torben,
However, the circuit is only an outline.

The alternator in cars (and I asume bikes have them also) produce voltage spikes. Some years ago, an expert in auto electrics stated in this forum that the spikes can be as high as 150 Volt. So they will destroy unprotected transistors, ICs, etc.

Therefore, my circuit needs transistors that can with stand a Vce of at least 150 Volt and the base - emitter junctions would need diodes across them (cathode to E, anode to B).

OK, I've heard of that but haven't done anything vehicle-related yet.

I did not specify the resistors as I don't know what current the lamps take.

I need to know the cold resistance of the lamps as the transistors must be in saturation or close to it even when the lamp filaments are cold.

I would have thought that all of the resistors would be of the same value.

I suggested that the lamps need to be incadescent since the base currents go through them. I don't think there will be enough base current if they are LEDs.

What transistor did you use in the simulation?

I was just using either the generic LTSpice PNP model or the 3906 (tried with both with the same results). However, all the indicators in my sim were generic LEDs with 220 ohm resistors in series, which probably explains the base resistor issues. I'll try later with lamps, and if I get a chance I'll breadboard it and see what I can come up with.

I'll also see if I can't get some time to sit down with my books and a pencil and give myself a good lesson on what's really going on with all this.

I mostly was interested in the switching topology to start with--but of course one thing always leads to more things to learn. :)


Torben
 
Torben said:
I was just using either the generic LTSpice PNP model or the 3906 (tried with both with the same results). However, all the indicators in my sim were generic LEDs with 220 ohm resistors in series, which probably explains the base resistor issues. I'll try later with lamps, and if I get a chance I'll breadboard it and see what I can come up with.

I'll also see if I can't get some time to sit down with my books and a pencil and give myself a good lesson on what's really going on with all this.

I mostly was interested in the switching topology to start with--but of course one thing always leads to more things to learn. :)

Torben
Torben,
I'm not sure if you saw the edits that I did to my post since you came on line while I was editing and, according to your profile, you were reading this thread.

This idea was inspired by the relay one that someone posted - I re-drew it and added the centre lamp.

I had previously tried to do an electronic one and failed. (I knew I could do it with digital logic or a PIC, but that seemed like an over kill and it would have to be protected from the voltage spikes. Also the heavy currents that I assume need to be switched are an additional complication)

But the relay one (both my original and the one posted by our friend) employ exclusive OR gates.

So if you look at my electronic one, you will see that Q1 & Q2 are configured as EX OR.

The left lamp is on if the left flasher line is high or if the brake line is high, but it is off if they are both high.

The same, of course, applies to Q3 & Q4.

I'll be interested to hear if you actually build one. I don't have the time at the moment.
 
ljcox said:
Torben,
I'm not sure if you saw the edits that I did to my post since you came on line while I was editing and, according to your profile, you were reading this thread.

Yes I did see the edits, and yes I was reading the thread, but I don't think I remembered to make that clear in my reply. Oops.

I had actually understood the logic of the relay layout and was trying to recreate it with transistors but they do require more thinking about things like powering them etc, which you noted in an earlier thread (plus I was dog tired), so your example and the notes on it since have helped a great deal in understanding why it works.

I'll be interested to hear if you actually build one. I don't have the time at the moment.

I may have time tonight; depends on how long my brain holds out. But if/when I do I'll be sure to post the results.

I really appreciate all the explanations.


Torben
 
Torben,
I think P channnel MOSFETs would be better than PNP transistors since they don't need a gate current.

But they are expensive.

It should be possible to invent one that uses N channel MOSFETs, but I expect you would have to remove the connection from the lamps to gnd so the N channels can switch that side of the lamps. This may not be easy to do physically on the bike. We would need an input from the Op.

The Ex OR could be done with transistors and diodes.
 
ljcox said:
I would have thought that all of the resistors would be of the same value.

I suggested that the lamps need to be incandescent since the base currents go through them. I don't think there will be enough base current if they are LEDs.

Hi again Len,

Just a quick update: I found the reason for the discrepancy. After doing the math on paper I couldn't figure out why the base resistors would need to be different. So I stared at the sim a bit more and voila! I had my brake line at 6 volts and my left flasher line at 5V. This allowed things to work, but only with the LEDs and only with the high base resistors.

Correcting that, lowering the base resistors to 470 ohms each, and replacing the LEDs and LED series resistors with incandescent lamp models made things work much better. Now it won't work with the LEDs, as you anticipated.

I didn't have any 6V motorcycle lamps around so I grabbed a 12V truck taillight out of the drawer and stuck it on the bench supply. At 12V it would pull at most ~0.5A so I called it 6W in the sim. I measured its resistance when cold and it came out to 2.1 ohms. I plugged these values into the sim and changed the supply voltages to 12V and lo and behold it works fine.

Of course, collector current on the 3906 transistors in the sim was way over the max from the datasheet. I think something higher would be needed for this application.


Torben


Edit: Ha! Once again you posted while I was writing. I won't reply to the new post immediately though; I'll read and try to think about it first. Cheers!
 
Last edited:
Torben,
That's interesting.

For the LED case, we could connect resistors in parallel with them in order to provide a path for the base currents.

And in the LED case, there won't be the cold current issue so the base resistors could be higher.

For example, say the resistors had to be 2k. Then we could connect 470 in parallel with the LEDs and the R1 ~ R4 resistors could be 1k5.
 
ljcox said:
Torben,
That's interesting.

For the LED case, we could connect resistors in parallel with them in order to provide a path for the base currents.

And in the LED case, there won't be the cold current issue so the base resistors could be higher.

For example, say the resistors had to be 2k. Then we could connect 470 in parallel with the LEDs and the R1 ~ R4 resistors could be 1k5.

Oddly enough it works with LEDs now without the proposed parallel resistors, which means either A) I screwed up earlier, or B) I'm screwing up now.

Attached is an image of what I have for the LEDs on this right now. I'm only including one side here. In this version I have an incandescent lamp on the front flasher and an LED on the rear. It works just the same without the front flasher present, or with an LED in front instead of the lamp.

The sim seems to be doing exactly what I would want, and from what I (think I) know, what I would expect.

I'm confused about why the transistors wouldn't be getting current. Aren't the base resistors doing that?

Anyway, the brake (red line) is pressed 3 times slowly and the left flasher is on until 2/3 of the way through the simulation. Time is greatly compressed here. The rear flasher inverts when the brake changes state but flashes just fine.


Torben


[Edit: The lamp wattage and supply voltages in the image don't match my above explanation but I just changed them back to 12V and 6W and got my expected results. The lamp current line now evens out at 0.5A.]
 

Attachments

  • turn_signal_brake_3way_ljcox_leds.png
    turn_signal_brake_3way_ljcox_leds.png
    23.5 KB · Views: 163
Last edited:
Torben,
I was a bit confused when I wrote the previous post. I was confusing the transistor on and off criteria.

If all the lamps are LEDs, then there may not be a problem.

If you look at the voltage on the brake line, you will see that it rises to about the LED voltage (if it's a red LED, it will be probably about 1.7 Volt) when Q1 is on.

So the base current is going through the brake LED.

There won't be a problem provided that the current is low enough so that LED does not glow AND the transistor has enough base current to saturate it.

But I'm not sure if both of these criteria can be met.

It is usual to make the base current about one tenth of the collector current in order to ensure that the transistor is saturated.

Can we meet this criterion and not cause the LED to glow?

EDIT
There will be more than one LED in the lamp. So it will also depend upon how many LEDs there are in series. With a 6 Volt system, you could probably have 3 LEDs in series.

If there are 3 in series, this will significantly reduce the base current.

So a resistor in parallel may be necessary.
 
Last edited:
Hi Len,

OK, I built the thing. I didn't really get what you were on about above until I did--not your fault; I just needed to see it in action. The sim is nice but doesn't really help explain it. Getting the build wrong a few times, thinking about it, etc., helped.

I couldn't get the base current to shut off the flasher LED when the brake and flasher were both HIGH until I added a resistor to ground from the Left brake line input. If I'm doing this right, that means this resistor is dissipating 120nA when the left flasher is on. Seems acceptable.

I haven't tried driving a front flasher from it yet though, and this circuit on the board is just a very simple exploration: 2 PNPs, 5 resistors, and some wire. :)

Anyway, thanks very much for the patient explanation. I think I'm getting what's going on in the circuit now. Perhaps I'll build one for a high brake/flasher on my truck canopy. Someday. I won't be using 3906s though.


Torben

[Edit: nb: This was an all-LED build, one LED per side. Just to check the basic idea before proceeding.]

[Edit 2: I added 2 more LEDs per side. These are all normal 20mA garden-variety red LEDs. It works fine as long as the voltage doesn't sag. At all. ;) ]
 
Last edited:
Torben said:
Hi Len,

OK, I built the thing. I didn't really get what you were on about above until I did--not your fault; I just needed to see it in action. The sim is nice but doesn't really help explain it. Getting the build wrong a few times, thinking about it, etc., helped.

I couldn't get the base current to shut off the flasher LED when the brake and flasher were both HIGH until I added a resistor to ground from the Left brake line input. Do you mean the left flasher input? If I'm doing this right, that means this resistor is dissipating 120nA Do you mean nA or mA or do you mean nW or mW? when the left flasher is on. Seems acceptable.

I haven't tried driving a front flasher from it yet though, and this circuit on the board is just a very simple exploration: 2 PNPs, 5 resistors, and some wire. :)

Anyway, thanks very much for the patient explanation. I think I'm getting what's going on in the circuit now. Perhaps I'll build one for a high brake/flasher on my truck canopy. Someday. I won't be using 3906s though.


Torben

[Edit: nb: This was an all-LED build, one LED per side. Just to check the basic idea before proceeding.]

[Edit 2: I added 2 more LEDs per side. These are all normal 20mA garden-variety red LEDs. It works fine as long as the voltage doesn't sag. At all. ;) ]
As you can see by the questions, I'm a bit confused. (not unusual)

It would help if you could post a diagram.
 
ljcox said:
As you can see by the questions, I'm a bit confused. (not unusual)

It would help if you could post a diagram.

Oh dear. I can see why you're confused. I posted complete gibberish.

I meant "left flasher line", not "left brake line".

And I meant that the new resistor to ground would pass 120uA (see below for why 120 is wrong too), not dissipate it. The nA thing was just me counting zeroes wrong, I guess. The resistor to ground is 100k. I got a bit confused because I did the calculation on paper first for 6V, got 60uA, and then simmed it and got 120uA, which confused me until I remembered that the sim was running 12V, not 6V like my breadboard. Then when I posted I just read the value off the sim instead of my paper. Argh. So that value should really be 60uA for a 6V supply, not 120nA.

I must try to remember to post *before* falling asleep. Apologies.

The schematic is the same as the one I posted earlier (the LTSpice image with the graph) except the front incandescent lamp model has been replaced with a 100k resistor.


Torben
 
I've revised your previous post (partially quoted below) in the light of your latest.

Torben said:
Hi Len,

I couldn't get the base current What I think you mean is that you could not switch Q1 off. This needs the base - emitter voltage to be < 0.5 Volt. The base current is virtually zero when the transistor is off. to shut off the flasher LED when the brake and flasher were both HIGH until I added a resistor to ground from the Left flasher line input. If I'm doing this right, that means that the current through this resistor is 120uA when the left flasher is on. Seems acceptable. Yes. See comments below.

Torben
I expect that the 100k resistor is necessary for the simulation, ie. the software can't analyse the circuit without it.
 
ljcox said:
I've revised your previous post (partially quoted below) in the light of your latest.

torben said:
Hi Len,

I couldn't get the base current What I think you mean is that you could not switch Q1 off. This needs the base - emitter voltage to be < 0.5 Volt. The base current is virtually zero when the transistor is off. to shut off the flasher LED when the brake and flasher were both HIGH until I added a resistor to ground from the Left flasher line input. If I'm doing this right, that means that the current through this resistor is 120uA when the left flasher is on. Seems acceptable. Yes. See comments below.

Torben

Actually, it works fine in the sim without the resistor, but in real life it needed the resistor there to cause the transistor to block the current to the flasher LED when the flasher line went high. Otherwise, when the brake line was high both LEDs would light up, but when the flasher line would then go high, the flasher LED would not turn all the way off. With the 100k grounding resistor there, it worked perfectly.

ljcox said:
I expect that the 100k resistor is necessary for the simulation, ie. the software can't analyse the circuit without it.

Not sure why, but the sim doesn't seem to care whether it's there or not.


Torben
 
Torben said:
Actually, it works fine in the sim without the resistor, but in real life it needed the resistor there to cause the transistor to block the current to the flasher LED when the flasher line went high. I assume you mean the case where both the brake and flasher lines are high. If the F is high and the B is low, the flasher LED should glow. Otherwise, when the brake line was high both LEDs would light up (as they should), but when the flasher line would then go high, the flasher LED would not turn all the way off. This does not make sense to me. When the F line is high, the resistor should have no effect. It is only has an effect when the F line is low - since it tends to pull the line low if the F line is (without the resistor) going from open to High. With the 100k grounding resistor there, it worked perfectly.

Not sure why, but the sim doesn't seem to care whether it's there or not. See below.

Torben
In the sim case, the voltage source driving the F line goes from low to high. When it is low, the F line is at 0 Volt. But in the real case, I assume that the F line is going from open to High (as I said above) hence there is no path for the current when it is open.

However, I still can't explain what you're observing. I'll need to think some more about it.
 
I still can't make any sense of it. So I've drawn the attachement.

Please measure the voltages (without the 100 k resistor) at the C, B & E of both transistors for each case.

A point that just occurred to me is the that EB junctions will go into Zener breakdown if the supply is 12 Volt. And it may occur at 6 Volt.
 

Attachments

  • Truth table.png
    Truth table.png
    126 KB · Views: 137
ljcox said:
I still can't make any sense of it. So I've drawn the attachement.

Yep, that's the truth table I've been working from too. This truth table matches the exhibited behaviour when I have the 100k resistor in place.

Please measure the voltages (without the 100 k resistor) at the C, B & E of both transistors for each case.

A point that just occurred to me is the that EB junctions will go into Zener breakdown if the supply is 12 Volt. And it may occur at 6 Volt.

I'll have to measure them later tonight but I'll do it.


Torben
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top