Getting useful noise data...

Grove is a modulated, ready-to-use tool set.
Much like Lego, it takes a building block approach to assembling electronics.

Moderators: lily.li, violet, jeremy882, crail.lyu969

Post Reply
simon859
Pre-kindergarten
Pre-kindergarten
Posts: 5
Joined: Sun Apr 14, 2019 7:31 am

Getting useful noise data...

Post by simon859 » Fri Apr 26, 2019 5:59 am

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.

bill.yu
Junior-6
Junior-6
Posts: 644
Joined: Mon Apr 02, 2018 11:05 am

Re: Getting useful noise data...

Post by bill.yu » Fri Apr 26, 2019 6:31 pm

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.

simon859
Pre-kindergarten
Pre-kindergarten
Posts: 5
Joined: Sun Apr 14, 2019 7:31 am

Re: Getting useful noise data...

Post by simon859 » Fri Apr 26, 2019 9:26 pm

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?

Post Reply