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
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 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.
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.
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.
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.
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.
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
Ahgu,
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.