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

13,461

43

4

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

About: Maker 101; Beginner and intermediate level Maker projects! You can find projects such as "How to" and "DIY" on programmable boards such as Arduino, ESP8266, ESP32 and Raspberry Pi on this channel. The projects…

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.

Step 1: Required Hardware

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

Step 2: About the Relay Module

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

Step 3: High Voltage Warning

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.

Step 4: About the Sound Sensor

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

Step 5: Connections

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.

Step 6: Source Code

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

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

Step 7: You Can Subscribe to My YouTube Channel

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

Be the First to Share

    Recommendations

    • For the Home Contest

      For the Home Contest
    • Make It Bridge

      Make It Bridge
    • Game Design: Student Design Challenge

      Game Design: Student Design Challenge

    4 Comments

    0
    kp358760
    kp358760

    Question 2 years ago

    The code is not available here is the anyway you can upload photo of the code?
    And another thins is I can try different codes as well right to do other stuff ?

    1
    morris.flohr
    morris.flohr

    Question 3 years ago

    does this also work with voice?

    1
    morris.flohr
    morris.flohr

    3 years ago

    does this also work with voice?

    0
    JakubZ18
    JakubZ18

    5 years ago

    I made it i use this program and its working. :)))))))

    sorry for my english i m from other countrie