Building a clap switch using PIC12F683

A clap switch could be nice addition inside the house. And it may be really practical when reaching for light switch in the dark – just clap your hands couple times and light goes on. Embedded-lab discusses on how to build a simple clap switch using few widely accessible components. Obviously first part is capturing sound using microphone. Its signal is boosted using transistor amplifier. After signal level is raised to match microcontroller input levels it is captured by PIC12F683 microcontroller. Analog comparator inside MCU makes things much easier as it allows comparing two analog voltages and decided when clap has occurred. Simple microcontroller program simply listens for two claps in a row and toggles output LED which can be easily replaced with relay switching heavier loads. Continue reading