Five simple yet effective electronic toggle flip flop switch circuits can be built around the IC 4017, IC 4093, and IC 4013. We will see how these can be implemented for switching a relay alternately ON OFF by alternately pressing a single push-button or through touch pads, which in turn will switch an electronic load such as fan, lights, or any similar appliance using a single push-button pressing.
What's a Flip Flop Circuit
A flip flop relay circuit works on a bistable circuit concept in which it has two stable stages either ON or OFF.
When used in practical applications circuits it allows a connected load to alternately toggle from an ON state to OFF state and vice versa in response to an external ON/OFF switching trigger through push button or touch pads.
So basically, it is a single push button relay ON/OFF circuit, which will alternately turn ON and OFF a relay and the connected load, in response to the alternate pressing of a push button or a touch pad.
In our following examples I have explained how to make a 4017 IC and 4093 IC based flip flop relay circuits.
These are designed to respond to alternate triggers through push-button, and correspondingly operate a relay and a load alternately from an ON state to OFF state and vice versa.
By adding just a handful of other passive components the circuit can be made to toggle accurately through subsequent input triggers either manually or electronically.
They may be operated through external triggers either manually or an electronic stage.
1) Simple Electronic Toggle Switch Flip Flop Circuit Using IC 4017
The first idea talks about an useful electronic flip flop toggle switch circuit built around the IC 4017. The component count here is minimum, and the result obtained is always up to the mark.
Referring to the figure we see that the IC is wired into its standard configuration, i.e. a logic high at its output shifts from one pin to the other in the influence of the applied clock at its pin # 14.
The alternate toggling at its clock input is recognized as clock pulses and is converted into the required toggling at its output pins. The whole operation may me understood with the following points:
Parts List
- R4 = 10K,
- R5 = 100K,
- R6, R7 = 4K7,
- C6, C7 = 10µF/25V,
- C8 = 1000µF/25V,
- C10 = 0.1, DISC,
- ALL DIODES ARE 1N4007,
- IC = 4017,
- T1 = BC 547, T2 = BC 557,
- IC2 = 7812
- TRANSFORMER = 0-12V, 500ma, INPUT AS PER AREA SPECIFICATIONS.
How it Works
We know that in response to every logic high pulse at pin #14, the output pins of the IC 4017 are switched high sequentially from # 3 to # 11 in the order: 3, 4, 2, 7, 1, 5, 6, 9, 10, and 11.
However, this proceeding may be stopped at any instant and repeated by just connecting any of the above pins to the reset pin # 15.
For example (in the present case), pin # 4 of the IC is connected to pin #15, therefore, sequence will be restricted and will bounce back to its initial position (pin # 3) each time the sequence (logic High) reaches pin # 4 and the cycle repeats.
It simply means that now the sequence toggles from pin # 3 to pin # 2 in a back and forth manner constituting a typical toggling action.
The operation of this electronic toggle switch circuit may be further understood as follows:
Every time a positive trigger is applied to the base of T1, it conducts and pulls down pin # 14 of the IC to ground. This brings the IC to a standby position.
The moment the trigger is removed, T1 stops conducting, pin # 14 now instantly receives a positive pulse from R1.
The IC acknowledges this as a clock signal and quickly toggles its output from its initial pin #3 to pin #2.
The next pulse produces the same result so that now the output shifts from pin #2 to pin #4, but since pin #4 is connected to reset pin #15, as explained, the situation bounces back to pin #3 (initial point).
Thus the procedure is repeated every time T1 receives a trigger either manually or through an external circuit.
Video Clip:
Upgrading the circuit to control more than one load
Now let's see how the above IC 4017 concept can be upgraded to operate 10 possible electrical loads through a single push button.
The idea was requested by Mr. Dheeraj.
Circuit Objectives and Requirements
I am Dhiraj Pathak from Assam, India.
As per the below diagram, following following operations should take place -
- The AC switch S1 when switched ON for the first time, AC load 1 should switch On and stay in ON state till S1 is witched OFF. AC load 2 should stay off during this operation
- The second time when S1 is again switched ON, AC Load 2 should switch ON and stay ON till S1 is switched OFF. AC load 1 should stay off during this operation
- The third time when S1 is again switched ON, both the AC loads should switch ON and stay ON till S1 is switched OFF.4. The fourth time when the S1 is switched ON , the operation cycle should repeat as mentioned in step 1, 2 and 3.
My intention is to use this design in my single living room of my rented apartment. The room has concealed wiring and the fan is located at the center of the roof.
The light will be connected parallel to the fan as a center light for the room. There is no extra power outlet at the center of the roof. Only outlet available is for the fan.
I do not wish to run separate wires from switchboard to the center light. Hence, I though of designing a logical circuit which can detect the state (On/OFF) of the power source and switch loads accordingly.
For using the center light, I do not wish to keep the fan ON all the time and vice versa.
Every time the circuit is powered ON, the last know state should trigger the next operation of the circuit.
The Design
A simple electronic switch circuit customized to perform the above mentioned functions is shown below, without an MCU.
A bell push-button type switch is used for executing the sequential switching for the connected light and fan.
The design is self explanatory, if you have any doubts regarding the circuit description, please feel free to get it clarified through your comments.
Electronic Switch without Push Button
As per the request and the feedback received from Mr. Dheeraj, the above design can be modified to work without a push button.... that is, using the existing ON/OFF switch at the mains input side for generating the specified toggling sequences.
The updated design can be witnessed in the below given figure:
Another interesting ON OFF relay witch with a single button can be configured using a single IC 4093. I have explained the procedures with the following explanation.
2) Accurate CMOS Flip Flop Circuit Using IC 4093
IC4093 Pinout Details
Parts List
- R3 = 10K,
- R4, R5 = 2M2,
- R6, R7 = 39K,
- C4, C5 = 0.22, DISC,
- C6 = 100µF/25V,
- D4, D5 = 1N4148,
- T1 = BC 547,
- IC = 4093,
The second concept is about a rather accurate circuit can be made using three gates of IC 4093. Looking at the figure we see that the inputs of N1 and N2 are joined together to form logic inverters, just like NOT gates.
It means that, any logic level applied to their inputs will be inverted at their outputs. Also, these two gates are connected in series to form a latch configuration with the help of a feedback loop via R5.
N1 and N2 will instantly latch the moment it senses a positive trigger at its input. Another gate N3 has been introduced basically to break this latch alternately after every subsequent input pulse.
The functioning of the circuit may be further understood with following explanation:
How it Works
On receiving a pulse at the trigger input, N1 quickly responds, its output changes state forcing N2 to also change state.
This causes the output of N2 to go high providing a feedback (via R5) to N1’s input and both the gates latch in that position.
At this position the output of N2 is locked at logic high, the preceding control circuit activates the relay and the connected load.
The high output also slowly charges C4, so that now one input of gate N3 becomes high. At this juncture, the other input of N3 is held at logic low by R7.
Now a pulse at the trigger point will make this input also go high momentarily, forcing its output to go low. This will pull the input of N1 to ground via D4, instantly breaking the latch.
This will make the output of N2 to go low, deactivating the transistor and the relay. The circuit is now back to its original state and ready for the next input trigger to repeat the entire procedure.
3) Flip Flop Circuit using IC 4013
The quick availability of the many CMOS ICs today has made designing of much complicated circuits a child's play, and no doubt the new enthusiasts are enjoying making circuits with these magnificent ICs.
One such device is the IC 4013, which is basically a dual D-type flip flop IC, and may be used discretely for implementing the proposed actions.
In short the IC carries two in built modules which may be easily configured as flip flops just by adding a few external passive components.
IC 4013 Pinout Function
The IC may be understood with the following points.
Each individual flip flop module consists of the following pin outs:
- Q and Qdash = Complementary outputs
- CLK = Clock input.
- Data = Irrelevant pin out, must be either connected to the positive supply line or the negative supply line.
- SET and RESET = Complementary pin outs used for setting or resetting the output conditions.
The outputs Q and Qdash switch their logic states alternately in response to the set/reset or the clock pin out inputs.
When a clock frequency is applied at the CLK input, the output Q and Qdash change states alternately as long as the clocks keep repeating.
Similarly the Q and Qdash status can be changed by manually pulsing the set or the reset pins with a positive voltage source.
Normally the set and the reset pin should be connected to the ground when not utilized.
The following circuit diagram shows a simple IC 4013 set up which may be used as a flip flop circuit and applied for the intended needs.
Both may be utilized if required, however if only one of them is employed, make sure the set/reset/data and clock pins of the other unused section is grounded appropriately.
A practical application flip flop circuit example can be seen below, using the above explained 4013 IC
Mains Failure Backup and Memory for the Flip Flp Circuit
If you are interested to include a mains failure memory and back up facility for the above explained 4013 design, you can upgrade it with a capacitor backup as shown in the following figure:
As can be seen, a high value capacitor and resistor network is added with the supply terminal of the IC, and also a couple of diodes to ensure that the stored energy inside the capacitor is used for supplying only the IC and not to the other external stages.
Whenever mains AC fails, the 2200 uF capacitor steadily and very slowly allows its stored energy to reach the supply pin of the IC keeping the IC's "memory alive" and to make sure that the latch position is remembered by the IC while the mains is unavailable.
As soon as the mains returns, the IC delivers the original latching action on the relay as per the earlier situation, and thus prevents the relays from losing its previous switch ON status during the mains absence.
4) SPDT Electronic 220V Toggle Switch using IC 741
A toggle switch refers to a device which is used for switching an electrical circuit ON and OFF alternately whenever required.
Normally mechanical switches are used for such operations and are extensively employed wherever electrical switching is required.
However mechanical switches have one big drawback, they are prone to wear and tear and have the tendency of producing sparking and RF noise.
A simple circuit explained here provides an electronic alternative to the above operations. Using a single op amp and a few other cheap passive parts, a very interesting electronic toggle switch can be built and used for the said purpose.
Though the circuit also employs a mechanical input device but this mechanical switch is a tiny micro switch which just requires alternate pushing for implementing the proposed toggling actions.
A micro switch is a versatile device and very much resistant to mechanical stress and therefore does not affect the efficiency of the circuit.
How the Circuit Functions
The figure shows a straightforward electronic toggle switch circuit design, incorporating a 741 opamp as the main part.
The IC is configured as a high gain amplifier and therefore its output has the tendency of easily getting triggered to either logic 1 or logic 0, alternately.
A tiny portion of the output potential is applied back to the non inverting input of opamp
When the push button is operated, C1 connects with the inverting input of the opamp.
Assuming the output was at logic 0, the opamp immediately changes state.
C1 now begins charging through R1.
However keeping the switch pressed for a longer period of time will only charge C1 fractionally and only when it’s released does C1 begins charging up and continues to charge up to the supply voltage level.
Because the switch is open, now C1 gets disconnected and this helps it to “retain” the output information.
Now if the switch is pressed once again, the high output across the fully charged C1 becomes available at the inverting input of the op amp, the op amp yet again changes state and creates a logic 0 at the output so that C1 starts discharging bringing the position of the circuit to the original condition.
The circuit is restored and is ready for the next repetition of the above cycle.
The output is a standard triac trigger set up used for responding to the outputs of the opamp for the relevant switching actions of the connected load.
Parts List
- R1, R8 = 1M,
- R2, R3, R5, R6 = 10K,
- R4 = 220K,
- R7 = 1K
- R9 = 22 ohm 2 watt
- C1 = 0.1uF,
- C2,C3 = 470uF/25V,
- S1 = micro-switch Push Button,
- IC1 = 741
- Triac BT136
- D1, D2 = 1N4007 Diodes
IC 741 Flip Flop using Set/Reset Touch Pads
A 741 IC can be also used to create a set/reset type of flip flop circuit, using two sets of touch pads.
As shown in the above figure, the upper sets of touch pads can be used to trigger ON the 741 output which in turn switches ON the relay driver stage and the load.
When the lower pair of touch pads are touched the IC 741 is resets to its original condition causing the output to the relay driver stage to turn OFF.
5) Transistor Bistable Flip Flop
Under this fifth and last but not the least fliop flop design I have explained a couple of transistorized flip flop circuits which can be used for toggling a load ON/OFF through a single push button trigger.
These are also called transistor bistable circuits.
The term transistor bistable refers to a state of a circuit where the circuit works with an external trigger to render itself stable (permanently) over two states: ON state and OFF state, hence the name bistable meaning stable on either ON/OFF states.
This ON/OFF stable toggling of the circuit alternately could be normally done through a mechanical push button or through a digital voltage trigger inputs.
So I have explained the proposed bistable transistor circuits with the help of the following two circuit examples:
Circuit Operation
In the first example we can see a simple cross coupled transistor circuit which looks quite similar to a monostable multivibrator configuration except the the base to positive resistors which are missing here intentionally.
Understanding the transistor bistable functioning is rather straightforward.
As soon as power is switched ON, depending upon the slight imbalance in the component values and the transistor characteristics, one of the transistor will switch ON completely rendering the other to switch OFF completely.
Suppose we consider the right hand side transistor to conduct first, it will get its biasing via the left hand side LED, 1k and the 22uF capacitor.
Once the right hand side transistor has switched completely, the left transistor will switch OFF completely since its base will now be held to ground via the 10k resistor across the right transistor collector/emitter.
The above position will be held solid and permanent as long as power to the circuit is sustained or until the push-to-ON switch is depressed.
When the the shown push button is pushed momentarily, the left 22uF capacitor now will be unable to show any response since its already fully charged.
However the right 22uF being in a discharged state will get an opportunity to conduct freely and provide a harder biasing to the left transistor which will instantly switch ON reverting the situation in its favor, wherein the right hand side transistor will be forced to shut off.
The above position will be held intact until the press button is yet again pressed. The toggling can be flipped alternately from left to right transistor and vice versa by actuating the push switch momentarily.
The connected LEDs will light up alternately depending upon which transistor is rendered active due to the bistable actions.
Circuit Diagram
Transistor bistable flip-flop circuit using a relay
In the above example I have explained how a couple of transistors can be made to latch in bistable modes by pressing a single push button and used for toggling relevant LEds and the required indications.
In many occasions a relay toggling becomes imperative in order to switch heavier external loads.
The same circuit which is explained above can be applied for activating a relay ON/OFF with some ordinary modifications.
Looking at the following transistor bistable configuration we see that the circuit is basically identical to the above except the right hand LED which is now replaced with a relay and the resistor values have been adjusted a bit for facilitating more current that may be required for the relay activation.
The operations of the circuit is also identical.
Pressing the switch will either switch OFF or switch ON the relay depending upon the initial condition of the circuit.
The relay can be flipped alternately from an ON state to OFF state simply by pressing the attached push button as many times as desired for switching the external load connected with the relay contacts accordingly.
Bistable Flip Flop Image
Do you any more ideas regrading flip flop projects, please do share with us, we'll be most glad to post them here for you and for the pleasure of all the dedicated readers.
Flip Flop Circuit using IC 4027
After touching the touch-finger pad. Transistor T1 (a type of pnp) begins to operate. The resultant pulse at the 4027 's input clock has extremely sluggish edges (due to CI and C2).
Accordingly (and extraordinarily) the first J -K flip-flop in 4027 then serves as a Schmitt control gate turning the very sluggish pulse at its input (pin 13) into a smooth electrical signal that can be added to the next flip-flop's clock input (pin 3).
Afterwards the second flip-flop functions as per the textbook, providing a real switching signal which can be used to turn a relay on and off through a transistor stage, T2.
The relay conducts alternately if you tap the contact plate with your finger.
The circuit current consumption while the relay is off is less than 1 mA, and when the relay is on, up to 50 mA. Any relay that is more affordable can be used for as long as the coil voltage level is 12 V
However use a relay with correctly rated contacts when operating a mains device.
Using IC 4049
Set-Reset Flip Flop Using IC 4011
CMOS IC's feature several benefits above TTL. One of the key features being the high input impedance. In the following figure, a couple of NOR gates are connected across each other with a cross coupled configuration to create a flipflop.
When touch plate S is touched background noise develops an AC voltage at G1 input. In the course of the first positive cycle G1 output turns negative which causes the flipflop to SET, switching ON the relay RLA1 on. This continues to be on as long as the R plate or the RESET plate is not touched.
R1 and R2 should not be removed given that they discharge any voltage levels developed on the plates soon after they are touched, hence enabling the flipflop to get its state altered swiftly.
R1 and R2 additionally protect against any static charges racking up, which can cause damage to the IC, when the supply is in the disconnected condition.
The 22Mohm resistors can be hard to obtain therefore a pair of 10 Mohm resistors can be connected in series.
The flip flop circuit could be kept switch ON continuously since a milliameter reveals absolutely no current being consumed in the relay off position.
In case relay RLA1 is removed TR 1 collector turns into a TTL output having a high fan out.
Attach the inputs of G3 and G4 to ground in case these are kept unused. The touch plates could be positioned many feet away from the IC only if shielded termination is used for the connecting wires.
Miscellaneous Flip Flop and Set/Reset Circuits
The following paragraphs explain a few more easy to build flip flop circuits using CMOS gates and op amp.
The first circuit uses a single buffer gate from the IC 4050. The second circuit uses a couple of gates from the IC 4011
Using a Single Buffer gate
A simple flip flop or set reset circuit can be easily built using a single buffer gate, such as from the IC 4050.
As shown in the above figure you just need a 10 M resistor and a couple of touch pads to configure the proposed flip flop circuit.
A relay driver stage can be seen attached with the output of the flip flop for activating the ON/OFF action of the load in response to the finger touch.
Set/Reset Flip Flop Circuit Using Two NAND Gates
If you have just a couple of NAND gates from an IC such as 4011, then you can easily build a nice little set/reset flip flop circuit as depicted in the above figure.
Touching the upper set of touch pads sets the flip flop, so that the relay driver is switched ON.
Touching the lower set of touch pads resets the flip flop such that the relay driver is switched OFF.
Warning: Please do not forget to connect a freewheeling diode across the relay coil for safeguarding the transistor
Set/Reset Flip Flop Circuit using a Single 4011 IC
If you don't like the use two sets of touch pads and are looking for a flip flop set/reset circuit with a single set of touch pads, then the following circuit will be perfect for your need.
When the touch pads are alternately touched and released, the outputs Q and Qbar alternately toggle high and low creating a set/reset operation across the outputs. The relay driver stage is toggled ON/OFF accordingly.
Have Questions? Please Comment below to Solve your Queries! Comments must be Related to the above Topic!!