Alternating green and red LEDs discrete circuit

Thread Starter

chad2057

Joined Sep 20, 2020
5
I tried to design this without much success so any help would be appreciated.

A transistor circuit where initially in a 3-pin Bi-Color LED (Common Cathode), the red led illuminates.

When an external positive voltage is applied (for example 5V), the red led switches off and the green led illuminates.

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

external voltage changes to +5V -> red led goes off, green led turns on

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

Thread Starter

chad2057

Joined Sep 20, 2020
5
Welcome to AAC!

Is this school work?

In any case, post a schematic of what you've tried.
It isn't. Too old for that :)

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.
The V+ I tried was between 15-45V

led drv.png
 

dl324

Joined Mar 30, 2015
13,554
It isn't. Too old for that
I've read stories about people who went back to college when they were in their 60's and ended up with 10's of thousands of dollars in student loans and a degree that was worthless because no one would hire them at their age.

clipimage.jpg
The driver needs to be able to source a half mA and sink 2.4 ~3mA. I designed for about 10mA LED current, but there's enough headroom that you can change R4 and R7 to give 20mA.

EDIT: Corrected current.
 
Last edited:

Thread Starter

chad2057

Joined Sep 20, 2020
5
I've read stories about people who went back to college when they were in their 60's and ended up with 10's of thousands of dollars in student loans and a degree that was worthless because no one would hire them at their age.

Gladly that's not me :)

View attachment 225503
The driver needs to be able to source a half mA and sink 2.4mA. I designed for about 10mA LED current, but there's enough headroom that you can change R4 and R7 to give 20mA.
I'll give it a try. Thanks Dennis!
 

Thread Starter

chad2057

Joined Sep 20, 2020
5
I've read stories about people who went back to college when they were in their 60's and ended up with 10's of thousands of dollars in student loans and a degree that was worthless because no one would hire them at their age.

View attachment 225503
The driver needs to be able to source a half mA and sink 2.4 ~3mA. I designed for about 10mA LED current, but there's enough headroom that you can change R4 and R7 to give 20mA.

EDIT: Corrected current.
Would be possible to scale this to work with higher supply voltages, let's say between 15 and 35V?
I tried to do it but Q3 in this circuit needs a 5V supply otherwise it doesn't turn off.
 

Tonyr1084

Joined Sep 24, 2015
6,462
A 555 can sink or source on the order of 500 mA. How much current do your LED's need?
The TS is using a Bi-Color LED, Common Cathode. A 555 was my first thought too, but with the common cathode it won't work. At least not by any means that I know of.

Getting more complicated, a 555 pulsing at a high enough frequency to avoid much delay and a Double D Flip Flop, Q and /Q can be connected to the anodes of the two colors with the cathode connected to common (ground). The triggering input would be on the flip-flop D line.
 

dl324

Joined Mar 30, 2015
13,554
Would be possible to scale this to work with higher supply voltages, let's say between 15 and 35V?
I tried to do it but Q3 in this circuit needs a 5V supply otherwise it doesn't turn off.
You'll need to add another transistor inverter on the output of Q1 and have it drive Q3. You'll also need to adjust the resistor values to keep currents in reasonable ranges.

You could probably use a zener diode to level shift the 5V control signal high enough to turn off Q3 if you're looking for a minimalist solution. But resistor values should still be changed.
 

Tonyr1084

Joined Sep 24, 2015
6,462
I'm not clear on exactly how you want your circuit to function. Is this a classroom exercise? If so, we would be happy to help you figure it out on your own.

From what I'm able to gather, you want a green LED to come on when power is applied but a red LED to be on when power is off. For that you need a constant voltage, otherwise the red LED will not light. From your drawing in post #4 it looks like your circuit is continuously powered and you're only sensing when a "Trigger" is applied. That's doable with numerous circuits. But are you being limited to using transistors? If you can use IC's there's an easy approach.
 

Tonyr1084

Joined Sep 24, 2015
6,462
Post 1 mentions 5V
Post 4 mentions 15 - 45V
Post 9 mentions 15 - 35V

Seems hard to pin down the voltage the TS wants.

I have a solution drawn up for this problem using two chips. Unspecified voltages and resistances (as well as a capacitance). If this is an engineering school problem I would like to encourage the TS to solve the problem with our help but not expect us to solve the problem FOR him/her. Yes, this is getting - well, not necessarily "complicated" but rather "difficult due to a lack of information, requirements and constraints".
 

Tonyr1084

Joined Sep 24, 2015
6,462
But my circuit (post 10) still works, and only needs the resistor changed.
Yes, it does. I must have missed it.

Still, we don't know if this is homework help or something else. Which is why I didn't post my solution using a DD flip flop and a 555 timer.
 

dl324

Joined Mar 30, 2015
13,554
Still, we don't know if this is homework help
We do. I asked if it was school work in post #2:
Is this school work?
It isn't. Too old for that :)
Then I gave him a circuit.
Which is why I didn't post my solution using a DD flip flop and a 555 timer.
He started with transistors, so I stayed with a discrete solution. I think it's more meaningful for the OP's if you help them make their circuit idea work.

There used to be a member that pushed for a microcontroller in almost every solution. Thankfully he's stopped doing that.
 

Tonyr1084

Joined Sep 24, 2015
6,462
But my circuit (post 10) still works, and only needs the resistor changed.
After closer examination, with 5V power the red LED comes on. With "Trigger" (as someone called it), the green LED will come on too, but the red LED will remain lit. Unless they're powered from the same power source.

The circuit I'm proposing (but holding back) gets powered and the red LED comes on. When the "Trigger" voltage is present the DDFF changes state with the next rapid clock pulse, switching the red LED off and the green LED on.
 
Top