Monday, 17 February 2014

Interfacing Sensors - Microphone Sound Detection Sensor

Microphone Sound Detection Sensor

The Microphone Sound Detection Sensor is a simple sensor that detects sound using a Condenser Mike. It can give either a RAW analog output or a Comparator based Digital Output. The Analog Output is the Output from a Potential Divider constructed between the Microphone and the Trimpot. The Digital Output is that of a Comparator that takes in the potential divider as one Input and a fixed resistance as the other. 


If you are using the Induino R3 Board, You can plug the sensor directly onto the Sensor Interface on the Board. Like in the Image Below.

  1. Connect '+' pin of the Sensor module to +5V on the Induino R3 / Arduino Board
  2. Connect the 'G' pin of the Sensor module to the GND pin on the Induino R3 / Arduino Board
  3. Connect the 'DO' pin of the Sensor module to Digital Pin 16 (A2) on the Induino R3 / Arduino Board
Adjusting the Sound Sensor Sensitivity

The Trimpot on the Sensor, lets you adjust the Sound Sensor Sensitivity. The LED marked L2 (below the Trimpot) indicates the digital output of the sensor. To adjust the sensitivity, Adjust the Trimpot using a Screw Driver. Clock Wise Rotation, Decreases the Sensitivity and Anti-Clock Wise Rotation Increases it. Once the sensitivity is set,  Verify by making a sound and checking if the LED L2 Turns On when you make the desired sound. 

Programming for the Microphone Sound Detection Sensor

Here's a Simple Program that toggles On / Off the LED on the 13th Pin everytime a clap is detected.

Here's the Program
/*  Induino R3 User Guide - Program 19.0 - Interfacing Microphone Sound Detection Sensor with the Induino R3 */

#define mic 16 // The Microphone Sound Detection Sensor's Digital Output Pin is Connected to Pin 16 / A2 of Induino R3

boolean state = 0;

void setup()
 // Open serial communications and wait for port to open:
  // Setup the 13the pin LED for OUTPUT
  pinMode(13, OUTPUT);
  // Setup the sensor input pin
  pinMode(mic, INPUT);

void loop()
  if(digitalRead(mic)) // Check if the Sensor Input is HIGH
   state = !state; // Toggle the State Variable
   digitalWrite(13, state); // Set the Current State to the OUTPUT LED
   delay(1000); // Wait for the INPUT to become stable

Thats It For This Part! Enjoy... and feel free to drop us an email with questions you might have ->

Visit for more interesting products


  1. I tried the Microphone Sound Detection Sensor with above code on Arduino Duemolanove (D0 to A2, gnd to GND and + to 5V). The led is always blinking. When I printed the value of mic on COM and it is showing 16 always, and the digitalRead(mic) is 1. So that condition check is always true and LED blinks always. I tried changing the sensitivity by turning potentiometer, still it works the same away. What can be done to resolve this problem. I want to set a threshold value. The LED should blink only if the sensor value is above that threshold.

  2. I have the same problem. I can get a stand alone powered microphone to work very well. But this board does not seem to fluctuate at all. I even bought two of them in case it was just a broken board. After finding nothing on the Internet, I am thinking the design of the board must be flawed.

  3. I read your blog and i found it very interesting and useful blog for me. thanks for sharing good information. get one of the best Microphone Rental New Orleans then visit our website.

  4. Very valuable information, it's not in all the blogs that we find here, congratulations, I was looking for something like this and found it here. microsonic ultrasonic sensors

  5. I really appreciate your work which you have done on this post. Thanks for such nice information. get one of the best Microphone Rental New Orleans then visit our website.

  6. So which microphone would it be a good idea for you to utilize? It very well might be enticing to feel that the recorder's inward microphone will be capable of recording any circumstance, especially in the new computerized recorders, which give an unrivaled nature of recording. USB microphone

  7. In the event that you need your account to be interpreted, the best way to guarantee an unmistakably discernible chronicle is to utilize hardware that is good for reason. Why sit around, exertion and cash masterminding an occasion, just to blow it at the chronicle stage? Microphones cost peanuts in correlation with what you'll spend sorting out an occasion, so why ruin the account for a couple of additional pounds? RealWear