Shop OBEX P1 Docs P2 Docs Learn Events
1 pin bi-color LED control (solution demo) — Parallax Forums

1 pin bi-color LED control (solution demo)

Bobb FwedBobb Fwed Posts: 1,119
edited 2010-09-30 11:08 in General Discussion
So Here is my project. It does everything I wanted it to do.

Using only 1 controlling I/O pin, control a bi-color LED in all three states (on-on-off), and not waste a lot of power doing it, especially when the LED was off.

Here are photos of the completed prototype. I think I ended up spending all of $8 in PCB and parts, and who knows how many hours optimizing the simple H-bridge concept into a low BOM count (relative to other solutions I was coming up with), for the relatively low power need of an LED.

attachment.php?attachmentid=73560&stc=1&d=1285796569

attachment.php?attachmentid=73561&stc=1&d=1285796574

attachment.php?attachmentid=73562&stc=1&d=1285796580

Also attached is a ZIP with the original photographs and a video of the board in action.

Maybe now Beau will post a schematic that does the same thing with 6, no, 5 parts. Let's see...
600 x 656 - 68K
556 x 600 - 50K
600 x 596 - 55K

Comments

  • localrogerlocalroger Posts: 3,452
    edited 2010-09-29 15:51
    Wait a minute, does this mean you've established that 15 discrete components == 1 Propeller pin?

    The theological implications of this are enormous. I am off to order a bucket of transistors.
  • Bobb FwedBobb Fwed Posts: 1,119
    edited 2010-09-29 16:05
    localroger wrote: »
    Wait a minute, does this mean you've established that 15 discrete components == 1 Propeller pin?

    The theological implications of this are enormous. I am off to order a bucket of transistors.
    Well, you are going to need two bucket I do think.
    But at that volume, they are only a couple pennies each, so it's all good.

    I have requested in the past, a simpler version of such a complex execution of an even simpler concept, with no dice. I wouldn't be doing this, except it's fun working with discrete components and I need to control two bi-color LEDs, and only have two pins to do so.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2010-09-29 18:58
    Beau must be busy, or I'm sure he would have beaten me to it. Here's a five-component circuit that drives the bicolor LED (red/green/off) from a single Prop pin:

    attachment.php?attachmentid=73607&stc=1&d=1285812179

    The LEDs in the base circuit don't actually light up (at least they didn't in the operational circuit I built). They're only there to prevent through conduction of the E-B junctions when the input pin is floating. The single resistor limits current to both the bicolor LED and the transistor E-B junctions.

    -Phil
    367 x 293 - 2K
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2010-09-30 11:08
    Some futher info on the above circuit:

    1. The forward voltage of the two base LEDs is about 1.6V, satisfying the condition:


    2(Vfwd(LED) + 0.6V) > 3.3V

    2. With the input floating, there is no measurable current draw from the circuit (using a meter that's sensitive to microamp levels).

    3. When the input is either high or low, current draw is about 4.5mA, which represents the bicolor LED's forward current.

    -Phil
Sign In or Register to comment.