Electronics

Microphone Sound Detection Module LM393

AED 12.00

1

Description

The LM393 Sound Detection Sensor Module for Arduino is a gateway to precise sound monitoring. Designed to discern sound levels surpassing a predefined threshold, this module harnesses the power of a sensitive microphone combined with an LM393 operational amplifier. With its onboard potentiometer, you can effortlessly fine-tune the sound level setpoint, enabling tailored sensitivity. When the detected sound level crosses the set threshold, a conspicuous LED indicator lights up, simultaneously triggering a low output signal. Experience real-time sound detection with ease, and seamlessly integrate this module into your projects for responsive and customizable auditory monitoring.

 

Package Includes:

  • 1 x Microphone Sound Detection Sensor

 

Features:

  • Working Voltage: The module operates within a voltage range of DC 3.3V to 6V, making it suitable for various microcontroller and Arduino projects.
  • IC Chip: LM393: The module employs an LM393 dual-comparator IC chip. The LM393 is a widely used and versatile comparator integrated circuit that helps in comparing input signals and generating digital outputs based on their relative magnitudes.
  • Signal Output Indication: The module provides a signal output indication, which usually takes the form of an onboard LED that illuminates when sound is detected above the set threshold level.
  • Digital Output: The module's output is digital, meaning it produces discrete high (logical 1) or low (logical 0) signal levels based on whether the sound level surpasses the setpoint.
  • Single-Channel Signal Output: The module provides a single-channel signal output, meaning it processes and outputs sound level information from a single microphone input.
  • Convenient Installation: The module features a retaining bolt-hole that facilitates easy installation and mounting onto various surfaces or within project enclosures.
  • Output Low Level and Signal Light for Sound Detection: When the sound level detected by the microphone exceeds the set threshold, the module's output goes low (logical 0), and the signal light (LED) on the module illuminates, providing a visual indication of sound detection.

Description:

The LM393 Sound Detection Sensor Module for Arduino enhances sound monitoring capabilities significantly. Crafted with precision engineering, this module is purpose-built for meticulous analysis of auditory data. It functions as a vigilant overseer, finely tuned to discern sound levels that exceed predetermined thresholds. Combining a highly sensitive microphone with the advanced LM393 operational amplifier, it constitutes the front line of acoustic scrutiny. The integrated onboard potentiometer enables effortless customization, allowing for seamless adjustment of the sound level setpoint. This grants the ability to fine-tune sensitivity, ensuring comprehensive capture of even the faintest auditory cues for thorough analysis. Upon breach of the sound threshold, a distinct LED indicator illuminates in tandem with an instantaneous shift to a low output signal. This synchronization establishes a direct connection between detected sound events and actionable signal outputs. Experience real-time auditory surveillance with unmatched ease using the LM393 Sound Detection Sensor Module. Its seamless integration into projects offers enhanced responsiveness and adaptability, making it an invaluable tool for comprehensive sound monitoring.

 

Principle of Work:

The LM393 Sound Detection Sensor Module operates by utilizing its components to detect and process sound levels in relation to a set threshold:

  1. Microphone: The module incorporates a sensitive microphone that captures ambient sound waves in its surroundings.
  2. LM393 Operational Amplifier (Op-Amp): The captured sound signal from the microphone is then fed into an LM393 operational amplifier. The operational amplifier amplifies the weak microphone signal to a level that can be effectively processed.
  3. Onboard Potentiometer: The module features an onboard potentiometer, which is a variable resistor. This potentiometer allows users to adjust the threshold sound level. By turning the potentiometer, the user can set the level at which the module will consider a sound to have exceeded the threshold.
  4. Comparator: The amplified sound signal is compared to the threshold level set by the potentiometer using the LM393's comparator function. If the sound level surpasses the set threshold, the comparator registers this change.
  5. LED Indicator: When the comparator detects that the sound level has exceeded the threshold, it triggers the LED indicator on the module to illuminate. This provides a visual cue that the threshold has been crossed.
  6. Output Signal: Simultaneously, the module's digital output is set to a low state (logical 0). This can be used as an input for a microcontroller (such as an Arduino), signaling that the sound level has crossed the threshold.

When interfacing the LM393 Sound Detection Sensor Module with a microcontroller unit (MCU) like an Arduino, the low output signal from the module can be read by the MCU's digital input pins. This enables the MCU to respond to sound events that surpass the threshold. You can program the MCU to perform specific actions or trigger events when the module detects sound levels beyond the predetermined limit.

 

