TinyOS Networked Sensors - PowerPoint PPT Presentation

1 / 27
About This Presentation
Title:

TinyOS Networked Sensors

Description:

photo. Messaging Layer. clocks. bit. byte. packet. Routing Layer. sensing application. HW ... Can 'Swap Out' system components to get necessary functionality. ... – PowerPoint PPT presentation

Number of Views:58
Avg rating:3.0/5.0
Slides: 28
Provided by: henr48
Category:

less

Transcript and Presenter's Notes

Title: TinyOS Networked Sensors


1
TinyOSNetworked Sensors Operating System
  • Henry Fan , Yi Fan
  • UCLA EE202A
  • Course Presentation

2
Outline
  • Requirement for OS of network sensor
  • Characteristics of TinyOS
  • Implementation Details
  • Evaluation (including power characteristics)
  • Related Work
  • Summary
  • Acknowledge

3
Networked Sensors
  • What is a Networked Sensor?
  • Small (I.e. 2x2 and smaller)
  • Onboard processor and communication device (e.g
    IR, Radio)
  • Self-contained power source (e.g. Battery, Solar)
  • Microcontroller building blocks
  • memory and processing
  • DACs, ADCs, UARTs,interrrupt controllers and
    counters
  • Communication
  • wired, short-range RF, infrared, optical,
  • Interaction
  • light, heat, position, movement, chemical presense

4
Hardware Platform
  • Assembled from off-the-shelf components
  • 4Mhz, 8bit MCU (ATMEL 90LS8535)
  • 512 bytes RAM, 8K ROM
  • 900Mhz Radio (RF Monolithics)
  • 10-100 ft. range
  • Temperature Sensor Light Sensor
  • LED outputs
  • Serial Port

5
Requirements of the system
  • Small physical size and low power
  • Concurrency-intensive operation
  • Limited Physical Parallelism and Controller
    Hierarchy
  • Diversity in Design and Usage
  • Robust Operation

6
How about Software?
7
Concurrency-intensive Operation
  • At least 2-level scheduling structure
  • Information may be simultaneously captured from
    sensors, manipulated and streamed onto a network
  • Large amount of low-level interleave rather than
    big buffer space

8
Limited Physical Parallelism Controller
Hierarchy
  • Allow multiple flows of data through a single
    micro-controller
  • Allow the micro-controller to control multiple
    devices

9
Diversity in Design
  • Efficient Modularity
  • Component models hardware abstractions in
    software
  • Allows migration of software components into
    hardware
  • Example bit level radio processing component
    could be implemented as specialized hardware

10
TinyOS Comes Out!
  • TinyOS (Tiny Microthreading Operating System)
  • Small physical size
  • Modest active power load
  • Tiny inactive load
  • Operating System for Network Sensors
  • Should fit the requirements (last page)
  • Research project in the CS department of UC
    Berkeley

11
Design Components include...
  • Frame
  • Fixed size
  • Encapsulate command handlers, event handles, and
    tasks
  • Allocate statically, easy convert to hardware
  • Command handler
  • Non-blocking request made to lower level
    components
  • Need return status
  • Cannot signal an event to prevent command/event
    chain

12
Design Components include (cont.)
  • Event handler
  • directly/indirectly, due with hardware events
  • The lowest level is hardware interrupt
  • Can signal both commands and events
  • Task
  • perform primary work
  • FIFO scheduler

13
TinyOS component model
14
Component Types Physical Hardware
  • Physical hardware
  • Contain current status
  • Hardware interrupt is converted to command sent
    to higher level
  • Do not contain any task

15
Component TypesSynthetic Hardware
  • Higher level hardware abstraction
  • Enhanced state machine
  • Can be implement in hardware/software/FPGA
  • E.g the radio byte module which shifts the data
    in and out of the RFM module

16
Component TypesHigh Level Software
  • Perform control
  • Perform routing
  • Perform data transformation
  • E.g. filling in packet buffer

17
Hardware/Software Layers
sensing application
Routing Layer
routing
Messaging Layer
Radio Packet
packet
Radio byte
Temp
byte
photo
SW
HW
RFM
i2c
ADC
bit
clocks
18
Scheduler
  • Two-level scheduling structure
  • Using interrupt
  • FSM execution model
  • Each task is like a state in the state machine,
    which the events are like input signals
  • Events model
  • When there is no event, CPU is put in idle
  • Stack-based threaded
  • Stack space is reserved for each execution
    context in order to support fast context switch

