From: Jonathan L. <jo...@cs...> - 2008-09-25 13:07:55
|
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 |