Pinout of the Module:

 

 The sound sensor has four output pins that link to a microcontroller:

  • GND: Ground connects the sound sensor to the ground of the microcontroller.
  • +5V: The technical datasheet states that this pin can operate with voltages between 3.3v and 6V.
  • Out: Using the potentiometer and the operating voltage of the microcontroller, a digital output is produced depending on a predetermined threshold.
  • The digital output pin's threshold is set using a potentiometer.
  • Through the potentiometer, the LM393 dual comparator compares the microphone signal

 

Applications:

  • Clap-controlled projects
  • Sensitive LED lights.
  • Animal sound-activated applications

 

Circuit:

The Analog pin of the sensor connected to pin A0 on Arduino and the d0 of the sensor connected to pin 2 on the Arduino LED connected through a 220 resistor to pin 4.

Library:

This Module doesn't need a library to work.

 

Code:

This code reads the state of the sound detection sensor and reflects that state on an LED. It also provides continuous feedback to the serial monitor about the state of the microphone pin and the LED status, allowing you to observe the behavior of the system in real time:

const int ledPin = 4;
const int microphonePin = 2;
int state = LOW;

void setup() {
  pinMode(ledPin, OUTPUT);
  pinMode(microphonePin, INPUT);
  Serial.begin(9600);  // Initialize serial communication
}

void loop() {
  state = digitalRead(microphonePin);
  
  Serial.print("Microphone state: ");
  Serial.println(state);
  
  if (state == HIGH) {
    digitalWrite(ledPin, HIGH);
    Serial.println("LED ON");
    delay(1000);
  } else {
    digitalWrite(ledPin, LOW);
    Serial.println("LED OFF");
  }
  
  delay(100);  // Small delay to avoid flooding the serial output
}

 

  1. It sets up two constants ledPin and microphonePin to define the digital pins connected to the LED and the sound detection sensor, respectively. The state variable is initialized to LOW.

  2. In the setup() function:

    • It configures ledPin as an output pin to control the LED.
    • It configures microphonePin as an input pin to read the signal from the sound detection sensor.
    • It initializes serial communication with a baud rate of 9600, allowing communication between the Arduino and your computer through the serial monitor.
  3. In the loop() function:

    • It reads the current state (HIGH or LOW) of the microphonePin using digitalRead(microphonePin) and stores it in the state variable.
    • It uses Serial.print() to output the current state of the microphone pin to the serial monitor. Serial.println() is used to print a new line after the state value.
    • It checks if the state of the microphone pin is HIGH (indicating that sound above the set threshold has been detected):
      • If the state is HIGH, it turns on the LED (by setting ledPin to HIGH) and outputs "LED ON" to the serial monitor. Then, it waits for 1 second  delay(1000) before moving to the next iteration of the loop.
      • If the state is not HIGH (i.e., it's LOW), it turns off the LED (by setting ledPin to LOW) and outputs "LED OFF" to the serial monitor.
    • After the above conditions are checked and actions are performed, it introduces a small delay of 100 milliseconds  delay(100) before looping again. This delay helps prevent excessive output flooding in the serial monitor.

 

Technical Details:

  • Comparator Circuit: LM393
  • Power supply voltage: +4 - 6v
  • Mounting screw hole size: 3mm
  • Circuit Board Dimensions: 3.1 x 1.6 x 0.8cm
  • Color: Black.

 

Resources:

 

Comparisons:

This is a comparison for the LM393 Sound Detection Sensor Module with the KY-037 Sound Detection Sensor Module:

LM393 Sound Detection Sensor Module:

  1. Working Voltage: Supports DC 3.3V to 6V.
  2. IC Chip: LM393: Utilizes LM393 dual-comparator IC.
  3. Signal Output Indication: Provides onboard LED signal indication.
  4. Digital Output: Generates digital output based on sound threshold.
  5. Single-Channel Signal Output: Processes and outputs from one microphone.
  6. Convenient Installation: Offers bolt hole for easy mounting.
  7. Output Low Level and Signal Light for Sound Detection: Signals sound detection with low output and LED.
  8. Size: Dimensions approximately 32 mm x 17 mm x 15 mm.

KY-037 Sound Detection Sensor Module:

  1. Working Voltage: Operates with DC 4-6V.
  2. Signal Processing: Contains an LM393 microphone sound detection module.
  3. Indicator: Features a built-in power LED indicator.
  4. Output Type: Provides digital output (0 or 1) when sound exceeds set threshold.
  5. Signal Channels: Equipped with a single-channel signal output.
  6. Mounting: Includes mounting holes for convenient installation.
  7. Response Indication: Detects sound and outputs a digital signal, no specific mention of LED.
  8. Physical Size: Compact design with dimensions of 32 mm x 14 mm x 18 mm.