bicolor led controlled with one output

WBahn

Joined Mar 31, 2012
30,060
See the attachment.
You can use any CMOS gate (AND, OR, NAND, NOR, INV, Buff).
Put a Pull up resistor on your signal output (1 KΩ) and feed this setup.

You need to find the right orientation of the Bi LED to get the correct colour.

Ramesh

Correction: the resistors are 650 Ohms !
Given that the 74LS08 shown in your figure has a max Vcc of 7V, you might not want to throw 12V at it.
 

WBahn

Joined Mar 31, 2012
30,060
Let's take it a step at a time.

What we have:

1) We have an output that is either floating or tied to ground.

2) We have an LED that is one color, green, if the current goes one way and another color, red, if it goes the other way.

What we want:

3) We want to always be in one of two states -- green if the output is floating and red if it is tied to ground.

What we need:

4) Since we want the LED to be on even if the output if floating, we HAVE to have an available source of power other than the output. Thus I will assume that a 12V supply is available.

5) In order to get the current to change direction in the LED, we HAVE to be able to change the relative polarity of one side of the LED relative to the other.

How we might proceed:

6) If we assume that we can use the output to either pull one side of the LED to ground or pull it HI, then we simply need to fix the other side of the LED to an intermediate voltage.

Attached is a circuit that should accomplish this:



Computing the optimal resistance values is a bit tricky because there are a couple of things that have to be traded off. Specifically, the total current drawn from the 24V supply and the current that has to be sunk by the alarm output.

Do you know how much current your alarm output is rated for when it is activated?
 

Attachments

crutschow

Joined Mar 14, 2008
34,451
Here's WBahn's circuit with values from my simulation (assuming a 12V supply). Note that the values have to carefully selected to drive enough current through the diodes without exceeding the output transistor's maximum 70mA rating (as per the OP's initial statement).

LED Driver.gif
 

Ramussons

Joined May 3, 2013
1,409
+12V on the VCC pin of an LS part exceeds the maximum rating and WILL let the magic smoke out. Were you thinking of a 4000 series CMOS part?
WBahn said:
Given that the 74LS08 shown in your figure has a max Vcc of 7V, you might not want to throw 12V at it.
Well, the ckt was drawn in LTspice and I forgot to amend the 74LS... marking. I had mentioned that CMOS unit will have to be used.

The corrections could not be uploaded - there was a prob that AAA was refusing my (maybe others too) posts!!

Ramesh
 

joeyd999

Joined Jun 6, 2011
5,283
Here's an alternate circuit using one transistor and 3 resistors.
Very clever! I like how the currents are steered to provide both LED and base currents. FYI, this only works if Vf is greater than Vbe, which will always be the case for LEDs. It won't necessarily be the case for other devices with a bipolar mode of operation.
 

Thread Starter

secuver

Joined Jul 5, 2012
18
so from wheir is see it i think the most simple way to make this thing work is using a little relais with two switching contacts and a currentlimiting resistor?
 

WBahn

Joined Mar 31, 2012
30,060
so from wheir is see it i think the most simple way to make this thing work is using a little relais with two switching contacts and a currentlimiting resistor?
Why is that simpler than using three resistors? The relay is probably going to cost you a buck or so, perhaps a few bucks at Radio Shack (assuming they even carry them). The resistors will cost you a fraction of that, even at Radio Shack.
 

Thread Starter

secuver

Joined Jul 5, 2012
18
I would like to make it work with three resistors.
but could someone help me with calculating the resistors becauwe i'm not an expert in electronics
thanks
 

Papabravo

Joined Feb 24, 2006
21,225
It might work as a one-off circuit with the "active" device as the "Alarm Output" which either sinks current or floats. We can argue about weather that counts or not based on the original post. The problem is that he needs to replicate this circuit a number of times. Usually with multiple LED indicators you prefer to have them all be roughly the same brightness especially if they are in proximity to one another on a panel. What you need to try and do is choose a current through the LED that produces acceptable brightness and then choose values based on that current and the forward drop of the diode.

Also, when calculating resistor values make sure you also calculate the dissipation of all three resistors under both (Alarm Output High and Low) operating conditions. As you try to achieve the brightness you need, it is not uncommon for resistors to dissipate more power than their design limit. If that happens you can always use bigger (higher power) resistors.

For example: In the diagram Q1 is sinking about 66 mA through R3 a 274 Ohm resistor. This will be about 1.2 Watts. More than enough to let the magic smoke out of a quarter watt resistor.
 
Last edited:

crutschow

