Searching \ for '[EE]: Drive bicolor LED w/ one output pin' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/displays.htm?key=led
Search entire site for: 'Drive bicolor LED w/ one output pin'.

Exact match. Not showing close matches.
PICList Thread
'[EE]: Drive bicolor LED w/ one output pin'
2004\04\21@184105 by Matt Redmond

picon face
Hi All,

My basic EE skills are lacking so I was hoping someone might suggest a solution to this...

I have a bicolor LED - one of the 2-lead types where the green anode is the red cathode and vice-versa.  You reverse polarity to change colors.

What I need to do is drive this with one output pin on my PIC.  I swear I'd do it with two if I had them, but I don't.

The green can be on all the time except when the red comes on.  So - steady green and then red when my output goes high (or low).

Any thoughts?

Thanks!

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads

2004\04\21@184519 by llile

flavicon
face
If one pin of your LED is driven from a 2.5 volt source, then the other
pin can be high, low, or open, giving you red, green, or off.   A cheap
2.5 volt source is two 500 ohm resistors in series from ground to 5V.  I
have used this to drive red-green LEDs from one pin in the past.

You don't need a series resistor to the LED with this arrangement, as the
impedance of the the resistor pair is already enough.


-- Lawrence Lile
Senior Project Engineer
Toastmaster, Inc.
Division of Salton, Inc.
573-446-5661 voice
573-446-5676 fax




Matt Redmond <spam_OUTmdredmondTakeThisOuTspamCHARTER.NET>
Sent by: pic microcontroller discussion list <.....PICLISTKILLspamspam@spam@MITVMA.MIT.EDU>
04/21/2004 05:04 PM
Please respond to pic microcontroller discussion list


       To:     PICLISTspamKILLspamMITVMA.MIT.EDU
       cc:
       Subject:        [EE]:  Drive bicolor LED w/ one output pin


Hi All,

My basic EE skills are lacking so I was hoping someone might suggest a
solution to this...

I have a bicolor LED - one of the 2-lead types where the green anode is
the red cathode and vice-versa.  You reverse polarity to change colors.

What I need to do is drive this with one output pin on my PIC.  I swear
I'd do it with two if I had them, but I don't.

The green can be on all the time except when the red comes on.  So -
steady green and then red when my output goes high (or low).

Any thoughts?

Thanks!

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads



--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads

2004\04\21@184934 by Jinx

face picon face
> Any thoughts?

A flip-flop with the LED between Q and /Q ? Could be anything
that has two alternating outputs - counter, shift register, etc

Otherwise an H-bridge

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads

2004\04\21@190014 by Richard.Prosser

flavicon
face
Matt.
The simplest scheme is to have a voltage divider between the +5v & 0 lines
and connect the led between the centre (or slightly off-centre) connection
and the PIC pin.
The pin can then be high for one colour, low for the other & defined as an
input for both off. Current will be limited by the resistors in the
divider.
The penalty is that even with both off there will be reasonable current
flowing through the divider. This may not be a problem, particularly if you
never have the "both off" condition.
The tap may be slightly off centre to adjust the relative brightness.

A circuit could be derived that reduced the standing current to only switch
in when required - but it would add some complexity. It may not be worth it
unless current consumption is a critical issue.

Richard P



Hi All,

My basic EE skills are lacking so I was hoping someone might suggest a
solution to this...

I have a bicolor LED - one of the 2-lead types where the green anode is the
red cathode and vice-versa.  You reverse polarity to change colors.

What I need to do is drive this with one output pin on my PIC.  I swear I'd
do it with two if I had them, but I don't.

The green can be on all the time except when the red comes on.  So - steady
green and then red when my output goes high (or low).

Any thoughts?

Thanks!

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads

2004\04\21@191425 by Spehro Pefhany

picon face
At 10:04 PM 4/21/2004 +0000, you wrote:
>Hi All,
>
>My basic EE skills are lacking so I was hoping someone might suggest a
>solution to this...
>
>I have a bicolor LED - one of the 2-lead types where the green anode is
>the red cathode and vice-versa.  You reverse polarity to change colors.
>
>What I need to do is drive this with one output pin on my PIC.  I swear
>I'd do it with two if I had them, but I don't.
>
>The green can be on all the time except when the red comes on.  So -
>steady green and then red when my output goes high (or low).
>
>Any thoughts?
>
>Thanks!


This one has more output drive and does not load the PIC  You get full
supply voltage. With 5V you can get 30mA+  through the LEDs.

                                +---|<---+-------+
                                |        |       |
                                +--->|---+      .-.
                                |               | |
                                |               | |
                        |\      |  |\           '-'
                       -| >O----+--| >O----------+
                        |/         |/

                          SN74LVC2G14


This one only uses half the SN74LVC2G14 and you can
turn both LEDs off by tristating the port pin. You get full supply
voltage. You must make sure not to load the PIC pin too much so that
it can't meet input specs for the SN74LVC2G14.


                                +---|<--+-------+
                                |       |       |
                                +--->|--+      .-.
                                |              | |
                                |              | |
                                |              '-'
                                |   |\          |
                       ---------+---| >O--------+
                                    |/

                         1/2 SN74LVC2G14


The SN74LVC2G14 dual ST inverter is about 0.48 one-off, 0.27 in 100's,
and is housed in a compact SOT-23-6, so it won't break the bank.

