1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

Logic DPST using a SPST switch?

Discussion in 'Datasheets, Manuals or Parts' started by slow_rider, May 20, 2009.

  1. slow_rider

    slow_rider New Member

    Joined:
    May 17, 2009
    Messages:
    19
    Likes:
    0
    I need to control two latching relays using a single momentary SPST switch. Can anyone recomend a good & cheap way to do this? Maybe a DPST logic IC that can be controlled using the SPST switch?

    Thanks!
     
  2. KMoffett

    KMoffett Well-Known Member

    Joined:
    Oct 5, 2007
    Messages:
    2,496
    Likes:
    58
    Location:
    Minnesota, USA
    I think we need more info.
    What are the relays' coil voltage and current?
    Are the latching relays 1-coil or 2-coil?
    Do you want both relays to switch states at the same time?
    Do you want one push of the SPST switch to latch the relays and a second push to unlatch them?

    Ken
     
  3. slow_rider

    slow_rider New Member

    Joined:
    May 17, 2009
    Messages:
    19
    Likes:
    0
    I agree, some details were skipped!

    I don't have an exact relay model but we are talking about signal type relays with a 4.5V or maybe 5V coils with a low current draw, 1 coil latching.

    Both coils should switch at the same time, and your description is accurate, I want a single push of the SPST tactile to latch them and the second one to unlatch them.

    I thought about this a little bit and I remember something called a multiplexer from logic class in university but I admit I forgot almost everything by now but maybe something like that could assist here?
     
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. Leftyretro

    Leftyretro New Member

    Joined:
    Mar 11, 2007
    Messages:
    1,420
    Likes:
    13
    Location:
    Hercules, California

    Well from a concept basis a SPST momentary switch could be used to clock a flip-flop and the Q & Q-bar outputs of the flip-flop could be used to set and reset the single coil latching relay(s). The fact that you want both relays to operate together means electrically you could treat them as one relay. A SPDT momentary switch would be better because a simple pair of cross coupled NAND gates could be used for the logic with no contact bounce problems to deal with. Simplest of all would be a DPDT momentary center off switch would could be wired directly to the latching relay coil that would require no additional intermediate logic.

    In fact some latching relays have DPDT contacts so maybe you can use just one, depending on what you need to switch with the contacts. Here is one low current single 5vdc coil DPDT relay that I have used several times:

    2 pcs 5 Volt Relay, Latching, 2 Form C (DPDT) AL5WNK - eBay (item 110366452444 end time Jun-17-09 16:20:10 PDT)

    Good luck;
    Lefty
     
    Last edited: May 20, 2009
  6. slow_rider

    slow_rider New Member

    Joined:
    May 17, 2009
    Messages:
    19
    Likes:
    0
    Are you talking about an SR flip-flop?
     
  7. Leftyretro

    Leftyretro New Member

    Joined:
    Mar 11, 2007
    Messages:
    1,420
    Likes:
    13
    Location:
    Hercules, California
    A cross coupled nand gate operates (is the same) as a SR flip-flop. A type D flip flop can also be used as a SR flip-flop by using the direct set and reset inputs.


    Lefty
     
  8. slow_rider

    slow_rider New Member

    Joined:
    May 17, 2009
    Messages:
    19
    Likes:
    0
    I took a second look on the FF, and if I'm not mistaking a JK-FF could be used for this function.

    I can hook J & K HI, when clicking on the tactile, CP will be set HI so Q(t+1) = Q-bar(t=0)

    Hooking up Q to the relay will give positive voltage when I click, negative on the next and so on...

    Is this correct?
     
  9. Leftyretro

    Leftyretro New Member

    Joined:
    Mar 11, 2007
    Messages:
    1,420
    Likes:
    13
    Location:
    Hercules, California
    The relay coil should wire to both the Q and Q-bar outputs, that is the polarity of the voltage applied to the coil must be reversed to switch the coil latch. You have to determine if the current capacity of the FF outputs can drive the coil directly or if you will need driver switching transistors to help supply the coil current requirements.

    The other problem is switch bounce on the FF's clock inpout. A switch wired directly to the clock input is bound to be erratic due to switch contact bounce. A R/C filter may help with that problem.

    Lefty
     
  10. slow_rider

    slow_rider New Member

    Joined:
    May 17, 2009
    Messages:
    19
    Likes:
    0
    Thanks for the help! Only one more question... any usefull links about how to actually build a JK-FF? Do they come in IC packages?
     
  11. Leftyretro

    Leftyretro New Member

    Joined:
    Mar 11, 2007
    Messages:
    1,420
    Likes:
    13
    Location:
    Hercules, California
    Yes they come in IC packages. Here is a link to show how the various flip flops are designed and operate.

    Flip-Flops

    Lefty
     
  12. KMoffett

    KMoffett Well-Known Member

    Joined:
    Oct 5, 2007
    Messages:
    2,496
    Likes:
    58
    Location:
    Minnesota, USA
    With leftyretro's relay (5V/28mA, DPDT), I think this circuit will work. I've combined circuits that I've seen, but have not bench tested it. The paralleled outputs are to get enough current drive for the relay.

    Ken
     

    Attached Files:

  13. slow_rider

    slow_rider New Member

    Joined:
    May 17, 2009
    Messages:
    19
    Likes:
    0
    Thank you very much, I really appreciate all the help from you the guys and the circuit will probably save me some time! :)
     
  14. Leftyretro

    Leftyretro New Member

    Joined:
    Mar 11, 2007
    Messages:
    1,420
    Likes:
    13
    Location:
    Hercules, California
    Nice circuit design K :)

    Lefty
     
  15. KMoffett

    KMoffett Well-Known Member

    Joined:
    Oct 5, 2007
    Messages:
    2,496
    Likes:
    58
    Location:
    Minnesota, USA
    The down side is that it doesn't really take advantage of the "latching" function unless you are concerned about loosing +5V power and want to retain the relay state. If that is not a concern, the OP might as well use a conventional relay.

    Ken
     
  16. slow_rider

    slow_rider New Member

    Joined:
    May 17, 2009
    Messages:
    19
    Likes:
    0
    So power has to remain ON at all times to the FF inputs? Anyway around this? Maybe connecting the inputs to the switch that goes to the CP input somehow? The signal has to be stable at the inputs before the CP gets the pulse somehow...
     
  17. KMoffett

    KMoffett Well-Known Member

    Joined:
    Oct 5, 2007
    Messages:
    2,496
    Likes:
    58
    Location:
    Minnesota, USA
    Again, more info would help. I'd rather help in solving your problem, than in solving your solution. ;) What exactly are are you trying to do? Details...details...details! :)

    Ken
     
    Last edited: May 21, 2009
  18. slow_rider

    slow_rider New Member

    Joined:
    May 17, 2009
    Messages:
    19
    Likes:
    0
    OK, here are the details...

    Originally I needed a DPDT foot switch to be fitted into a small box but there's not enough room for any switch I can buy. Using a SPST tactile switch with an actuator solves this problem and the actual switching will be performed by the relay. Since this will be battery operated I took a latching relay so it won't draw current while not doing actual switching. Idealy, the switching part of the device will be made out of as few parts as possible and will draw current only when switching to allow the longest battery life possible. I think the suggested circuit could work fine if there's a way to delay the signal to the CP input pin by even 1ms so the FF inputs would be stable before the clock signal reaches max and drops.

    I think that's all :)
     
    Last edited: May 22, 2009
  19. KMoffett

    KMoffett Well-Known Member

    Joined:
    Oct 5, 2007
    Messages:
    2,496
    Likes:
    58
    Location:
    Minnesota, USA
    Two more questions. The tactile switch is in the box, but the relay, battery, and toggling circuit will be somewhere else? What is the signal that is being switched by the relay?

    ken
     
  20. slow_rider

    slow_rider New Member

    Joined:
    May 17, 2009
    Messages:
    19
    Likes:
    0
    The relay, battery and all the electronic components are inside the box, a DPDT switch would not fit because of it's height. The signal being switched is an audio signal.
     
  21. KMoffett

    KMoffett Well-Known Member

    Joined:
    Oct 5, 2007
    Messages:
    2,496
    Likes:
    58
    Location:
    Minnesota, USA
    Then...another question. What are the dimensions for the available space within the box?

    Ken
     

Share This Page