Introduction: Arduino - Sound Sensor (with LED)

Picture of Arduino - Sound Sensor (with LED)

This instructable is the written version of my "Arduino - Sound Sensor (with LED)" YouTube video that I've uploaded recently. I strongly recommend you to check it out.

My YouTube Channel

Step 1: Tutorial

Sound sensors can be used for a variety of things, one of them could be turning lights off and on by clapping. Today however we are going to use hook up the sound sensor to an array of LED lights which will beat with music, clapping or knocking.

Step 2: Hardware Required

Picture of Hardware Required

  • Arduino
  • A Sound Sensor
  • LED
  • 220 ohm Resistors
  • Mini Breadboard
  • Wires

Step 3: Circuit & Connections

Picture of Circuit & Connections

Arduino Sound Detection Sensor

This module allows you to detect when sound has exceeded a set point you select.Sound is detected via a microphone and fed into an LM393 op amp. 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.

Step 4: Code

Picture of Code

Step 5: If I Was Helpful

Picture of If I Was Helpful

First of all, I would like to thank you for reading this guide ! I hope it helps you.

If you want to support me, you can subscribe my channel and watch my videos.

Visit My YouTube Channel

Comments

RichardG231 (author)2017-10-10

I have tried three different sound sensors on two different Uno boards, written the sketches corrected, wired the simple wiring correctly, and still can't get this or any other similar sketches to work. What am I possibly doing incorrectly? HELP!!!

PrakharT1 (author)2017-09-30

I have a 4 pin sound sensor(A0, GND, +, D0) and therefore unable to use this can someone pls help.

doladola made it! (author)2017-08-13

thank you . done

bryany20 (author)2017-06-18

Can someone please help me, it doesn't work

int soundSensor = 2;
int LED = 3;
void setup()
{
Serial.begin (9600);
pinMode (soundSensor, INPUT);
pinMode (LED, OUTPUT);
}

void loop()
{
int statusSensor = digitalRead (soundSensor);

if (statusSensor == 1)
{
digitalWrite(LED, HIGH);
}

else
{
digitalWrite(LED, LOW);
}
Serial.println(statusSensor);
}

iTECHKING (author)2016-11-03

Hey,

By Using Arduino --

I want at 10 PM all my home lights should OFF and at 6 AM same should be ON.

I have set up the Arduino Uno board with DS3231 RTC but only unable to tell Arduino to read that particular time (from 10PM to 6AM) from RTC and to execute the task.

Kindly suggest all the possible method.

Thanks.

Use the 'Time' library

MertArduino (author)iTECHKING2016-11-05

It could be a really good project.

But the project algorithm can be very difficult.

You can use the DS3231 RTC. I would very much like to help but it takes a long time and I do not have much time.

I think, first of all, the power output of all the lights should be from one place. So it must be intertwined with an Arduino scheme. Otherwise, the project needs to be extended and remotely controlled. Different modules are used in this. If all the light inputs are in one place, the DC3231 RTC and Arduino are programmed. Then you can interact with the lights using the relay card. A project that should be considered long and carefully!

iTECHKING (author)MertArduino2016-11-08

Thanks for your reply.

I've no issue with the Hardware setup, either Arduino side or 230V power side, all are ready.

The main problem I am facing is-- DS3231 is printing time in Arduino serial monitor and I want Arduino to Read that particular time from Serial monitor and execute the task.

Suppose serial monitor is printing hour, minute and second as :

21:59:57
21:59:58
21:59:59
22:00:00 I want Arduino to read this moment as it shows 22:00:00
22:00:01 either through Serial Monitor or Directly
22:00:02 from DS3231 and execute the desired task.

Your assistance would be appreciated...

parvizNekooei (author)2017-04-07

that's great

Vitor Shaft made it! (author)2017-01-25

I made it with an Arduino Nano and it works perfectly. Thank you for the tutorial.

(The other sensors on the breadboard are not in use in the project, nevermind haha).

MertArduino (author)Vitor Shaft2017-01-26

That's great!

DAEHWANL made it! (author)2017-01-09

I made it. thank you~~

---------------------

int LED = 3;

void setup(){

pinMode (LED, OUTPUT);

}

void loop() {

int statusSensor = analogRead(A0);

if (statusSensor > 200){

delay(100);

while(true){

digitalWrite(LED, HIGH);

int statusSensor = analogRead(A0);

if(statusSensor>200){

break;

}

}

delay(100);

}

else{

digitalWrite(LED, LOW);

}

}

---------------------

MertArduino (author)DAEHWANL2017-01-09

Congratulations. I wish you continued projects.

amandai11 (author)2016-11-27

I want to make a baby's cry alarm that connect via bluetooth to my smartphone when the a sound exceed 10 seconds. How can I set the threshold and the bluetooth connection? Please help. Thank you :D

ahmet_024102 (author)2016-10-28

çok teşekkür ederimm mert kardeş bravo tebrikler

MertArduino (author)ahmet_0241022016-10-28

Takibin ve yorumların için ben teşekkür ederim.

About This Instructable

26,120views

81favorites

License:

Bio: For more project and tutorial visit my YouTube channel Mert Arduino and Raspberry Pi
More by MertArduino:Arduino - MPU6050 GY521 - 6 Axis Accelerometer + Gyro (3D Simulation With Processing)NodeMCU ESP8266 - WiFi Robot Car Controlled by Application (Wifi Bot / Android / IoT)Arduino - Programmable Robotic Arm (Record and Repeat of the Servo Positions)
Add instructable to: