So I decided to make programmable version of the Clapper using an Arduino microcontroller. The Arduino lets you set codes for each outlet. This eliminates false triggering and lets you control multiple outlets independently. Your lamp could be turned on and off with one clapping pattern and your fan could be controlled with another pattern.
The Arduino also lets you program how the outlets are turned on and off. For instance, if your internet router needs to be reset, you could program it to turn your internet router off for ten seconds and then turn it back on automatically. Or you could turn a heater on for a few minutes and automatically turn itself off.
Step 1: Watch the Video
Here is a video walkthrough of the project.
Step 2: Materials
Materials:
Arduino microcontroller
Electret microphone
2 x 10 kohm resistor
100 kohm resistor
3 x 100 ohm resistor
0.1 microfarad capacitor (capacitor code 104)
White LED
Red LED
Green LED
Small Switch
Jumper wires
Power MOSFET (such as IRF510)
Diode (rated for at least 1 amp)
5 Volt Relay
Extension cord
printed circuit board
Insulated project enclosure
5V power supply/ USB charger
Tools:
Soldering Iron and solder
Wire Cutters
Wire Strippers
Knife
Screw Driver
For more detail: Sound Activated Outlet