Joined Mar 14, 2008
34,451
I would like to make it work with three resistors.
but could someone help me with calculating the resistors becauwe i'm not an expert in electronics
thanks
The two LEDs have slightly different forward voltage which affects the resistor values. When do you want Red ON and when do you want Green ON?
 

WBahn

Joined Mar 31, 2012
30,060
It might work as a one-off circuit with the "active" device as the "Alarm Output" which either sinks current or floats. We can argue about weather that counts or not based on the original post. The problem is that he needs to replicate this circuit a number of times. Usually with multiple LED indicators you prefer to have them all be roughly the same brightness especially if they are in proximity to one another on a panel. What you need to try and do is choose a current through the LED that produces acceptable brightness and then choose values based on that current and the forward drop of the diode.

Also, when calculating resistor values make sure you also calculate the dissipation of all three resistors under both (Alarm Output High and Low) operating conditions. As you try to achieve the brightness you need, it is not uncommon for resistors to dissipate more power than their design limit. If that happens you can always use bigger (higher power) resistors.

For example: In the diagram Q1 is sinking about 66 mA through R3 a 274 Ohm resistor. This will be about 1.2 Watts. More than enough to let the magic smoke out of a quarter watt resistor.
The 66mA does not all go through R3. The 20mA LED current bypasses it. Stil the dissipation in that resistor is right at 0.5W, assuming that R3=274Ω. The constraint based on the 70mA current sinking capability of the alarm output is that R3>250Ω. As it is made higher, the power in it drops but the current in the other two increases. It's a compromise.

And that's not saying that this solution is the best solution. Specifically because of the power dissipation associated with a 12V supply, it would probably be better to use a regulator to bring that down to 5V or so, preferably with a little switcher, but linear would still let the power dissipation be managed primarily in one part of the circuit.
 

WBahn

Joined Mar 31, 2012
30,060
The two LEDs have slightly different forward voltage which affects the resistor values. When do you want Red ON and when do you want Green ON?
I'm pretty sure he wants the green to be on when the alarm output is floating and the red to be on when the alarm output is pulled LO.
 

THE_RB

Joined Feb 11, 2008
5,438
My solution involves no active devices, just three resistors. Why won't it work?
Minor nitpick; Ramusson suggested the circuit first, I seconded it by adding the resistor to pullup the open collector driver, and you "thirded" it.

It's a common enough way to drive a 2-pin bipolar LED. All it needs are the right resistor values to give about 10mA through each LED.
 

WBahn

Joined Mar 31, 2012
30,060
Minor nitpick; Ramusson suggested the circuit first, I seconded it by adding the resistor to pullup the open collector driver, and you "thirded" it.

It's a common enough way to drive a 2-pin bipolar LED. All it needs are the right resistor values to give about 10mA through each LED.
Ramusson's solution uses an active device, and hence isn't a suitable counter for the claim that it can't be done without using an active device. I don't know what circuit you had in mind as you mentioned four resistors. So I couldn't very well ask someone to indicate why a circuit that wasn't actually given wouldn't work without the addition of an active device.

I agree that the general approach of Ramusson's and mine (and probably yours) is the same, namely to get bipolar operation by biasing one node to an intermediate voltage.
 

Thread Starter

secuver

Joined Jul 5, 2012
18
I'm loosing the essence of the communication. For me is it good when the green led is working when the alarmoutput is floating and red when it is pulled down to ground.
I also would like to work with the present 12V power supply of the alarmpanel

Is it possible to make it work with the circuit below, but then switching the 24V power supply with the 12V power supply.
wich resistor shoul is use then to make it work?





 

WBahn

Joined Mar 31, 2012
30,060
The problem you are going to have is managing the power dissipation. If you really want 20mA of LED current (and why do you want that much?) then from a 24V supply that, alone is going to have to dissipate 40mW in the LED and 440mW in the resistor. Using the purely passive circuit is going to cost you a lot more because it is basically steering a fraction of a much larger quiescent current. Are you really prepared to waste (and have to deal with the heat from) 4W or so of power to get 40mW of LED output?
 

Thread Starter

secuver

Joined Jul 5, 2012
18
I don't understand anymore what i should choose,
when i use the circuit with the relay, someone said that this is a shame because the relay would cost so much
whith the passive circuit with only resistors i will have to much power dissipation in the resistors?
what should i do?
 

WBahn

Joined Mar 31, 2012
30,060
Welcome to the world of engineering. Everything involves compromise. The best way to proceed usually depends on what is important to you. Are you willing to pay higher energy bills or live with shorter battery life in order to save some money in component costs? Or are you willing to pay more up front for better battery life and less heat dissipation? How many of these LEDs are you talking about using? Why do you want to use 12V or 24V for them? How sensitive are your decisions to budget considerations?
 
Top