Flip Flop Using IC 4013

The post explains how to make a simple 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 flip flop 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:

  1. Q and Qdash = Complementary outputs

  2. CLK = Clock input.

  3. Data = Irrelevant pin out, must be either connected to the positive supply line or the negative supply line.

  4. 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.

Making a Flip Flop Circuit


Both the flip flop 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 flip flop 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 2200uF 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.

Need Help? Please send your queries through Comments for quick replies!




Comments

is pin3 diff from pin 11??
which is positive? pin 12 or 13?? or are they the same??
same with pin 1, 2
pin 4-10 are grounded??
tnx Engr. Swagatam
- Wardenclyffe
Swagatam said…
Wardenclyffe,

there are two sets of flips flops in the IC, pin3 and pin1 are the two inputs respectively, the two sides of the IC have similar complimentary pins for the respective functions as assigned for the two flip flops.

all the pins shown connected with the ground are grounded.
Achuet Kumar said…
May I use this ic to make remote control switch with Ir receiver tsop1838
Sriram Kp said…
Hi, can u provide a full circuit to control two relays with two momentary switches with the above IC4013?
Thanks
Swagatam said…
Hi, i'll try to do it soon.
Sriram Kp said…
Thanks... waiting for the circuit. and provide me with LED facility. so that when relays 1,2 activated means green LEDs 1,2 will glow. and when relays 1,2 deactivated means red LEDs 1,2 will glow.
Swagatam said…
I have updated the required circuit in the above article
Sriram Kp said…
Thanks for the circuit. u r grt... Thank u very much.
Swagatam said…
you are welcome
Sriram Kp said…
I made the circuit. But its not working (toggling) properly. When press the push button for first time, the relay activated. Then second time, if I press the push button again, the relay is not de-activating. It is still in ON state only. Both the outputs are like that only. Dont know whats the issue. Kindly help.
Swagatam said…
sorry I can't troubleshot it without a practical check up...better you use a 4093 based flip flop or a 4017 based circuit as give in this article:

https://homemade-circuits.com/2011/12/build-these-simple-flip-flop-circuits.html

these are tested by me.
Sriram Kp said…
Hi, I need a dual flip flop IC switch with last action restored. Means, after powering ON the circuit, the relays will be in de-activated state. when I push the buttons on the IC, the relays will get activated. At this stage, if main power got failure and restored after sometime means the relays should be in activated state because the relay was in activated state before main power got failure.
Swagatam said…
Hi, use the above circuit, now it will surely work.

the mentioned memory feature may not be possible without an internal battery to keep the system alive during mains failure... or a high value capacitor in the order of 2200uF/6V might also do the job.

Sriram Kp said…
I tried. Still the above circuit is not working. And I want the IC alone to alive during the main power failure. So U suggested me to add the a 2200uF/6V capacitor. Is it 6v or 63v? I will use 12v power supply for the circuit. So if I use 2200uF/6V means, wont the capacitor blow off? If it won't means where to connect the capacitor and for how much hour the IC will alive with the help of the capacitor during the power failure? I need the IC alone to be alive for 2-3 hours during the main power failure.
Swagatam said…
in the previous diagram the "data" and the "Q2" pins were not connected, but now this has been corrected...so the circuit should work now, and this is the standard design so there's no doubt regarding this design.

2200uF/6V will do but will require some special wiring with the IC.....first confirm confirm the flip flop working then we can discuss that.
Swagatam said…
2200uF should be able to sustain more than 5 hours
Swagatam said…
Hi, I think I completely missed the resistor across the "clock" pin and ground (across the 1uF cap)...I have added it now.

according to me this was the only thing which was not allowing the circuit to work normally....you can try it now.


I am not sure whether a single 2200uF would be enough for 4 ICs....you will have experiment it and see.

the circuit should be built in the following manner:

connect the Vcc pin of the IC to the supply rail through a 1N4148 diode (cathode to Vcc pin)

next connect the 2200uF/25V cap across this Vcc and ground through a 1M resistor in series with its positive lead

