Home / Wiki / Sensor / Environment
Microphone sensor moudle-variable resistance


Microphone sonser module is sensible to sound, therefore, it’s widely used in detecting the instensity of sound. When sound’s instensity is lower than the threshold value, the module output high level, contrally, when sound’s instensity is higer than the threshold value, the module output logic low, indicated led light, these function is based on a chip named LM393, you can change the threshold by adjust potentiometer.



Technical data

Work voltage: 3.3 to 5V

DO:  digital output



Indication for output signal

One way output

Effictive signal is low power

When detect sound, output low power, signal lamp light


Voice-activated sensor light

Detecting in sound



Let’s test it:

Connect sensor module's output pin to pin 3 of Arduino

Input the following code to Arduino IDE and uplode it to Arduino,

Then give the module some sound, if it didn’t work, may be threshold is too big, you can adjust it by setting slide rheostat.

Adjust slide rheostat in the direct of clockwise will decrase the threshold.



 * Microphone sensor module output digital signal.

 * Connect sensor module's output pin to the pin 3 of Arduino.


int Microphone=3;  //Define the pin 3 as micophone.

int led=13;   //Define the 13 pin as led.

int value;

void setup()


 pinMode(led, OUTPUT);    //set led as output pin

 pinMode(Microphone, INPUT);   //set Microphone as input pin

 Serial.begin(9600);     //set serial monitor's baud rate as 9600


  void loop()


      value=digitalRead(Microphone);  //read digital data from Microphone



        digitalWrite(led, HIGH);  //When detect the sound, led on.

              Serial.println("I detected the sound ");




          digitalWrite(led, LOW);  //when there's no sound has been detect, led off

                Serial.println("I can't hear you ");


          delay(300);   //Delay for 0.3s