Project 3

Sound Alert System: Real-Time Noise Detection - Arduino Uno

Project Description

This sound alert system monitors environmental sound levels and triggers alerts when noise exceeds set thresholds. It uses a microphone module to measure acoustic intensity and when a set point is reached, the output pin is triggered. The sensitivity of the sound sensor can be set by turning the screw on the module.

In this project, you will learn to trigger an action based on a sensor's output which acts as an input to the Arduino

Such a system can be used for noise level monitoring in sensitive spaces, security detection of unusual sounds like breaking glass or forced entry, and home automation tasks such as clap-activated controls.

Components
  • Arduino Uno
  • Sound sensor module
  • LED (any colour)
  • Resistor (220 Ohm) - [Red-Red-Brown-Gold]
  • Jumper wires
  • Breadboard
Code

int soundSensor = 2;   // Sound sensor digital OUT pin
int led = 13;          // LED pin

void setup() {
  Serial.begin(9600);      // Start serial communication
  pinMode(soundSensor, INPUT);
  pinMode(led, OUTPUT);
}

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

  // Print digital value (0 or 1)
  Serial.print("Sound State: ");
  Serial.println(soundState);

  if (soundState == HIGH) {  
    digitalWrite(led, HIGH);   // Sound detected
  } else {
    digitalWrite(led, LOW);    // No sound
  }

  delay(100);  // Small delay for stability
}

Taking things further
  • An alarm such as a buzzer can be added
  • The sound input can be combined with motion sensing using the PIR sensor for a more robust security system
  • The "intrusion" can be transmitted via SMS or over the internet using a GSM module
  • Noise level warnings can be displayed using colour coded LEDs or displayed on an LCD