[Tinyos-help] Question on high sampling rate with MTS300/310

2006-05-06 Thread Jerry Xu
I'm a univerisity student in China. And currently I'm doning a project
on gunshot detection with wireless sensor networks. We are using MICAz
and MTS300 as the devices. I met with a problem. The sampling rate  we
need is about 6k-8kHz. But the sampling rate of TimerM.nc is to limited
and we have to deploy MicroTimer.nc. I'v already change the code of
MicroTimer.nc so it's suitable for use in MICAz. I've
integrated it into the application like XSensorMTS300 to replace the
previous Timer. The yellow led does not act as what the codes act. And I set the
maximun samples to 8000 and send the last sample. I rarely got the
sample. Why?I add our codes to this mail.What should I do? I've attach our codes  in this mail. Thanks! -- Yours sincerely.Jerry Xu
Department of Computer Science Nanjing UniversityNanjing, P.R.China, 210093


TestSensorM.nc
Description: Cdf file


MicroTimerM.nc
Description: Cdf file
___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


[Tinyos-help] Question on high sampling rate with microtimer on MTS300/310

2006-05-06 Thread Jerry Xu
This post replace my previous one.I'm a univerisity student in China. And currently I'm doning a project
on gunshot detection with wireless sensor networks. We are using MICAz
and MTS300 as the devices. I met with a problem. The sampling rate  we
need is about 6k-8kHz. But the sampling rate of TimerM.nc is to limited
and we have to deploy MicroTimer.nc. I'v already change the code of
MicroTimer.nc so it's suitable for use in MICAz. I've
integrated it into the application like XSensorMTS300 to replace the
previous Timer. The yellow led does not act as what the codes act. And I set the
maximun samples to 8000 and send the last sample. I rarely got the
sample. Why?I add our codes to this mail.What should I do? I've attach part of our codes in this mail. Thanks! / * Start the component. Start the clock.
 /  command result_t StdControl.start()  {  call Leds.redOn();  call UARTControl.start();  call RadioControl.start
();  call MicControl.start();  call MicroTimer.start(10); /*jerry*/  call Leds.greenOn();  return SUCCESS;      }async event result_t MicroTimer.fired() {  char l_state;
  atomic my_counter ++;  /*jerry*/    //  call Leds.redToggle();  if(my_counter > 8000)  {        call Leds.yellowToggle();        post send_uart_msg();        call MicroTimer.stop
();              }  if(my_counter == 5000)  {          call Leds.yellowOn();  }  atomic l_state = main_state;    if (sending_packet)        return SUCCESS;    //don't overrun buffers
  l_state = START;  switch (l_state) {      case SOUND_DONE:      atomic main_state = START;      case START:      atomic main_state = BUSY;      //call BattControl.start
();       //call ADCBATT.getData(); //get sensor data;        call MicControl.start();   call MicADC.getData();       break;      case BUSY:      default:      break;
  }  return SUCCESS;  }/ * MicroPhone ADC data ready  */   
 async event result_t MicADC.dataReady(uint16_t data) {  data = "">  msg_uart->data[MIC] = data & 0xff;  msg_uart->data[MIC+1] = data >> 8;    return SUCCESS;
  } -- Yours sincerely.Jerry XuDepartment of Computer Science Nanjing UniversityNanjing, P.R.China, 210093
___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


Re: [Tinyos-help] tmote-sky out of memory

2006-05-06 Thread Riccardo Sala

I found a stupid bug in my code (or in my brain?).
I access an element out of the matrix bounds. With tossim it works 
because an index of matrix is TOS_LOCAL_ADDRESS and my motes have 
different addresses than those in tossim...

Thanks.

___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


Re: [Tinyos-help] tmote-sky out of memory

2006-05-06 Thread Riccardo Sala

I found a stupid bug in my code (or in my brain?).
I access an element out of the matrix bounds. With tossim it works 
because an index of matrix is TOS_LOCAL_ADDRESS and my motes have 
different addresses than those in tossim...

Thanks.

___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


[Tinyos-help] Help me with MultiRouter!

2006-05-06 Thread Hieu Tran
Hi all!  I am new to tinyos. I am doing the project with relay channels. I see in the directory Tos/Lib/Route have MultihopRouter configuration file and I want to compile it with make mica2, and make mica2 docs to have a graphic picture. However, when I change directory to ..tos/lib/Route and type make mica2 the cygwin display "make: *** no rule to make target 'mica2'. Stop"  I see in other applications, all have makefile, but in the Route directorym there is no makefile. Do I need to create a make file to compile the MultihopRouter application?  Can you help me with this trouble? Many thanks!  Regards!  Tran Chi Hieu      
		Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ countries) for 2¢/min or less.___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


[Tinyos-help] TOSSIM lossy model

2006-05-06 Thread pavan_edara

Hi,

I am trying to simulate a temperature sensing application on TOSSIM using 
the lossy radio model. I want to simulate a message loss probability of x. 
As I understand, the lossy model is simulated using bit error probability. 
In order to achieve the above said loss rate, following is what I am 
planning to do. Could someone please confirm if this makes logical sense?


Assuming the message size = 30 bytes = 30 * 8 = 240 bits. Let the bit 
error probability (specified in the loss model file on the command line of 
tossim) for any sender receiver pair be y. Then the message loss 
probability x and bit error probability y are related as follows:


x = 1 - (1 - y)^240

