Grove Sound Sensor: very low readings

I am using a Grove Sound Sensor connected to an MKR WiFi 1010 on A0. The readings are not 0-1024 as I am expecting.

I have tested it with the Calibration example and the maximum reading I've got is 294 (playing a loud shaker the closest I could get to the mic).

The example that is available on Grove – Sound Sensor gives readings of ~6 on a quiet office environment (a DbA meter on my phone reads ~35-40 DbA).

I have tried with another unit (same sensor) and the readings are similar.

I will appreciate any help.

Why don't you just tweak your code so that the outputs you get are consistent with a standard (like your phone?) that you trust?

Your Grove sensor gives readings in dB. Your phone gives readings in dBA. Google tells us: What Is the difference between dB and dBA? dB sound pressure levels are unweighted. dBA levels are "A" weighted according to the weighting curves to approximate the way the human ear hears. For example, a 100 dB level at 100 Hz will be perceived to have a loudness equal to only 80 dB at 1000 Hz.
So, you are not comparing apple and apples. You will need to use a real dB meter for calibration.
Paul

Yes, I know, I need to compare comparable things. But not my point though, I just put the reading from my phone as a reference, not because I want to get that value directly out of the sensor reading.

I still don’t get why the sensor is not giving a reading between 0 and 1024. In the example at SeeedStudio page, these seems to be the values.

I could map this in the code, but I want to understand why is giving those values.

I guess there could be a variety of reasons;

  • faulty batch

  • different specification (is it a revised model designed to cater for a 747 at 3 meters?)

  • issue with your code (which you haven't posted)

  • some step you're misinterpreting

  • "something else"

At this stage it's just a guessing game.

I understand that there could be different reasons, and I have tried several of those routes.

  • faulty batch | unlikely
    I have tried two sensors, from different kits, bought at different times. The results are the same.

  • different specification | unlikely
    It is the v1.6 of the sensor, the same one that SeeedStudio shows

  • issue with your code | unlikely
    I have tried different approaches, including the Calibration example provided with the Arduino IDE.
    The code below gives readings of ~0-14 when quiet and ~100-200 when clapping in front of the mic.

// test code for Grove - Sound Sensor
// loovee @ 2016-8-30
 
const int pinAdc = A0;
 
void setup()
{
    Serial.begin(9600);
    //Serial.println("Grove - Sound Sensor Test...");
}
 
void loop()
{
    long sum = 0;
    for(int i=0; i<32; i++)
    {
        sum += analogRead(pinAdc);
    }
 
    sum >>= 5;
 
    Serial.println(sum);
    delay(10);
}
  • some step I am misinterpreting | unlikely, but…
    I am expecting the analogRead to be 0-1023. I tried changing the analogReadResolution() value as explained, because I am using a MKR 1010, but it's also not giving reasonable values.

Righto - so ...

  • Have you fed a known voltage onto pin A0 and verified that it reads correctly thus eliminating an issue with pin A0?

  • Are we sure that there isn't any low(ish) resistance on pin A0 that's dragging the voltage down?

  • Can you put a voltmeter on the output of the sound sensor to see what it's outputting (both in and out of circuit)?

  • Does it go any higher if you give it an even louder sound (say, the output from a smoke alarm)?

  • What range of sound volumes is it designed to detect? How loud should a sound have to be to max it out?

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.