Ben -
Thanks for pointing out the TEP105 wording Your radio will only be on for approximately 5 milliseconds per receive check, no matter what duty cycle you set it to. That value is radio-dependent and static, and the off time is calculated around that pre-measured on-time. That means if you want to set your local duty cycle to 20% (2000), your radio will be on for ~5 milliseconds and off for 20 milliseconds. Those receive checks are happening pretty fast and using up more energy. A better setting would be more like 2% or even 0.2%. If you call setLocalSleepInterval(20), your radio will be on for ~5 milliseconds and off for 2495 ms. In other words, you can never control the "on" time for a single receive check, but you can control how often the radio performs receive checks. The more receive checks you perform, the more energy your node consumes. -David _____ From: Murray, Ben [mailto:[EMAIL PROTECTED] Sent: Thursday, August 09, 2007 2:40 AM To: 'David Moss'; Murray, Ben; 'mona zima' Cc: [email protected] Subject: RE: [Tinyos-help] Duty cycle Thanks David ! ...just to make sure I understand it... setLocalDutyCycle(2000) will mean the radio is off for 8 seconds and then on (actively receiving) for 2 seconds (approx). whereas setLocalSleepInterval(8000) would mean the radio is off for 8 seconds and then on (actively receiving) for X seconds, where X is the shortest possible on-time to perform an effective receive check (presumably in the scale of milliseconds?), this method being better for more frequent checks setLocalSleepInterval(100) ..where the radio) is on for X seconds every 100ms? ...is there a case for setting the sleep interval to, say, 60 seconds and the wake tine to, for example, 2 seconds (i.e. basically controlling the on period rather than X seconds as described above) or should I really be using my own duty-cycle framework outside of Lpl to achieve that sort of on/off relationship? I suppose you'd want to avoid your transmitters running for 60 seconds where possible... Cheers, Ben p.s. not sure if it's been corrected yet but in the tep105 I printed out, section 2.3 opens with "...minimizing energy efficiency and...". This should probably either read "minimizing energy usage" /or/ "mazimizing energy efficiency"? minimal efficiency is an easier goal to achieve ;-) -----Original Message----- From: David Moss [mailto:[EMAIL PROTECTED] Sent: 08 August 2007 22:13 To: 'Murray, Ben'; 'mona zima' Cc: [email protected] Subject: RE: [Tinyos-help] Duty cycle Hi Ben - You're only able to specify the OFF time. The ON time is statically set by the radio stack to be the shortest possible on-time to perform an effective receive check. If you're setting the sleep interval as a duty cycle %, the max is 10000 ms off. You can specify it to be much larger if you're setting it with setLocalSleepInterval(). -David _____ From: Murray, Ben [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 08, 2007 9:22 AM To: 'David Moss'; 'mona zima' Cc: [email protected] Subject: RE: [Tinyos-help] Duty cycle are we able to set both the on time and the off time with those duty-cycle commands? From the tep105.txt and the comments in the file itself it seems to imply that all we can do is state the ON time (either discretely or as a %) within a total period time of 10,000ms? For example if I wanted to use Lpl but with an 'on' time of 10ms and an off time of 490ms - is this possible using the current Lpl interface or would I need to edit the underlying hardware definitions...? [I'm using micaz motes so it'd be the cc2420 stack in my case] Cheers, Ben -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of David Moss Sent: 08 August 2007 16:14 To: 'mona zima' Cc: [email protected] Subject: RE: [Tinyos-help] Duty cycle Hi Mona, There is a .txt version of it here: http://tinyos.cvs.sourceforge.net/*checkout*/tinyos/tinyos-2.x/doc/txt/tep10 5.txt I would recommend putting setLocalSleepInterval early on in your application's execution. I typically put the setLocalSleepInterval() inside of either Boot.booted() or the radio's SplitControl.startDone(error_t error) events. event void Boot.booted() { call LowPowerListening.setLocalSleepInterval(400); } -or- event void SplitControl.startDone(error_t error) { call LowPowerListening.setLocalSleepInterval(400); } That way your node will turn on with a low power duty cycling state. Before you send your messages, make sure you call LowPowerListening.setRxSleepInterval(&myMsg, 400); somewhere to tell your radio that the message will be sent to another low power listening node. That call only needs to happen one time, and I usually call it once at booted(), or multiple times at the place in the code where the node is about to send the message. Hope that helps, -David _____ From: mona zima [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 08, 2007 6:54 AM To: David Moss Subject: Re: [Tinyos-help] Duty cycle Hi David, Just to let you know that I could not find Tep 105 , could you please let me know where can I find it ? or what do you think ? Also I have simple question and hope that you have some time to answer: I want to put the node to sleep for 400ms then to power it up and so on, but I don't know where should I put : call LowPowerListening.setLocalSleepInterval(100); suppose this is the code, i think to put it after senddone () what do you think? is that right ? Thank you for any help or suggestions Mona suppose this is the code, I think to put it after sendDone () what do you think? is that OK ? event void Boot.booted() { call AMControl.start (); } event void AMControl.startDone(error_t err) { ...} event void Timer0.fired() { } event void AMSend.sendDone(message_t* msg, error_t err) { ....} event message_t* Receive.receive(message_t* msg, void* payload, uint8_t len) {.....} On 7/20/07, mona zima < [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> > wrote: Oh thanks David, I am really appreciate it your help. Thanks again, I will go and try that... Many thanks Mona On 7/20/07, David Moss <[EMAIL PROTECTED]> wrote: Hi Mona, Just use the LowPowerListening interface, provided by CC2420ActiveMessageC. call LowPowerListening.setLocalDutyCycle(..) -or- call LowPowerListening.setLocalSleepInterval(..) The setLocalSleepInterval() method is going to give you more precision on how long your radio is off (compared to the setLocalDutyCycle() method). See TEP 105 for more details. You don't need to mess with arbitration at this level. The CC2420 does use an arbiter down below when accessing the shared SPI bus. -David _____ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of mona zima Sent: Friday, July 20, 2007 12:10 PM To: [email protected] Subject: [Tinyos-help] Duty cycle Hi All, Many thanks for any help... I want to specify a duty cycle so the radio can power up and down based on a time interval which I want to specify! My question is : Do I have to use arbitration interfaces to do this task or I can simply use the cc2420DutyCycle.nc interface and use the methods like setSleepInterval and so on. As long as I know that radio device is a dedicated resource so the arbitration policies is only needed when dealing with shared resources? is that true? please correct me.. Many Thanks Mona **************************************************************************** *** Please consider the environment before printing this email. **************************************************************************** *** This email and any files transmitted with it are intended solely for the use of the individual or entity to whom they are addressed and may not be divulged to any third party without the express permission of the originator. Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of Thales Research & Technology (UK) Limited. **************************************************************************** ***
_______________________________________________ Tinyos-help mailing list [email protected] https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
