MICA: A WIRELESS PLATFORM FOR DEEPLY EMBEDDED NETWORKS

Page created by Jimmie Baker
 
CONTINUE READING
MICA: A WIRELESS PLATFORM
            FOR DEEPLY EMBEDDED
                 NETWORKS
                                 LOW-POWER INTEGRATION OF SENSING, COMMUNICATION, AND
                                 COMPUTATION REQUIRES A NEW APPROACH TO WIRELESS DESIGN. FLEXIBLE

                                 INTERFACES AND PRIMITIVE ACCELERATORS ENABLE AGGRESSIVE SYSTEM-

                                 LEVEL OPTIMIZATIONS.

                                            Current wireless systems only               Exploiting local communication and appli-
                                 scratch the surface of possibilities emerging       cation-specific protocols can drastically reduce
                                 from the integration of low-power commu-            size, cost, and power use in wireless devices.
                                 nication, sensing, energy storage, and com-         These devices won’t need to communicate
                                 putation. Generally, when people consider           with the nearest high-power control tower,
                                 wireless devices they think of such items as        but only with their local peers. Peer-to-peer
                                 cell phones or personal digital assistants, items   networking techniques provide a flexible
                                 with high costs and energy requirements that        meshlike interconnect that shuttles data
                                 target specific, highly standardized applica-       between thousands of tiny embedded devices.
                                 tions and rely on a powerful infrastructure. A      A handful of the devices might act as bridges
                                 new direction in wireless system design, how-       between a local embedded communication
              Jason L. Hill      ever, is extending wireless connectivity to         mesh and a traditional data network. Figure 1
                                 small, low-cost embedded devices for a wide         depicts a precision agriculture deployment—
          David E. Culler        range of applications.                              an active area of application research.
                                    Application possibilities for miniature wire-    Researchers are developing new algorithms for
     University of California,   less sensing devices include inventory asset        data aggregation, ad hoc routing, and distrib-
                                 tracking, roadside traffic pattern and open         uted signal processing for low-power peer-to-
                    Berkeley     parking spot detection, individual plant mon-       peer wireless networks. As researchers envision
                                 itoring for precision agriculture, habitat mon-     smaller and lower-cost devices, the range of
                                 itoring in nature preserves, and advanced           application scenarios grows dramatically.
                                 building security and automation. The mili-            The Mica wireless platform serves as a foun-
                                 tary could blanket fields with sensors to detect    dation for the emerging possibilities. Pictured
                                 troop movement. Sensors might enable civil          in Figure 2, the Mica platform measures 1.25
                                 engineers to gauge the structural integrity of      × 2.25 inches, runs the TinyOS operating sys-
                                 buildings and bridges after earthquakes or          tem (http://webs.cs.berkeley.edu/tos), and is
                                 fires. Integrating hundreds of thousands of         suited for self-configuring multihop wireless
                                 sensing and control points could provide new        networks. With sensing, communication, and
                                 insights into the state of the world.               I/O capabilities, Mica can simultaneously act

12                                                                                                    0272-1732/02/$17.00  2002 IEEE
Figure 1. Ad hoc, wireless embedded network for precision agriculture. Sensors detect tem-
 perature, light levels, and soil moisture at hundreds of points across a field. The system
 communicates the data over a multihop network for analysis.

as a data router, sensor interface, and control
point. Nearly a hundred research groups cur-
rently use Mica nodes to explore networking
techniques, data analysis, distributed algo-
rithms, networked services, programming,
and novel applications. We created Mica with
off-the-shelf hardware, but the architecture
and its capabilities represent what could be
implemented in just a few square millimeters
of custom silicon. Mica’s flexible design serves
as a building block for creating efficient appli-
cation-specific protocols. Instead of defining
narrow, standardized application interfaces,
Mica provides a set of richly interconnected
primitives (such as data serializers and timing
extractors) to facilitate cross-layer optimiza-
tions. To explore novel systems approaches,
researchers can develop customized protocols         Figure 2. Mica node.
tailored to their application; Mica does not
require use of predefined protocols.
                                                    First, power consumption must be drastically
Conventional wireless design comparison             reduced. A deeply embedded, battery-operat-
  An explanation of the current wireless archi-     ed device might need to operate for years on a
tectures and their shortcomings for deeply          pair of AA batteries or a lithium coin cell.
embedded devices illustrates the advantages of      Power consumption must average in the
the Mica network architecture. Deeply embed-        microamps range, requiring powering down
ded wireless networks differ in several key         most of the device much of the time—a cell
respects from traditional wireless scenarios.       phone would do well to last a couple of weeks

                                                                                          NOVEMBER–DECEMBER 2002   13
MICA

                                                                         devices, protocol processing can consume hun-
                                     Display/keyboard                    dreds of milliwatts before making significant
             Audio I/O                                                   battery life impact. In a deeply embedded wire-
                                                                         less network, however, devices typically require
                                                                         less than a milliwatt to communicate with their
                                                                         neighbor nodes. This drastic reduction in
                                                                         transmission power must be complemented
            Voice codec             Application controller               by a highly efficient protocol processing mech-
                                                                         anism. In wireless Ethernet (IEEE 802.11b)
                                                                         cards, radio-frequency (RF) transmission
                                                                         power ranges from just 25 to 100 mW, yet
               DSP                                                       device power consumption can exceed
                                                                         2,000 mW when active due to protocols that
                                                                         are optimized for high data rates. A pair of AA
                                                                         batteries would last less than eight hours with
                    RF protocol processing                               a standard 802.11 card. Thus, in deeply
                                                                         embedded wireless networks, protocol pro-
                                                                         cessing must be optimized for ultralow-power
                                               Power regulator           operation, not for high data rates.
                                                                            Traditional and deeply embedded wireless
                         RF transceiver                                  devices also differ in their required level of flex-
                                                                         ibility. Peer-to-peer protocols and in-network
                                                                         processing implementations must adapt to
     Figure 3. Typical cell phone architecture. The design is parti-     meet application needs in sensor networks.
     tioned into highly specialized pieces, limiting new applica-        Currently, cell phones use highly partitioned
     tion scenarios.                                                     designs; a generic microcontroller provides the
                                                                         user interface and device configuration, dedi-
                                                                         cated digital signal processors process audio
                     on two AA batteries. This hundredfold power         with a single and highly specific algorithm, and
                     consumption reduction mandates drastic              complex radio controllers provide the low-level
                     changes to system architecture. Second, many        channel processing. Figure 3 depicts a gener-
                     deeply embedded systems cannot rely on a pre-       alized cell phone architecture. A prolonged
                     deployed, powerful infrastructure for support.      standardization process allowed for high opti-
                     Cell phone protocols, for example, exploit          mization for specific functions in each system
                     high-powered base stations to reduce power          component, with narrow interfaces between
                     consumption in mobile nodes. In a peer-to-          components. New services are typically over-
                     peer multihop network, typically, only the last     laid on the established structure. For example,
                     hop will communicate with a base station—           on second-generation cell phone systems, a
                     most of the nodes would be located outside of       point-to-point layer over what is essentially an
                     the station’s direct communication range. An        audio stream provides an IP data communi-
                     advantage of a peer-to-peer architecture is that    cation stack. The 802.11 designs are also high-
                     it only requires small communication distances      ly partitioned—each of the components
                     for each transmission. Finally, whereas most        service a specific, highly standardized aspect:
                     wireless devices carry out a single, highly stan-
                     dardized function, deeply embedded networks           • A baseband controller implements the
                     must be suited to a wide variety of applica-            radio channel interface (including spec-
                     tions. This requires a more general-purpose             trum sequencing, framing, and coding);
                     system design, but also allows employing rad-         • A bus controller services the PCMCIA
                     ical, highly efficient algorithms.                      interface; and
                        As wireless transmission power decreases,          • A microcontroller shuttles data units
                     the significance of protocol processing increas-        between these controllers according to a
                     es. An average cell phone uses 750 to                   specific media access control (MAC)
                     1,000mW to reach a distant cell tower. In such          protocol.

14     IEEE MICRO
This strict partitioning makes it difficult for       in-network processing to reduce power con-
devices to adapt their behavior to meet appli-        sumption by orders of magnitude. For example,
cation-specific requirements. Additionally, the       if sensor data is sampled only once per minute,
complex controllers surrounding the radio             it might be acceptable to delay transferring the
consume significant power bringing the radio          data to the consumer for several seconds, allow-
online, making low-power operation difficult.1        ing the network to coordinate many such flows
   The Bluetooth wireless specification targets       efficiently while operating at a low duty cycle.
low-power personal-area wireless communi-             Such optimizations can extend battery life from
cation. Originally envisioned to replace the          weeks to years.
wires of modern PCs—a wireless USB—the                    Our deeply embedded system approach
Bluetooth design is based on a master-slave           emphasizes flexibility in ultralow-power oper-
model in which a single master device com-            ation and the opportunity to produce system-
municates with a few peripherals (fewer than          level optimization. Rather than a narrow,
eight). While the specification lets devices par-     standardized interface to a complex radio con-
ticipate in logical communication groups dis-         troller, our deeply embedded designs use sim-
tinct from the primary master-slave                   ple radios with much of the RF channel
relationship, it has a powerful master in direct      control exposed to software through a rich
control of a small collection of physically close     interface. Rather than dedicated protocol con-
low-power devices. In the deeply embedded             trollers, we provide simple accelerators for
networks we envision—a mesh of thousands              protocol primitives that are composed in soft-
of interconnected embedded nodes—the key              ware. Rather than partitioning the design into
to power, cost, and size reduction is neighbors       dedicated subsystems, this new approach
forwarding and routing data. Ad hoc, multi-           pools processing resources and uses fine-
hop interconnections could be simulated as            grained multithreading to dynamically allo-
an overlay on the Bluetooth master-slave phys-        cate subtask processing. While each of these
ical layer, but are likely to be inefficient. Addi-   differences affects performance on simple
tionally, the Bluetooth device power                  tasks, their real impact is made by enabling
consumption is still an order of magnitude            high-level software optimizations.
above our intended target—Bluetooth
chipsets consume 115 mW to communicate                Mica design
to a master node.2 Similar to IEEE 802.11                We designed the Mica platform to aid sys-
devices, current Bluetooth designs are parti-         tem-level exploration, providing a rich inter-
tioned to implement a single rigid protocol in        connection of protocol primitives that
conjunction with a well-powered host device,          designers can flexibly assemble into applica-
such as a laptop or, eventually, a personal dig-      tion-specific protocols. Our design’s power
ital assistant.                                       and time-efficient primitives significantly
                                                      improve key system capabilities including
Exploiting wireless design                            low-power device startup, time synchroniza-
   For the deeply embedded approach, it’s             tion, power-aware routing, and localization.
essential that researchers explore radical direc-        Mica combines communication, computa-
tions in system-level optimization. Cell phones,      tion, power management, and sensing into a
wireless local area networks, and Bluetooth pro-      small experimental platform. The current form
tocols must meet strict bandwidth and latency         factor (1.25 × 2.25 inch) is similar in size to a
requirements. Cell phone voice traffic trans-         pair of AA batteries, although we have com-
missions cannot suffer signal delays that cause       pressed a variant of the design to about the size
noticeable audio variations. Additionally, a          of a 2.5-centimeter coin (0.5 cm thick). The
small transmission round-trip time between            standby current for Mica’s components is a few
users is required to keep an interactive conver-      microamps, enabling applications that last for
sation flowing smoothly. These demands                several years on a single set of batteries. Mica
require that these devices meet strict protocol       improves experimental flexibility by including
design specifications. In deeply embedded wire-       an expansion bus that connects to a wide array
less networks, however, we can exploit trade-         of sensor boards. Our current batch of sensor
offs between bandwidth, latency, and                  boards includes support for monitoring ther-

                                                                         NOVEMBER–DECEMBER 2002           15
MICA

                                                                                                          ture with a firmware upload
                                51-pin I/O expansion connector                                            or during field maintenance.
                                                             Eight                                        In our design, however, the
                                             Eight
                          Digital I/O                    programming                                      embedded network can be
                                         analog I/Os
                                                             lines
                                                                                                          dynamically reprogrammed
                                                                                                          during routine use. The
                                                                           Coprocessor                    coprocessor handling the
 DS2401 unique ID
                                 Atmega103 microcontroller
                                                                                                          wireless reprogramming is an
                                                                                                          Atmel AT90LS2343, 8-pin,
                                                                             4-Mbit external flash        flash-based microcontroller
                                                                                                          with an internal system clock
                            Transmission           Hardware
                            power control         accelerators     Power regulation MAX1678 (3 V)         and five general-purpose I/O
                                                                                                          pins. Additionally, to provide
                                                                                                          each node with a unique
                         TR1000 radio transceiver
                                                                                                          identification, we include a
                                                                                                          Maxim DS2401 silicon seri-
Figure 4. Mica architecture block diagram. The direct connection between application con-                 al number—a low-cost ROM
troller and transceiver enables flexibility in meeting application demands. Hardware acceler-             device with a minimal elec-
ations optionally assist in communication protocols.                                                      tronic interface and no power
                                                                                                          requirements.
                                                                                                             The Mica radio module
                                    mal temperature, barometric pressure, mag- consists of an RF Monolithics TR1000 trans-
                                    netic fields, light, passive infrared frequency, ceiver and a set of discrete components to
                                    acceleration, vibration, and acoustics.             operate the radio. Software can externally set
                                                                                        the transceiver’s transmission radius to range
                                    Block diagram overview                              from inches to hundreds of feet, and it oper-
                                       Figure 4 shows the Mica architecture, con- ates at communication rates up to 115 kilobits
                                    sisting of five major modules: processing, RF per second. This amplitude-shift-keying-
                                    communication, power management, I/O based radio has a fixed transmission frequen-
                                    expansion, and secondary storage. A quick cy of 916.5 MHz. At maximum transmission
                                    survey of the major modules provides a gen- power, it outputs approximately 0.75 mW—
                                    eral overview for the system as a whole, hence, roughly 1/1,000 the power of a cell phone—
                                    a detailed bill of materials, device schematic and consumes 21 mW. With a maximum
                                    and datasheet for all components mentioned receive sensitivity of less than 95 dBm, or deci-
                                    can be found at http://www.tinyos.net.              bels relevant to one milliwatt, it provides an
                                       The main microcontroller is an Atmel unobstructed communication range of
                                    Atmega103L or Atmega128 running at 4 approximately 200 feet. In receive mode, the
                                    MHz and delivering about four million radio consumes 15 mW regardless of whether
                                    instructions per second (MIPS). This 8-bit actual communication is occurring. The radio
                                    microcontroller has                                 interface gives direct control over the trans-
                                                                                        mitted signal, allowing the modulation
                                       • a 128-Kbyte flash program memory,              scheme, coding, framing, and MAC protocol
                                       • a 4-Kbyte static RAM,                          to be determined in software. In addition,
                                       • an internal 8-channel 10-bit analog-to- operating system software controls radio
                                          digital converter,                            transmission strength and can sense the
                                       • three hardware timers,                         strength of the receive signal.
                                       • 48 general-purpose I/O lines,                     A 4-Mbit Atmel AT45DB041B serial flash
                                       • one external universal asynchronous chip provides persistent data storage. We
                                          receiver transmitter (UART), and              chose this chip because of its interface and
                                       • one serial peripheral interface (SPI) port. small footprint, 8-pin small-outline integrat-
                                                                                        ed circuit. It stores sensor data logs and tem-
                                        Normally, programming of these embed- porarily holds program images received over
                                    ded microcontrollers occurs during manufac- the network interface. To hold a complete

16                 IEEE MICRO
program, the flash must be larger than the          Table 1. Breakdown of active and idle power consumption for Mica
128-Kbyte program memory. This prevented                                        hardware.
the project from considering use of the lower
power, electronically-erasable-programmable-        Component                       Active (mW)        Idle (µW)
ROM-based solutions because they are gen-           CPU                           16.5                     30
erally smaller than 32 Kbytes.                      Radio                         21 (transmit mode)         0
   We designed the power subsystem to regu-                                       15 (receive mode)
late the system’s supply voltage; a Maxim1678       Silicon ID                     0.015                   0
dc-dc converter provides a constant 3.3-V           External flash                45                      30
supply. Mica operates with inexpensive alka-        LEDs                          10                       0
line batteries that produce between 3.2 and
2 V (for example, a pair of AA batteries). We
chose the Maxim chip because of its small          any RS-232-protocol-based device. Dozens of
form factor and high efficiency. The convert-      sensor boards with a variety of sensors have
er takes input voltage as low as 1.1 V and         been developed that use this expansion con-
boosts it to 3 V. This supplies a clean, stable    nector. It has even been used to let the Mica
voltage source for the rest of the system. Input   node control a handful of inch-sized micro-
voltage significantly affects the TR1000 trans-    robotic platforms.
mission strength and its receive sensitivity.
The converter chip increases the system’s avail-   Operating system
able power because more than 50 percent of            The Mica hardware platform uses the
the energy in an alkaline cell lies below 1.2 V,   TinyOS multithreading execution model
which is unusable without a boost converter.       developed at the University of California,
For ultralow-power sleep mode, disabling the       Berkeley.4 TinyOS is an event-based operating
power system lets the system run directly off      system in which individual components act
the unregulated input voltage, reducing power      together to form a complete application and
consumption by the boost converter and the         to implement all system functions. This com-
microcontroller. The radio will not operate,       ponent-based structure lets an application
however, without the boost converter enabled.      designer select from a catalog of system com-
Table 1 summarizes Mica’s node component           ponents to meet application-specific goals.
power consumption.                                    The TinyOS execution model provides
   The I/O subsystem interface consists of a       fine-grained allocation of processing resources
51-pin expansion connector that we designed        across multiple components. This lets high-
to interface with a variety of sensing and pro-    level application code and low-level protocol
gramming boards. We divided the connector          code coexist on a single CPU. Each compo-
into the following sections:                       nent acts like a finite state machine that uses
                                                   commands and events to transition from one
  •   eight analog lines,                          state to the next. There is no blocking or wait-
  •   eight power control lines,                   ing in TinyOS. This forces components, after
  •   three pulse-width-modulated lines,           finishing a calculation, to release the CPU for
  •   two analog compare lines,                    use by other components.
  •   four external interrupt lines,                  TinyOS performs high-level, long-running
  •   an I2C-bus from Philips Semiconductor,3      application processing in special execution
  •   an SPI bus,                                  contexts, called tasks. When executed, a task
  •   a serial port, and                           runs to completion and other tasks cannot
  •   a collection of lines dedicated to pro-      preempt it. However, low-level system events
      gramming the microcontrollers.               can preempt tasks, allowing TinyOS to tem-
                                                   porarily reallocate the CPU to low-level sys-
  The expansion connector can also program         tem processing. TinyOS shields the
the device and communicate with other              application-level processing from the under-
devices, such as a PC serving as a gateway         lying concurrent scheduling, yet exposes low-
node. Additionally, it contains a standard         level system components to meet their
UART interface to control or provide data to       real-time requirements.

                                                                      NOVEMBER–DECEMBER 2002                       17
MICA

                       In contrast, most wireless devices use ded-     components determine all aspects of the com-
                    icated protocol processors to handle low-level     munication protocol. In contrast, Bluetooth
                    processing. This partitioned approach requires     radio chipsets dictate bit rates, signaling
                    enough power in the application and system-        schemes, data-encoding methods, framing,
                    level processors to handle the peak demand;        MAC protocols, and the routing scheme to
                    though system demand for these two proces-         the host processor. With Bluetooth, the oper-
                    sors might never occur simultaneously. The         ating system can only spool packets across the
                    pooled processing approach used in TinyOS          interface; delays through the interface have a
                    allows dynamically allocating a single CPU to      large, unpredictable variance, and the system
                    a given task, so peak demand is close to aver-     or application components cannot observe the
                    age processing. For example, the radio pack-       activity or physical characteristics of the radio
                    et start symbol detection requires a peak of       channel. Researchers have observed similar
                    3 MIPS, but only at the instant a packet is        shortcomings with IEEE 802.11 designs.5 Fig-
                    received (less than one percent of the time).      ure 5 depicts a standard packet-based proto-
                    Suppose the signal processing algorithms to        col implemented on the Mica node.
                    analyze sensor readings require 2 MIPS each           The TR1000 radio used on the Mica gives
                    time a sample arrives. A partitioned system        the controller direct access to the signal
                    would require a total of 5 MIPS; however,          strength of the incoming RF transmission. It
                    using a shared pool approach, slightly more        also allows sampling the level of background
                    than 3 MIPS could handle this application.         noise during periods when there is no active
                    Additionally, in a real application with a mix     transmission and adjusting transmission
                    of operations of varying cost, efficiency          strength. Using this information in multihop
                    decreases further because of overprovisioning      networking applications can dramatically
                    of the partitioned system to the worst case.       improve efficiency. Interactions between
                    Furthermore, if a more efficient mechanism         transmitter and receiver are very predictable,
                    for performing start symbol detection were         as is the delay through the radio interface.
                    selected for a particular application scenario,    Because software can quickly and predictably
                    TinyOS could reallocate the freed resource.        turn radio power on or off, low duty cycle
                       The biggest advance gained from exploiting      operation can occur without global coordi-
                    a shared pool of computation is that the inter-    nation or complex time slotting. This direct,
                    faces between system components are not            low-level interface to the radio provides flex-
                    constrained by narrow chip-to-chip communi-        ibility for application developers. Researchers
                    cation mechanisms defined by physical hard-        from the University of California, Los Ange-
                    ware. System components can provide rich           les, have exploited this flexibility to create
                    interfaces to other components to enable cross-    energy-aware MAC protocols.6
                    layer optimization. Additionally, software-based
                    interfaces facilitate interface evolution as new   Communication accelerators
                    features are added to system components.              The drawback of a low-level interface to the
                                                                       radio is that it places a significant overhead on
                    Raw radio interface                                the main controller, because of the frequency
                       The radio subsystem is a prime example of       of programmed I/O operations and the inef-
                    the rich simple interface approach. From this      ficiency of conventional instruction sets for
                    subsystem’s low-level interface, designers can     expressing these operations. It’s inefficient to
                    build customized arbitrary signaling proto-        handle the bit-serial sliding window correla-
                    cols to meet application requirements. Only        tion operation required for start symbol detec-
                    the radio dictates certain parameters, that is,    tion on a general-purpose data path, although
                    signaling should occur over a half-duplex bit-     this takes just a few gates to implement in
                    serial link using amplitude shift keying with a    hardware. The design of dedicated protocol
                    minimum physical bit time of 10 microsec-          processors typically contains support for such
                    onds (µs), and the need for a rough direct cur-    operations. To compensate for this, the Mica
                    rent (dc) balance (for example, there should       architecture includes hardware accelerators for
                    not be more than four consecutive high bits or     the most demanding primitives used in pro-
                    four low bits). Beyond that, system software       tocol construction and allows these primitives

18     IEEE MICRO
Preamble                        Start symbol
         Transmission                                                      transmission

                          MAC delay                                                       Transmitting individual bits

      Bit modulations

      Radio samples
                      Slow, periodic sampling                                               Receiving individual bits

         Reception
                               Activity monitoring                                 Precise synchronization

                                                 Start symbol search                  Start symbol detection

 Figure 5. Anatomy of packet reception and transmission. For reception, slow sampling detects arrival of a 10-kilobits-per-
 second (Kbps) start signal. The receiver must determine the packet’s precise timing to synchronize for the 50-Kbps data pay-
 load. Data sample timing for the entire packet is based on the initial synchronization. For transmission, after a short random
 delay, the preamble, then a start symbol, and then the data are sent.

to be composed in software, making rich               small fraction of the processor, whereas pro-
interfaces available. In general, these primi-        grammed I/O peaks at 20 Kbps using the
tives could be implemented in board-level             entire processor. Other microcontrollers with
logic, field-programmable gate arrays, appli-         a double-buffered SPI transmit port can
cation-specific integrated circuits, or inte-         achieve the full 115 Kbps of the radio. The
grated logic, depending on the                        byte streaming performance of more sophisti-
implementation technology.7 For the Mica              cated versions of this accelerator would
platform, we built the critical hardware accel-       approach conventional direct memory access
erators using conventional serializers in             channel performance, yet with precise control
unconventional ways. While they provide a             over timing.
significant efficiency boost, they represent just        The Mica node also incorporates a syn-
the beginning of the possibilities we can             chronization accelerator that captures the
include as we progress toward custom devices.         exact timing of an incoming packet to with-
   The first accelerator provides a simple shared     in one clock cycle (250 nanoseconds) at the
memory buffer between the bit-parallel data           start of packet reception. Shared memory
path and the bit-serial radio channel. This lets      stores this packet time stamp, and the data
the processor deal with communication data            path can read it. This hardware accelerator is
in efficient chunks and overlap its data manip-       critical to our design because at high bit rates,
ulation with the low-level spooling of bits to or     determining transmission timing is extreme-
from the radio, at defined intervals. The mech-       ly difficult. The synchronization accelerator
anism doesn’t dictate channel coding or sig-          forwards this time stamp to the buffering
naling and can be bypassed to let the                 accelerator so that it can perform automatic
microcontroller directly interact with the radio      channel sampling at the center of each bit
by using programmed I/O. This option meets            transmission. The timing information is not
real-time requirements when necessary, for            buried in the radio interface; it can also be
example, during start symbol detection, but           delivered to application software for use in
doesn’t force real-time processing of all trans-      higher-level synchronization operations.
fer options. Software can deal with data in 8-           We built both of these hardware accelera-
bit chunks when its optimal, but the data can         tors out of standard microcontroller func-
also be directly accessed bit-by-bit as it arrives.   tional units. SPI is a synchronous chip-to-chip
This accelerator lets the Atmel controller drive      interconnect with a serial data line and a sep-
the radio at 50 kilobits-per-second using a           arate clock signal that an external SPI master

                                                                         NOVEMBER–DECEMBER 2002                               19
MICA

                    will provide. We drive the asynchronous radio        several sources and communicate results
                    by combining the functionality of input cap-         rapidly to engage some response. This wake
                    ture registers, timer-controlled output pins,        up would normally be realized above the mes-
                    and the SPI communication hardware. The              saging layer, passing packets to propagate the
                    input capture register automatically captures        event notification to initiate aggregate pro-
                    a timing pulse contained in the packet. This         cessing. However, we can exploit the flexible
                    value is used to configure the timing register       interface to the radio to implement an
                    that controls an output pin. One control             ultralow-power network wake-up signal.
                    option lets hardware automatically toggle the        More specifically, this flexibility lowers system
                    output pin each time the counter expires; this       cost for wake-up checking.
                    output pin becomes a clocking signal that               For any RF-based wake-up protocol, each
                    times each arriving bit. Finally, SPI hardware       node must periodically turn on its radio and
                    captures the value of the radio signal each time     check for a wake-up signal. Consider a pro-
                    the counter triggers the clock line. We accom-       tocol in which a node checks for a signal every
                    plish this by connecting the counter-                4 seconds. Since the protocol assumes that
                    controlled output pin to the synchronous             the wake-up alarm is rare, the source can
                    clock line of the SPI port. On the Mica node,        transmit a signal continuously for a period of
                    we combine the radio’s incoming receive data         time after the event. A packet interface uses
                    with an artificially generated clock signal to       the detection of a start symbol pattern to dif-
                    create an SPI master. The clock signal is the        ferentiate data from noise on the channel.
                    output of the timing register fed back into the      Thus, to implement the wake-up check over
                    controller’s SPI port. This results in the SPI       a packet-based radio interface, a node must
                    port automatically latching and buffering the        turn on its radio for at least the duration of
                    incoming transmission with precise timing—           two packets. We typically use 30-byte pack-
                    as long as the internal timing register is con-      ets with a dc-balanced, single-error correc-
                    figured correctly at the start of reception.         tion, dual-error detection encoding that
                                                                         results in 540 bits per packet. Thus, at 10
                    Cross-layer optimizations                            Kbps, the check time would be 108 ms, or
                       Many deeply embedded applications spend           21 ms at 50 Kbps; just checking for wake up
                    the vast majority of the time in a very low          yields a 2.7 percent active duty cycle of the
                    power state, slowly draining their available         device, or 0.5 percent at the faster rate.
                    energy supply by processing sensor readings to       Although reducing the responsiveness to the
                    confirm that no particular action need be            alarm or modifying the packet interface for
                    taken. Infrequently, these applications com-         an early rejection on the check could reduce
                    municate monitoring results, and rarely, por-        this cost, we perform a more radical cross-
                    tions of the network become extremely active         layer optimization.
                    upon detection of an important event. Perfor-           Instead of interacting with the radio over a
                    mance improvements in an application’s active        high-level packet interface, our low-power
                    work, such as processing and messaging,              sleep mode interacts directly with the analog
                    enhance the application’s overall effectiveness      baseband. The wake-up signal is nothing
                    and let it return to a low-power state more          more than a long RF pulse. A node checks for
                    quickly. However, the larger impact of the rich-     the wake-up signal by sampling the energy on
                    ly integrated approach to wireless design is that    the channel and can determine whether the
                    enables optimization of the rest of the appli-       wake-up signal is present in less than 50 µs.
                    cation. Often these optimizations reach across       With a 4-second check interval, this 2,000-
                    traditional layers of abstraction, using low-level   fold speedup in the check time results in a
                    information to achieve a high-level goal.            0.00125 percent radio duty cycle. To put this
                                                                         in perspective, the same energy consumed by
                    RF wake up                                           packet-based checks in a week could last 38
                       Upon detection of an important event, a           years using low-level wake up. We have used
                    node will typically awaken, or start up, a sub-      this ultralow duty cycle implementation to
                    stantial portion of the network. The network         consistently wake up multihop sensor net-
                    will collect, transport, and process data from       works of more than 800 nodes.

20     IEEE MICRO
Time synchronization                                 mentation is only possible because of the
   Many sensor applications require time-cor-        shared access to a high-accuracy system timer
related sensor readings or multimode coordi-         between the bottom of the network stack and
nation, and therefore need an underlying             the top of the application. Partitioned wireless
time-synchronization mechanism. For exam-            devices—such as Bluetooth chipsets—hide the
ple, if a sensor network were used to capture        exact timing information from applications.
the propagation of earthquake vibrations             (Generally the receive packet path has less jit-
through a building, sensor readings across the       ter than the transmit path, so an alternative
network would need to be synchronized to             approach uses the broadcast nature of the radio
within hundreds of microseconds. The accu-           channel to synchronize multiple receivers, even
racy of distributed synchronization protocols        if they are poorly synchronized with the trans-
is bounded by the unpredictable jitter on com-       mitter.9) Mica’s time synchronization primi-
munication times. Aside from variations in the       tives provide highly accurate pairwise
actual network latency, the variation in delay       synchronization between any two nodes. This
going through sophisticated protocol proces-         primitive can aid construction of network-
sors can be hundreds of milliseconds due to          wide time synchronization to within tens of
buffering, MAC protocols, and backoff. Unlike        microseconds.9
wide-area time synchronization protocols—
such as the network time protocol8—we can            Determining device location
determine all sources of communication delay.           Many applications need to associate loca-
Our use of rich interfaces lets us expose the        tion information with the data obtained from
sources of delay to the application, reducing        sensor nodes. Using the radio as both a sensor
the unknown jitter. Additionally, by exploiting      and a high-fidelity time synchronization
shared system timers, we can assign precise time     mechanism can facilitate localization. RF sig-
stamps to incoming and outgoing packets              nal strength falls off with distance, so sam-
beneath the sources of variation.                    pling the strength of the baseband signal,
   We designed the Mica platform to use an           combined with information on the transmit
internal 16-bit high-frequency counter to act        power level, provides an indication of dis-
as the lower 16 bits of a 32-bit continually         tance. The distance estimates can aid an elab-
running system clock. This highly accurate           orate form of triangulation to determine
system clock is directly linked to the syn-          device position.5,10 Variations in strength read-
chronization accelerator used to capture the         ings due to multipath effects, interference, and
exact timing of an incoming packet. To syn-          transmitter/receiver tuning make this
chronize a pair of nodes, a packet can be time       approach more effective for determining prox-
stamped with a sender’s clock value as it is         imity than absolute position.
transmitted and after all MAC delays have               Alternatively, obtaining accurate time
occurred (prior to transmission, a node might        stamps can help determine the propagation
have to wait for the radio channel to be clear).     delay of acoustic pulses as a basis for localiza-
The receiver’s synchronization accelerator can       tion.11 Some sensor boards contain an elec-
then tag the packet with the receiver’s clock        tronic sounder and a microphone. These
value. The application can use the difference        boards transmit a radio packet in unison with
between the two time stamps to determine             an acoustic pulse. The RF packet causes the
how to adjust its system clock.                      receiver to start a counter to measure the delay
   Our implementation synchronizes a pair of         until the acoustic pulse arrives, providing cal-
nodes to within 2 µs. We can directly attribute      ibration parameters to map measured delay to
the skew of +/− 2 µs to several sources of jitter.   distance. This mapping compensates for
When sending, there is a jitter of +/− 1µs in        delays in the acoustic transmission/receive
the transmission propagation due to the inter-       path. As with the radio, a rich interface
nal circuit dynamics of the radio. Hardware          reduces the sources of unknown jitter.
then captures the arriving pulse with an accu-
racy of +/− .25 µs. Finally, to synchronize the      Application evaluation
clock based on the captured value introduces           The ultimate goal of the Mica node is
an additional +/− .625 µs of jitter. This imple-     enabling novel applications that shape the

                                                                         NOVEMBER–DECEMBER 2002          21
MICA

         Table 2. Node energy costs in a persistent data monitoring application that reports every
           5 minutes and has a maximum of five children. The table shows results for basic and
                                       optimized implementations.

     Implementation                                     Base               Optimized            Improvement factor
     Data communication (mJ/day)                        2,262                 452                        5
     Children’s transmission waiting time (mJ/day)        669                  33                       20
     Alarm check (mJ/day)                              54,237                  25                    2,160
     Sensing (mJ/day)                                      17                  17                        1
     Total active (mJ/day)                             57,187                 528                      108
     Sleep (mJ/day)                                     5,038               5,182                        1
     Total (mJ/day)                                    62,225               5,711                       11

                    role of deeply embedded networks. Not only        environmental change, any node can send an
                    do the application requirements differ dras-      emergency notification to its parent at any
                    tically from those of traditional wireless sce-   time. The parent checks for emergency mes-
                    narios, they differ dramatically from one         sages every 4 seconds. Table 2 summarizes the
                    another. In our exploration of these new sce-     theoretical impact of the Mica optimizations
                    narios, two distinct classes of applications      for a base case without the hardware acceler-
                    have emerged. The first is categorized by a       ators and a case with the accelerators and the
                    low duty-cycle, low data-rate, long latency,      cross-layer optimizations that they enable.
                    static topology and a long expected lifetime.     Mica’s support of application-specific proto-
                    For these networks, lifetime is the main eval-    cols results in a 10× increase in overall appli-
                    uation criterion. A second class of applica-      cation performance.
                    tions is that of highly dynamic                      The energy cost of data transmission assumes
                    sense-and-control networks with higher data       that the worst-case node is responsible for five
                    rates, latency limits, and highly mobile nodes.   children. The node must receive a summary
                    Instead of passively monitoring a relatively      from each of the children, combine them, and
                    static environment, these networks attempt        transmit a new summary to its parent. The pro-
                    to control the environment in real time. This     cessing time is small compared with the time
                    class places strict latency and throughput        needed to transmit or receive a message. The
                    requirements on the network, which act as         hardware accelerators reduce—proportionally
                    the main measure of system performance.           to the increase in bandwidth—the energy con-
                       A common, low duty cycle scenario for sen-     sumption of this portion of the application.
                    sor networks is the continual monitoring of          Since communication is infrequent and the
                    an environmental space for low-frequency          radio consumes energy whenever it’s powered
                    environmental changes combined with detec-        on—whether it’s receiving data or not—nodes
                    tion of important events. These scenarios         leave their radios powered off whenever pos-
                    include heating, ventilation, and air condi-      sible. In a rendezvous protocol, nodes agree to
                    tioning monitoring of large buildings or cli-     communicate at a future time and turn off
                    matic monitoring of outdoor habitats. The         their radios until that time. In these protocols,
                    Mica optimization opportunities come              synchronization precision translates into lower
                    together to determine the application’s capa-     power consumption. If a scheduled applica-
                    bility and lifetime at a given energy budget.     tion-level rendezvous is only accurate to
                    Consider a scenario where the network forms       approximately100 ms, then the receiver must
                    itself into a tree and each node samples envi-    wake up 100 ms early to ensure that it’s not
                    ronmental data every 4 seconds, aggregates a      late; this could result in the receiver’s waiting
                    statistical summary over 5 minute’s worth of      200 ms before the transmission actually begins.
                    readings, and transmits the summary to its        For the short transmissions common in sen-
                    parent node. Each parent combines the read-       sor networks, this results in a four-to-five-times
                    ings from its children and sends a single sum-    increase in cost. The use of bit-level time syn-
                    mary to its parent. In the event of a drastic     chronization reduces the energy consumed

22     IEEE MICRO
waiting for the rendezvous by a factor of 20.        References
   The relatively high frequency of the wake-         1. M. Stemm et al., “Reducing Power Con-
up check makes it the single largest consumer            sumption of Network Interfaces in Hand-
of energy in the base design. Exploiting the             Held Devices,” IEICE Trans. Comm., vol.
low-power wake-up functionality reduces this             E80-B, no. 8, 1997, pp. 1125-1131.
cost by a factor of 2,000. Taken together, the        2. TC2000 Single Chip Bluetooth Solution,
three optimizations (RF wake up, time syn-               Zeevo, Santa Clara, Calif., 2001; http://www.
chronization, and high-speed communica-                  zeevo.com/pdf_files/tc2k_public.pdf.
tion) reduce energy consumption of the active         3. I 2C-Bus Specification v2.1, Philips Semicon-
part of the application by two orders of mag-            ductor, Eindhoven, Netherlands, 2000; http://
nitude. Table 2 shows the impact of each indi-           www.semiconductors.philips.com/acrobat/
vidual optimization as well as the overall               various/I2C_BUS_SPECIFICATION_3.pdf.
impact on system lifetime for a theoretical           4. J. Hill et al., “System Architecture Directions
deployment. In the base case, the power drain            for Networked Sensors,” Proc. 9th Int’l
in sleep state was a reasonable 10 percent of            Conf. Architectural Support for Programming
the overall budget, but it dominates the opti-           Languages and Operating Systems (ASP-
mized application. When looking at the appli-            LOS), ACM Press, New York, 2000.
cation as a whole, battery life is improved by        5. P. Bahl and V. Padmanabhan, “RADAR: An
a factor of 10, resulting in an expected life-           In-Building RF-Based User Location and
time of 10 years for a pair of AA batteries (that        Tracking System,” Proc. Ann. Joint Conf.
is, 9 years for the base and 1 year for the opti-        IEEE Computer and Comm. Soc. (IEEE Info-
mized implementation). Fortunately, further              com), vol. 2, 2000, IEEE Press, Piscataway,
integration of the design will further reduce            N.J., pp. 775-784.
the standby power drain.                              6. W. Ye, J. Heidemann, and D. Estrin, “An
   The application must control the duty cycle           Energy-Efficient MAC Protocol for Wireless
and rendezvous schedule of the protocol,                 Sensor Networks,” Proc. Ann. Joint Conf.
because these elements vary greatly depending            IEEE Computer and Comm. Soc. (IEEE Info-
on the application scenario. For example, tem-           com), IEEE Press, Piscataway, N.J., 2002.
perature sensing might require 1-minute inter-        7. J.L. Da Silva Jr. et al., Design Methodology
vals between reports with only a byte of data            for Pico Radio Networks, Berkeley Wireless
collected per node, while network monitoring             Research Center, Berkeley, Calif., 2001.
of plant photosynthesis could need more com-          8. D.L. Mills, “Internet Time Synchronization:
plex readings, but only once per hour.                   The Network Time Protocol,” IEEE Trans.
                                                         Comm., vol. COM-39, no. 10, 1991, pp.

T    he exploration of deeply embedded sen-
     sor networking is pushing wireless tech-
nologies in new directions. Many research
                                                         1482-1493.
                                                      9. J. Elson and D. Estrin, “Time Synchroniza-
                                                         tion for Wireless Sensor Networks,” Proc.
groups in the US that are exploring these                IPDPS Workshop Parallel and Distributed
directions use the Mica node as a foundation             Computing Issues in Wireless Networks and
for their research. A single-chip version of the         Mobile Computing, Springer-Verlag, Heidel-
architecture is in development today. It will            berg, Germany, 2001.
generalize Mica’s architecture, provide addi-        10. J. Hightower and G. Borriello, “Location Sys-
tional accelerators, and dramatically reduce             tems for Ubiquitous Computing,” Computer,
the standby power consumption.               MICRO       vol. 34, no. 8, 2001, pp. 57-66.
                                                     11. N.B. Priyantha, A. Chakraborty, and H. Bal-
Acknowledgments                                          akrishnan, “The Cricket Location-Support
   We thank Crossbow (http://www.xbow.                   System,” Proc. 6th Ann. Int’l Conf. Mobile
com) for manufacturing and distributing the              Computing and Networking (MobiCom),
Mica platform, Intel for support during devel-           ACM Press, New York, 2000, pp. 32-43.
opment, UC Berkeley’s Smart Dust and Webs
research groups, the TinyOS development              Jason L. Hill is currently working toward his
team, Kris Pister, Robert Szewczyk, Alec Woo,        PhD in electrical engineering and computer
and Phil Levis.                                      science at UC Berkeley. His research interests

                                                                         NOVEMBER–DECEMBER 2002            23
MICA

                             include developing hardware and software to        ed abstract machine; and data flow systems.
                             enable the proliferation of wireless sensor net-   Culler has a BA from UC Berkeley, and an
                             works and developing millimeter-scale wire-        MS and PhD from the Massachusetts Insti-
                             less sensor nodes by incorporating                 tute of Technology. He was awarded the NSF
                             communication, computation, and storage            Presidential Young Investigator in 1990 and
                             onto a single CMOS chip. Hill has a BS and         the Presidential Faculty Fellowship in 1992,
                             an MS in electrical engineering and comput-        and holds three patents.
                             er science from UC Berkeley.
                                                                                  Direct questions and comments about the
                             David E. Culler is a professor of computer sci-    article to Jason Hill, 467 Soda Hall,
                             ence at UC Berkeley and founding director of       Berkeley, CA 94720-1776; jhill@cs.
                             Intel Research, Berkeley. His research inter-      berkeley.edu.
                             ests include vast networks of small, embed-
                             ded wireless devices; parallel computer
                             architecture; parallel programming languages;
                             high-performance communication; TinyOS;            For further information on this or any other
                             networks of workstations (NOW); Internet           computing topic, visit our Digital Library at
                             services; active messages; split-C, the thread-    http://computer.org/publications/dlib.

     Get access
     to individual IEEE Computer Society

     documents online.

     More than 57,000 articles

     and conference papers available!

     US$5 per article for members

     US$10 for nonmembers

     http://computer.org/publications/dlib/

24              IEEE MICRO
You can also read