Page 1 of 1

Getting useful noise data...

Posted: Fri Apr 26, 2019 5:59 am
by simon859
I am trying to log environmental noise, but the values I am getting from the loudness sensor and the noise sensor aren't that useful. I have had the sensors set up in my living room for a few days.
  • During the night when the room is very quiet, I am getting average (300 over 5 minutes) readings of the sensors between 391 and 392.
  • During the day when things are noisier, I get readings between 391.5 and 393.
  • In the evening with the TV blaring, I get readings from 394 to 397.
Image

Although I can tell from the graph when things are, I need to write some code to trigger warning when things get too loud, and I simply do not feel like I get enough signal to noise ratio here to do that.

I am essentially using the code from the loudness sensor wiki page in python on a raspberry pi, grove base pi hat.

Re: Getting useful noise data...

Posted: Fri Apr 26, 2019 6:31 pm
by bill.yu
Hi there,

1. please make sure your physical analog port match with the code analog port.
2. you can adjust the blue item to adjust the sensitivity. thanks.

Re: Getting useful noise data...

Posted: Fri Apr 26, 2019 9:26 pm
by simon859
OK, so I think I'm going about this all wrong. Here is a more illuminating graph:

Image

I think the sensor doesn't return any sort of aggregate data, but returns the value from the mic at a given point. I think to get useful loudness data, I need to take a whole bunch of samples over a short period, and consider my loudness to be the difference between the lowest and the highest.

Is that about right?