SPL is measured as an average of the instantaneous values you get from,
for instance, a microphone. What you need to do is sample the mic at some
reasonable rate (making some assumptions about the frequency range you are
interested in). In T1 there is a HighFrequencySampling demo app that sorta
does this.

Then the (sl)easiest thing to do would be to look for max values over a moving
window of some large number of samples. The real way to do it would be to
estimate a zero crossing point -- probably at about 1/2 the ADC range (what
you get from a mote ADC is fundamentally an AC signal with a fixed DC offset),
do a full-wave bridge around that zero crossing, and then an RMS average of
the result (again with a moving window of some size which will capture the
lowest frequency of interest).

In either case you should probably do the SPL conversion on the mote and
only send the results because it markedly reduces the bandwidth of the
data you need to send.

In order to get an engineering measurement in dBm you need to calibrate your 
averaged data against a known source and perhaps make some adjustments for
the non-flat frequency response of the microphone, then convert the
measurements to a log scale. Note that you will have some noise floor that
makes the lower couple of bits insignificant, and that the max you can get is
10 to 12 bits (for Atmega and MPS converters). This means 8-10 significant
bits where each bit is 6dB (a doubling of sound pressure), so your measurement
range is at best somewhere between 48 and 60 dBm. Hopefully that is sufficient
for your system...

MS

Rogério De Pieri wrote:
> Hi dear all
> 
> I am working on an acoustic project within tinyos-2.x environment. 
> The goal of the project is to take a view of the distribution of SPL (Sound 
> Pressure Level) in an ambience.
> 
> 
> I took just a few of steps on that, and a this time I'm looking for 
> documentation about how to take datas from acoustic/sound sensor from 
> sensorboards.
> 
> Another problema I know I will have is to turn de sound or acoustic data in 
> SPL or dB.
> 
> 
> Does anybody caan help me?
> 
> Thanks for all
> 
> 
> -- 
> Rogério De Pieri (Lelo)
> Buscando melhorar a cada dia
> Áudio, Hardware & Software
> Fone: (48) 8409-0575
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Tinyos-help mailing list
> [email protected]
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

-- 
Platform: WinXP/Cygwin
TinyOS version: 1.x, Boomerang
Programmer: MIB510
Device(s): Mica2, MicaZ, Tmote
Sensor board: homebrew

_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to