Sound Detection using BigSound Sensor
Sound Detection using BigSound Sensor
Just Arduino Things | TW TechieTube
Detect a Sound near surroundings and Make an LED Glow system.
Principle:
Big Sound Sensor is a module that detects sound and its intensity. You can select a point of sound intensity and detect sound when it exceeds a set point. In a loudspeaker, electricity flows into a coil of metal wire wrapped around (or in front of) a permanent magnet. The changing pattern of electricity in the coil creates a magnetic field all around it that pushes against the field the permanent magnet creates.
Components Required:
- Arduino UNO (1)
- Big Sound Sensor (1)
- Breadboard (As per Requirement)
- Jumper Cables (As per Requirement)
- Arduino Bus Cable (1)
Construction:
A Simple project to detect Human or Animal Interaction using the Passive IR Sensor.
Now connect the Sensors pins with the order given,
Vcc - Arduino 5v/3.3v Pin
Gnd - Arduino Gnd Pin
AO - Any ANlog Pins from A0 to A5
(OR)
DO - Any Digital Pins except D1/D2 on UNO.
Incl. an LED in D13 and Gnd for external value.
As explained in the Video, the Code is written as Follows.
Code:
//ARDUINO BIGSOUND SENSOR
//DEFINE THE VARIABLES
const int led=13;
const int sound=A0;
const int threshold=200; //Threshold value for sound sensor
int sousen;
void setup()
{
Serial.begin(9600);
pinMode(sound,INPUT);
pinMode(led,OUTPUT);
}
void loop()
{
sousen = analogRead(sound);
if (sousen>=threshold)
{
digitalWrite(led,HIGH);
delay(1000);
}
else
digitalWrite(led,LOW);
}
Comments
Post a Comment