Continue to Site

Welcome to

Welcome to our site! is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

design idea? How to use one signal to drive 2 LEDs?

Not open for further replies.


Full Member level 3
Jun 19, 2001
Reaction score
Trophy points
Activity points
I have a signal and ground line that need to drive 2 LEDs.
One is green LED is on all the time when driven.
One is RED LED that blinks at 1Hz when driven.
Both are never on at the same time.

The signal coming can be either 12v DC(turn on the Green LED) , or 12 Square wave at 1Hz(blink the red LED), 0V will turn all LED off.

How can I design a circuit with Q, D, R,C? that let me do this?

I can also throw in a voltage reg if needed.

How long can voltage reg hold its voltage when input is switched off


There is one way how you can do this:

Use polarity switchers. If line 1 is +12V and line 2=0V then the green LED is on. If line 1=0V and line 2=+12V then the red led is on (or blinking).

You need 2 diodes to do this.

If you are using a micro why don't you just use a bi-colour led?



bi-color LED needs another input

bi-color has 3 LED. I only have 2 input.

For switch polarity, I have one output from the microcontroler, How can I switch 12v/0v using Q, D, R,C? I can mudulate the 12v to a square wave very easily.


reverse polarity would not work

reverse polarity would not work because when it is 12v, it is actually going thru a voltage reg to power some circuit after that, reverse the polarity will possibly burn the voltage reg.

Look at the schematic attached.

You have to calculate the values of C2, R1, R2 and R3 in such a way that the transistor won't turn on until you have a steady 12V signal. (ie: it won't turn on with a pulsed signal).

When you have a 1Hz signal C1 will charge through DIODE during the positive period of the signal and discharge through Blinking LED during the 0V period of the signal, thus, making the LED blink.

Good luck!! 8) 8) 8)

Hi Ahgu,

The power reg problem can be solved by adding a rectifier just before the regulator. The polarity for the reg will be always the same then.

But you still have to:
- Switch 12V on for green
- Reverse polarity for red

If you only have 1 output then it is a bit difficult.

A power reg is no capacitor, so it doesn't hold any buffer. If you need it, then you should charge a cap from your lines.

bicolour has two led - tricolour has three.


Use 2 pieces of DS2405 (from MAXIM). It's 1Wire single I/O port, with own address each.

Usually, tricolor leds has got only 2 leds.

two led's yes, but three colour combinations


I have attached data on the bi-colour led I mean


Bicoulor leds hav two leds inside. Infact they have three terminals: two anodes (one for each colour) and a common cathode. They allows three colours. For example if you have a bicolour led red and green, turning on both leds, you obtain the orange led. The problem of such bicolour leds is that normally the red one has an efficiency greater then the green one, so if you want the same intensity you have to use a resistance in series with the red led greater than the one used for the green led.

Best Regards


Actually, a bi-color LED has two LEDs but only two leads, so you get red or green but not both. Tri-color LEDs have two LEDs and three leads so you get red, green or yellow = three colours = tri-color.

Nothing to do with the number of leads but the number of colors.

And no help to the original question :)


If you would like to solve this with an mcu, try to use tiny mcu like attiny or pic 12c509.You can easily write a code for this.If you can not, just ring.


Just connect one led to + that turns on with a GND signal, and ond led to GND that comes on with a + signal, then TOGGLE man! To turn them both off, ?, go fast.

How long would depend on how big is your cap, and the loading.

You could use a monostable (555) to let it turn on the right LED when there is the pulse.

Think using a small PIC/AVR might be better to save some power.

Bi color led


There are two types of bi colors which produce the three color have three
legs center is common and out side are green and red the other type heve only two legs and have two color red and green this type of led can not produce the third color please visit rs component web site for detail


If this is a quiz, than OK. If it is a question for a real circuit, than change your specification. I suppose that your micro has tristate I/Os. Connect first LED to +supply, other to -supply. Make the LED selection with the pin latch output level. Turn the LED on or off using the tristate control for the pin.


Try this circuit, when a alternated signal is putted, is pass trough C1, and excited Q2, so RED led will blink at same frecuency of input.

When a DC signal is putted, it will no pass C1, so Q1 is not activated, then Q3 is on. When a blinking signal is at input, it will be rectified by D1, and will activate Q1, so Q3 will be off.

When no signal is at input, circuit is no powered, so both leds are off.

Not open for further replies.

Part and Inventory Search

Welcome to