Description:
This module is ideally suited for adding sound control to your project. This is a sound detection module that can detect noise and produce an analog output that can be used to trigger a switch-like response. This allows you to replace those mechanical switches that have been holding back your project all this time with something a little noisier or begin a long-term sound level monitoring system.
An onboard potentiometer allows you to tailor the sensitivity or trigger level to account for a project's background noise.
As a simple module, it will suit use within a large range of projects based on microcontrollers, such as Arduino boards and the Raspberry Pi. The module has a M3 mounting hole, allowing for easy attachment to a multitude of surfaces.
Documentation:Â KY-037 datasheet
Pinout:Â
This module has 4 pins; 2 of them are for power supply.
Pin 1: The analog output. It’s value changes according to the intensity of the received sound. It can be connected to the Arduino analog (ADC) pins.
Pin 4: The digital output. It acts as a key, and it activates when sound intensity has reached a certain threshold. The sensitivity threshold can be adjusted using the potentiometer on the sensor.
You can see the pinout of this module in the following image.
Required Materials:
- Arduino UNO R3
- KY-037
- male-female-jumper-wire
Wiring:
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);
}