From: Jonathan L. <jo...@cs...> - 2008-09-29 09:49:44
|
Dear Joakim, Thanks very much for your reply, 1) Did wonder about the missing flag. I must have almost the latest version, where adding the flag causes no troubles, but the code still has it commented out. Will do cvs update and see what happens ... ;-) 2) Thought there must still be things running on the board to account for the usage. Thanks for pointing me in the right direction. Presumably one could temporarily switch some devices off if one really wanted to bring consumption down into the low μA range while nothing is to be done. Do you think it is simply a matter off turning off the SHT11 (with sht11_off()) and re-enabling the power when needed (with sht11_init()), and likewise for ADC and external flash? On brief inspection there don't appear to be xmem_off, adc_off, sensors_light_off functions. Presumably I would have to come up with my own if I wanted to temporarily switch all these off. Taking xmem as an example, the following P4OUT |= BV(FLASH_PWR); /* P4.3 Output, turn on power! */ in xmem_init (xmem.c), and assuming it turns the power on there must be a similar way to switch it off, and likewise for the ADC and light sensors. I'll give it a shot ... but if you have any insight here, would be good to know ... 3) I agree that the small blips 64 times a second are most likely due to waking from LPM3 and going back to sleep again, as CLOCK_CONF_SECOND is indeed set to 64. I was merely surprised that the blips were so small, I had expected a larger change in current usage when going between LPM3 and active mode. 4) I may have a go with LPM4 as well, just for fun, although it is probably not as useful as LPM3. Thanks again Jon > -----Original Message----- > From: Joakim Eriksson [mailto:jo...@si...] > Sent: 26 September 2008 15:07 > To: Contiki developer mailing list > Subject: Re: [Contiki-developers] Tmote sky low-power modes > > Hello Jonathan, > > The reason that we did not use the SCG1 flag before was that > it cause the processor into a mode that turns all clocks off > making UART communication over the USB impossible. The latest > version of Contiki has a fix for that on the Sky platform and > will go down in LPM3 when it is "sleeping". > > The reason for the high energy consumption is probably: > 1 - the ADC systems is configured to sample several sensors > frequently (I have not measured what effect this actually > has, but it will consume some power for sure). > > and > > 2 - other external components such as the flash memory are > on, the analog sensors (light), possibly the "digital" > sensors (SHT11). > > > The small blips 64 times a second is likely when the timer system > updates the clock (if you have CLOCK_CONF_SECOND set to 64 in > contiki-conf.h). This is going from LPM1 (or 3) and into active mode > during the interrupt. > > > I have never tried LPM4 wakeup but the button-sensor should wake the > application up from LPM4, and possibly sending in data on the > USB might > also work with the latest fix. > > Best regards, > -- Joakim Eriksson, SICS > > Jonathan Lewis wrote: > > Hi guys, > > > > To set the scene, I am part of a team implementing a high-level > > component-based language called Insense for use on resource > constrained > > devices such as the Tmote Sky nodes. > > > > http://www-systems.cs.st-andrews.ac.uk/wiki/Dias/InsenseLanguage > > > > Thanks to Contiki our work has been fairly straight forward > in not having to > > deal with very low-level issues, well done ... ;-) > > > > > > Recently I've been playing about with a Scheduler component > that we want to > > provide as part of our language and we would ideally like > to incorporate > > some power-management features. So I started playing around > with low-power > > modes under Contiki. > > > > As far as I can tell, sending the processor to sleep when > nothing is to be > > done using the > > > > _BIS_SR(GIE | SCG0 | SCG1 | CPUOFF); > > > > (not sure why Contiki leaves out the SCG1 flag, > > seems to work fine when it is added, but that is > > not my main concern here, although I am intrigued) > > > > statement in the contiki-sky-main.c scheduler loop saves > roughly 1mA when > > there is nothing to do. I get a pretty constant usage of > around 2.5-2.6mA > > without the sleep statement and roughly 1.5-1.6mA with the > sleep statement > > in place (excluding current spikes due to radio listen as > set in xmac.c). > > Even sending the processor into LPM4 doesn't make a huge > difference, maybe > > takes off another 0.05mA. > > > > To clarify how I measure current: I am using an > oscilloscope to measure the > > voltage drop over a small resistor that is in series with > the battery supply > > to the device. I have experimented with 10 and 100 Ohm > resistors, both show > > the same 1.5-1.6mA results. > > > > > > 1) My main query is why we don't seem to get anything near > the low μA usage > > as outlined in the tmote datasheet (values shown below). > Maybe I'm reading > > the figures in the datasheet wrong or the figures in the > datasheet are > > somewhat optimistic, maybe some other parts of the tmote > can be switched off > > but aren't, maybe ... ? I was wondering if anyone had had similar > > experiences and/or has an explanation. > > > > 2) It is also odd that I can hardly detect the wake-sleep > cycles. I can just > > about see small blips (of less that 100μA) roughly every > 15ms (64 times a > > second) within the fairly constant 1.5mA (1.6mA for tmote > with sensors) > > trace. I am no electronics expert, but my initial thought > for this one is > > that I'm running into some sort of resolution issue in that > the scope isn't > > picking up the change in voltage drop over the resistor for > very small times > > (when the processor wakes up for some micro-seconds and > goes back to sleep > > as nothing needs doing). > > > > 3) Has anyone experimented with waking the tmote up from > LPM4? If anyone has > > any info here that would be great. > > > > 4) Apart from setting XMAC_CONF_OFF_TIME at compile time, > is there any way > > (without hacking Contiki or duplicating code) of altering > the CC2420 power > > cycle at runtime? > > > > > > If anyone can shed any light on the above, that would be > great. The values > > taken from the tmote datasheet are below. > > > > Cheers > > > > Jon > > > > ----------------------------------------------------------------- > > > > According to the tmote datasheet we should be able to > expect around the > > following for the device as a whole (I think) > > > > NOM MAX UNIT > > Current Consumption: MCU on, Radio RX 21.8 > 23 mA > > Current Consumption: MCU on, Radio TX 19.5 21 mA > > Current Consumption: MCU on, Radio off 1800 > 2400 μA > > Current Consumption: MCU idle, Radio off 54.5 1200 μA > > Current Consumption: MCU standby 5.1 21.0 μA > > > > ----------------------------------------------------------------- > > > > And for the MSP430 with Vcc = 3V > > NOM MAX UNIT > > Active current at 1MHz 500 > 600 μA > > Sleep current in LPM3, 32.768kHz active 2.6 > 3.0 μA > > > > ----------------------------------------------------------------- > > > > No virus found in this outgoing message. > > Checked by AVG. > > Version: 7.5.524 / Virus Database: 270.7.0/1680 - Release > Date: 19/09/2008 > > 08:25 > > > > > > > > > -------------------------------------------------------------- > ----------- > > This SF.Net email is sponsored by the Moblin Your Move > Developer's challenge > > Build the coolest Linux based applications with Moblin SDK > & win great prizes > > Grand prize is a trip for two to an Open Source event > anywhere in the world > > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > > _______________________________________________ > > Contiki-developers mailing list > > Con...@li... > > https://lists.sourceforge.net/lists/listinfo/contiki-developers > > > -------------------------------------------------------------- > ----------- > This SF.Net email is sponsored by the Moblin Your Move > Developer's challenge > Build the coolest Linux based applications with Moblin SDK & > win great prizes > Grand prize is a trip for two to an Open Source event > anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Contiki-developers mailing list > Con...@li... > https://lists.sourceforge.net/lists/listinfo/contiki-developers > > No virus found in this incoming message. > Checked by AVG. > Version: 7.5.524 / Virus Database: 270.7.3/1691 - Release > Date: 25/09/2008 19:23 > > No virus found in this outgoing message. Checked by AVG. Version: 7.5.524 / Virus Database: 270.7.3/1691 - Release Date: 25/09/2008 19:23 |