1

I try to get a good range of values from VMA309 sound sensor.

However, when I connect it properly it gives me a range of values +/-5 like below. The documentation says it should give numbers between 0 and 1024.

I turned the potentiometer both sides all the way and that only changed the number, but it keeps gives number in a range of 5 numbers:

An example:

626
623
624
624
624
624
623
624
624

My code:

int sensorPin = A5;
int sensorValue = 0;
void setup ()

{
  Serial.begin (9600)  ;
}

void loop()
{
  sensorValue = analogRead(sensorPin);
  delay (500);
  Serial.println (sensorValue, DEC);
}

What am I doing wrong here?

An image of the wires: I also tried the wiring directly without a breadboard. But that gave the same results.

I used the code as given from the VMA 309 documentation.

6
  • 1
    The original maker could be velleman: velleman.eu/products/view/?id=435532 They also have a schematic: velleman.eu/downloads/29/infosheets/vma309_scheme.pdf The analog output is the signal directly from the microphone output. That is a silly circuit. When the wrong microphone is used or when the microphone is 180 degrees rotated and soldered on the board, it won't work. You are doing probably nothing wrong, but to be sure you can show the code that you use and a photo of the wiring. Have you tried blowing into the microphone?
    – Jot
    Jan 16, 2019 at 10:44
  • Thanks for your reply, yes i tried that. That resulted in a range difference of about 30 at maximum. I added the code aswell as a picture of the arduino with the sensor. Jan 16, 2019 at 11:09
  • 1
    I don't understand from picture if sensor is powered by 5V or 3.3V. If it's powered from 3.3V , you are wrong.
    – leoc7
    Jan 16, 2019 at 11:13
  • I tried 3.3 and 5V the back of the product says that both should work. At both voltages i get the same results, only different values Jan 16, 2019 at 11:16
  • 1
    Give a try to exclude issue from Arduino, you run code for all analog pins (A0, A1 etc...) and check if result is the same..
    – leoc7
    Jan 16, 2019 at 11:39

2 Answers 2

1

I have had a smimilar issue extracting the data to ardino module. -with 5V power supply the counts were varying from 1009~1023. -with 3.3V power supply the counts were in the range of 610~640

I connected an scope and found out the MIC module gives an AC outputput of 340mV max sitting over DC signal of 3.3(at 5V supply) and 1.7(at 3.3Vsupply).

On thing was very clear that However the MIC is giving and out put, we need to consider the analoag ref. voltage, for an ADC the input can never be higher than Vref. i.e. 2.56V.So 5V suppy is not going to work. Also if 1.1 Vref is selected the ADC will remain saturaed alaways at 1023 and won't work. Also consider a need to subtruct and offset of 1.7V while working with 3.3V supply.

As a summary, 1- Set Vref of Arduino ADC module to 2.56V 2- Use 3.3V supply for VMA309 sound sensor 3- Consider a DC offset of 640 counts approx and the actual voice signal will be sitting on this offset value. May need to decouple in a software code. 4- Set a VMA309 sound sensor module threshold at a reasonable point to capture the full spectrum of voice. 5- The delay(ms) in a code shall be removed to get max capture rate or Set an ADC in a free running mode to caputure at max sampling rate(15KSPS for ATmega2560).

0

Arduino is a lot of fun, but you better stay away from such modules.

The module is a resistor and a electret microphone. There is also a comparator for the digital output. When you have an electret microphone, and add a resistor of 4k7 or 10k, then you have the same.

The signal from the microphone is not amplified and the Arduino only gets the analog value of the audio. The module does not measure how loud the audio is.

I think Velleman makes them: www.velleman.eu/products/view/?id=435532
They are so kind to have a schematic available: vma309_scheme.pdf

Can you move on and use the Arduino for something else?
This module with this microphone is probably not going to work.
If you want to measure the sound level, then perhaps you can make a circuit yourself or buy a better module.

The "Sound Pressure" is how loud audio is.
The most used standard is called "Sound Pressure Level" or "SPL" and is measured in dB (deciBell).

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.