2 Leds 1 switch

Discussion in 'The Projects Forum' started by je3005, Mar 26, 2009.

  1. je3005

    Thread Starter New Member

    Mar 26, 2009
    4
    0
    I try to design a circuit with a green led on when the switch is close (door lock). When the switch open (door unlock) green led off and the red on.
    I can do it with a mechanical relay energize when switch close and using the green and red leds on the NC an NO.

    I use an alarm switch with magnet,only 2 wire. Power Supply 12 V. and leds 12 V.

    I try to do it with transistor and diode, do not know much about IC. Could not find anything that would do that.

    Any suggestion will be appreciate.

    Thank,
     
  2. jj_alukkas

    Well-Known Member

    Jan 8, 2009
    751
    5
    Why dont you drive one wire of that switch to a relay and use the N/C and N/O? Thats the simplest solution..
     
  3. je3005

    Thread Starter New Member

    Mar 26, 2009
    4
    0
    The relay will be energize 90% of the time, I would like the relay energize 10 % of the time. The circuit that drive the relay should be open when the switch is close.
    If I use a relay NO will it make a difference.
     
  4. Mike2545

    Active Member

    Mar 26, 2009
    116
    3
    Have it energize only for the 10% of the time. So the switch energizes the relay.
     
  5. je3005

    Thread Starter New Member

    Mar 26, 2009
    4
    0
    I need to monitor the door lock, ( 4 doors ) using an alarm switch with magnet 2 wire, contact close when door is lock. 90% of the time the contact will be close, I need the relay to be energize when the contact is open 10%.

    I would like to use electronic (transistor and diode or IC) only. If I use a relay I would like to have the relay energize only when the door is unlock, the contact is open.
     
  6. Mike2545

    Active Member

    Mar 26, 2009
    116
    3
    Get continuous duty relays.
    Another way would be to use an "OR" gate, "NOR" gate or an "XOR" Gate.

    If you had a resistor holding the switched pin high and were pulling it low with the door (switch/on) were closed, then the output would change from low to high when the door were opened.
    Wire your leds back to back with that pin, with 470 ohm resistors.

    Mike2545
     
  7. Mike2545

    Active Member

    Mar 26, 2009
    116
    3
    Like This :

    Edit I changed the format from PDF to PNG (sorry)
     
    Last edited: Mar 27, 2009
  8. jj_alukkas

    Well-Known Member

    Jan 8, 2009
    751
    5
    Switch it using a BC547 for open circuit check.. and drive the relay using another 547.. you'll get the current situation inverted.. then interchange the led connections b/n N/C and N/O..
     
  9. Mike2545

    Active Member

    Mar 26, 2009
    116
    3
    Could you post the circuit?
     
  10. jj_alukkas

    Well-Known Member

    Jan 8, 2009
    751
    5
    I'll suggest you a better and easy way... Replace your current N/O door switch with an N/C switch.. Saves the power for running a circuit, space and is more economical..
     
  11. Mike2545

    Active Member

    Mar 26, 2009
    116
    3
    You would have to run one relay for each door. He needs four(4) indicators. One 74LS32 OR gate will run the entire shebang. No relays, and he can keep the door switches he already has. Easy-pesy :)
     
  12. je3005

    Thread Starter New Member

    Mar 26, 2009
    4
    0
    This site is driving two leds with one pin using a voltage divider
    Driving a Bicolor LED from a Single Output Pin
    http://www.neufeld.newton.ks.us/electronics/?p=151

    Using a bicolor LED or RGB, permanent wiring one color and turning off the other will change the color of the LED.

    Thanks
     
  13. robertuit

    New Member

    Mar 29, 2009
    1
    0
    NOPB switch grounds base resistors of PNP and NPN wired as followers with LEDs in emitter legs with limit resistors.
     
  14. trixheim

    Member

    Apr 1, 2009
    10
    0
    [​IMG]
     
    Last edited: Apr 7, 2009
  15. Bernard

    AAC Fanatic!

    Aug 7, 2008
    4,170
    395
    This is slightly modified from a 12 zone alarm system. The 5060 SCR can be eliminated if we do not need to remember if a door was opened and closed. Paralleling sections of 40106 schmitt trigger cuts current to 5mA per stage
     
  16. Mike2545

    Active Member

    Mar 26, 2009
    116
    3
    I think he wanted to monitor the doors individually, no?
     
  17. Bernard

    AAC Fanatic!

    Aug 7, 2008
    4,170
    395
    Not certain, I can read it both ways, no problem leave out 3 SW. With 1 SW X 4 , would use 40106 for inputs & a current driver for LED's or cut LED's to 5 mA., limiting resistor around 1600Ω.The amount of filtering on input lines depends on enviroment and length. I've seen and heard some strange noises on long lines, whistles and even distant lightning.
     
  18. thatoneguy

    AAC Fanatic!

    Feb 19, 2009
    6,357
    718
    If this is simply to show if door is open or closed, a red/green Dual color LED can be used at the output of a comparator, with the supply feeding one side, and the line back from the switch feeding the other. It will change colors when voltage is present or absent (door closed or open).

    Alarm cable should have a foil shield to keep interference down. Make sure it is grounded at both ends if noise is a problem. Another method to "overcome/drown out" noise is increasing bias current to boost signal/noise ratio.
     
  19. wollybyte

    Member

    Apr 5, 2009
    15
    0
    you can use resistors in the following arrangement to switch the LED's
     
  20. Mike2545

    Active Member

    Mar 26, 2009
    116
    3
    je3005, What design did you go with? There certainly has been a lot of them offered on this one.
     
Loading...