Hi,
 
The samples are not simply saved into the buffer, but they are added to the 
samples already in the buffer. For every chirp, this additive recording starts 
from the beginning of the buffer and stops after 850 samples (or whatever your 
buffer size is).
 
   Yes, I can truly understand this part (in fact this is how it works) - but 
what I don't understand is why I'm not getting all the 16 samples (each sample 
contributes to 850 "samples", which are added on to the buffer).  I've 
explicitly done some debugging to prove that I am getting less than 850 samples 
for a particular chirp + silence period.  Any idea?  Am I supposed to put the 
specialized Clock and Timer modules in another folder besides the 
AcousticRanging folder in the tinyos lib?
 
   Hoping to see some light on this problem.  Thanks so much.
 
Regards,
Azhar



Subject: RE: [Tinyos-help] Acoustic Ranging: Not getting 16 samples within 
oneset of 16 chirpsDate: Thu, 13 Dec 2007 10:34:38 -0600From: [EMAIL 
PROTECTED]: [EMAIL PROTECTED]; [email protected]




This is the expected behavior. The samples are not simply saved into the 
buffer, but they are added to the samples already in the buffer. For every 
chirp, this additive recording starts from the beginning of the buffer and 
stops after 850 samples (or whatever your buffer size is). After all the 16 
chirps are received, what you should see in the buffer is the samplewise sum of 
these chirps, which should look like some silence in the beginning, then a big 
peak, followed by some smaller peaks which should be discarded. The position of 
the first big peak should carry the information on the distance.
 
There is a technical report that explains how it works:
http://www.isis.vanderbilt.edu/publications/archive/Sallai_J_2_25_2004_Acoustic_R.pdf
 
Janos
 
-----Original Message-----From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On 
Behalf Of Muhammad AzharSent: Tuesday, December 11, 2007 8:16 PMTo: [EMAIL 
PROTECTED]: [Tinyos-help] Acoustic Ranging: Not getting 16 samples within 
oneset of 16 chirps
 
Hi all,    I'm currently working on Vanderbilt's acoustic localization module.  
From my understanding, this is how it works: 1) Actuator sends a radio message 
to sensor to inform sensor to "get ready" to receive the 16 chirps including 
the silence period (chirps are constant duration, silence period following each 
chirp is varied).2) There is a start-up delay for the mic to receive the 
chirps.3) The sound is emitted at the same time as the radio message (but due 
to the much slower speed of sound, the sensor receives the radio message first 
before receiving the sound).4) In AcousticMultiSamplerM.nc, upon each 
Timer.fired() event (i.e. for each specific chirp + silence period), it will 
call MicADC.getContinuousData().5) Each time the data is ready, it will then 
signal dataReady() in OutsideRangingSensorM, which will then be stored to the 
850 samples in the buffer.  Once 850 samples have been filled in the buffer, 
the sampler will ignore any more data and wait for the next chir!
 p + silence period to arrive.  (Thus for each chirp + silence period, the data 
would then be added to the specific "sequence" in the buffer - i.e. we would 
expect the peak to appear somewhere below 200 (sequence number) in the array 
for short distances).6) A moving average function is then carried out.  (I left 
out the peak detection process as I wanted to see the "raw" data of the 850 
samples that was filled).    However, in my case, I realised that in step (5), 
my ADC does not sample at the required rate - hence, I'm not getting 16 samples 
at the sensor side (if I wasn't mistaken, 3 sequences of chirp + silence period 
were required to fill up the 850 size of the buffer).  My actuator is able to 
emit the 16 chirps as required.  Thus, I really do not know what is wrong as 
I'm using the specific micaz folder done by VU which contains a different timer 
from the default timer.  I have renamed the default micaz folder to micaz2, so 
that the micaz will now "point" to the micaz f!
 older for acoustic localization.  Also, based on the diagram generated

 by typing "make docs micaz", it seems that my timer is wired appropriately to 
the "special" timer for acoustic localization.   
No virus found in this incoming message.Checked by AVG Free Edition.Version: 
7.5.503 / Virus Database: 269.17.1/1181 - Release Date: 12/11/2007 5:05 PM
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to