A "Clap On Clap Off" switch is an interesting concept that could be used in home automation. It works as a switch which makes devices On and Off by making a clap sound. Although its name is “Clap switch”, but it can be turned ON by any sound of about same pitch of Clap sound. The main component of the circuit is the Electric Condenser Mic, which has been used as a sound sensor. Condenser Mic basically converts sound energy into electrical energy, that in turns used to trigger 555 timer IC, through a Transistor. And triggering of 555 ic works as a Clock pulse for D-type flip-flop and would turn ON the LED, which will remain ON until the next clock pulse means until the next Clap/sound. So this is the Clap Switch which will turn ON with first Clap and turn OFF with the second Clap. If we remove the D-type Flip flop from the circuit, the LED will be turned OFF automatically after some time and this time will be 1.1xR1xC1 seconds, which I have explained in my previous circuit of clap switch. For better understanding, I recommend to study the previous circuit before study this one.
Here we are using Electric Condenser Mic for sensing the sound, transistor to trigger the 555 timer IC, 555 IC to SET & RESET the D-type flip flop and D-type flip flop to remember the logic level (LED ON or OFF) until next Clap/sound.
555 Timer IC
Resistors (1k, 47k, 100k ohm)
IC7474 more precisely DM74S74N (D-type flip flop)
LED and Battery (5-9v)
Circuit Diagram and Explanation
You can see the connections in above "clap on clap off circuit diagram". Initially the transistor is in OFF state because there is not enough (0.7v) base-emitter voltage to turn it ON. And the point A is at high potential, and point A is connected to Trigger pin 2 of 555 IC, as a result Trigger pin 2 is also at high potential. As we know that, to trigger the 555 IC through Trigger PIN 2, the voltage of the PIN 2 must be below Vcc/3. So at this stage no output at OUT PIN 3, means no clock pulse for D-type Flip-flop (IC 7474), thereby no response from D-type Flip-flop, and so LED is OFF.
Now when we produce some sound near condenser mic, this sound will be converted into electrical energy and it will raise the potential at the Base, which will turn the Transistor ON. As soon as the transistor becomes ON, the potential at Point A would become low and it will trigger the 555 IC because of the low voltage (below Vcc/3) at Trigger Pin 2. So the output PIN3 will be high and a positive clock pulse will be applied to D-type Flip-flop, which makes Flip-flop to respond and LED will turn ON. This SET state of flip flop will remain as it is until the next clock pulse (next Clap). Detailed working of D-type Flip-flop has been given below.
Here we are using 555 timer IC in Monostable Mode, whose output (PIN 3 of 555 IC) has been used as a clock pulse for D-type Flip-flop. So the clock pulse will be HIGH for 1.1xR1xC1 seconds and then it would become LOW. You can learn 555 IC operations through some 555 timer circuits HERE.
Working of D-type Flip-flop
Here we are using Positive Edge Triggered D-type flip-flop, which means this flip flop only responds when clock pulse would go from LOW to HIGH. OUTPUT Q will be shown according to state of INPUT D, at the time of the Clock pulse transition (Low to High). Flip flop remembers this OUTPUT state Q (Either HIGH or LOW), until the next positive clock pulse (Low to High). And again shows the OUPUT Q, according to the input state D, at the time of clock pulse transition (LOW to HIGH)
D-type Flip-flop is basically the advanced version of S-R flipflop. In S-R flipflop, the S=0 and R=0 is forbidden, because it is making the flip-flop behaving unexpectedly. This problem is resolved in D-type Flip-flop, by adding a Inverter between both the inputs (see the diagram) and the second input is given by the Clock pulse to both the NAND gates. Inverter is introduced to avoid same logic levels at both the inputs, so that “S=0 and R=0” condition never occurs.
D-type Flip-flop doesn’t change its state while clock pulse is low, because it gives the output logic level “1” at NAND gates A and B, which is the input for NAND gates X and Y. And when both the inputs are 1 for NAND gates X and Y, then output don’t change (remember S-R flip-flop). The conclusion is that it will not change its state while clockpulse is LOW, regardless of INPUT D. It only change when there is transition in Clock pulse from LOW to HIGH. It won’t change during the HIGH and LOW period. We can deduce the truth table for this D-Flip-flop:
↓ » 0
↑ » 1
Reset Q » 0
↑ » 1
Set Q » 1
We have used IC DM74S74N of 7474 series. IC DM74S74N is the Dual D-type Flip-flop IC, in which there are two D-type Flip-flops, which can be either used individually or as a master-slave toggle combination. We are using one D-type Flip-flop in our circuit. Pins for first D flip-flop are the left side and for second flip flop are at right side. Also there are PRE and CLR pins for both the D-type Flip-flops which are active-low pins. These pin used to SET or RESET the D-type Flip-flop respectively, regardless of INPUT D and Clock. We have connected both to Vcc to make them inactive.
After understanding the D-type Flip-flop and IC DM74S74N, we can easily understand the use of D-type Flip-flop in our circuit. When we first triggered the 555 IC by first Clap, the LED glows as we get Q=1 and Q’=0. And it will remain ON until the next trigger or next positive clock pulse (LOW to HIGH). We have connected Q’ to to INPUT D, so when LED is glowing, Q’=0 is waiting for Second Clock pulse, so that it can be applied to the INPUT D and makes Q=0 and Q’=1, which in turns TURN OFF the LED. Now Q’=1 is waiting for next clock pulse to make the LED turn ON by applying Q’=1 to INPUT D, and so on this process will continue.
To test this circuit you need to clap loudly as this small condenser mic don’t have long range. Or you can directly hit at the mic lightly (like I have done in the video).
Some Important Points
- If circuit doesn’t works at first, then connect the CLR (PIN1 of IC DM74S74N) to the ground to RESET the flip-flop, then again connect to Vcc as shown in circuit.
- We can modify this circuit using Relay to control the Electronic devices (120/220V AC).
- Control PIN 5 of 555 Timer IC should be connected to Ground through a 0.01uF capacitor.
- We should use a 220 ohm resistor to connect LED.
where is you R2 Resistor in your diagram?, because in the list of your resistors they are 4 resistor which is 1k, 10k, 47k, and 100k, so where is 10k or R2?
Can you send me a modified circuit for 220VAC? please.
Will this work if i use a 6V source?
yes, you can use 6v.
How can i adjust the sensitivity of the microphone?
By using the proper value of Pull-Up resistor with your Mic, refer datasheet. Or use variable resistor and try different values. Or use different Microphone.
Can I use BC548 /BC 557 transistor in place of BC547
Yes you can use BC548. But don't use BC557 as it is a PNP transistor and we are using NPN here.
i used 74f74pc ic and im having problem , when i connect battery ,light gets onn and remain on what should i do ???
YOU LEFT PINS 8 , 9 , 10 ,11, 12, 13 OF DM74S74N
Yes, we left those PINs as we are only using one D type Flip Flop (out of two) inside the IC. Please check the PIN diagram and description.
thank you abhishek for reply i really appreciate you , please let me know on more thing , i used f74f74pc ic . when i connect 9v battery so led(Red) remain onn , mean without any clap it gets on .. am i using wrong ic ???
I would like to do this but how could I make it so that it has more than one led, for example I want to clap 2 times then the 2nd led will turn and when I clap 3 times the 3rd led will turn on etc. Thanks
This particular circuit is quite complex to design. Either you need to use three mic at distance or you need to cut out the one mic after trigger. You should try to do this using Microcontroller, or use IC4017 but latter will increase the complexity. Share here if you achieve this.
Pls can I use 74Ls174 ic for my clap on clap off switch? If yes how can I connect to pins
Yes because its an ic that you can use in the circuit and that is the alternate for that ic
Thank u very much!!. Its now I understand what d flip flop ic is all about. But honestly maddy am still new to this system. So hw am I to create a nor gate. Or may be I shud go read about logic gates
Hi, i made the same circuit as yours, same components, eneverything. My Flip Flop starts overheating when i connect de 1 with 4 and after VCC.
It doesn't work...Can you pls tell me where to put R2. And do I have to do the following steps as you mentioned:
•Control PIN 5 of 555 Timer IC should be connected to Ground through a 0.01uF capacitor.
•We should use a 220 ohm resistor to connect LED.
Pls help. I am stuck after making the whole circuit.
Ignore R2 and these two steps are not necessary.
Where can we get this 7474 ic ?
You can get it from local electronics market or can order online, the detail about the IC is explained in above comment.
i used MC74ACT74N ic and im having problem , when i connect battery ,light gets onn and remain on
Check the datasheet of MC74ACT74N and do the connections accordingly. Then try using 10k pull up resistor for condenser mic. Also check all the above comments if they solve your problem.
Hi. I used 74LS74AP and the connections are the same as DM74S74N but my problem is when I connect the battery the LED is on and remains on even after I clap. Can you help me please? Thank you very much.
Will this work without relay? And what is the cable at the picture(the unshown full pic) connect to?
I made the same circuit like you with SN74S74N (same dataseet), when i connect to battery the led is off and when i clap led get on and remains on even after i clap again.
Hi. I am trying to do this circuit without D flip flop so I'm taking output directly from PIN3. But the circuit is not working. No value is changing on base of transistor when clap..
buy another microphone :D
I made the same circuit like you with SN74S74N (same dataseet), when i connect to battery the led is off and when i clap led get on and remains on even after i clap again. what should i do?
I made the same circuit with DM74LS74AN. What changes can i do so that the circuit will work?
will this work with a 12v source??
yes, it should but better use 9v battery as shown or some 5v source.
thanks alot , is there an equivalent of IC DM74S74N? coz i have searched for it and failed to get
I want to use a 741 op-amplifier, beacause the elctret mic is not working properly so can you please give me the full circuit diagram after adding the op-am in the circuit. Thanks :)
I used ic 74AC74PC, but the led remains "on" and does not respond to clap.
please reply ASAP.
Check the datasheet of 74AC74PC and do the connections accordingly.
Can I use a 2N3904 NPN Transistor instead of the BC547?
Thanks 4 sharing the circuit. Its working fine. But mic is not working from distance. How it can be connected to house hold appliance
Is it ponsible to include the remote control system in the circuit of the clap sound? If yes how should I do it?
I guess S=0 and R=0 state is there in SR flipflop. The S=1 and R=1 state gives invalid results instead.
Do we have any specific condenser mic used for clap switch?
Thank you for your diagram.
It works, but...
but it works in reversed way.
I mean that, when I clap, it turn off. then after 3 sec, it turn on again.
Please do some fix, mate !
Is it possible to use a cd4027be IC and can it be possible to use a 2n222 transistor instead.
check its datasheet whether It have all the pins needed in the circuit.
how do we supply the clock pulse.and is it -ve edge trigered
Clock Pulse is being supplied by 555 Timer IC here and its +ve edge triggered.
sir, can I use d type flip flop M74LS74P in this circuit???
I want to use this sweech in AC circuit to on/off my fan then how to use this sweech.
Which condenser mic is to be used?
Plz help me
I have alredy made but When testing
when I clamp the sound The LED is turned On but when I clamp again the LED is not become completly off .Meaning that instead of it must trun off but LED get alittle supply voltage so the LED is lighting alittle in Off mode
Please help me
What to do if I want clap on and off circuit to use for 220V aupply,i.e.how to connect relay?
how to introduce the relay in this circuit?do you have a diagram for that?
My condenser mic isn't giving out any signal. Is there any specify condenser mic we have to use?
Kindly can you please create a video with step by step instructions on how to create a clap on clap off switch. Email it on my email 
Is it okay to use SN74LS74N? And how do i introduce the relay on the circuit? Do i ned to parallel a diode between gnd and output on flipflop?
Can we use the ic 4017 for 7474
hey, i have make a simulation on your circuit...but it is not working...the led does not turn on...are there any mistake on your circuit...Please reply ASAP
Instead of a condensor mic, can you use a loud speaker?
I followed all the steps and did same as the circuit diagram and instructions. But its not working.
Please help me as soon as possible.
It will be better if you upload a video showing step by step.
The data sheet for the D flip flop says the IC has a max voltage of 5.25 V. How does this work with a 9V source?
I have to snap 3-4 times as current flowing to the base of transistor i.e electrical impulses released by mic are too less!! what should I do?
U can increase the sensitivity of the mic by connecting a 100 nF capacitor with the positive of the kick and the other end to theBase of the transister also connect 2 10 k ohm resister one from the capacitor to Vcc and the others from collector of the transister to Vcc ,also connect a 1m resister from the Base of the transister (i.e from one end of the capacitor) to the Vcc . And continue the output from the collector to ic 1 as shown above. It worked for me!
Can you please elaborate your statement? I hope it will work
how much volt this 10uF..?
I did everyrhing as the circuit diagram 3 times but when i connect battery the led remains on and does not switch off even if i clap. The 7474 also becomes warm.
i made the circuit but the light is not being off after being on
can I use ic 74ac74pc instead of ic Dm74s74n in this circuit
Check if your IC has two D-type flip flop, if yes then you can use it.
I am using the same circuit. Its working fine with LED and Buzzer at the output. Now I am trying to drive a Motor through driver IC ULN2803. The Motor turns on but turns off immediately before receiving the second clap. Do I need to do anything different then this.The Motor is 6v Dc 100rpm Motor.
I connected the components as instructed but when I clap the led doesn't even turn on, what could be the possible reasons?
i follow all the step and use all the component that being mention,but the led light up already after a battery is being supply to the circuit. it does not required any clap. please help me. i need to do this for my final year project. any idea?
Sir can share Gcb board structure of above project
How can i use relay in this circute..pls help me
Can i connect relay???according to this circuit??pls replay...
Yes you can replace the LED with a relay driver circuit and control the relay
Which transistor can use for relay driver according to tis circuit
You can use the normal BC547 transistor.
can't we use 555 ic as a bistable multivibrator, so we don't need to use 7474 .
I want to work this cicuit with 5 volt.if so what can i do
Just use a 7805 and power the IC from 5V it will work just fine
What should be the value of pull up resistance of condensor microphone to increase the sensitivity, like it will operate with low sound??
I made this circuit using SN74HC74N.But the led is turned on only when I remove the ground.it is not responding to the clap.what is wrong in my circuit?
I think you should have made a mistake in the connection? Tey using a multimeter to check the voltage levels
Can I replace the model of 7474
When I connect the source, it just turns on automatically
How much time will the LED be in on state, with out giving another clap??