4

I have been trying to get a mini microphone module with an inbuilt microphone module I got from AliExpress to my Arduino to confirm if it is working. It was a four pin microphone with pins labeled V, L, and two G pins. The V represents voltage in and the L represents audio output positive.

Here is the link to the microphone: https://www.aliexpress.com/item/1005004277353392.html?spm=a2g0o.productlist.main.23.61e36f2fBMHvFk&algo_pvid=15b05576-cd73-4eb7-a476-4503b8a706a7&algo_exp_id=15b05576-cd73-4eb7-a476-4503b8a706a7-11&pdp_npi=3%40dis%21USD%210.54%210.39%21%21%21%21%21%40211bf3f716869249882567444d07ba%2112000028601598840%21sea%21NG%214345576938&curPageLogUid=plaZEQWq7SRB

However, when I ran the code to check whether it works the value does not change that much, Is there something I'm doing wrong (I'm a beginner btw) or is the microphone not just working?

My code

const int audioPin = A0; // Analog input pin connected to the microphone module output

void setup() {
  Serial.begin(9600); // Initialize the Serial Monitor
}

void loop() {
  int audioValue = analogRead(audioPin); // Read the analog value from the microphone module

  Serial.println(audioValue); // Print the analog value to the Serial Monitor

  // Add a small delay to control the rate of readings
  delay(10);
}

I connected the output (L) to A0 and connected both the G pins to the arduino ground, I connected the V pin to the 3.3V pin on the Arduino Uno.

5
  • Does your Uno operate at 3.3V or 5V? If it's 5V, you can power the microphone module with 5V which may help. The images the seller provides do not show the bottom of the circuit board. Assuming there are no components on the other side of the board, the amplification provided by the components we can see will be limited. If you have access to an oscilloscope, you could verify the module is not defective.
    – VE7JRO
    Commented Jun 16, 2023 at 17:45
  • What much exactly is "not much"? The module looks, like a raw microphone with a simple amplifier circuit, but without any further processing. Thus you would get directly the signal on your analog pin, which is an alternating voltage (probably around 0.5*V (aka 2.5V on 5V supply voltage), where you need to sample at least 2 times as often as the highest frequency, that you want to measure (nyquist frequency). Also this module will probably not provide enough gain to fill the full 5V range, that you have with the Uno.
    – chrisl
    Commented Jun 16, 2023 at 23:25
  • The arduino operates by 5V btw, and when I say the value does not change much when I check my Serial Monitor, it gives a value of about 400 to 460 varying a lot and even when I speak to the microphone, it does not seems to go higher than that or change. I was thinking that it was noise. I am not so familiar with an oscilloscope, but when I connected it to the oscilloscope, it seemed to have a lot of noise, with repeating patterns even when I was not speaking to it and when I did speak to it, I could not tell if it was detecting it or not. Commented Jun 17, 2023 at 8:49
  • If you can't detect the sound on an oscilloscope, then the Arduino won't detect it either, so you would need to get a better microphone module. Also think about what you want to do with the sound module. The Uno is not really capable of audio processing (or at least very limited in it)
    – chrisl
    Commented Jun 18, 2023 at 8:58
  • If you look carefully on the PCB, it has an AC-coupling capacitor on the L line which block the DC bias from the transistor, and you only get half of the signal. You need to connect the Arduino Analog input directly to the transistor output (i.e. to bypass the capacitor). You can measure the DC voltage at the output transistor, if it is at 1.5v without input signal, you will get +/- xxxmV swing against 1.5v that you can read with the Arduino analog input.
    – hcheung
    Commented Jun 19, 2023 at 14:27

1 Answer 1

1

Have you checked to see if it is a hardware problem? It could be the fact that it is just off AliExpress. Usually, the display images are better than the actual product and if this is true, you can see a few bad soldering connections. I might want to go over some of them with a soldering iron.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.