555? Flip flop? How best to do this?

Discussion in 'General Electronics Chat' started by openplanet, Oct 8, 2011.

  1. openplanet

    Thread Starter New Member

    Jul 27, 2011
    I'm an electronics newbie, so pardon the ignorance. I'm building a little circuit that you might call a solid state latching relay, using an N-channel MOSFET. If I momentarily take the gate high, the MOSFET latches on. If I momentarily ground the gate, the MOSFET turns off. So far so good. Now, I want a circuit that will be controlled by remote momentary switch such that a momentary pulse from the switch produces a positive pulse to activate the MOSFET, and another positive pulse from the switch produces a negative pulse to turn the MOSFET off. I've looked at 555 circuits but can't see how I can use a 555 to accomplish this. All the flip flops I've looked at require separate set and reset lines. I just want one input to the circuit...high pulse to turn the MOSFET on, and another high pulse to turn it off. Thoughts? THanks!
  2. Wendy


    Mar 24, 2008
    Welcome to AAC!

    A 555 can be a latch, but it would need a high pulse to turn it on, and a low pulse to turn it off.

    There are huge options here though. A dual FF (flip flop) has two per package, all you need is one. Something like a CD4013 would work well.

    You didn't mention where the pulse is coming from, so anything I might show is somewhat speculative.

    I'll draw up a quick schematic to show how to use the 4013.

    While I'm about it, I'll show you what I was talking about with the 555

    Last edited: Oct 8, 2011
  3. crutschow


    Mar 14, 2008
    If the pulse is from a mechanical switch then you will need to add a debounce circuit, of course, if you are driving the clock input of the D FF.
  4. elec_mech

    Senior Member

    Nov 12, 2008
    Here is an example configuring a D-type flip flop into a T-type flip flop as Bill as showed earlier. There is also added circuitry to make sure the output is off when power is first applied to the circuit (otherwise you'll never know how it starts). You can connect the output to an N-channel MOSFET.

    As crutschow mentioned, you'll need to add a debouncing circuit if using a mechanical switch. You can do that with a CD4093, a capacitor and a resistor. I can post a circuit if desired.

    Hope this helps and welcome to the forum!
  5. openplanet

    Thread Starter New Member

    Jul 27, 2011
    What a welcome! Thank you all so much for the information. Very, very much appreciated. I guess that for simplicity's sake I'll end up using two momentary switches, one that momentarily grounds the gate and one that momentarily takes it high. That seems less complicated in the long run. Years ago I saw a mechanical latching relay that consisted of a solenoid, a switch, and a clever mechanism that caused an arm to toggle and latch with each momentary activation of the solenoid. This would alternately turn the switch on and off. That's essentially what I'm trying to accomplish with circuitry. Again gentlemen, thank you!
  6. openplanet

    Thread Starter New Member

    Jul 27, 2011
    Attached is a schematic of a MOSFET circuit from the 'Net. I wired this up, and noticed that it worked fine whether the 1Megohm resistor is there or not. Can someone explain its purpose? My guess is that someone will say it's a pullup, but I still don't really understand why it's needed if the circuit works without it.

    Also, regarding the use of the flip flop to toggle the MOSFET, is it ok for the gate to stay positive while the MOSFET is on? If so, it makes me wonder why I'm using a MOSFET, which latches on with a momentary pulse, rather than something like a TIP122.

    Again, thanks so much. This forum is a real discovery!
  7. SgtWookie


    Jul 17, 2007
    The schematic you attached is not correct.

    You have the input going to pin 6. Pin 6 is the SET input. The input clock needs to be on pin 3, which is currently shown floating (disconnected).

    Pin 3 should also have a pull-down resistor.
  8. shortbus

    AAC Fanatic!

    Sep 30, 2009
    Does it have to be a flip-flop? How about a DIP latching relay? they can be mounted on a PCB. Like this one; http://www.futurlec.com/Relays/LATCHREL5V.shtml There are other voltages available if this isn't correct for your circuit.
  9. SgtWookie


    Jul 17, 2007
    That would need two buttons; one to latch it, and another to unlatch.
    shortbus likes this.