For simplicity, ignoring collisions and hidden terminal problem, a message 
is lost if the CRC does not match the CRC in the message. Also, assuming 
that any bit error leads to a CRC mismatch, 1 - y is the probability that 
a bit is transmitted properly. The probability that all bits in the 
message are transmitted properly without error is (1 - y)^240. The 
probability that a message is received properly is equal to the 
probability that all bits are transmitted properly i.e.


1 - x = (1 - y)^240

or equivalently: x =  1 - (1 - y)^240

Please point out flaw in the above argument.

Thanks and Regards
Pavan Edara

___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


Re: [Tinyos-help] Help me with MultiRouter!

2006-05-06 Thread Michael Schippling

Only applications with top level config files are explicitly compiled,
the compiler then sucks in the necessary tos/* code.

See if you can find something in the app/ or contrib/ directories
that uses MultihopRouter and try to compile there. You should then
be able to generate the doc picture and see what MHR does...

MS


Hieu Tran wrote:

Hi all!
I am new to tinyos. I am doing the project with relay channels. I see in 
the directory Tos/Lib/Route have MultihopRouter configuration file and I 
want to compile it with make mica2, and make mica2 docs to have a 
graphic picture. However, when I change directory to ..tos/lib/Route and 
type make mica2 the cygwin display "make: *** no rule to make target 
'mica2'. Stop"
I see in other applications, all have makefile, but in the Route 
directorym there is no makefile. Do I need to create a make file to 
compile the MultihopRouter application?

Can you help me with this trouble? Many thanks!
Regards!
Tran Chi Hieu
 
 



Yahoo! Messenger with Voice. Make PC-to-Phone Calls 
 
to the US (and 30+ countries) for 2¢/min or less.





___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


[Tinyos-help] question on serialforwarder for 1.x and 2.x

2006-05-06 Thread Avinash Sridharan
Hi All,
 Would the serialforwarder for 1.x work with base station for 2.x.
Also if I have generated JAVA classes for the 2.x serial forwarder
using mig for 2.x can my JAVA app communicate with the 1.x serial
forwarder ? Basically what are the backward compatability issues
between 1.x and 2.x  (my questions are specific to the JAVA tool
chains, but if someone has a more general comment would be more than
willing to hear that as well ).

Thanks,
Avinash-- Phd Dept. of Electrical EngineeringUniversity of Southern Californiahttp://www-scf.usc.edu/~asridhar
___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


Re: [Tinyos-help] RE: Power consumption in motes

2006-05-06 Thread jagan nath

Hi David,
Looks like u have put in lot of effort in power measurement of motes.
I have developed an application on the tmotes, that does dutycycling
of the radio and most of the time is in an idle state ( as required by
the application).Now I want to know how long will my batteries last  
(its OK even if I get a rough idea)


I have the following query regarding power measurements on motes,

1. Is there any document published whcih indicates the exact power
consumption of
tmotes for the following ,
  - Microcontroller operation
  - Radio Power consumption for tx/rx a bit(or TOS packet)
  - various other operations like LED oN etc
  - flash read/write
2. ur mail indicates that u have measured all the operations above,
could u please let us know the values

regards
jagan





On 5/6/06, David Moss <[EMAIL PROTECTED]> wrote:


Hi Krisakorn -

Are you asking about the actual method used to collect the data, or how to
actually get the power set so low on the mote?

To measure, I used a 2-probe DAQ sampling at 50 kSps, measuring across a
1-ohm resistor connected in series with the battery. The 50 kSps provided
enough resolution to detail individual operations on the mote - i.e. radio
on/off, receive, transmit, flash read/write, timer fires, etc.  For the duty
cycling power measurements, one duty cycle period was measured and processed
in Matlab to produce the results.


To get the power low on the microcontroller, I connected HPLPowerManagementM
in with my app and called HPLPowerManagement.enable() on start.  That knocks
the power way down automatically - when the mote isn't doing much, it won't
be consuming much.

Then the other thing you have to worry about is turning off the radio.  The
CC1000 components provides low power duty cycling, which was used to obtain
the results.  I forget which component exactly you call to change the duty
cycling rate.. it's probably in one of the help docs.

On a CC2420 radio, when you turn off the radio by calling
SplitControl.stop() in CC2420Control (I think), the radio really turns off -
you get about 0.102 mA current, which is consumed mostly by the
microcontroller itself.  But when you turn off the CC1000 radio through the
same method on a mica2/2dot, you end up getting around 0.960-some mA - 9
times more power consumption.

This is my next thing I'll be working on here - I believe the CC1000 radio,
when turned "off", still has its crystal oscillator and bias running, which
consumes a total of 800+ uA.  The crystal oscillator and bias can and should
be both be turned off to achieve similar power characteristics as the CC2420
motes.  Plus, adding in the features of Boomerang onto a CC1000 radio, as
far as netsync and everything goes, should allow a network to obtain much
lower power characteristics than the CC1000 low power duty cycling.

-David


-Original Message-
From: Krisakorn Rerkrai [mailto:[EMAIL PROTECTED]
Sent: Friday, May 05, 2006 12:34 AM
To: [EMAIL PROTECTED]
Subject: Power consumption in motes


Hi David,

I have seen your post in TinyOS help list regarding the measurement of
power consumption and duty cycle. Could you please explain me how you
manage to get this power consumption? Thank you so much.

Regards,
Krisakorn


___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help



___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help