Introduction: Clap Switch (Simple, Illustrated, You Can Build It)
In this tutorial we will learn about clap switch. Clap switch is a circuit with which we can turn ON-OFF any electrical equipment. Whenever we clap the equipment will turn ON and when we clap again the equipment will turn OFF.
The final finished product is shown above.
Step 1: What Will Happen If I'll Clap?
Clap switch is a device which converts the sound vibrations into electrical signal. Then electrical signal can be converted into sound or light according to our wish.
Bill of materials:
a) Standard Breadboard 01
b) Transistors 2N2222 05
c) Microphone Electic 01
d) LED 01
e) Capacitors ceramic 04
f) ON-OFF switch 01
g) Buzzer 01
h) Some standard resistors
Step 2: Clap Switch Explained Using Block Diagram
It is a device which converts the sound vibrations into electrical signal. The microphone that we are using in this project is electret microphone. In the microphone capsule we have a FET amplifier, which amplifies the feeble electrical signal generated by microphone.
b) Amplifier block:
In the amplifier block we are amplifying the signal which is coming out of the microphone. The electrical signal coming out of microphone is so weak it is next to none. In this stage signal is amplified to make it stronger.
c) Bistable multivibrator:
Bistable multivibrator is the heart of the circuit, it is also called as S-R flip-flop. Using bistable multivibrator we can store any digital value i.e. ‘0’ or ‘1’ ( ON or OFF), thus when we clap bistable multivibrator store it. Bistable multivibrator consist of two input one is called SET and another as RESET. When we give high value to SET it stores it, but then to remove the stored value we have to give high value to RESET pin. Thus SET is used to store the value and RESET is used to remove the stored value.
d) To & Fro circuit a.k.a grandma circuit:
The problem encountered with bistable multivibrator circuit is it needs signal on two different pin, one pin to store the value, other pin to reset or erase the stored value, so who will do this work for us. Well we have use TO & FRO circuit, it lets in one input signal and then send the output to one of the two output pin such that both pin gets equally probable output (To & Fro motion). This TO & Fro circuit is doing a kind of To & Fro motion. This TO & Fro circuit is connected to bistable multivibrator. Thus first time we clap it store the value in the bistable circuit and then next time we clap it resets the value from bistable multivibrator circuit. Hey this is what we want, when we clap bistable circuit must store it and next time we clap it should remove the stored value.
e) Output devices:
Well, you must be thinking where is the output, the output are one LED and a buzzer. They both are attached to bistable multivibrator circuit. Thus when we clap the LED will light up and buzzer will buzz, and the next time you will clap again both the LED and buzzer will stop.
Step 3: Connecting the Microphone
The microphone is the device which converts the sound vibrations of the clap into electrical signal. Technically it is called transducer. Internally in the microphone we have FET( a fancy name for transistor). Microphone that is used here is electret microphone. The microphone has two electrical connection.
Positive leg of the microphone (Black wire) is connected with 10K ohm resistor as to limit the current, some of you will say why only 10K ohm resistor. 9v battery is used for the supply and using the datasheet (which is provided by the manufacture) & some trial and error the value of resistance finalised is 10K ohm. Notic that capacitor is connected with positive supply of the microphone so that only AC signal comes out of microphone (that is what we want). Now with the required setup if we power up the microphone and clap it will produce signal.
The output from the microphone is show above in the oscilloscope waveform.
Step 4: Amplifying the Microphone Signal
The signal coming out of the microphone is too weak to be used for anything, hence we need another amplifying stage. The signal coming out of the microphone is little more than 160mv. The signal voltage coming out of the microphone cannot be used for anything useful as minimum base voltage required to turn ON a transistor is 600mv (0.6V) Hence another stage is needed to amplify the signal. In this stage the signal will be amplified, using BJT (Bipolar Junction Transistor) to amplify the weak signal. Here the transistor is being used as an amplifier. To tell you the long story short, transistor has two operating mode as an amplifier other as a switch. Here we are deliberately forcing the transistor to be used for amplification purpose, by a thing called biasing, by regulating the amount of base current we can force the transistor to be used as an amplifier, for more information check out any undergraduate electronics course book.
The transistor is amplifying the signal coming from the microphone. Yellow wire represent the flow of clap signal , which is going from capacitor connected with the microphone to the base of the transistor (middle pin). Transistor is used in fixed bias configuration here. Collector (extreme right of the transistor) is connected to the supply via 10K ohm resistor which is also connected with DC blocking capacitor.
In the oscilloscope screenshot (look above for picture), you can see that peak voltage is 4.5V which is high enough to be used for practical purpose.
Step 5: Storing the Clap Signal Into Memory Device
The clap signal which we are producing is ephemeral, hence we need a arrangement to store this intangible signal into something more concrete. Hence we are using Bistable multi-vibrator configuration of the transistor to store clap signal.
Bistable multi-vibrator is the heart of the clap switch. It is also called as S-R (Set-Reset) flip-flop. It is also simplest one bit storage device (well you can say 1 bit flash storage device). whenever it receives a signal it stores it and hold on to that value indefinitely. When clapping is done it stores value, then again clapping is done it removes the stored value. Now to show stored value we connect LED to the output. Now whenever bistable multi-vibrator has stored the value it can be physically seen by the glow of the LED.
Step 6: Complete Perspective of the Clap Switch:
Here we would understand circuit from the point of view of the signal, which is flowing from the microphone up to the output.
The yellow wire is representing flow of clap signal. Black wire represents ground connection. Red wire represents supply.
When we clap, the signal will flow from microphone then amplified by the transistor it will go to the To & Fro circuit, from here signal will flow one by one to SET and RESET pin of the bistable circuit which will turn ON-OFF load.
If you want to read complete illustrated article( I have not explained, feedback mechanism here, because of frustration of writing everything again ), for that visit my site http://rafalerobotics.in/clap-switch/
Step 7: Power Consumption
When clap switch circuit is ON and it is not producing any output i.e. both LED and buzzer are off (standby mode). The current consumed by the circuit is about 10mA (see the first image above). Working voltage of the circuit is 9v. So power (P=V*I) consumed by the circuit is 10m*9v = 90mWatt.
When both LED and Buzzer are ON, the current consumed by the clap circuit is about 12mA. Power consumed by the circuit is 12m*9v = 108mW. (image shown above)
Want to say thanks:
If you have like my article and want to say thanks to me, please like my facebook page, and I’ll be more than happy. Want to say something, just comment below and I will respond to your questions.