Tag Archives: relay

Arduino: Clap count

Started with a small project. I had a small audio relay that I purchased as a hobby project a few year back called Mini Vox & Relay. This kit lets you activate a relay when it hears a noise. I lost the microphone that it came with, but fortunately I found one in my box of “things” that worked. I was able to connect the relay to the 5V of the Arduino and the output to Pin 11. The modified the Blink code example and made it count 3 sounds/claps. After 3 counts an LED would turn on.

The problem I ran into was the relay stayed connected as long as the sound. While the relay was connected, the counter kept counting. I had to put a delay after the count so the relay had some time to disconnect to get around this problem. Another way to fix this issue would be to look for a low signal after a high to complete a full count.  Personal note: Pull Up/Down resistor!