-1

I tried to design this without much success so any help would be appreciated.

A circuit where initially in a 3-pin Bi-Color LED (Common Cathode), the red led illuminates. Then it switches off and the green led illuminates, when an external voltage is applied.

for example: initial state: external voltage 0V -> red led on, green led off

external voltage changes to 5V (or any) -> red led goes off, green led turns on

if the external voltage changes back to zero it resets the leds to the initial state.


--Just to clarify

This discrete (transistor) circuit is powered by a positive voltage supply between 15-45V. Being a transistor circuit the resistors can be adjusted for different voltages.

An external voltage that can be 0V or +5V will dictate which led lights up.

0V lights up the red led (initial state)

+5V turns off the red and lights up the green.

The transistor circuit that AnalogKid showed (third on the last image) fits the bill with the exception that it operates with Ground and +5V instead of the 0V and +5V required in this application.

This is what I had tried with V+ between 15-45V

enter image description here

I tried something along the these lines but could not get the same current on both leds. Also tried adding a trimmer to adjust the current (brightness) but that didn't work correctly, and that would be the preferred solution instead of replacing resistors to get the same brightness on both leds.

primare
  • 21
  • 4
  • 1
    Welcome to the community!! This community expects you to show some efforts from your side. Try adding what your ideas are. – G-aura-V Dec 20 '20 at 13:23
  • 1
    Does this answer your question? [Device to power either a red LED or a green LED](https://electronics.stackexchange.com/questions/533775/device-to-power-either-a-red-led-or-a-green-led) – ocrdu Dec 20 '20 at 13:49
  • You will probably want some hysteresis in the circuit. What's powering the LEDs and circuit? What's the external voltage source you are observing with this circuit? You say *5 V (or any)* but you really need to define what you really mean with better precision than that. Would 1 V change things? 0.5 V? Etc. Write a lot more. – jonk Dec 20 '20 at 20:31
  • I just saw the clarification. If GND isn't 0 V, then what is it? AND, are the LEDs powered from the 45 V source? – AnalogKid Dec 20 '20 at 21:44
  • Ground is just the label for what you decide is 0V. By definition, ground ***is*** 0V. It’s also arbitrary. You could take the 0V wire (black wire/ “-“ /ground) and 5V wire (red wire/ “+”) and instead declare the 5V wire as ground/0V. Now the wire that used to be ground (black wire) is -5V. Voltage is just a potential difference, analogous to potential energy from height. Ground is arbitrary and just means the reference you use as 0V and all voltages will be given in terms relative to their difference in volts from that point. – metacollin Dec 20 '20 at 22:14
  • And in doing so, the circuit diagram would not change, only the labels would. 5V would turn into ground, and ground would change to -5V. But physically nothing would change. You can relabel the circuit like this while it is operating, and of course, it will continue to operate no matter how you label ground. The important thing is ground means what you’ve chosen to be 0V, and all voltages in the diagram are relative to that. This circuit would work for any 2 voltages as long as the “5V” voltage is 5V more positive than the voltage you’ve labeled ground. – metacollin Dec 20 '20 at 22:20
  • Why not just use a BJT differential pair (long-tailed pair) with LEDs and voltage-dropping series resistors in each tail? It's easy to add hysteresis by tapping off of one of the collectors to the base of the opposite BJT. It will work quite fine at all the supply voltage ranges you talked about -- except that I still don't know your transition voltages at the input side. – jonk Dec 20 '20 at 22:33
  • The ULN2003 is a group of 50 V / 500 mA darlington transistors that can act as open-collector logic gates. 3 gates get you everything you want including independently adjustable LED currents. Besides the LED parts, 1 chip and 1 resistor. – AnalogKid Dec 20 '20 at 23:55

5 Answers5

0

You could use digital logic elements and do something like this.

schematic

simulate this circuit – Schematic created using CircuitLab

If your input signal can directly drive the led then you can omit the buffer or if you want you can replace it with two sequential NOT to not have to use another component.

po.pe
  • 2,548
  • 1
  • 10
  • 25
0

Here is something I've posted before with three methods. The middle schematic should work for you. You don't say if your LED is common-anode, common-cathode, or dual isolated LED chips. This schematic is based on a common anode part, but also will work with a dual-isolated part.

enter image description here

Because only one LED is on at a time, you can get away with only one current limiting resistor. Also, the gate can be replaced with one transistor. If you use a 2N7000, no additional parts are needed. With a bipolar thpe like a 2N4401, you need a base resistor.

The circuit works because the forward voltage of an LED plus a diode is less than that of an LED alone. When the input goes high and the gate output goes low, D3 effectively "shorts out" D4-D5.

Here is an updated version for common-cathode LEDs.

enter image description here

AnalogKid
  • 16,865
  • 1
  • 13
  • 25
0

Here is a simple (one BJT) way of doing it.

schematic

simulate this circuit – Schematic created using CircuitLab

Spehro Pefhany
  • 376,485
  • 21
  • 320
  • 842
0

Now that you've actually posted a schematic you've tried, I have more information about what you are looking for. You could try something like this:

schematic

simulate this circuit – Schematic created using CircuitLab

It should work pretty well, without part changes, over the entire range you specify for \$V_{+}\$.

It's just two different current sink sections coupled by an input signal inverter (\$Q_5\$.)

jonk
  • 77,059
  • 6
  • 73
  • 185
  • I'll give it a try. Thanks for that. If you were to add a trimmer to one of the leds to adjust the brightness, how would you go about it? – primare Dec 20 '20 at 23:45
  • @primare \$R_1\$ and \$R_3\$ set the currents. You could just change them until things "look right" to you. – jonk Dec 20 '20 at 23:52
  • I did simulate this but it didn't work as expected. – primare Dec 21 '20 at 12:29
  • @primare I also did simulate it and it works as ***I*** expected it to do. So it must be a difference of expectations. I'd be happy to show you my simulation results in the answer. – jonk Dec 21 '20 at 17:50
0

Ok, so none of the other schematics actually meet your requirements.

To reiterate:

  1. The LEDs are common cathode.
  2. You want to drive them from a wide voltage range of 15-45V
  3. You want to control them via a logic level (5V) input and alternate red or green depending on if it is high or low.

Here is a circuit that will actually do all those things. Additionally, the LED current is constant with changing drive voltage and set by the cathode resistor. The current will be (5V - LED voltage drop) divided by that resistance.

And yes, you only need three resistors. This circuit makes use of complementary feedback transistor pairs.

Your control input is where I have substituted a square wave input on the far left (it swings from 5V to 0V). Connect your control signal to the transistor bases. Ignore the ground that is also connected to the square wave - that was for simulation purposes.

enter image description here

metacollin
  • 27,884
  • 4
  • 64
  • 119
  • Thanks for that. The main drawback I see with this is the need of two supply voltages, 45V and 5V. – primare Dec 21 '20 at 09:11