Hello, I've bought a microphone sensor for my arduino(Mega 2560)
the specific kind of microphone is KY-037. You can see more details about this sensor at this Link
so I connected all the wires according to this site and I've copied the code from the site and uploaded it to my arduino but the microphone sensor seems unresponsive to sound or at least shows very low change in the analog output relative to the sound intensity.
So I found on this website that the trimming potentiometer is responsible for the microphone's sensitivity and I did tried to adjust it to both sides but it didn't helped, I could only see that the background sound from the analog output is increasing/decreasing but the microphone still didn't respond much to sound.
And also, no matter what I did, the digital output always was on High mode.
This is the code I used:
const int analogP = A0;
const int digitalP = 8;
void setup() {
pinMode(analogP, INPUT);
pinMode(digitalP, INPUT);
Serial.begin(9600);
}
void loop() {
float analog;
int digital;
analog = analogRead(analogP);
digital = digitalRead(digitalP);
Serial.println("Analog voltage value: "); Serial.print (analog, 4); Serial.print ("V, ");
Serial.print ("Extreme value: ");
if (digital == 1)
{
Serial.println (" reached");
}
else
{
Serial.println (" not reached yet");
}
Serial.println ("----------------------------------------------------------------");
delay (200);
}
And this is the Serial Monitor Log, at the time I was recording I've made some noise but as you can see there is no obvious change in the analog/digital outputs.
Analog voltage value:
74.0000V, Extreme value: reached
----------------------------------------------------------------
Analog voltage value:
74.0000V, Extreme value: reached
----------------------------------------------------------------
Analog voltage value:
74.0000V, Extreme value: reached
----------------------------------------------------------------
Analog voltage value:
75.0000V, Extreme value: reached
----------------------------------------------------------------
Analog voltage value:
72.0000V, Extreme value: reached
----------------------------------------------------------------
Analog voltage value:
75.0000V, Extreme value: reached
----------------------------------------------------------------
Analog voltage value:
75.0000V, Extreme value: reached
----------------------------------------------------------------
Analog voltage value:
71.0000V, Extreme value: reached
----------------------------------------------------------------
Analog voltage value:
76.0000V, Extreme value: reached
----------------------------------------------------------------
Analog voltage value:
78.0000V, Extreme value: reached
----------------------------------------------------------------
Analog voltage value:
83.0000V, Extreme value: reached
----------------------------------------------------------------
Analog voltage value:
76.0000V, Extreme value: reached
----------------------------------------------------------------
Analog voltage value:
77.0000V, Extreme value: reached
----------------------------------------------------------------
Analog voltage value:
75.0000V, Extreme value: reached
----------------------------------------------------------------
Analog voltage value:
79.0000V, Extreme value: reached
----------------------------------------------------------------
Analog voltage value:
76.0000V, Extreme value: reached
----------------------------------------------------------------
Analog voltage value:
76.0000V, Extreme value: reached
----------------------------------------------------------------
Analog voltage value:
77.0000V, Extreme value: reached
----------------------------------------------------------------
Analog voltage value:
77.0000V, Extreme value: reached
----------------------------------------------------------------
Analog voltage value:
74.0000V, Extreme value: reached
----------------------------------------------------------------
Analog voltage value:
67.0000V, Extreme value: reached
----------------------------------------------------------------
Analog voltage value:
76.0000V, Extreme value: reached
----------------------------------------------------------------
Analog voltage value:
74.0000V, Extreme value: reached
----------------------------------------------------------------
Analog voltage value:
75.0000V, Extreme value: reached
----------------------------------------------------------------
Analog voltage value:
74.0000V, Extreme value: reached
----------------------------------------------------------------
Analog voltage value:
71.0000V, Extreme value: reached
----------------------------------------------------------------
Analog voltage value:
82.0000V, Extreme value: reached
----------------------------------------------------------------
Analog voltage value:
75.0000V, Extreme value: reached
----------------------------------------------------------------
Analog voltage value:
75.0000V, Extreme value: reached
----------------------------------------------------------------
Analog voltage value:
76.0000V, Extreme value: reached
----------------------------------------------------------------
Analog voltage value:
78.0000V, Extreme value: reached
----------------------------------------------------------------
Analog voltage value:
76.0000V, Extreme value: reached
----------------------------------------------------------------
Analog voltage value:
97.0000V, Extreme value: reached
----------------------------------------------------------------
Analog voltage value:
76.0000V, Extreme value: reached
----------------------------------------------------------------
Analog voltage value:
78.0000V, Extreme value: reached
----------------------------------------------------------------
Analog voltage value:
76.0000V, Extreme value: reached
----------------------------------------------------------------
Analog voltage value:
74.0000V, Extreme value: reached
----------------------------------------------------------------
Analog voltage value:
80.0000V, Extreme value: reached
----------------------------------------------------------------
Analog voltage value:
75.0000V, Extreme value: reached
----------------------------------------------------------------
Analog voltage value:
75.0000V, Extreme value: reached
----------------------------------------------------------------
Analog voltage value:
74.0000V, Extreme value: reached
----------------------------------------------------------------
Analog voltage value:
74.0000V, Extreme value: reached
----------------------------------------------------------------
Analog voltage value:
75.0000V, Extreme value: reached
----------------------------------------------------------------
Analog voltage value:
75.0000V, Extreme value: reached
----------------------------------------------------------------
Analog voltage value:
74.0000V, Extreme value: reached
----------------------------------------------------------------
Analog voltage value:
74.0000V, Extreme value: reached
----------------------------------------------------------------
Analog voltage value:
75.0000V, Extreme value: reached
----------------------------------------------------------------
Analog voltage value:
75.0000V, Extreme value: reached
----------------------------------------------------------------
Analog voltage value:
74.0000V, Extreme value: reached
----------------------------------------------------------------
If you know how to fix this problem, please let me know.