One momentary switch, two LEDs, one on other off...

Discussion in 'The Projects Forum' started by bigjayman, Feb 8, 2011.

  1. bigjayman

    Thread Starter New Member

    Feb 8, 2011
    4
    1
    I'm looking to use a push button momentary switch in such a way that one LED is on when the button isn't being pushed and then when the button is pushed it turns a different LED on and kills the power to the original LED. I'm new to electronics and looking for some help. I have some NPN and PNP transistors on hand if they would help in some way. I've been trying to figure this one for some time with no luck. I'm currently using two SPST switches to accomplish this and hoping to replicate my design with only one switch if possible. Thank you all.
     
    ronnie120 likes this.
  2. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    What is your supply voltage?
     
  3. bigjayman

    Thread Starter New Member

    Feb 8, 2011
    4
    1
    I am using a single 9 volt battery
     
  4. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    OK, I should've asked this question along with the 1st one I asked.

    One LED (let's say green) is lit, and the other LED (let's say red) is dark.
    When you push the button, the green LED goes off, and the red LED goes on.

    What is supposed to happen when you release the button?
    1) The red LED stays lit and the green LED stays off?
    2) The red LED goes off and the green LED lights up again?
     
  5. bigjayman

    Thread Starter New Member

    Feb 8, 2011
    4
    1
    The second option is what I'm hoping to achieve.

    1. Green LED on, red LED off.
    2. Momentary switch pushed, turning red LED on and turning off the green.
    3. The button is released, turning green back on and killing the red.

    I appreciate your help.
     
  6. Wendy

    Moderator

    Mar 24, 2008
    20,766
    2,536
    I have something like that in my 555 articles, a basic 555 Schmitt Trigger. There are many ways to do something like this, this is one.

    555 Schmitt Trigger

    The 555 Projects

    Give me a little bit and I will draw something more specific that will fit your needs.

    I have another variation that is a push once and it flips, push again and it flips back.

    Be back soon, drawing.
     
  7. Wendy

    Moderator

    Mar 24, 2008
    20,766
    2,536
    OK, this is very similar to the Schmitt Trigger link I posted last post. Similar enough you can look at the circuit layout and make minor changes. It will also cover theory of operation pretty well. The resistors are designed for 20ma, but you could use 1KΩ for R1 and R2.

    [​IMG]

    You can also find a interesting variation in LEDs, 555s, Flashers, and Light Chasers Chapter 4 The 555 Integrated Circuit , Figure 3.1, where you can use a integrated single Red/Green LED instead of the Red/Red shown in the illustration (this part is available from Radio Shack).
     
    Last edited: Feb 9, 2011
  8. KMoffett

    AAC Fanatic!

    Dec 19, 2007
    2,574
    230
    Since that's not latched or toggled...battery, resistor, red LED, green LED, SPDT momentary pushbutton switch...if that's all you want. A DPDT switch if you want something else switched as well.

    Ken
     
  9. Wendy

    Moderator

    Mar 24, 2008
    20,766
    2,536
    Yep, that would do it.
     
  10. hobbyist

    Distinguished Member

    Aug 10, 2008
    764
    56
    Quote "I have some NPN and PNP transistors on hand if they would help in some way." Unquote:


    If you still want to use your transistors, here is another way to do it,
    this gives you the option to use a manual switch input, or a electronic signal input, to perform the function.

    2 leds.jpg
     
  11. bigjayman

    Thread Starter New Member

    Feb 8, 2011
    4
    1
    Thanks everyone. I went with the SPDT.
     
  12. KMoffett

    AAC Fanatic!

    Dec 19, 2007
    2,574
    230
    Great! But, what was the purpose of that simple circuit/operation?

    Ken
     
Loading...