This project was created with the goal of controlling devices with a double clap. This is useful if there aren't many switches inside a room and the user wants to turn on/off the lights quickly and without any effort/walking.
The sound is recorded using a cheap microphone and amplified to achieve higher voltage swings. After amplification, the signal is passed through a high pass filter to retain only the high frequency content. This filtering is required because otherwise the device would be activated by normal house sounds such as talking, phone ringing, and so on. When the signal is free of low frequency content and has a high enough amplitude, the first comparison stage can be activated. When the first clap occurs, a count down circuit begins to run, which resets the circuit after a few seconds if no other claps occur in the meantime. If a second clap is detected, the circuit latches and closes the output as the video shows.