Best regards,

Spehro Pefhany --"it's the network..."            "The Journey is the reward"
.....speffKILLspamspam.....interlog.com             Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog  Info for designers:  http://www.speff.com

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads

2004\04\21@192505 by Jinx

face picon face
> A circuit could be derived that reduced the standing current to
> only switch in when required - but it would add some complexity.
> It may not be worth it unless current consumption is a critical issue
>
> Richard P

Which is something I should have mentioned in my reply. Late last
year I needed to drive 3 bi-colour LED staus indicators using the
fewest number of pins, which turned out to be 1. The LEDs were
connected between adjacent o/p pairs of a CMOS shift register,
which was driven with a data pattern to make the combinations of
red/green on the LEDs. The PIC had to survive on batteries and was
mostly powered down, woken fully by a microswitch on the case door

PS H-bridge suggestion was a little OTT

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads

2004\04\22@113747 by Byron A Jeff

face picon face
On Wed, Apr 21, 2004 at 10:04:31PM +0000, Matt Redmond wrote:
> Hi All,
>

> My basic EE skills are lacking

You may want to bone up. I've spent quite a bit of time reading the copy
of the Art of Electronics I requested from our school library.

> so I was hoping someone might suggest a solution to this...

Fire away.

>  I have a bicolor LED - one of the 2-lead types where the
> green anode is the red cathode and vice-versa.  You reverse polarity to
> change colors.

Check.

>  What I need to do is drive this with one output pin on my
> PIC.  I swear I'd do it with two if I had them, but I don't.

Understood.

>  The green can
> be on all the time except when the red comes on.  So - steady green and then
> red when my output goes high (or low).

Good. So it doesn't have to be off. That makes it a lot tougher.

>
>
> Any thoughts?

Several. The first is that if you can afford to burn the current you can
simply tie the outside leg to a midpoint resistor voltage divider that locks
the outside leg at 2.5V (presuming a 5V circuit). Then the PIC output can
swing from 0 to 5V, going from one color to the other as it swings. Neither
LED in the bipolar should require more than 2V forward voltage.

A more active approach could be to inject a opamp voltage follower between
the divider and the LED. So you get:

PIC pin -> resistor -> LED -> opamp follower -> voltage divider

The nice thing about this approach is that you can build the voltage divider
with 47K or 100K resistors limiting the amount of current they consume because
they no longer have to feed power to the LED.

BAJ

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics

2004\04\22@121520 by hael Rigby-Jones

picon face
{Quote hidden}

Even easier is to drive one side of the LED and a CMOS inverter input with
the PIC pin, and the other side of the LED with the inverter output.  The
above solution may be ok, but you are limiting your forward voltage to
2.5volts for a 5v supply rail which may be marginal for some LED's

             |\
---+    +-----+ |0-------------+
  |    |     |/               |
  |    |                      |
  |----+----+-|>|-+---/\/\/---+
  |         |     |
  |         +-|<|-+
PIC|          LED
  |
---+


Regards

Mike




=======================================================================
This e-mail is intended for the person it is addressed to only. The
information contained in it may be confidential and/or protected by
law. If you are not the intended recipient of this message, you must
not make any use of this information, or copy or show it to any
person. Please contact us immediately to tell us that you have
received this e-mail, and return the original to us. Any use,
forwarding, printing or copying of this message is strictly prohibited.
No part of this message can be considered a request for goods or
services.
=======================================================================
Any questions about Bookham's E-Mail service should be directed to
@spam@postmasterKILLspamspambookham.com.

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics

2004\04\23@192229 by Byron A Jeff

face picon face
On Thu, Apr 22, 2004 at 05:14:50PM +0100, Michael Rigby-Jones wrote:
{Quote hidden}

The only problem I see is packaging. You can get opamps two in a 8 pin package
no problem. Not sure about inverters.

BAJ

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.

2004\04\23@192853 by Shawn Wilton

flavicon
face
Here you go:  http://www-s.ti.com/cgi-bin/sc/family3.cgi?family=INVERTERS

Byron A Jeff wrote:

{Quote hidden}

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.

2004\04\23@203946 by Matt Pobursky

flavicon
face
Toshiba and Fairchild also make "microgate" parts as well. I used my
first Toshiba parts about 5 years ago and have since started using the
TI and Fairchild parts also. They're extremely handy in tight SMD
layouts where you only need a gate or two.

One thing to watch out for is many of the devices only have about half
the output drive current capability as their HC or AHC counterparts
-- probably die size or package power handling issues, I'm guessing.

BTW, I recently had to add a bi-color SMD LED to a circuit that
previously was a single LED and had very little room for any external
components. I thought about it and scribbled several circuit ideas for
a few days and came up with the *exact* same circuit shown below. I used
a SO14 74HC14 though, I had six circuits to upgrade and that worked out
to the least space required.

Matt Pobursky
Maximum Performance Systems

On Fri, 23 Apr 2004 16:29:23 -0700, Shawn Wilton wrote:
{Quote hidden}

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.

2004\04\26@085925 by Matt Redmond

picon face
Thanks, everyone, for your responses to my question.  I'm working on it now
and have plenty to chew on.

Thanks again!

-matt redmond



{Original Message removed}

More... (looser matching)
- Last day of these posts
- In 2004 , 2005 only
- Today
- New search...