Introduction to motes
Motes are sensor nodes manufactured by . A motes has a sensor unit, a
power unit, a transceiver unit, a ADC unit and a processor. We have
two kinds of motes
These two contain a
processor and a transceiver unit and they have connectors for attaching
sensor boards to them. A sensor board consists of a set of sensing
units. We have MTS300CA sensor board. This can be interfaced with MICA2 mote.
The sensing units in MTS300CA are
- Light
- Temperature
- Acoustic and
- Sounder
The motes can be programmed by attaching them to the Mote Interface
Board (MIB500CA).
The MIB can be interfaced
with the PC by connecting it to the parallel port.
The mote has an on board flash that can be programmed.
The mote that is to
be programmed is connected to the 51 pin male connector on the board.
Motes run a multithreaded operating system called TinyOS. TinyOS is
based on component model. Each component declares the commands it uses
and the events it will signal. A simple FIFO scheduler will be part of
each program uploaded onto the mote. The program will consists of
codes for components that will be used. The components communicate with
each other by passing commands. Events are usually initiated by hardware
devices. Based on the event, the component related to that event will
generate one or more commands to other components. TinyOS system,
libraries and applications are written in NesC language. NesC has a C
like syntax. The machine to which the MIB is connected will contain
the TinyOS code (i.e.) the code for the components. We write our code
by using the component code that is already present in TinyOS. After
writing to compile the program we use
ncc compiler. The output by default is called main.exe. Then
avr-objcopy converts the exe file produced by ncc into a text format
that can be used for programming the mote's flash. The sensor board
collects data and sends it to the mote which can either store the data
or transmit the data to the base station. A base
station is nothing but a mote attached to a Mote Interface
Board(MIB) that is interfaced to a PC via the parallel port.
The programming environment for motes is currently setup in lab BY 517.
It is setup on the second machine from the entrance. To program
first run cygwin batch file located on the desktop. Cygwin is a linux
like environment for windows machines. Attach the mote to a MIB then
attach the MIB to the PC via the parallel port. Change directory in
the cygwin window to /cygdrive/c/tinyos-1.x/. This is the directory
that contains the source files for tinyos. This directory also
contains sample applications that can be run on motes (apps
directory). Change directory to apps. Apps directory contains a set of
directories each of which contain an application. To compile
an application type "make mica2". If it is successful it will
output the amount of RAM and ROM space the program will require. The
output of the make command will be main.srec. Now this can be used for
programming the flash memory. The make file has an install option
that takes care of uploading the program onto the flash. The install
option uses a program called "uisp" to upload the program onto the
flash. The TinyOS directory also contains tiny os tutorial. It
also contains manuals for motes, sensor boards and tiny os.
References:
- Lecture on TinyOS ()
- Lecture notes on Crossbow Mica Motes ()
- Presentations from that took place in Boston from the 15-16 of Jan 2004
- Presentations on TinyOS from the tutorial session that took place in , San Fransisco
- System Architecture Directions for Networked Sensors () by J. Hill, R. Szewczyk, A. Woo, S. Hollar, D. Culler and K. Pister
- Active Message Communication for Tiny Networked Sensors () by P. Buonadonna, J. Hill, and D. Culler
- A Network-Centric Approach to Embedded Software for Tiny Devices () by R. Szewczyk, A. Woo, P. Buonadonna, J. Hill, and D. Culler