Transistors controlling LEDs

Thread Starter

stillgrowingup

Joined Jul 15, 2015
210
HI all,

I need to offer a 12V output to illuminate a 20mA LED, until a 12V input triggers (something) to make this output 20mA LED turn off. When the 12V trigger input is gone, the LED should turn back on.

I have designed a successful circuit to achieve this, but only using incandescent bulbs in my cars tail lamps, side markers, Headlamp, etc. I used the ground coming through the incandescent car bulbs to triggering (energizing) the BD140 transistors. When the 12v was applied from activating the car's indicators. The BD140 is deactivated, turning off the LED. I have attach the incandescent circuit to this post.

You will also note/see that I have a relay to accept the 0v/Ground trigger from the car's computer for when the 'Check Engine' light is active. I use the N.C. terminals on a relay to power the LED output, until the 0v/Ground trigger from the computer is activated. Once the relay is activated the 12v supplying the LED is removed, turning off the LED when the Check Engine is activated by the car's computer.

I have now replaced ALL my vehicles exterior lamps with LEDs. These new LEDs work fine. BUT ..... now my circuit does NOT. By replacing the incandescent with LEDs, I have removed the Ground triggering the BD140. :( ... The Check Engine light circuit still works. But I DO NOT want to hear relay clicking, so I do NOT want to use relays to solve this problem.

I tried to come up with a solution ... Circuit 2 (attached to this post) works fine for the Check Engine 0v/Ground trigger circuit. But Circuit 3 does not work well. The output in Circuit 3 causes the LED to light up very dim/faded. By lowering the R6 value from 1k to 100ohm, LED6 is very bright. But R6 at 100 ohms heats up within seconds. Once the BD139 is activated. :(

I am NOT opposed to using MOSfets or Darlington Transistors. I just have many BD139, BD140, 2n3904 and 2n3906.

Thanks
TONY
 

Attachments

hp1729

Joined Nov 23, 2015
2,304
HI all,

I need to offer a 12V output to illuminate a 20mA LED, until a 12V input triggers (something) to make this output 20mA LED turn off. When the 12V trigger input is gone, the LED should turn back on.

I have designed a successful circuit to achieve this, but only using incandescent bulbs in my cars tail lamps, side markers, Headlamp, etc. I used the ground coming through the incandescent car bulbs to triggering (energizing) the BD140 transistors. When the 12v was applied from activating the car's indicators. The BD140 is deactivated, turning off the LED. I have attach the incandescent circuit to this post.

You will also note/see that I have a relay to accept the 0v/Ground trigger from the car's computer for when the 'Check Engine' light is active. I use the N.C. terminals on a relay to power the LED output, until the 0v/Ground trigger from the computer is activated. Once the relay is activated the 12v supplying the LED is removed, turning off the LED when the Check Engine is activated by the car's computer.

I have now replaced ALL my vehicles exterior lamps with LEDs. These new LEDs work fine. BUT ..... now my circuit does NOT. By replacing the incandescent with LEDs, I have removed the Ground triggering the BD140. :( ... The Check Engine light circuit still works. But I DO NOT want to hear relay clicking, so I do NOT want to use relays to solve this problem.

I tried to come up with a solution ... Circuit 2 (attached to this post) works fine for the Check Engine 0v/Ground trigger circuit. But Circuit 3 does not work well. The output in Circuit 3 causes the LED to light up very dim/faded. By lowering the R6 value from 1k to 100ohm, LED6 is very bright. But R6 at 100 ohms heats up within seconds. Once the BD139 is activated. :(

I am NOT opposed to using MOSfets or Darlington Transistors. I just have many BD139, BD140, 2n3904 and 2n3906.

Thanks
TONY
Your PNP transistors are upside down. Put emitter to +12 and collector to LED.
 

Thread Starter

stillgrowingup

Joined Jul 15, 2015
210
Oh yes. The 100 ohm Resistor in Circuit 3 gets very hot. Burns up actually. So I use a 1k ohm resistor in place of the 100 ohm. The Output LED is very dim, but the 1k resistor does NOT burn up.

TONY
 

dl324

Joined Mar 30, 2015
16,909
For starters, you're not driving the LEDs correctly. You have 4 LEDs connected in parallel. The correct way to connect them is to have each one have it's own current limiting resistor. That will prevent current hogging which will likely result in a cascading failure destroying all of the LEDs.
The 100 ohm Resistor in Circuit 3 gets very hot. Burns up actually.
Assuming 2V for the LED forward voltage, the dissipation in the resistor is P = V*V/R = 10V*10V/100 ohms = 1W. My guess is that you're using a 1/4W resistor...

If you replace the single 100 ohm resistor with 4 510 ohm resistors, each connected to one of the LEDs; you'll get about 20mA in each LED and each resistor will dissipate around 0.2W. You could use 1/4W resistors, but good design practice calls for derating them; so you should use 1/2W.

Don't know why you have R4, D17, and D18.
 

bertz

Joined Nov 11, 2013
327
Oh yes. The 100 ohm Resistor in Circuit 3 gets very hot. Burns up actually. So I use a 1k ohm resistor in place of the 100 ohm. The Output LED is very dim, but the 1k resistor does NOT burn up.

TONY
Of course the bloody resistor is going to get hot and possibly even burn up. Let's assume that the forward voltage drop across the LEDs is 2.5 volts. Your LEDs are rated at 20 mA so a 100 ohm resistor will give you the desired effect from a brightness standpoint, BUT you have to dissipate 9.5 volts x .095 amps of power (0.9 watts). You don't tell us the power dissipation rating of your resistors, but if you are using 1/4 watt or 1/2 watt resistors, you can bet your snake that they will burn up.
Off the top of my head there are a couple of avenues that you can pursue:
1. Use a resistor with a 5 watt rating and a heat sink. It'll get warm but wont burn up.
2. Use a 555 to pulse the LEDs at a 50% duty cycle. You will still probably need at least a 1 watt current limiting resistor.
Cheers
 

ScottWang

Joined Aug 23, 2012
7,398
In your circuit, whatever the leds are on or off, the R6 always drawing a lots of current, and the leds in parallel directly was not good for leds themselves.

You can try the circuit below, I haven't try it yet, I was used the led drawing 80% of 20mA and that is 16mA, I also assuming that the led is 3V, R2, R4 just using 1/4W and R1, R3, R5~R8 using 1/2W or more.

OneSwitchCtrlTwoSideOf3VLeds_ScottWang.gif
 

Thread Starter

stillgrowingup

Joined Jul 15, 2015
210
Hello all

I have updated circuit 3 to be more clear about the application.
S16 is my Turn signal
LED 7 is my Tail lights
LED 6 (4 LED array) on a separate circuit board with ONE 12v input.

ScottWang ... I would never of guess to use a Pull up and Pull down resistor on the base. Thank you for the diagram. I'll try it tomorrow.

I am using 1/4w resistors.

TONY
 

Attachments

ScottWang

Joined Aug 23, 2012
7,398
In your new circuit, when the LED6(4 leds) is working then the current of R6 will be as :
I_R6 = (12V-3V)/(1K+100Ω)
= 9V/1.1K
= 8.1mA
If the led is 3V/20mA then the current can't be drive the led too light, but it is safe for leds.

When the LED6(4 leds) is not working then the current of R6 will be as :
I_R6 = V_R6*R6
= (12V-0.2V)/100Ω
= 11.8V/100Ω
= 118 mA, the current is waste too much.

Watts of R6:
W_R6 = V_R6*I_R6
= 11.8V*118mA
= 1.39 Watts

1.39W * 3 = 4.17 Watts
At least, you have to using 5 W resistor, but over 7 Watts is better for the bjt long time turn on.
 

Thread Starter

stillgrowingup

Joined Jul 15, 2015
210
If using your circuit, adding the diodes 1N4148 will reducing the power consumption for R6.
Hi ScottWang

I like your circuit in post #8 ... It's simple (less Components) than in post #11. I will try it on my breadboard to see what happens. :)

I can't modified what is going on with the separate circuit containing the 4 LEDs. :( ...

TONY
 

ScottWang

Joined Aug 23, 2012
7,398
When I designed the circuit, I forgot to calculate the affect of voltage divider, about the R2(10K) of the circuit in #8, in the beginning that I just want to use it to prevent something, but it will affecting the voltage, so I moved it to the Vbe as Rbe(R4) or you can take it away.

OneSwitchCtrlTwoSideOf3VLeds-02_ScottWang.gif
 

Thread Starter

stillgrowingup

Joined Jul 15, 2015
210
When I designed the circuit, I forgot to calculate the affect of voltage divider, about the R2(10K) of the circuit in #8, in the beginning that I just want to use it to prevent something, but it will affecting the voltage, so I moved it to the Vbe as Rbe(R4) or you can take it away.
In my SIM your post #13 circuit works with and without R4. I will try on breadboard tonight. :) Thank you.

What is benefit for using R4?

TONY
 

ScottWang

Joined Aug 23, 2012
7,398
In my SIM your post #13 circuit works with and without R4. I will try on breadboard tonight. :) Thank you.

What is benefit for using R4?

TONY
That is to prevent when Sw1 is open and R2 also open and used it to turn off the bjt(Q1) and then the Led2~Led5 stay at the off status, if you didn't consider about that then you can take it away.
 

Thread Starter

stillgrowingup

Joined Jul 15, 2015
210
ScottWang

Thank so much ... :)

I also need a similar circuit, but with a ground trigger from car's computer. Cars computer sends is negative pulse.

I still need output LED to stay lit/on. Then turn off when ground from computer is applied.

Here is the circuit I came up with. Can you please check it over for me please? I did try it on the Breadboard and seemed fine.

TONY
 

Attachments

Last edited:

ScottWang

Joined Aug 23, 2012
7,398
I was used your circuit to modified, Assuming that the calculation as:
Calculate the voltage for bjt.
Vce = (0.7V+0.2V) = 0.9V,
Ve = 12V-0.9V = 11.1V
Ie = Ic
Ib = 1/10(Ic)
= 0.1(0.016mA*4)
= 0.1(0.064 mA)
= 6.4 mA

Vb =
= Ve+0.7V
= 11.1V+0.7V
= 11.8V

V_R11 = 12V - 11.8V = 0.2V
I_R11 = V_R11/Ib
= 0.2V/8 mA (6.4 mA adding some more current to 8 mA)
= 25 Ω (choose 27Ω)

Calculate the current of I_R11 :
I_R11 = V_R11/27Ω
= 0.2V/27Ω
= 7.4 mA (the Ib needs 6.4mA)

So Ie = Ic
= Ib*10
= 7.4 mA*10
= 74 mA. (The 4 leds need 64 mA)

Capture_stillgrowingup-02.jpg
 

Thread Starter

stillgrowingup

Joined Jul 15, 2015
210
ScottWang

Is it possible the 27 ohm will get hot when the negative trigger is sent from cars computer. It will be a transistor negative output coming from the computer. That's why I had a bd139 and bd140 in the circuit. I was hoping to protect the computers transistor output by using a transistor as a buffer. Does my thought makes sense?

Tony
 
Last edited:

ScottWang

Joined Aug 23, 2012
7,398
@stillgrowingup.
Sorry, I made a mistake, I forgot to calculate the current for your computer side, whatever reason that the resistor can't just connected to the computer like that, even it is a relay, because the current was too big, and I always be care about the current and heat, last night (my time zone) was too tired, when I woke up this morning and it really shocked me, I have to redesign the circuit.

You want to protect the computer side, that is correct, do you know what exactly the switch is(contacts of relay, bjt, mosfet)?
 

Thread Starter

stillgrowingup

Joined Jul 15, 2015
210
@ScottWang
I do NOT know what is driving output from Car computer. It is GM car from 1986. The output directly drives incandescent bulb and can remain lit/illuminated for hours at a time. I hope this info narrows the possibilities.

When I designed the circuit, I forgot to calculate the affect of voltage divider, about the R2(10K) of the circuit in #8, in the beginning that I just want to use it to prevent something, but it will affecting the voltage, so I moved it to the Vbe as Rbe(R4) or you can take it away.
I have tested this circuit on my breadboard. The Output LED did NOT toggle until I increased R2 resistance from 1.2k to 15k. I did NOT try R2=10k ... Output led was nice and bright. :) ... When circuit was activated to shut OFF output LED. Output LED remain Dim/faded lit. R4=4.7k MUST be used to completely shut off output LED. Also, no components seemed to get warm/hot while testing. :) ... Should I use this circuit from post #13 with changes/modifications I have just stated?

I feel this is great progress ScottWang! :)

TONY
 
Top