I am working on a clapper circuit to trigger mains voltage with a relay. I have pretty much everything done except for the sound part. I have an electret hooked up to a single-supply lm358, which is then hooked up to a peak detector (10uF cap + 5k resistor) so that I have time to deal with the signal. The only problem, however, is that voices, stomps, and other loud-ish sounds are triggering the clapper. It's not just a simple fix as raising the threshold, because the extraneous sounds are sometimes louder or just as loud as the claps themselves. Is there anyway that I can build or write something that will filter out the other sounds. Because, if you think about it, claps sound VERY different than regular sounds... so is that possible?

Thanks a lot!


p.s. if necessary I can post a schematic and my code... but it's really simple.

Maybe check my project and see if it helps you out?


Realized that modding it to listen for 2 claps will lower the errors...