Wireless Sensor Networks






Course : CS347
Semester:  Autumn 2004
Title: Wireless Sensor Networks
Instructors:  Pete Beckman and Rick Stevens
Class Schedule:  Mondays:  1:30pm and Thursdays at 10:00am
Prerequisites:  Graduate-level understanding of Unix/Linux operating systems, networking, computer architecture, programming

Course Catalog Description:  Recent advances in low-power computer architectures and wireless technology have made possible the practical deployment of large scale sensor networks.  These sensor networks are being used for everything from environmental and structural monitoring to emergency patient care.  Students will learn the concepts and technologies for building embedded systems and wireless sensors nets by focusing on four areas:  low-power hardware, wireless networking, embedded operating systems, and sensors.  Assignments will provide hands-on experience by deploying small wireless sensor motes running TinyOS to form an ad-hoc peer-to-peer networks that can ollect environmental data and forward it back to an 802.11b-equiped embedded Linux module.  Students will also read 2-3 papers a week and write summaries of each paper, participate in classroom discussions, and participate in a team research project. 


Required Textbooks:
An Embedded Software Primer, David E. Simon, ISBN: 0-201-61569-X

Recommended Texts:
Building Embedded Linux Systems, Karim Yaghmour, ISBN: 0-596-00222-X

Assignments:
Unless otherwise specified, all assignments should be mailed to {beckman,stevens} at mcs.anl.gov.  The "Subject:" line MUST include "CS347", so we can filter and find your assignments.  Email without CS347 in the Subject: line will be ignored.

Teams for Mote programming will be:
    Team 1:  Han, Kay, Matthew, Ivan
    Team 2:  Fang fang, Rupe, Yitz
    Team 3:  Chad, Ioan, Dave, Gohar

    1:  Due Oct 11th
a) Dream up two creative wireless sensor network applications.  One of them must use the current mote family we have (xbow.com MicaZ) but possibly using the GPS or weather-board or RFID modules.  One should be feasible with a handful of nodes, and one application can use 100 or more.  Write up your idea including a discussion of software, deployment issues, etc.  One page or more per application is fine.
b) Write up a routing algorithm of your design, that might be useful for creating ad-hoc wireless sensor networks.  Include a discussion of strengths and weaknesses, issues concerning noise, movement, traffic, power, etc.  One page or more should be fine.
c) Read the following papers:  Wireless Sensor Networks for Habitat Monitoring, Power and Control in Networked Sensors, System Architecture Directions for Networked Sensors

    2:  Due Oct 18th
a) Read the following papers: A Transmission Control Scheme for Media Access in Sensor Networks, The Emergence of Networking Abstractions and Techniques in TinyOS, Active Message Communication for Tiny Networked Sensors.  Write a 3/4 to 1 page summary of key concepts and key issues and findings for each paper.

    3:  Due Oct 21st, to be demonstrated in class.
          a) Get single mote programmed with current TinyOS distro (from CD).  Get acquainted with tools for downloading TinyOS.

b)
Do "Blink" example from net

c) Write "Hello World" for mote:  Set timer for 5 secs, then sound alarm for 3 secs

d) “Shake and Cry”
Set time for 3 Secs.
Get accelerometer reading
Sound alarm and cry for 3 secs if acceleration above threshold of normal table vibration (picking up mote for example)
If you are having fun, use LEDs to signal “armed and ready” (blinking red == armed, solid green == setup)

   4:  Due Oct 25th:
 a) Read the following paper:  Mate: A Tiny Virtual Machine for Sensor Networks.  Write a 3/4 to 1 page summary of key concepts and key issues and findings for the paper.

   5:  Due Oct 28th:
 a) Read the following paper: Intel Mote: An Enhanced Sensor Network Node, Tiny Application Sensor Kit (TASK),  Write a 3/4 to 1 page summary of key concepts and key issues and findings for each paper.

   6:  Due Nov 1st, to be demonstrated in class.
a) Mote 6-bit display.  Using the three LEDs, encode 6 bits of data using the following scheme for each LED:  off, slow blink, fast blink, and on.  Monitor the light sensor, displaying the lowest 6 bits.  Slow blink should about 1/3 Hz.  Fast should be fast, but clearly distinguishable from on.

b) Mote talk ping pong (Furbish).

This exercise requires two motes, each of which will be running identical code stacks. 

Using the microphone and the sounder, motes will "talk" to each other, back and forth, eaching taking a turn talking and listening.

The experiment will begin by turning both motes on.  They should immediately both run the "Shake and Cry" code from the previous exercise.  The Mote will stay in the "armed" state, waiting for movement until it is either moved (it begins the conversation as the "talker") or it hears a tone (it begins as the "listener").   After the motes figure out if they begin as the Talker or the Listener, they begin the following algorithm:

The Talker will send a tone for x milliseconds.  The Listener will detect the edges of the tone, and time the length of the tone, wait quietly for an equal length of time, and then become the Talker.  The new Talker will reply with a tone that is (x*10/8) milliseconds long.  The other mote, now the Listener, will detect the edges of the tone, and time the incoming tone, wait for an equal length of time, and reply with a tone that is (x*10/8) milliseconds long.  This will continue until no tone can be detected or the precision of the sensors or the math makes a reply impossible.  The wireless network may not be used.  Also, the motes must reply strictly to the length of time of the received tone, and not use shared constants about the length of the tones.  Try whistling to your mote and see if you can get the same behaviour. 

A pseudocode algorthim for the behavior might look something like what is shown below.  Naturally, it is not NesC or Mote friendly (and may even have a bug) but shows the basic idea.

tone_length = 1000 milliseconds;
while (talking_ok) {
  if (talker) {
    sound(tone_length);
    wait(tone_length);
    talker = false;
    }
  else {
    X = detect_spoken_word();
    wait(X);
    tone_length = X * 10 / 8;
    talking_ok = check_for_exit(tone_length);
    talker = true;
  }



Puzzlers:
Not assigned as homework, but something to make your brain itch and you will impress classmates and the instructors (extra credit) if you can figure out a cool solution:

    Puzzler 1:  Presented Oct 7th:  f(x) for cheap one-bit encoding

Lecture Notes:
    Lecture 1:  Sept 30, 2004:  Instructor's Viewgraphs
    Lecture 2:  Oct 4th, 2004:  Lecture-2 notes
    Lecture 3:  Oct 7th, 2004:  Lecture-3 notes
    Lecture 4:  Oct 11th, 2004:  Compiling, downloading, and running Blink on nodes.  Review of "Emerg of Net Abs in TOS".
    Lecture 5:  Oct 14th, 2004:  Lecture-5 notes
    Lecture 6:  Oct 18th, 2004:  Discussion of application concepts, deployment issues, etc.
    Lecture 7:  Oct 21st, 2004:   Demonstration and review of mote programming.
    Lecture 8:  Oct 25st, 2004:   Virtual Machines, 365 project discussion.  Lecture-8 notes


Announcements:
    Oct 8, 2004:  The ISO image for the TinyOS CDROM is in the secret web area