Attiny2313 based clap detection circuit

Clap activated circuits has been for some time around. But most of them simply toggled the output. Pete have bought few cheap lamps and used them for his smart clapper project. He didn’t want to limit functionality with just turn on and off but added couple new interesting features.

As normally it toggles the AC switch when there are two claps within one second. If three claps are hared within one second them PWM dimming starts until fourth clap is detected. Additionally there is another relay which may be activated with laser beam. Laser is detected with photo-transistor. Device is controller by Attiny2313microcontroller which activates two 12V halogen lamps through transistor keys, one device is controlled using relay. Microphone captures sound, then amplifies, filters it and then comparator gives a pulse that goes directly to microcontrollers external interrupt pin. Small and effective circuit that adds fun to your house.