19
Example Code
  • Message_Handler(incoming_message)
  • if(sender_is_better_parent())
  • my_parent sender()
  • else if(I_am_parent_of_sender()
  • forward_message(my_parent,
    incoming_message)
  • Clock_Event_Handler()
  • check_expire(my_parent)
  • if(my_parent ! null)
  • send_data(my_parent)

20
Example Code
  • TOS_FRAME_BEGIN(BLINK_frame)
  • char state
  • TOS_FRAME_END(BLINK_frame)

  • / Accepts INIT Command from above/
  • / BLINK_INIT/
  • char TOS_COMMAND(BLINK_INIT)()
  • TOS_CALL_COMMAND(BLINK_LEDy_off)()
  • TOS_CALL_COMMAND(BLINK_LEDr_off)()
  • TOS_CALL_COMMAND(BLINK_LEDg_off)()
  • TOS_CALL_COMMAND(BLINK_SUB_INIT)(0x03) /
    initialize clock component /
  • return 1

  • / Clock Event Handler
  • update LED state as 3-bit counter and set LEDs to
    match
  • /
  • void TOS_EVENT(BLINK_CLOCK_EVENT)()

21
Evaluation
  • Small physical size

Scheduler 178 B code 16 B data Total 3450
B code 226 B data
22
Evaluation(cont. 1)
  • Concurrency-intensive operations
  • Context switch speed
  • e.g. The cost of propagating an event copying
    one byte of data
  • Totally Low Overhead
  • Still, the interrupt handling is slow
  • Efficient modularity
  • Event and command can propagate through
    components quickly

23
Evaluation(cont. 2)
  • Limited physical parallelism and controller
    hierarchy
  • CPU overhead ( even not so high during highly
    active period)
  • Power saving design
  • Diversity in usage and robust operation
  • Multi-hop routing applications
  • Active-badge-like location detection applications
  • Sensor network monitoring applications

24
Power Characteristics
Active Idle Sleep
CPU 5 mA 2 mA 5 µA
Radio 7 mA (TX) 4.5 mA (RX) 5 µA
EE-Prom 3 mA 0 0
LEDs 4 mA 0 0
Photo Diode 200 µA 0 0
Temperature 200 µA 0 0
  • Using Panasonic CR 2354 560mAh
  • peak load for 35 hours
  • mininum load for 1 year

25
Related Work
  • Disadvantage using in sensor networks
  • Code size
  • Context switch time
  • Control centric, not dataflow-centric

26
Summary
  • The goals is to develop an ultra low power
    networked sensor platform, including hardware and
    software, that enables low-cost deployment of
    sensor networks.
  • Provides a component based model abstracting
    hardware specifics from application programmer.
  • Capable of maintaining high levels of
    concurrency.
  • Allows multiple applications to be running.
  • Services Provided Include
  • RF messaging protocols.
  • Periodic Timer Events.
  • Asynchronous access to UART data transfers.
  • Mechanism for Static, Persistent Storage.
  • Can Swap Out system components to get necessary
    functionality.
  • Complete applications fit in 4KB of ROM and 256B
    RAM.

27
Acknowledgement
  • Jason Hill, Robert Szewczyk, Alec Woo, Seth
    Hollar, David Culler, Kristofer Pister. System
    architecture directions for network sensors.
    ASPLOS 2000. (pdf)
  • Jason Hill, Philip Bounadonna, David Culler.
    Active Message Communication for Tiny Network
    Sensors. Submitted to Infocom 2001 (pdf).
  • Alec Woo, David Culler. A Transmission Control
    Scheme for Media Access in Sensor Networks.
    Mobicom 2001. ( pdf)
  • Adrian Perrig, Robert Szewczyk, Victor Wen, David
    Culler, J.D. Tygar. SPINS Security Protocols for
    Sensor Networks. Mobicom 2001.
  • http//tinyos.millennium.berkeley.edu/
Write a Comment
User Comments (0)
About PowerShow.com