Saw an old YouTube video about the Clapper, "Clap on, Clap off..." and thought "That would be a fun little project". So here is a quick and easy project that utilizes a electret mic, relay, and an Uno. When you clap your hands (or any loud noise) it will toggle a relay. In my case have a extension cord connected to the relay which you can plug a light or some other AC appliance.
PLEASE READ: Electricity can be dangerous. Please use caution as I am not responsible if you hurt yourself.
Step 0 - Chop up an Extension Cord- Take an extension cord make sure it isn't plugged in and split the wires
- Cut one of the wires and strip back the insulation to expose the bare wire
- Solder the wires ends to keep the strands from going everywhere
Plug mic into breadboard and connect pins to Uno. The mic I am using can use 3.3V or 5V
OUT --> Pin 6 on Uno
GND --> Ground rail on breadboard
VCC --> +5V rail on breadboard
Plug Relay into breadboard and connect pin to Uno. I am using a 4 channel relay buy you can buy single channel relays if desired.
GND --> Ground rail on breadboard
VCC --> +5V rail on breadboard
IN1 --> Pin 7 on the Uno
Note: If you try and drive all 4 channels of the relay you many need to use external power. Since I am only driving 1 of the channels I am using the Uno +5V to drive.
Plug the extension cord into the relay. There are three pins for each relay
- Normally open
- Common
- Normally closed
Plug into the normally open pins. See picture for help.
Upload the code to the Uno. Very basic and you can tailor to your needs.
Step 3 - Start Clapping!- Plug extension cord into the wall
- Plug light into extension cord
- Clap or make loud noise! - Everytime you clap or make a loud noise the relay will toggle on/off
- Change the code to turn on/off with two claps
- Use relay to drive motors
I hope this is interesting and please provide me with any feedback as i am always willing to learn. Enjoy!!!
Comments
Please log in or sign up to comment.