Sound Detector

Z2M Part: EMS-00004-B

Detect sound with digital sound sensor.

Circuit Diagram
Circuit diagram for Sound Detector
Wire Connections & Pin Configuration

Wire Color Connections:

Yellow → Pin 7 to Sound detector OUT, Pin 11 to LED
Red → 5V to Sound detector VCC
Black → GND to Sound detector, LED cathode

Pin Configuration:

Arduino Digital Pin 7 → Sound detector OUT
Arduino Digital Pin 11 → LED anode (via 220Ω resistor)
Arduino 5V → Sound detector VCC
Arduino GND → Sound detector GND, LED cathode
Arduino Code
Edit
const int led = 11;   // LED connected to pin 11
const int sound = 7;  // Sound sensor output connected to pin 7
int soundVal = 0;     // Variable to store sensor reading

void setup() {
  pinMode(led, OUTPUT);  // Set LED pin as OUTPUT
  pinMode(sound, INPUT); // Set sound sensor pin as INPUT
}

void loop() {
  soundVal = digitalRead(sound);  // Read sound sensor value

  if (soundVal == LOW) {          // Check if sound is detected (LOW signal)
    digitalWrite(led, HIGH);      // Turn ON LED
  } else {
    digitalWrite(led, LOW);       // Turn OFF LED
  }
}

Instruction Details

Wiring: Connect sound detector VCC to 5V, GND to GND, OUT to Digital Pin 7. Connect LED anode to Digital Pin 11 via 220Ω, cathode to GND.
Library: Not required (built-in).
Upload Code: Tools → Board → Arduino Uno. Tools → Port → select your COM port. Click Upload button.
View Output: LED turns ON when sound detected. Clap or make noise to test. Adjust onboard potentiometer for sensitivity.

How to Use

  1. Connect the required components as per the Pin Configuration above
  2. Open Arduino IDE and create a new sketch
  3. Copy and paste the code above
  4. Select your Arduino board and COM port from Tools menu
  5. Click the Upload button to upload the code to your Arduino
  6. Open Serial Monitor (if applicable) to see the output

Components Required

  • Arduino Uno
  • Sound Detector Module
  • LED
  • 220Ω Resistor
  • Breadboard
  • Jumper Wires

Category: Sensors