How can I switch between 2 LEDs using a momentary DPDT switch?

Discussion in 'The Projects Forum' started by rigerman, Apr 25, 2014.

  1. rigerman

    Thread Starter Member

    Apr 25, 2014
    40
    0
    Hi,

    I am new to this forum. Good day to everyone.

    I need to switch between 2 LEDs using a momentary DPDT switch. Can someone help me how to accomplish it?
     
  2. rigerman

    Thread Starter Member

    Apr 25, 2014
    40
    0
    To add to it, it can simply be a push button switch as well.
     
  3. inwo

    Well-Known Member

    Nov 7, 2013
    2,433
    315
    rigerman likes this.
  4. rigerman

    Thread Starter Member

    Apr 25, 2014
    40
    0
    Thanks INWO!
     
  5. rigerman

    Thread Starter Member

    Apr 25, 2014
    40
    0
    But if I replace the push buttons with a momentary DPDT switch will the circuits still work? Because when I am toggling the DPDT I am actually reversing the direction of the current. DC 12V in this case.
     
  6. rigerman

    Thread Starter Member

    Apr 25, 2014
    40
    0
  7. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,779
    1,103
    Does a LED have to stay lit only while the switch is held in an 'on' position? Or must it light then and stay lit until the switch is moved to the opposite 'on' position; i.e. there is a latching action?

    Edit: I'm guessing this is for a model railway turnout indicator?
     
    rigerman likes this.
  8. rigerman

    Thread Starter Member

    Apr 25, 2014
    40
    0
    The LED should stay lit till the switch is moved to the opposite on position.

    You guessed it perfect. The momentary switch throws the turnout in either the straight or diverging direction (depending on position A or B of the DPDT) and the turnout stays there till the switch is reversed. However from a distance, visualizing is very tough and thus an indicator is needed on the control panel.
     
  9. djsfantasi

    AAC Fanatic!

    Apr 11, 2010
    2,802
    832
    Model railroader, here!

    What is the make of the turnout switch? Many of them have extra contacts to drive external LED position lights.

    Solenoid coil based machines as far as I have seen, do not require the current to be reversed. In that case, I have wired a regular DPDT switch with one set of contacts driving the indicator lights and the second set wired in series with a momentary pushbutton switch to energize the coils.

    If your turnout switch does require current to be reversed, one could wire a small bridge rectifier in parallel with the output - giving you a DC source to drive one of the flip flop circuits presented earlier.

    Please let us know the make and full wiring diagram of the turnout switch you are using.
     
    Last edited: Apr 25, 2014
    rigerman likes this.
  10. inwo

    Well-Known Member

    Nov 7, 2013
    2,433
    315
    The flip flop could get out of step.
    This is better.

    [​IMG]

    Replace the switches with a diode connecting cathode to "mechanical part" red and blue respectively.

    Which ever (red or blue) goes to ground will turn off that NPN.
    Series diodes added in emitter circuit may be a good idea.
     
    rigerman likes this.
  11. rigerman

    Thread Starter Member

    Apr 25, 2014
    40
    0
    I am using Kato #6 turnouts for N scale. These turnouts need a momentary voltage to throw the turnout in either of the direction. One of the easy solution is to use a two step process as you mentioned, use a normal DPDT for the polarity change and a push button for the turn out supply. I am trying to eliminate the dual process by a single action. That is momentary DPDT.

    [​IMG]
     
  12. rigerman

    Thread Starter Member

    Apr 25, 2014
    40
    0
    So the cathode of the diodes will be grounded as well as connected to the "mechanical part" ?
     
  13. John P

    AAC Fanatic!

    Oct 14, 2008
    1,632
    224
    Kato turnouts have a unique feature where they're operated by a momentary pulse on a single coil, with the direction of the current controlling which way the solenoid moves. You can see in the picture that there are only 2 wires. A good way to operate them is with an A.C. source and a pair of pushbuttons each in series with with a diode, and you could then take that pulsing high or low voltage and use it to set or reset a transistor latch. But you'd have to live with the situation where the LED might not be right when layout power is first turned on.
     
  14. rigerman

    Thread Starter Member

    Apr 25, 2014
    40
    0
    Seems like a complex problem here.
     
  15. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Latching relays may be your most simple bet. There are latching relays which have two coils, and latching relays with single coils. Either might work with your situation.

    Here is an example latching relay at just over $2/ea when buying singly, offered by Digikey, who is a reputable distributor:
    http://www.digikey.com/product-detail/en/EC2-12SNU/399-11030-5-ND/4291096
    You get a pretty good price break at 50 units - it's good to have spares of the same part type, so keep that in mind if you're planning on adding a lot of switches to your layout.

    Basically, you'll just connect the coil of that relay in series with a 910 Ohm resistor (to drop the difference between the 12v rating of the coil and your RR's 19v supply) up in parallel with your switch machine's coil/motor terminals, connect your positive LED supply in series with a resistor (say, 2k) to one of the contact set's common terminals, the N.O. contact to a green LED's anode, the N.C. contact to a red LED's anode, and the cathodes of both LEDs to ground.

    I'll post a schematic, but want to verify if your supply is 19v or something else?

    Did you want to make a circuit board to mount a bunch of these things, or were you planning on making them separately?
     
    Last edited: Apr 25, 2014
    djsfantasi and rigerman like this.
  16. rigerman

    Thread Starter Member

    Apr 25, 2014
    40
    0
    My supply for the switches is 5V. Kato switches operate fine on 5V DC.
     
  17. djsfantasi

    AAC Fanatic!

    Apr 11, 2010
    2,802
    832
    Using standard DPDT switches, a momentary pushbutton, and a bicolor LED produces a simple solution. See my diagram below.

    [​IMG]
     
    rigerman likes this.
  18. rigerman

    Thread Starter Member

    Apr 25, 2014
    40
    0
    Yes, indeed but when the number of switches is like 20 the 2 step action becomes monotonous during the operation. So my intention is to make a single step action that will throw the turnout and at the same time, indicate it's direction.
     
  19. John P

    AAC Fanatic!

    Oct 14, 2008
    1,632
    224
    Another approach might be to use a very low-power electronic latch and keep it powered with a battery. For instance, the CD4013 has a max power draw of 1uA at 5V, so you wouldn't be buying batteries very often. I'm not sure how to turn the output into something that will drive LEDs and not draw any battery power when main layout power is off, though.
     
  20. rigerman

    Thread Starter Member

    Apr 25, 2014
    40
    0
    That will be good and why a battery, I already have a 5V regulated DC supply in hand. Why can't that be put.
     
Loading...