Introduction: Clap Switch

Hello Friends,

Here is a clap switch. You can turn any home appliance on/off with a clap. I personally designed the circuit for better accuracy and customized filtration. You can see the working of the switch in the video attached.

I hope you will enjoy building this project.

Step 1: Circuit Explanation

The signal processing done in the circuit is explained in the image.


There are 4 stages of the signal procesing:

  1. In first step, the input from the mic is anplified.
  2. In second step the comparator is used to put a threshold value on the amplified value, to be considered as a clap or not.
  3. In third step the pulse from the comparator is converted into a longer pulse, this is helpful to reduce the noise in the clap.
  4. In fourth step, the signal is first used to turn on the LED, and next time it turn the LED off. This is done using a decade counter and resetting the counter on the Q2. Q0 is left blank, Q1 is the led/relay attached to.

Q0,Q1,Q2 are the outputs of the decade counters. if you see the datasheet of 4017. First time clock is given to 4017, it gives output on Q0, on next clock, output shifts to Q1, and so on.

POT1 = used for the voltage for the microphone

POT2 = used for initial biasing for the transistor

POT3 = used to set the reference voltage for the comparator

Step 2: Building the Circuit

Things you will need to build the circuit :

  1. potentiometer - 100K,20kX2
  2. LEDs X3
  3. BC547 X2
  4. 12v RElay
  5. diode
  6. resistors 160k, 470X3, 1k, 22k.
  7. Condenser MIC
  8. LM358
  9. NE555
  10. CD4017
  11. Switch
  12. 12v Adapter/batter
  13. Prefboard/dotted PCB
  14. IC base - 2x8pin, 1x16pin
  15. 100nF capacitor (104)
  16. 10uF capacitor (any voltage)

You can build the PCB in many ways :

The best way is the one in which i made it. You dont need to spend money or time on preparing designs and PCB print for the circuit.,

or you can build it on breadboard,

or you can design your own PCB and solder the components on it.

Happy soldering :)

I hope you will enjoy building the project, any suggestions or questions are most welcomed.

Step 3: Calibration of the Potentiometers

To calibrate the device, the first step would be that you should use lowest voltage LED available to you, in the place of LED1. This is because the low voltage LEDs glow at lower voltage consumption and you will be easily able to identify the glow when you make a clap sound near the mic. (i dont remember my blue LED's voltage consumption but its very low, may be lower than even 1 volt, you can try using small LEDs).

Second thing you need to keep in mind is that you need to set POT2 such that initially the LED1 (low voltage LED) must be off. It must be fine calibration. Its Not hard to do so. The thing is that initially we need to give nearly 0.7 volts at the base of the first transistor. and we can do it by adjusting POT2. POT1 is easy to calibrate. First set the POT2 such that LED1 is off, then make a clap near the mic and notice the glow of the LED1. NOW, Change the POT1 value, set the POT2 again such that LED1 is off, then make a clap and notice the glow of LED1. you will notice the difference in the glow of LED1. you have to set the POT1 and POT2 such that the glow is highest in lowest sound. (POT1 must be greater than 5 kilo ohms). Once you are done with the glowing of LED1, now you should go to LED2 with POT3. POT3 sets the reference voltage to be compared to the voltage after amplification from the transistor (LED1). here you can set the sensitivity of the device, that on how much volume should the switch work. the output can be seen on LED2. you will have better idea when you will adjust it a couple of times. one thing is that you should never calibrate the pots all at the same time, i.e. you should first change the value of one portion of the circuit and notice the change, then change the other part's calibration.

Comments

author
JohnSmith64 made it!(author)2017-02-23

I made it according to your instructable and it work awesome and probably in going to put it in a desk led lamp :)

Slika0036.jpg
author
jwbrooks0 made it!(author)2017-02-02

The original clapper design was a 2-clap system, and this appears to be a single clapper design. Is there an advantage of a 1-clap to 2-clap design?

author
Agustinus+bruin made it!(author)2016-11-25

please help me. i have problem. ic ne555 cant give clock. how to give clock with ic 555. thank you

author
Samartist made it!(author)2016-11-26

