I can still remember the funs and laughs of the Adam Sandler movie where there were three old ladies and a clap activated house – two claps to turn on the lamp – one clap to turn it off. Some people call it a cool way to fuel laziness but you must admit it’s handy to have. There are a lot of ways to implement this project most of them does not use microcontrollers – just flip flops and comparators. This actually limits the capabilities of the switch and makes it less flexible.
To address the need for the cool clap triggered switch without compromising on the flexibility and expandability of the system Toddy Cangica developed this microcontroller based clapper switch which uses an ATmega8 and a relay to detect claps and switch on and off an appliance. Clap generated signals are captured using a microphone, an NPN transistor is then used to amplify the signal before feeding it into the ATmega8’s ADC. The firmware was written using AVR-GCC and it dictates when the relay is activated to turn the appliance on and off.