nes-proj/examples/energest-demo
2008-01-22 15:00:24 +00:00
..
handouts final versions 2007-11-01 17:33:16 +00:00
lib
nodeid
src Updated makefiles and paths to make a .zip file with demo contents 2007-11-06 14:46:12 +00:00
build.xml added jar target 2007-11-01 17:34:36 +00:00
contiki-conf.h Pulled in updated defines for the sky platform 2008-01-22 15:00:24 +00:00
contiki-sky-main.c moved initialization of ctimer to allow MAC layer to use ctimers 2007-11-15 13:07:42 +00:00
energest-demo.c Removed redundant initialization 2008-01-22 14:58:41 +00:00
Makefile Added upload and rundemo targets, removed obsoleted %.upload target 2007-11-26 23:32:32 +00:00
Makefile.contiki-energest-demo Fixed so that it runs with multiple Tmote Sky boards attached; it now uses the first one 2007-11-26 23:34:52 +00:00
README Updated instructions 2007-11-06 19:57:41 +00:00

This directory contains the compiled code for the Contiki energy
estimation demonstration for ACM SenSys 2007. More information is
available in the handouts/ directory and at the Contiki website:

		     http://www.sics.se/contiki/

* INSTALLATION INSTRUCTIONS

Cygwin and Java (JRE) needs to be installed. The demo has been tested
on Microsoft Windows, but probably works under Linux too.

You need between two and eight Tmote Sky boards to run the demo: one
sink and between one and seven nodes. The nodes are numbered from 42
to 48, and 41 is the sink node.

Step 1: Unpack the zip file

     unzip contiki-energest-demo.zip

Step 2: Change directory to the demo directory

     cd contiki-energest-demo

Step 3: Connect the sink node to the PC. Remove all other Tmote Sky
        nodes from the PC.

Step 4: Upload Contiki to the sink:

     make upload-sink

Step 5: Remove the sink node from the PC.
     
Step 6: Connect one of the non-sink nodes to the PC

Step 7: Upload Contiki to the node:

     make upload-node-42

        This takes some time. The red LED should be lit when the
        uploading is finished. We have found that in some cases brand
        new Tmote Sky boards seem to cause a problem with Contiki and
        the red LED does not light up. If so, try to wait a few
        minutes (~10 minutes) with the Tmote Sky either inserted in
        the PC, or powered with batteries. If the red LED goes on
        after these minutes, repeat the "make upload-node-XX" to
        upload Contiki again.
     
Step 8: Remove the Tmote Sky from the PC.

Step 9: Insert batteries into the Tmote Sky. The red LED should light
        up.

Step 10: Repeat step 6 to step 9 for all non-sink nodes. Replace "make
        upload-node-42" with "make upload-node-43", "make
        upload-node-44", and so on.

Step 11: Insert the sink node to the PC again.

Step 12: Run the Java program:

     make rundemo

     NOTE: this uses the first Tmote Sky it finds as a
     sink. Therefore, make sure that only one Tmote Sky (the sink) is
     inserted.

Step 13: Push the "user" button on the Tmote Skys and watch their
         power consumption go up and down.


* DEMO DESCRIPTION

Contiki continuously estimates the energy consumption of the
system. In this demonstration, seven Tmote Sky nodes, running Contiki,
estimates their energy consumption and send their power to a sink
node. The sink node is connected to the PC, and reports the nodes'
power to a Java program. The Java program shows the nodes' power
consumption for the last second.

When pushing the button on the nodes, they cycle through seven states
as below. This is reflected by their power consumption, as shown in
the Java program. The different states are:

* Red LED: sending one packet per second
* Green LED: radio listen 1% duty cycle
* Green, red LEDs: radio listen 10% duty cycle
* Blue LED: radio listen 100%
* Blue, red LEDs: radio listen 10%, CPU low-power mode disabled
* Blue, green LEDs: sending data 1.2 kilobytes/second
* Blue, green, red LEDs: sending data 12 kilobytes/second

When sending data, the radio is turned on for a while before the
transmission to check if it is possible to send the packet. This is
the reason why energy is spent on radio listening even when the nodes
are only sending data.