[Tinyos-help] TinyOS-2.x and Sampling rate

Omar Bouzid o.m.bouzid at newcastle.ac.uk
Thu Apr 8 11:04:39 PDT 2010


Hi all,

Currently I am trying to implement a simple code using nesC language and TinyOS-2.x so that a sensor node will be able to capture an acoustic signal generated by a PC speaker, for instance a sine wave or a gunshot signal, in order to know what is the maximum sampling frequency that MICAz mote can achieve. This code is installed on a sensor node which sends the signal captured to the base station. However, I only can achieve maximum sampling frequencies in the range of 200Hz and 750Hz using Read interface and ReadStream interface respectively. But...

In the literature, it was reported that, in tinyos-1.x, the MICA components can normally sample at a frequency up to 200 Hz (in real time transfer mode i.e. sampling and sending), while in the  ADC's free running mode (i.e. turning off the wireless radio of the MICA components while sampling) the highest sampling rate using these components can reach 17.723 KHz.

After I read the TinyOS Programming book, I decided to use TinyOS-2.x instead of TinyOS-1.x in my project because of two reasons:
	1- it is expected that the sampling frequency can be easily increased since TinyOS-2.x supports in addition 	to a millisecond timer a microsecond timer which could be used to improve the sampling rate.
	
	2- It supports the ReadStream Interface which is equivalent to the ADC's free running mode.

But, as I tried to use the microsecond timer in my code, I surprised that this type of timer is actually unknown for the compiler. Also, in ReadStream mode I only can reach 750 Hz as a maximum sampling rate by setting timer.startperiodic(1300) (below this value the senor node does not send any data). So, my questions are: 

	1- Is it right that the microsecond timer still not fully supported by the MICA components?
	2- Which commands that can be used to set the sampling rate in the ReadStream interface? Or is there an 	technique that can be used to achieve high sampling rates?

I am looking forward to hear from you and I appreciate in advance any help.

Best regards,
Omar



More information about the Tinyos-help mailing list