Wireless Sensor Network T.Y.B.Sc.C.S Chapter 2 : Sensor Node Hardware and Network Architecture By Mrs.Vidhi Khedekar Assistant Professor, Dnyandeep College of Science and Commerce, Morvande-Boraj,Khed.
Agenda : What is Single-node architecture? What are the hardware components & design constraints? Introduction to TinyOS and nesC . Chapter 2:Sensor Node Hardware and Network Architecture
A sensor is a device that detects and responds to some type of input from the physical environment. The specific input could be light, heat, motion, moisture, pressure, or any one of a great number of other environmental phenomena. The output is generally a signal that is converted to human-readable display at the sensor location or transmitted electronically over a network for reading or further processing. Example: In a mercury-based glass thermometer, the input is temperature. The liquid contained expands and contracts in response, causing the level to be higher or lower on the marked gauge, which is human-readable. Sensor node: A sensor node , also known as a mote , is a node in a sensor network that is capable of performing some processing, gathering sensory information and communicating with other connected nodes in the network. A mote is a node but a node is not always a mote. Defination of Sensor:
Main Architecture of Sensor Node: The main architecture of sensor node includes following components: Controller module Memory module Communication module Sensing modules Power supply module Single-node architecture:
Main components of a WSN node : Controller- Processes all relevant data Capable of executing arbitrary code Communication device(s) - Device for sending and receiving data over a wireless channel Sensors/actuators - The actual interface to the physical world; Devices that can observe or control physical parameters of the environment. Memory - Stores data and programs Often different types of memory are used for programs and data Power supply - Some form of batteries to provide energy Sometime recharging by obtaining energy from the environment, e.g. solar cells Sensor node Hardware overview:
Controller- The controller is the core of a wireless sensor node, it process all relevant data, capable of executing arbitrary code. It has to execute various programs, hence it is a Central Programming Unit (CPU) of the node. These, -Collects data from the sensors -Process the collected data -Decides when and where to send the data -Receives data from the other sensor nodes -Decides on the actuator’s behavior Basic Node Architecture:
Microcontroller : ◦ For the sensor nodes mostly microcontroller are used ◦ It is a general purpose processor, optimized for embedded applications, low power consumption ◦ Examples Intel StrongARM - High-end processor often used in PDAs - SA-1100 model: 32-bit RISC core, running @206MHz Texas Instruments MSP 430 - Intended for usage in embedded applications - 16-bit RISC core, up to 4 MHz, 2-10 kB RAM, several DACs, RT clock Digital signal processor(DSPs) - These are familiar because of their architecture and instruction set for processing large amount of vector data FPGA(Field Programmable Gate Arrays) - Flexible, can be reprogrammed to adapt to a changing set of requirements. - But take time and energy. ASIC(Application Specific Integrated Circuit) - These are used only when peak performance is needed - Ex: High speed routers and switches Main option for Controller:
Memory is required to store the programs and intermediate data; usually different types of memory are used for program and data. RAM (Random Access Memory) - To store intermediate sensor readings, packets from other nodes and so on. - Is fast, but looses content if power supply is interrupted ROM (Read-Only Memory) - To store fixed programs; not writeable EEPROM (Electrically Erasable Programmable)or Flash Memory - Programs are stored - Enables overwriting of data - Can be used as intermediate storage if RAM is insufficient or if the RAM’s power supply should be turned-off - BUT: long read/write access delays, high energy requirement Memory :
To turn nodes into a network a device is required for sending and receiving information over the wireless channel. Communication device is used to exchange data between individual nodes. Choices of transmission medium: Wireless communication chooses any one of the following as transmission medium - Radio frequencies(most used in WSN) - Optical communication - Ultra sound - Magnetic inductance(less used) Among the above Radio Frequency(RF) is best because it provides, -Long range -High data rates -Acceptable error rates at reasonable energy expenditure -Does not require line of sight between sender and receiver Communication:
- Both a transmitter and a receiver are required in a sensor node - For practical purposes these two tasks are often combined in one entity, the so called transceiver - It convert a bit stream coming from a microcontroller(or a sequence of bytes or frames) and convert them to and from radio waves. - A range of low cost transceiver is commercially available. - It includes all the circuitry required for transmitting and receiving modulation, demodulation, amplifiers, mixers, filters and so on. - Usually it uses half duplex mode because transmitting and receiving at the same time is impractical in the wireless medium Bit Stream Radio Waves Transceivers: Radio Transceiver
Transceivers can be put into different operational states: Transmit - In this state transceiver is active and the antenna radiates energy Receive - In this state receive part is active Idle - In this state transceiver ready to receive but currently no receiving Sleep Significant parts of the receiver are switched off A fairly common structure of transceivers is into the Radio Frequency (RF) front end and the baseband part: - The radio frequency front end performs analog signal processing in the actual radio frequency band. - The baseband processor performs all signal processing in the digital domain and communicates with a sensor node’s processor or other digital circuitry.
Some important elements of an RF front ends architecture are: The Power Amplifier (PA) accepts up converted signals from the IF or baseband part and amplifies them for transmission over the antenna. The Low Noise Amplifier (LNA) amplifies incoming signals up to levels suitable for further processing without significantly reducing the SNR.
The actual interface to the physical world: The devices that can observe or control physical parameters of the environment. Sensors can be roughly categorized into three categories: Passive, omnidirectional sensors These sensors can measure a physical quantity at the point of the sensor node without actually manipulating the environment by active probing -In this sense, they are passive. Passive, narrow-beam sensors These sensors are passive as well, but have a well-defined notion of direction of measurement. A typical example is a camera, which can “take measurements” in a given direction, but has to be rotated if need be. Active sensors This last group of sensors actively probes the environment. For example, a sonar or radar sensor or some types of seismic sensors, which generate shock waves by small explosions. Actuator: a device that converts an electrical signal to a physical output to open or close a switch or a relay or to set a value in some way. Whether this controls a motor, a light bulb, or some other Sensor and Actuator
There are essentially two aspects: ◦ First, storing energy and providing power in the required form; ◦ Second, attempting to replenish(refill) consumed energy by “scavenging” it from some node-external power source over time. 1.Storing energy :Batteries Traditional batteries: The power source of a sensor node is a battery, eighter non-rechargeable(Primary) or rechargeable (Secondary). Upon these batteries the requirements are Capacity Capacity under load Self-discharge Efficient recharging Relaxation DC-DC conversion: Unfortunately, batteries alone are not sufficient as a direct power source for a sensor node. One typical problem is the reduction of a battery’s voltage as its capacity drops. Consequently, less power is delivered to the sensor node’s circuits, – a node on a weak battery will have a smaller transmission range than one with a full battery. Power Supply
For this energy scavenging is used which is the process of recharging the battery with energy gathered from the environment like solar cells or vibration-based power generation. 1. Photovoltaics ◦ The well-known solar cells can be used to power sensor nodes 2. Temperature gradients ◦ Differences in temperature can be directly converted to electrical energy. 3. Vibrations ◦ General form of mechanical energy is vibrations. 4. Flow of air/liquid ◦ Another often-used power source is the flow of air or liquid in wind mills or turbines. ◦ The challenge here is again the miniaturization, but some of the work on millimeter scale. 2.Energy scavenging
Why was TinyOS needed? Introduction to TinyOS Goals/Objectives behind TinyOS Requirements of WSN for Operating System TinyOS as a Solution TinyOS Model Data Model Thread Model Programming Model Component Model Network Model Example Application Introduction to TinyOS and nesC :
Problems with traditional OS Multithreaded Architecture not useful Large Memory Footprint Does not help to conserve energy and power Requirements for Wireless Sensor Networks Efficient utilization of energy and power Small Footprint Should support diversity in design and usage More emphasis on Concurrent execution Need of TinyOS
TinyOS began as a collaboration between University of California, Berkeley and Intel Research. It is a free open source operating system designed for wireless sensor networks. It is an embedded operating system written in NesC It features a component based architecture. TinyOS as a Solution Component based architecture allows frequent changes while still keeping the size of code minimum. Event based execution model means no user/kernel boundary and hence supports high concurrency. It is power efficient as it makes the sensors sleep as soon as possible. Has small footprint as it uses a non- preemtable FIFO task scheduling. Introduction to TinyOS
Static Memory Allocation No Heaps or any other dynamic structures used. Memory requirements determined at compile time. This increases the runtime efficiency. Global variables Allocated on per frame basis. Local Variables Saved on the stack Defined in the function/method Data Memory Model
Power-Aware Two-levels Scheduling Long running tasks and interrupt events Sleep unless tasks in queue, wakeup on event Tasks Time-flexible, background jobs Atomic with respect to other tasks Can be preempted by events Events Time-critical, shorter duration Last-in first-out semantic (no priority) Can post tasks for deferred execution Thread Model
Separation construction/composition Construction of Modules Modules implementation similar to C coding Programs are built out of components Each component specifies an interface Interfaces are “hooks” for wiring components Composition of Configurations Components are statically wired together Increases programming efficiency (code reuse) an runtime efficiency (static defs .) Programming Model
Components should use and provide bidirectional interfaces. Components should call and implement commands and signal and handle events. Components must handle events of used interfaces and also provide interfaces that must implement commands. Component Model : Hierarchy Commands Flow downwards Non Blocking requests Control returns to caller Events Flow upwards Post task, signal higher level events, call lower level cmds Control returns to signaler To avoid cycles Events can call commands Commands can NOT signal events Component Model