Arduino - Turn ON Your LEDs and Lamps With a Clap (Relay and Sound Sensor)

by MertArduino in Circuits > Arduino

14553 Views, 43 Favorites, 0 Comments

Arduino - Turn ON Your LEDs and Lamps With a Clap (Relay and Sound Sensor)

Arduino Project 12: Turn ON your LEDs and Lamps with a Clap (Relay and Sound Sensor)
cover.jpg

In this tutorial we will learn how to control the Arduino Sound Sensor. So we will control our LEDs and Lamps with a clap. We will use a sound sensor and a relay module for this.

Required Hardware

vlcsnap-2017-07-16-16h46m43s377.png

Arduino Board - https://goo.gl/Rqc5w2

Relay Module - https://goo.gl/yAxcPL

Sound Sensor - https://goo.gl/2pXWsw

LED Strip 5M - https://goo.gl/2pXWsw

LED Adapter - https://goo.gl/2pXWsw

9V Battery - https://goo.gl/2pXWsw

F to F Jumper - https://goo.gl/2pXWsw

M to M Jumper - https://goo.gl/2pXWsw

Breadboard - https://goo.gl/2pXWsw

Battery Cable - https://goo.gl/2pXWsw

Some Promotion Links

Flash Deals -- https://goo.gl/CVqg7P

Mega Stock Clearance -- https://goo.gl/eCbuiP

Arduino Kits -- https://goo.gl/uwr19e

More Budget 3D Printers -- https://goo.gl/uwr19e

Anet A8 3D Printer Promotion -- https://goo.gl/uwr19e

About the Relay Module

vlcsnap-2017-07-16-16h46m50s695.png

5V 1 Channel H/L Level Relay Module

Specification:

Maximum load: AC 250V/10A, DC 30V/10A

Trigger current: 5mA

Working voltage: 5V

Module interface:


VCC: positive power supply

GND: negative power supply (GND)

IN: can be high or low level control relay

Relay outputs:


NO: normally open relay interface

COM: Common Interface Relays

NC: normally closed relay interface

High Voltage Warning

vlcsnap-2017-07-16-16h47m15s433.png

I warning you here that we will use High Voltage which used could result in serious injuries or death.

So must be very carefully! I take no responsibility for any of actions.

About the Sound Sensor

vlcsnap-2017-07-16-16h47m09s511.png

This module allows you to detect when sound has exceeded a set point you select. Sound is detected via a microphone.

The sound level set point is adjusted via an on board potentiometer. When the sound level exceeds the set point, an LED on the module is illuminated and the output is sent low.

Adjust sensitivity of the Sound Sensor

When less sensitive, it takes more sound to trigger the device When more sensitive, it takes less sound to trigger the device

Connections

vlcsnap-2017-07-16-16h47m33s412.png
vlcsnap-2017-07-16-16h48m05s861.png
vlcsnap-2017-07-16-16h48m22s426.png

Connection of the Relay Module and Lamp

The HIGH Voltage part we need a power plug, a socket and a cable with two wires.

One of the two wires will be cut and connected to the common and the normally open pin of the module output connector.

The Relay VCC pin will be connected to the +5V pin of the Arduino.

The Relay GND pin will be connected to the GND pin of the Arduino.

The Relay INPUT pin will be connected to the Digital 5 pin of the Arduino.

Connection of the Sound Sensor

The Sound Sensor VCC pin will be connected to the +5V pin of the Arduino.

The Sound Sensor GND pin will be connected to the GND pin of the Arduino.

The Sound Sensor OUT pin will be connected to the Digital 4 pin of the Arduino.

Connection of the LED Strip and Adapter

The LED strip possitive cable will be connected to the COM input of the Relay.

The Adapter possitive cable will be connected to the NO input of the Relay.

The LED and Adapter ground cable will be connected together.

Source Code

vlcsnap-2017-07-16-16h48m32s952.png

You can copy and paste the code to empty page of the Arduino IDE.

Get the Code - https://goo.gl/0wVN1c

You Can Subscribe to My YouTube Channel

mertarduin2.png

You can subscribe to the my YouTube channel for more tutorials and projects. Subscribe for support. Thank you.

Go to my YouTube Channel - https://goo.gl/f0RHmR