[islandlabs] Arduino audio detection
endolith at gmail.com
Fri Apr 23 13:43:27 EDT 2010
On Fri, Apr 23, 2010 at 11:32 AM, Burns, William <burns at cshl.edu> wrote:
> I don't really need to sample sound, just detect that it's a loud "pop,
> clap" etc.
> Hopefully that means my sampling rate doesn't need to be high.
No, it doesn't need to be high for detecting the sound of a clap, but,
depending on how far apart the microphones are, the delay between the two
channels can be very small, so the sampling frequency and detection method
affects how much accuracy you can get out of it, especially if you're just
using a trigger at some amplitude threshold. If you just want to detect
"from the left" or "from the right", then it's fine.
On Fri, Apr 23, 2010 at 12:33 PM, Jim Robert <jim.mixtake at gmail.com> wrote:
> 15kHz is plenty high enough. That is near the limit of human hearing (less
> than an octive).
It's the sampling frequency that's 15 kHz, so it can only reproduce up to
7.5 kHz audio. If the mics are 10 cm apart, the best-case delay (directly
in line with the microphones) is:
(10 centimeters) / speed of sound at sea level = 293.866996 microseconds
and the time between samples is:
1 / (15.25000 kilohertz) = 65.5737705 microseconds
so that's only 4.5 samples difference, and any other angle is going to be
less than this, so if you only have granularity of one sample, it would be
able to detect 8 different angles, best case? Separating the microphones
would give more accuracy, but would also make the waveforms less similar,
which would decrease the accuracy. :)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the List