ok, what are you trying to do? How did you get to know that 555 is not generating the signal? Show me pics of your circuit...

author
Jaseelt6 made it!(author)2016-11-16

can u plz give circuit diagram???

author
%C4%90%E1%BB%A9cS made it!(author)2016-05-16

Can you give me your design, please?

author
Samartist made it!(author)2016-05-18

sorry, i cant give it to you...

haha its already in the instructable :D

author
Nguy%E1%BB%85nQ12 made it!(author)2016-03-11

Where is Q0, Q1, Q2 ?

author
Samartist made it!(author)2016-05-18

sorry about that,

Q0,Q1,Q2 are the outputs of the decade counters. if you see the datasheet of 4017. First time clock is given to 4017, it gives output on Q0, on next clock, output shifts to Q1, and so on.

author
dimasgomez made it!(author)2016-02-28

I made it!
Thank you Samartist for all your help. Without your instructions about calibrating it would be impossible to me to make it.

1456703377137-2100991691.jpg
author
%C4%90%E1%BB%A9cS made it!(author)2016-05-16

can you give me the circuit diagram, please?

author
dimasgomez made it!(author)2016-02-29

Here it goes!

author
Samartist made it!(author)2016-02-29

i am glad i could help you in that...

author
rajesh+dhusu made it!(author)2016-05-01

can anyone give me the circuit diagram

author
dimasgomez made it!(author)2016-03-04

I've being thinking a lot about making it on a perfboard. My last time was a nightmare, so I've been trying to plan it first. On the picture, I'm did not even payed much attention to the polarities (I just need to know where to put the components), and enjoyed the simplicity of Fritzing. Sure there is a few drawbacks (like the bizarre size of resistors (too big) and potentiometers (too smal), which anyone can adjust if really necessary). Perhaps it could enlight someone. Just please don't follow my polarities. I will post a new one after I have checked everything. I'm always confused by the "long leg, positive" thing.

perfboard.png
author
dimasgomez made it!(author)2016-03-04

First mistake found: the collector leg of the transistor is connected to the wrong pin of the relay. It should be connected to the positive leg of the diode.

author
anooooos made it!(author)2016-03-03

Nic to met yuo

author
dimasgomez made it!(author)2016-02-25

I tried it yesterday, bought everything in the list and realized that the capacitors were not listed. I was very lucky, I had them for another circuit. Im a beginner (or a repeatedly starter), so took a lot of time to figure out every polarity. Internet is a bliss. First time I studied elet. was in 2003. Unfortunately, it didn't work. Not yet, at least. I think it might be the mic.

145642325335014338966.jpg
author
Samartist made it!(author)2016-02-27

sorry for replying late :

