[Tinyos-help] Fwd: Regarding tmote sky sampling rate
Michael Schippling
schip at santafe.edu
Mon Nov 3 13:25:54 PST 2008
Lets put this on the help list to keep a record....
The Intelligent Designers kind of arbitrarily limited the
Timer driven sampling to a 3ms period on micas, although using
Timer2<TMilli> on the tmotes I have used 2ms (presumably even
1ms works...). If you want to get to .5ms you'll have to look
into the HighFrequencySampling example or dig into the
aforementioned "ADC prescalar" and free-running the converter.
Note that there will probably be timing jitter due to other
interrupts, and there's not much you can do with the data.
See the recent non-discussion of audio sampling on this list.
MS
amit ohri wrote:
> thank you for your reply
>
> I am not cleared about your reply. I am looking for increasing the
> sampling rate more than 2000 samples/sec. Can you please give me more
> information regarding the same.
>
> Bye
> Amit ohri
> Oklahoma state university
> Oklahoma
>
> On Mon, Nov 3, 2008 at 12:16 PM, Michael Schippling <schip at santafe.edu
> <mailto:schip at santafe.edu>> wrote:
>
> I'm cc'ing this back to the help list where someone may have a
> better opinion...
>
> I would generally set a repeat Timer in start() like this:
> call Timer.start(TIMER_REPEAT, READMS);
> where READMS is something above 3ms (the undocumented minimum in T1).
> When the timer fires, start a conversion. Then either chain all the
> conversions you want to do so each dataReady() calls the getData() of
> the next, or else run a little state machine like you seem to be doing
> so each timer firing initiates a different conversion. You'll have to
> analyze the timing and settling requirements for your sensors and the
> ADC to figure out the best approach.
>
> Using a ONESHOT timer is fine but it just adds more code confusion if
> all you want is regular periodic samples. You might want to have a
> 'watchdog' timer on the data transmission task similar to what you
> have commented out (the 5000 period timer) but I've only seen this
> to be (possibly) useful on multi-hop systems that fall out of sync.
>
> The "ADC prescalar" stuff is misleadingly named, what it actually does
> is set the clock rate of the ADC and thus the time it takes to do a
> conversion -- the time between getData() and dataReady(). If you were
> free-running the ADC that would set the sample rate.
>
> MS
>
> amit ohri wrote:
>
>
>
> ---------- Forwarded message ---------- From: *amit ohri*
> <ohriamitlit at gmail.com <mailto:ohriamitlit at gmail.com>
> <mailto:ohriamitlit at gmail.com <mailto:ohriamitlit at gmail.com>>>
> Date: Sun, Nov 2, 2008
> at 5:57 PM Subject: Regarding tmote sky sampling rate:Michael
> Schippling To:
> "Ohri, Amit" <amit.ohri at okstate.edu
> <mailto:amit.ohri at okstate.edu> <mailto:amit.ohri at okstate.edu
> <mailto:amit.ohri at okstate.edu>>> Cc:
> ohriamit_lit at yahoomail.com <mailto:ohriamit_lit at yahoomail.com>
> <mailto:ohriamit_lit at yahoomail.com
> <mailto:ohriamit_lit at yahoomail.com>>
>
>
> Hi there My name is Amit and i am working on Tmote sky with
> Easysen SBT80
> board.I am using oscilloscope application to display sensor
> signal.The
> sampling rate which I am getting from sensor is 500. Can u
> please tell me how
> to increase sampling rate. I know that by changing ADC prescalar
> sampling can
> be changed but I tried but was unsuccessful.I tried to change
> ADCcontrol
> interface (cygwin/opt/moteiv/tinyos-1.x/tos/interfaces)for ADC
> prescalar but
> was not successful. CAn you please guide me regarding the same.
> I have
> attached the NEsc code which I am using. Can you suggest me more
> regrading
> the same
>
>
> ------------------------------------------------------------------------
>
> //$Id: Acceleration.h,v 1 2005/10/31 18:48:54 cssharp Exp $
>
> /* "Copyright (c) 2000-2003 The Regents of the University of
> California. *
> All rights reserved. * * Permission to use, copy, modify, and
> distribute this
> software and its * documentation for any purpose, without fee,
> and without
> written agreement * is hereby granted, provided that the above
> copyright
> notice, the following * two paragraphs and the author appear in
> all copies of
> this software. * * IN NO EVENT SHALL THE UNIVERSITY OF
> CALIFORNIA BE LIABLE
> TO ANY PARTY FOR * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR
> CONSEQUENTIAL
> DAMAGES ARISING OUT * OF THE USE OF THIS SOFTWARE AND ITS
> DOCUMENTATION, EVEN
> IF THE UNIVERSITY * OF CALIFORNIA HAS BEEN ADVISED OF THE
> POSSIBILITY OF SUCH
> DAMAGE. * * THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
> WARRANTIES, * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
> WARRANTIES OF
> MERCHANTABILITY * AND FITNESS FOR A PARTICULAR PURPOSE. THE
> SOFTWARE
> PROVIDED HEREUNDER IS * ON AN "AS IS" BASIS, AND THE UNIVERSITY
> OF CALIFORNIA
> HAS NO OBLIGATION TO * PROVIDE MAINTENANCE, SUPPORT, UPDATES,
> ENHANCEMENTS,
> OR MODIFICATIONS." */
>
> //@author Amjad Awawdeh <amjad.awawdeh at okstate.edu
> <mailto:amjad.awawdeh at okstate.edu>> & Jakkrit Kunthong
> <jakkrit at okstate.edu <mailto:jakkrit at okstate.edu>>
>
>
> // X Acceleration enum { TOS_ADC_XACC_PORT = unique("ADCPort"),
>
> TOSH_ACTUAL_ADC_XACC_PORT = ASSOCIATE_ADC_CHANNEL(
> INPUT_CHANNEL_A1, REFERENCE_VREFplus_AVss, REFVOLT_LEVEL_2_5 ) };
>
>
> --
> Platform: WinXP/Cygwin
> TinyOS version: 1.x, Boomerang
> Programmer: MIB510
> Device(s): Mica2, MicaZ, Tmote
> Sensor board: homebrew
>
>
--
Platform: WinXP/Cygwin
TinyOS version: 1.x, Boomerang
Programmer: MIB510
Device(s): Mica2, MicaZ, Tmote
Sensor board: homebrew
More information about the Tinyos-help
mailing list