Rules | Recent posts | topic RSS | Search | Register  | Log in

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

 
Post new topic  Reply to topic    EDAboard.com Forum Index -> Hobby Circuits and Small Projects Problems
Author Message
ahgu



Joined: 19 Jun 2001
Posts: 170


Post14 Mar 2003 16:02   design idea? How to use one signal to drive 2 LEDs?

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

thanks
ahgu
Back to top
msmax



Joined: 06 May 2001
Posts: 104
Location: Pays Bas


Post14 Mar 2003 16:51   

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.
Back to top
ntfreak



Joined: 22 Feb 2002
Posts: 190
Helped: 5
Location: UK


Post14 Mar 2003 16:59   

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

Regards

NTFreak
Back to top
ahgu



Joined: 19 Jun 2001
Posts: 170


Post14 Mar 2003 19:20   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.

-ahgu
Back to top
ahgu



Joined: 19 Jun 2001
Posts: 170


Post14 Mar 2003 19:22   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.
Back to top
gpoletto2



Joined: 17 Feb 2003
Posts: 14


Post14 Mar 2003 20:22   

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!! Cool Cool Cool



Sorry, but you need login in to view this attachment

Back to top
msmax



Joined: 06 May 2001
Posts: 104
Location: Pays Bas


Post14 Mar 2003 20:24   

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.
Back to top
ntfreak



Joined: 22 Feb 2002
Posts: 190
Helped: 5
Location: UK


Post16 Mar 2003 20:36   

bicolour has two led - tricolour has three.

Regards
NTFreak
Back to top
arturt134



Joined: 01 Jan 1970
Posts: 140
Helped: 1
Location: Poland


Post17 Mar 2003 7:29   

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



Joined: 05 Dec 2002
Posts: 15
Location: Espaņa


Post17 Mar 2003 9:09   

Usually, tricolor leds has got only 2 leds.
Back to top
ntfreak



Joined: 22 Feb 2002
Posts: 190
Helped: 5
Location: UK


Post17 Mar 2003 13:00   

two led's yes, but three colour combinations

Regards
NTFreak
Back to top
ntfreak



Joined: 22 Feb 2002
Posts: 190
Helped: 5
Location: UK


Post17 Mar 2003 14:19   

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

Regards
NTFreak



Sorry, but you need login in to view this attachment

Back to top
s_a_r_a



Joined: 04 Jul 2002
Posts: 21


Post09 Apr 2003 22:38   

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

S_a_r_a
Back to top
Encrypted



Joined: 28 May 2001
Posts: 149
Helped: 7


Post09 Apr 2003 23:40   

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 Smile
Back to top
Analyzer



Joined: 18 Nov 2001
Posts: 409


Post10 Apr 2003 20:44   

Hi,

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.

Analyzer.
Back to top
btbass



Joined: 20 Jul 2001
Posts: 904
Helped: 66
Location: Oberon


Post10 Apr 2003 20:51   

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.
Back to top
happy123



Joined: 16 Apr 2003
Posts: 21


Post16 Apr 2003 13:54   

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.
Back to top
Fragrance



Joined: 26 Jul 2002
Posts: 1313
Helped: 23


Post17 Apr 2003 10:12   Bi color led

Hi

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

regards
Fragrance
Back to top
maranaza



Joined: 27 Mar 2002
Posts: 51


Post17 Apr 2003 17:23   

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.

maranaza
Back to top
penrico



Joined: 28 Aug 2001
Posts: 225
Helped: 8
Location: Argentina


Post17 Apr 2003 19:11   

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.



Sorry, but you need login in to view this attachment

Back to top
luben111



Joined: 02 Mar 2002
Posts: 103
Helped: 2


Post17 Apr 2003 19:28   How to drive 2 LEDs from one wire

Hi,

An old idea, that I realized many years ago.

You make one voltage of let's say 2.5V - by simple 2 resistors.

You connect two LEDs to the uP pin and other end to the middl epoint of resistors.

LEDs are with oposide ends - when you push the uP pin to 0 - one of LEDs is lighting, other is dark and visa versa.

When you make the pin TRISTATE - no lighting..

Regards
Luben
Back to top
atmel2000



Joined: 23 Mar 2003
Posts: 12


Post17 Apr 2003 23:00   Re: How to drive 2 LEDs from one wire

Hi Luben,

Your idea is good but there are 2 disadvantages:

1. there is a high power consumption even if the leds are not working
because the resistors must be around 470 Om each - that means
5mA or more all the time.

2. You cannot turn on 2 leds at the same time. You can do this only
with 50% modulation but then you have to decrease the value of the
resistors and the power consumption is going up.

Anyway, the idea is very good - I like it!

Atmel2000
Back to top
Post new topic  Reply to topic    EDAboard.com Forum Index -> Hobby Circuits and Small Projects Problems
Page 1 of 1 All times are GMT + 1 Hour


Abuse
Administrator
Moderators
topic RSS 
sitemap