Non common connection bi-color LED...

Thread Starter

dtvonly

Joined Dec 14, 2012
43
Hi. In today's market I believed that there are only either common cathode or common anode bi-color (through hole 5mm) LEDs. I have been searching for a while for a bi-color 5mm through hole LED that have no common connection. There are surface mount packages but I need through hole package. Please view attachment for clarification. Please advise on part number, if there are any. Thanks.
 

Attachments

Thread Starter

dtvonly

Joined Dec 14, 2012
43
Hi Sony103. Thanks for the reply. I do have the two pins bi-color through hole LEDs. The problem with these is that they need two IO ports (from a microcontroller) to switch color, so do the common anode/cathode 3-pins LEDs. True. I can add external components to these so that I will only use one IO port. I don't want to add any more hardware. But if I had this type of through hole style (image attached) then all I have to do is to hardwire one pin to Vcc, one to GND and one to (only one) MCU IO port. My main objective: MCU IO port saving.
 

GopherT

Joined Nov 23, 2012
8,009
Hi. In today's market I believed that there are only either common cathode or common anode bi-color (through hole 5mm) LEDs. I have been searching for a while for a bi-color 5mm through hole LED that have no common connection. There are surface mount packages but I need through hole package. Please view attachment for clarification. Please advise on part number, if there are any. Thanks.
How will this be easier than two lead LED suggested above? It will still need two external resistors.

The option below also uses two resistors to make a voltage divider and think of the switch as your ONE I/O port.
To turn them both off, set pin as input!


 

Attachments

Last edited:

Thread Starter

dtvonly

Joined Dec 14, 2012
43
How will this be easier than two lead LED suggested above? It will still need two external resistors.

The option below also uses two resistors to make a voltage divider and think of the switch as your ONE I/O port.
To turn them both off, set pin as input!


Thanks for the reply. That will work.
 

ErnieM

Joined Apr 24, 2011
8,377
To turn them both off, set pin as input!
There may be an unintended consequence to turning both off: The left side has an equivalent circuit of ½ the supply voltage driving a series resistance of ½ of either resistor. Here that’s 2.5V into 110 ohm.

That may be fine when powering the LEDs but when you’re turning both off you’re inputting ½ the supply voltage into an input pin.

Generally that is a fine technique for releasing the magic smoke, so once off the LEDs may tend to stay that way. Forever.
 

GopherT

Joined Nov 23, 2012
8,009
That may be fine when powering the LEDs but when you’re turning both off you’re inputting ½ the supply voltage into an input pin.

Generally that is a fine technique for releasing the magic smoke, so once off the LEDs may tend to stay that way. Forever.
Ernie,
I am not understanding your comment. Are you concerned that the right side of the LEDs will be floating (or the input of the Microcontroller will be floating)?

If that is the case, then a 100k pull down resistor should take care of that (I/O pin to ground).

Or, am I missing something else? The input pins are high impedence so they should be handle any voltage 0-5V without current limiting.

Please let me know if I am on the right track.
 

ErnieM

Joined Apr 24, 2011
8,377
Ernie,
I am not understanding your comment. Are you concerned that the right side of the LEDs will be floating (or the input of the Microcontroller will be floating)?

If that is the case, then a 100k pull down resistor should take care of that (I/O pin to ground).

Or, am I missing something else? The input pins are high impedence so they should be handle any voltage 0-5V without current limiting.

Please let me know if I am on the right track.
The problematic issue here is when the I/O pin is redirected to input that pin is not floating (if it were a simple pull-either way resistor would work) but that the pin is being actively driven to ½ the supply voltage thru the lower LED.

This is a tragic thing to do as it has an incredibly good chance of driving the PIC digital input stage smack dab into the middle of its active region, which puts both output fets of this stage ON and ON hard. So lots of current flows until something breaks releasing the magic smoke.

On third thought, your method would be quite proper and acceptable if you choose a pin with analog capability and switch from "digital out" to "analog in" to turn the LED off: in Analog mode the digital input stage is disconnected from the input pin and you may freely apply any voltage there within the Vdd-Vss range.

Analog switching can be tricky with older baseline parts as the analog functions are not individually pin switchable.
 

bertus

Joined Apr 5, 2008
22,270
Hello,

When you have 2 pins available, you could use a tri-state buffer.
The input could choose the color and the enable put the leds on or off.

Bertus
 

GopherT

Joined Nov 23, 2012
8,009
The problematic issue here is when the I/O pin is redirected to input that pin is not floating (if it were a simple pull-either way resistor would work) but that the pin is being actively driven to ½ the supply voltage thru the lower LED.

This is a tragic thing to do as it has an incredibly good chance of driving the PIC digital input stage smack dab into the middle of its active region, which puts both output fets of this stage ON and ON hard. So lots of current flows until something breaks releasing the magic smoke.
I guess that one could pick a pin with a Schmitt trigger input to avoid your concern.

I made the original suggestion because the Microchip "Compiled Tips ‘N Tricks Guide" uses rising analog voltage to trip a digital input quite often and makes no comment on input impedence limitations or possible damage to the device.


Here is one...

 

Attachments

Last edited:

MMcLaren

Joined Feb 14, 2010
861
Wire up the 2-pin bi-color LEDs in a Charlieplexed matrix. Three pins for 3 LEDs, four pins for 6 LEDs, five pins for 10 LEDs, etc. It works great...
 

ErnieM

Joined Apr 24, 2011
8,377
I made the original suggestion because the Microchip "Compiled Tips ‘N Tricks Guide" uses rising analog voltage to trip a digital input quite often and makes no comment on input impedence limitations or possible damage to the device.
Note the input is "rising." It may momentarily find that dangerous input voltage as does every normal digital signal when changing from 1 to 0 or 0 to 1, but it does not linger there.

I would refer you to Implications of Slow or Floating CMOS Inputs, an application note from T.I.
 
Top