if 1M does not help to keep the IC alive, you may reduce it to some lower value and check again


I have cancelled the 2200uF /6V idea to keep the circuit simple.
Swagatam said…
....and make sure to connect a 1N4148 diode directly from the positive lead of the 2200uF to the positive supply rail....cathode will be to positive lead of the 2200uF
Sriram Kp said…
Hi, I tested now ur above modified circuit. Its working correctly. Thanks. In the link which I gave before, so many resistors and capacitors are used in that circuit. May I know that y they have used that much for one flipflop itself? And u have connected pin 2 to pin 5 directly. But In the link which I gave early, resistor and cap is connected between pin 2 and pin 5. What is the purpose of that? Then they have mentioned about the "Bouncing" of the mechanical switch and they have reduced that effect by R and C. Whats that mean?
I have sketched as u said. Kindly check.
https://drive.google.com/open?id=0BwOHgjWzTjbwTlNKQmpwSG1sSkk

And I didnt understand ur last comment
"....and make sure to connect a 1N4148 diode directly from the positive lead of the 2200uF to the positive supply rail....cathode will be to positive lead of the 2200uF".
Swagatam said…
OK thanks,

the IC 4013 is a CMOS IC which is a digital IC, and these ICs have a high input resistance, therefore current limiting is not required for there input pins...and that's why there was no need of connecting a resistor between pin2 and pin5, however the inputs of CMOS ICs must be always terminated to a logic level, either (+) or (-), that's the reason I had to connect the "clock" pin to ground via the 10 k resistor....again this resistor value is not crucial, even a 1M would work, but 1M would make the discharging of 1uF slow which would have not allowed quick ON/OFF switching of the button possible and so I had to use a 10k for quick discharging of the 1uF

and the 1uF is introduced for the tackling the debouncing issue from the button....the series 1N4148 is also introduced to assist the same.

so as you can see every part has a reason behind it...we cannot just put anything or remove anything with our own wish and will...

your new link is not opening, lease toggle the "share" option to make it visible to me.
Sriram Kp said…
Sry. Try the link now.
https://drive.google.com/file/d/0BwOHgjWzTjbwTlNKQmpwSG1sSkk/view?usp=sharing

Is this fine or Do I have to connect one more diode to capacitor from power supply?
Bcoz I didnt understand this comment "....and make sure to connect a 1N4148 diode directly from the positive lead of the 2200uF to the positive supply rail....cathode will be to positive lead of the 2200uF".
Swagatam said…
your diagram is correct, now just connect another 1N4148 diode as explained earlier....connect cathode of the second diode with the (+) of the 2200uF, and anode with the (+) of the supply

if possible show me the modified final diagram.
Sriram Kp said…
I have added another diode as u said. Pls check it now.
Example 2:
https://drive.google.com/file/d/0BwOHgjWzTjbwaUFxcW1Ta1NOOE0/view?usp=sharing

If the above Example 2 link diagram is correct means, Can I connect 4 nos of 2200uf/25v cap in parallel for 4 nos of IC to keep the ICs alive? Kindly check the below link for that.
Example 3:
https://drive.google.com/file/d/0BwOHgjWzTjbwbEhiZ2hSS1JqSTQ/view?usp=sharing
Swagatam said…
yes the design is correct.....but you will need to use this network individually for each of the IC's supply pins for a better response....if the input voltage is 5V then 2200uF/9V will be enough
Sriram Kp said…
ok. I want to operate the IC at 5V. Thats y am giving 5v power supply. So if I use 2200uf/9v means what will be the power supply from the capacitor to the IC? whether 5v or 9v?
And If I use 2200uf/25v means what will be the output to the IC? 5v or 25v?
Swagatam said…
the supply from the capacitor will be same as the actual supply voltage, that is 5V and will slowly drop as it discharges

Contact me for Customized Circuits

Name

Email *

Message *


 Follow on G+  Follow on Facebook   Follow on Tweeter  Follow on G+  Follow on G+