# Something like a flip flop

I have a pneumatic chuck that needs a pulse that lasts a bit to open and close. Currently I have 2 foot pedals and each works in one direction. I would like to have just one pedal and a relay circuit to make it a flip-flop, but I only know how to do it digitaly.

When the pedal is pressed first time the signal should go in one direction as long as the pedal is pressed. When it's released the direction should change, and by pressing it again it should start again.

             ____                ____              ____
FOOTSW  ____|    |______________|    |____________|    |_______
____
SOLN-O  ________________________|    |_________________________
____                                  ____
SOLN-C  ____|    |________________________________|    |_______


Basicaly to get both a push button and a latching switch with the same pedal that in hadrware only has push buttons.

Is it possible to have this kind of functionality with just relays, and how?

I can solve the problem in general, I would just like to know if there's a solution to do it without other elements like timers, capacitors and microcontrollers.

• yes, sure, can build anything out of relay logic. But, you could also use a microcontroller to solve a control problem and be done with it. – Marcus Müller Jul 6 at 9:47
• Where to start to find out how to do it with relay logic? I know how to do it with microcontroller but it will take a bit of time to get all the parts, and I have almost infinite amount of relays on stock – Affaltar Jul 6 at 10:30
• Constructing a toggle flip-flop with relays is discussed here: How to control a motor with only relays and push button? – Dave Tweed Jul 6 at 11:33
• @DaveTweed Wow, that's very detailed explanation, but I have the problem that mine should work only while the button is pressed, and from the explanation, this one is in the middle of switching at that time. I'll try to understand it better and do something with it if someone doesn't have a direct solution – Affaltar Jul 6 at 11:48
• Hi Affaltar, Is the pneumatic chuck controlled by a 5/3 double solenoid valve or a 5/2 double solenoid valve? That is a key input required to devise the logic, be it with relays, logic gates or a programmable device. With that information, I would be able to provide you with a solution using relays. – vu2nan Jul 7 at 4:49

Solution 1: A latching relay.*

Have a look at latching relays.

Figure 1. There's an animation of one on [HomoFaciens.de] (https://www.homofaciens.de/technics-base-circuits-relay_en.htm) that explains the operation very well. (Click the "animate" link in the article to see it in action.)

Solution 2. A relay flip-flop.

simulate this circuit – Schematic created using CircuitLab

Figure 2. A weird relay toggle circuit.

How it works:

• On power-up both relays are off. The chuck solenoid, SOLN, is de-energised. (This is good as it gives you a predictable power-up state.)
• When FOOTSW is pressed RLY2 is powered on. SOLN will then be powered on.
• While FOOTSW is pressed RLY1 is shorted out and cannot energise.
• When FOOTSW is released RLY1 is connected in series with RLY2 and will energise. Both relays now receive half of the supply voltage. (See Note 1 below.)
• When RLY1 energises contacts RLY1a and RLY1b switch over setting it up for the next FOOTSW operation.
• On the next press of FOOTSW the bottom of RLY1 is grounded (giving full voltage to RLY1 as long as FOOTSW is held) and RLY2 is shorted out. It will switch off.
• When FOOTSW is released the circuit resets to the original state.

Note 1:
The circuit relies on the relays energising in series and on their own. That means operating on half of supply voltage and full supply voltage. You'll need to rummage through your selection of relays and find a pair that will operate when the coils are connected in series.

Figure 3. Timing diagram.

             ____                ____              ____
FOOTSW  ____|    |______________|    |____________|    |_______
______________                        _______
RLY1    _________|              |______________________|
___________________                   ____________
RLY2    ____|                   |_________________|


... but I need a pulse in different directions for the duration of holding the pedal.

Figure 4. Updated timing diagram.

             ____                ____              ____
FOOTSW  ____|    |______________|    |____________|    |_______
____
SOLN-O  ________________________|    |_________________________
____                                  ____
SOLN-C  ____|    |________________________________|    |_______


So the latching would chose the direction and second contacts on pedal would just activate it.

Correct. See Figure 5.

simulate this circuit

Figure 5. Schematic updated for timing diagram of Figure 4.

• So if I got it correctly, to get my functionality (2 solenoids, each works only while footswitch is pressed, switching between them), I would just need to put the other solenoid on the normaly closed side of RLY2b side, and the footswitch in series with that? I'll have to check if the relays we have work like that, but I believe that's exactly the solution I need. Just getting a latching relay would be a perfect solution, but I'd have to find one – Affaltar Jul 6 at 12:51
• No, the circuit latches. Hit the footswitch once and RLY2 turns on and stays on. Hit it again and it turns off. Yes, if you have two solenoids then connect one to the NO contact of RLY2b and the other to the NC. Let me know how you get on. – Transistor Jul 6 at 14:37
• Yeah, I got that the circuit latches, but I need a pulse in different directions for the duration of holding the pedal. I'll try to make it today and see if it works as I want it to. So the latching would chose the direction and second contacts on pedal would just activate it. I tried to make a schematic but it asks for payment before I can save it to share here – Affaltar Jul 7 at 4:32
• You can add one in using the CircuitLab button on the editor toolbar. Double-click a component to edit its properties. 'R' = rotate, 'H' = horizontal flip. 'V' = vertical flip. Note that when you use the CircuitLab button on the editor toolbar and "Save and Insert" on the editor an editable schematic is saved in your post. You don't need a CircuitLab account, no screengrabs, no image uploads, no background grid. – Transistor Jul 7 at 6:49
• "... but I need a pulse in different directions for the duration of holding the pedal." Clarification needed in your question then. It sounds like an on-off switch to me. Draw a timing diagram using the {} code formatting button which will use a fixed width font. See the example in my updated answer. – Transistor Jul 7 at 6:59

The latching relay referred to in 'Solution 1' of the accepted answer is also known as a ratchet relay. It gives an optimal solution with a part count of only one.

Here's the schematic using a readily available ratchet relay with 2NO + 2NC contacts.

Maybe I have't understood the qestion, but: If you are looking for a Simplest Soft Latching Power Switch Circuit, here you can see detailed review of it's schematic: in this video from EEVBLOG