SeeedDocument / Seeed-WiKi

This is the Seeed wiki page

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Loudness sensor, Lotus / Grovepi and signal quality

dothebart opened this issue · comments

I'm using the Loudness sensor to detect environmental volume.
I've started using it with the groovepi, via python from the raspii to monitor the environment continually. I've noticed that it doesn't reliably deliver a good signal so I started digging deeper.

I found that the Lotus is really compareable to the grovepi, so I wanted to retry with it, put a usual level converter to attach it to the Raspi I2C, and it worked with the grovepi firmware. However, the values delivered from the loudness sensor were even less reliable.

I've retried using the lotus alone with usb attached to a host and the values output would be reliable. But, even once I would connect the i2c (without even using it) the values would become unreliable again.

When I simply attach a pot to the analog in to the lotus or the grovepi it will give reliable values..

So, my assumption is, that the digital i2c couples into the loudness sensor and voids its values. Please advise whether there is an easy way to fix the sensor.

Hi, could you please post the sensor readings for both reliable and unreliable?

But, even once I would connect the i2c (without even using it) the values would become unreliable again.

This is really weird, leaving the I2C bus idle means the I2C will not introduce any noise into the power circuit.

Since the grove pi contains lots of code, I'm using this simple sketch on a lotus:
https://github.com/dothebart/sketches/tree/master/loudness
its squaring the current values, to calculate the RMS later on, which it does in 0.1s steps over 1s.
In column 1 we have the current value measured at that very time, the second value is the RMS over the last second.

I've measured a silent environment:

noise:9409:6943
noise:6400:7249
noise:7921:7252
noise:6889:7409
noise:7569:7166
noise:7921:7140
noise:5776:7139
noise:7396:7382
noise:7569:7071
noise:7396:7146
noise:6084:7120
noise:7569:7355
noise:8281:7022

single: 5776 - 9409; Avg 1s 6943 - 7409
delta 3633 ; 466

i2c plugged in:

noise:7744:6946
noise:6889:7616
noise:9604:7117
noise:4900:8132
noise:9216:7677
noise:6561:6883
noise:6561:7494
noise:2809:7619
noise:6889:7398
noise:7569:8047
noise:4761:7308
noise:9604:7541
noise:7744:7462
noise:8100:7140
noise:8464:7707
noise:7744:7464

Single: 2809 - 9604; Avg 1s 6883 - 8132
Delta: 6795 ; 1249

So you see that the range of the values are quiet different once i2c is plugged in; While the RMS in the disconnected state narrows in very well, it even spreads with i2c connected.