It consist of a capacitive microphone and an amplifier.The output of this module is both analog and digital.

Pins

This module contains 4 pins, 2 of the are used to supply power. pin 1: anaog ouput and pin 4: digital output-activates when sound reaches certain threshold.

Components Required

  • Arduino uno
  • KY-037 Sound sensor
  • 4 jumper wires

Procedure

  1. Set up your connection as shown in the followinf image.

joy stick connecting image

  1. Connect ground pin to ground

  2. Connect positive pin to arduino 5v

  3. Connect A0 to ‘A0’ in the arduino board

  4. In the setup()

1
2
3
4
void setup() {
  // initialize serial communication at 9600 bits per second:
  Serial.begin(9600);
}
  1. In the loop() function write:
1
2
3
4
5
6
7
8

// the loop routine runs over and over again forever:
void loop() {
  // read the input on analog pin 0:
  int sensorValue = analogRead(A0);
  // print out the value you read:
  Serial.println(sensorValue);
} 

Full source Code

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
void setup() {
  // initialize serial communication at 9600 bits per second:
  Serial.begin(9600);
}

// the loop routine runs over and over again forever:
void loop() {
  // read the input on analog pin 0:
  int sensorValue = analogRead(A0);
  // print out the value you read:
  Serial.println(sensorValue);
}