Maker Pro
Maker Pro

Bicolor LED Switch driven by a PIC, need to pull outs to GND?

N

Nick

Jan 1, 1970
0
I have a bicolor led switch that I would like to control with 2
different output lines from a PIC that I'm using. I'm having trouble
figuring out the circuit.

The switch is:
http://www.citrelay.com/Catalog pages/Switches/JC Series Catalog.pdf

SPDT Red & Green

Their datasheet (linked above) shows the LEDs circuit to be:

--->|---0 LED1
|
0---|
|
--->|---0 LED2


So, I figure I want a 180 Ohm R between + and the single leg, the other
2 need to be pulled to ground.

I did not look at the datasheet close enough when I ordered this part
and planned the circuit in my head. I thought it was the opposite,
where there were 2 feeds to the forward side and 1 pull to ground.

I guess I need a circuit that looks like:




--->|---0 -- ??? --- PIC Out1
|
+5V 0---|
|
--->|---0 -- ??? --- PIC Out2

What is the blackmagic I can use to pull an active high output to
ground?
 
S

Spehro Pefhany

Jan 1, 1970
0
I have a bicolor led switch that I would like to control with 2
different output lines from a PIC that I'm using. I'm having trouble
figuring out the circuit.

The switch is:
http://www.citrelay.com/Catalog pages/Switches/JC Series Catalog.pdf

SPDT Red & Green

Their datasheet (linked above) shows the LEDs circuit to be:

--->|---0 LED1
|
0---|
|
--->|---0 LED2


So, I figure I want a 180 Ohm R between + and the single leg, the other
2 need to be pulled to ground.

I did not look at the datasheet close enough when I ordered this part
and planned the circuit in my head. I thought it was the opposite,
where there were 2 feeds to the forward side and 1 pull to ground.

I guess I need a circuit that looks like:




--->|---0 -- ??? --- PIC Out1
|
+5V 0---|
|
--->|---0 -- ??? --- PIC Out2

What is the blackmagic I can use to pull an active high output to
ground?


Just two resistors where your ??? are. Drive the output low to turn
the LED on, assuming you're writing the code. If you're not writing
the code, and the outputs are high for ON, then add one inverter on
each output (eg. use 2/6 of a 74HC04)


Best regards,
Spehro Pefhany
 
J

John Popelish

Jan 1, 1970
0
Nick said:
I have a bicolor led switch that I would like to control with 2
different output lines from a PIC that I'm using. I'm having trouble
figuring out the circuit.

The switch is:
http://www.citrelay.com/Catalog pages/Switches/JC Series Catalog.pdf

SPDT Red & Green

Their datasheet (linked above) shows the LEDs circuit to be:

--->|---0 LED1
|
0---|
|
--->|---0 LED2


So, I figure I want a 180 Ohm R between + and the single leg, the other
2 need to be pulled to ground.

I did not look at the datasheet close enough when I ordered this part
and planned the circuit in my head. I thought it was the opposite,
where there were 2 feeds to the forward side and 1 pull to ground.

I guess I need a circuit that looks like:




--->|---0 -- ??? --- PIC Out1
|
+5V 0---|
|
--->|---0 -- ??? --- PIC Out2

What is the blackmagic I can use to pull an active high output to
ground?

The first question that comes to mind is why do the outputs have to be
active high? If they could be active low, you could just use a 470
ohm resistor in place of ???.

But if there is some good reason they have to be active high, then you
might add a 2N7000 or BS170 N channel mosfet as an inverter. Source
goes to ground, drain to resistor to LED, gate to PIC output.
 
N

Nick

Jan 1, 1970
0
Hello,

Thanks, I tested this today and it worked. Thanks again.
 

Similar threads

J
Replies
5
Views
2K
Watson A.Name - \Watt Sun, the Dark Remover\
W
Top