Clappy: the Clap Controlled Lamp

by Phoenix ZX200 in Circuits > Arduino

230 Views, 1 Favorites, 0 Comments

Clappy: the Clap Controlled Lamp

ezgif-3-691ac7bb10b1.gif

The main thing is the code, it uses Booleans. When we clap, the sound sensor sends a HIGH signal and it makes our relay status True or False.

Supplies

Electronics:

Arduino Uno

2-channel relay (any would work by the way)

Sound sensor

Lamp (any, but one with a switch will be easier to use)

USB Type-A to Type B cable (Arduino cable)

5V 1A adapter (a normal phone charger would work too)

Jumper wires

Tools:

Hot glue gun (to stick the components)

Screwdriver and pliers (to open the lamp and get access to the wiring and all...)

Attaching the Relay to the Lamp

image.png
IMG_20201025_135732.jpg
IMG_20201025_135752.jpg
IMG_20201025_140956.jpg
IMG_20201025_152844.jpg

1. Open the lamp and take out the on/off switch

2. Remove the switch and connect the relay instead of the switch as shown in the circuit diagram

Connections

image.png
IMG_20201025_152844.jpg

4. Connect as per the diagram

Upload the Code

Download the code and upload it!!

https://drive.google.com/file/d/1drL29-WzrkYBaKamF...

This is the link for the code.

(Optional) Beautification

Make a closure for the electronics so that it doesn't look like a rat's nest.

Now it is ready to use!!!!!!

👍👍

Thank you for viewing this project

Also visit my blog: https://phoenixzx200.blogspot.com/

And see this project on the Arduino project hub: https://create.arduino.cc/projecthub/phoenixzx200/...