To calibrate the device, the first step would be that you should use lowest voltage LED available to you, in the place of LED1. This is because the low voltage LEDs glow at lower voltage consumption and you will be easily able to identify the glow when you make a clap sound near the mic. (i dont remember my blue LED's voltage consumption but its very low, may be lower than even 1 volt, you can try using small LEDs).

Second thing you need to keep in mind is that you need to set POT2 such that initially the LED1 (low voltage LED) must be off. It must be fine calibration. Its Not hard to do so. The thing is that initially we need to give nearly 0.7 volts at the base of the first transistor. and we can do it by adjusting POT2.

POT1 is easy to calibrate. First set the POT2 such that LED1 is off, then make a clap near the mic and notice the glow of the LED1. NOW, Change the POT1 value, set the POT2 again such that LED1 is off, then make a clap and notice the glow of LED1. you will notice the difference in the glow of LED1. you have to set the POT1 and POT2 such that the glow is highest in lowest sound. (POT1 must be greater than 5 kilo ohms).

Once you are done with the glowing of LED1, now you should go to LED2 with POT3. POT3 sets the reference voltage to be compared to the voltage after amplification from the transistor (LED1). here you can set the sensitivity of the device, that on how much volume should the switch work. the output can be seen on LED2. you will have better idea when you will adjust it a couple of times.

one thing is that you should never calibrate the pots all at the same time, i.e. you should first change the value of one portion of the circuit and notice the change, then change the other part's calibration.

feel free to ask about any doubts. i may reply late, but i am happy to help.

author
dimasgomez made it!(author)2016-02-28

Thank you very much for all your help. Your instructions help me a lot. After two days, I realized the only thing that could be wrong would be the mike. Since it wasn't really responding at all, I replaced it, and then just needed to follow the POT steps. I would humbly recommend that you add them as a third step in the instructable. I will be adding pictures and a litte "made it" movie. Thank you once again. Best regards.

author
dimasgomez made it!(author)2016-02-25

Please, would you, or someone, kindly help me test it and find the issue? I've been trying to callibrate it, but it never works, with any sound. Either one of the LEDs turns on, the other, both, or none, mostly when I change POT3. Sometimes a little tap (with my finger) on the upper one (POT2), it changes from LED 2 to LED 3. Sorry for bothering you without throughly understand the sub-circuits first.

2016-02-25 17.51.57.mp4
author
dimasgomez made it!(author)2016-02-25

(The video just shows that changing POT3, I change which LED is on.)

author
Huntsman064 made it!(author)2016-02-22

I may be 9, but that I think is cool! also I would be able to make that

author
Samartist made it!(author)2016-02-23

just 'making' this circuit is not enough, i think you must make small circuits first, which are very basic circuits...

you should make the following very-simple-circuits first, and understand those workings and then it will be very easy for you to make circuits like clap switch...
1 - LDR + comparator circuit = darkness detector
2 - 555 led blink
3 - 555 +4017 chaser circuit
4 - darkness detector using transistors
5 - 555 as monostable

as a beginner you should build circuits on breadboard : enjoy making circuits

author
tijoecon made it!(author)2016-02-20

I noticed the 555 IC has two pin7 i think the one connected to 12V should be pin4 am i correct?

author
Samartist made it!(author)2016-02-23

yes

author
wkatchi made it!(author)2016-02-16

can u pls explain which parts of these components are to be soldered with other in detail. thank you.

author
JOHNE96 made it!(author)2016-02-17

Check the circult diagram, you will see the parts that needs to be soldered together.

author
JOHNE96 made it!(author)2016-02-17

And also can anyone help me get a software that can diagonize laptop circult and also help in fixing it.
Please its among my project.
Would be very clad if i can get a help.
Thanks in advance.

author
JOHNE96 made it!(author)2016-02-17

And also can anyone help me get a software that can diagonize laptop circult and also help in fixing it.
Please its among my project.
Would be very clad if i can get a help.
Thanks in advance.

author
JOHNE96 made it!(author)2016-02-17

Very nice but how can we make the voltage higher that is maybe input voltage and output voltage

author
laith+mohamed made it!(author)2016-02-14

Actualy its awesome .

author
TiagoA12 made it!(author)2016-02-08

I'm practically a begginer, how am I supposed to know what components do I need if the photo doesn't even have good quality, come on :/

author
Samartist made it!(author)2016-02-09

you can see every component is in the circuit diagram... i have added the list of components used in the circuit...

author
TiagoA12 made it!(author)2016-02-09

Jee sorry man, im blind XD

author
Samartist made it!(author)2016-02-09

no, i added them few hours back....

author
Sandy65 made it!(author)2016-02-07

It's cool I am thinking to make it. But you are the first with different Circuit..

Great Work.

author
charmrus made it!(author)2016-02-07

can you post this in english?

oops, my mistake

author
GrantC4 made it!(author)2016-02-03

can you post the materials required please?

thanks

author
gdomantic made it!(author)2016-02-04

everything is on the schematic! just look through it!

author
Paulo+Pereira made it!(author)2016-02-04

Exist one brasilian version in www.newtoncbraga.com.br

author
Manuela26 made it!(author)2016-02-03

that is amazing I will do it

author
dudes made it!(author)2016-02-02

Could you post a schematic of the circuit?

author
dudes made it!(author)2016-02-02

Nevermind, I missed it at first

author
josdau11 made it!(author)2016-02-01

kdfnknk

About This Instructable

27,586views

693favorites

License:

More by Samartist:2-Bit Arithmetic and Logic UnitHandheld Gameboy - Using Arduino (with Snake Game)Clap Switch
Add instructable to: