needed: Set/Reset latch controlled from same spst switch

Discussion in 'The Projects Forum' started by Steve C, Dec 4, 2008.

  1. Steve C

    Thread Starter Active Member

    Nov 29, 2008
    I need a circuit or hints towards making a circuit that is a simple set/reset latch. one that works under the following conditions:

    -Set and Reset action from a single input switch

    -The input switch goes from float to ground when pressed.

    -The latch output needs to rest at Vcc when powered on and idle, and ground when set. back to Vcc when reset, and not grounded with power removed even when the circuit is still grounded.

    -Finally, the latch needs to activate when the input goes from float to ground. when the switch is pushed.

    I tried this circuit:


    But it latches on the input release. No good!

    I've got a bunch of transistors, diodes, some 40XX circuits (NANDs and JK flip flops) laying around, and some more. And of course plenty of components.

    Supposedly this circuit will do it:


    But I hate relays because they are noisy, expensive, and large. I'd be happy to consider this option if I can have a silent relay that takes up less than approx. 1/2"x1/4" of PC boardspace (preferrably much less). I don't have any of those in my project box though...
  2. beenthere

    Retired Moderator

    Apr 20, 2004
    With a debounce circuit, you could use the PBSW to toggle the state of a flip flop. An R-S latch has to have one input high and the other low, requiring a SPDT switch.
  3. Steve C

    Thread Starter Active Member

    Nov 29, 2008
    Because of the application, I don't get to choose my switch. I only have access to a momentary SPST switch that switches ground.

    I can make it SPDT by using it to close or open a relay, but it still ends up momentary rather than push-on, push-off.

    Any way using this kind of input?
  4. mik3

    Senior Member

    Feb 4, 2008
    You can use a T type flip flop (actually it is a JK flip flop with both J and K at logic 1) and make your job. It has two outputs, Q and Q'. When you switch the power on its Q output is high (set) and its Q' is low. Once you push the button it will reset and its Q' output will go high and the Q output will go low. If you press the button again the Q will go high and Q' will go low. Every time you push the button the outputs toggle.Look here for more information:
  5. eblc1388

    Senior Member

    Nov 28, 2008
    You can try the following circuit. Its a classic bi-stable with key debounce already built in. However, it does not use a ground reference push button.

    I would recommend using a small reed switch or relay connected to your existing push button and the reed is small and virtually noiseless in operation.
  6. Wendy


    Mar 24, 2008
    You mentioned using an existing flip flop chip, you can debounce the switch thusly...


    If it triggers on the wrong part of the button press just move the switch/resistor to the other side of the power supply (the switch contacting Vcc and the resistor to ground, this inverts the signal).