My daughter has been bugging me for one of those
clapper devices you see advertised on TV. I decided to see if
I could build my own. Using a small speaker as a
microphone we can amplify the signal enough to register on the
Athena microcontroller.

To pick up the sound we used a 130 mini speaker in
series with a .1uf capacitor. The sounds that the speaker
picks up need to be amplified so we use a MC24119P low power amp.
The output of the amp is fed directly to the Athena. When the
speaker picks up a sound beyond a certain threshold they will
register as 1 on port 0.
The Athena will use some timing loops to detect two
threshold breaches (Claps). Once detected port 4 is toggled.
Port 4 drives a NPN transistor which in turn drives a 12v relay.
The Relay is used to switch the lamp or appliance of your choice.
You can use just about any relay for this project.
I recommend that you check out my
relay
application note.

I used
PCB8
available from the online store as the basis for my circuit.

I mounted the speaker on the outside of my case.
I connected the AC-IN to a AC Plug and the Switched AC out to the
end of a extension cord.