
Sound Detector Module
This module has a microphone for detecting sounds and has two outputs:
AO: analog output, real-time output voltage signal of the microphone.
DO: digital output, when the sound intensity reaches a certain threshold, the
output high and low signal. The threshold-sensitivity can be adjusted via
potentiometer on the sensor.
Pinout and Connection to Arduino
Connect + to 5v, GND to ground, AO to pin A5 and DO to pin 3. Only AO or DO needs to be connected
depending on desired operation.

Arduino Example Sketch
The following Arduino Sketch will light the LED when a sound is detected using the digital output.
int Led = 13 ;// define LED
int buttonpin = 3; // define D0 Sensor
int val = 0; // define numeric variables val
void setup ()
{
pinMode (Led, OUTPUT) ; // define LED as output
pinMode (buttonpin, INPUT) ; // output D0 is defined sensor
}
void loop ()
{
val = digitalRead(buttonpin); // read pin 3 to val
if (val == HIGH) // When sound is detected, LED flashes
{
digitalWrite (Led, HIGH);
}
else
{
digitalWrite (Led, LOW);
}
}
The following Arduino Sketch will output the value from the analog output via serial monitor and
blink the LED according to the detected sound level.
int sensorPin = A5; // select the input pin for A0
int ledPin = 13; // select the pin for the LED
int sensorValue = 0; // variable to store the value coming from the sensor
void setup ()
{
pinMode (ledPin, OUTPUT);
Serial.begin (9600);
}
void loop ()
{
sensorValue = analogRead (sensorPin);
digitalWrite (ledPin, HIGH);
delay (sensorValue);
digitalWrite (ledPin, LOW);
delay (sensorValue);
Serial.println (sensorValue, DEC);
}