Professional Documents
Culture Documents
Professor: Dr. Paolo Pagano Project coordinators: Andrea Azzar Stefano Bocchino Pisa, July 2012
CONTENT
bstract........................................................................................................................2 1. Introduction..............................................................................................................2 1.1. Simple WSN.............................................................................2 1.2. Hardware and software used............................................3 1.3. 802.15.4 MAC protocol with GTS feature4 2. Behaviour of the WSN............................5 References....11
Abstract
This report is dedicated to the implementation of a distributed data collection in WSN (Wireless Sensor Networks). We will build a simple wireless sensor data acquisition system organized in a star topology (one coordinator, two or more devices). The devices should periodically sample sensor data (temperature, light, acceleration) and send the data to the network coordinator by using 802.15.4 MAC protocol and the GTS (Guaranteed Time Slot) feature. The coordinator compares the measured values with a threshold and sends a message to the corresponding device to take an action. The coordinator also sends the data to a PC using a serial connection (RS232) and live plotting is used to represent the collected data.
1. Introduction
WSN consists of spatially distributed autonomous sensors to monitor physical or environmental conditions, such as temperature, light, acceleration, sound, pressure, humidity or pollutants and to cooperatively pass their data through the network to a main location.[1] The modern networks are bi-directional, also enabling control of sensor activity. The WSN is built of "nodes" from a few to several hundreds or even thousands, where each node has one or more sensors. Each such sensor network node has typically several parts: a radio transceiver, a microcontroller, an electronic circuit for interfacing with the sensors and an energy source, usually a battery. Size and cost constraints on sensor nodes result in corresponding constraints on resources such as energy, memory, computational speed and communications bandwidth.
Figure 1.2.1 FLEX Demo Board We used Eclipse RT-Druid templates for FLEX Demo Board: Console Demo, Basic Devices Demo, IEEE 802154 Demo Device and IEEE 802154 Demo Coordinator under ERIKA RTOS. For programming the devices with the written code we used MPLAB ICD 3 In-Circuit Debugger as shown on figure 1.2.2.
Figure 1.2.2 MPLAB ICD 3 For sending the data to a PC from the coordinator we used serial connection (RS232) and for displaying the received data on the PC we used Moserial program. For real time plotting we used the Matplotlib which works under Python.
Figure 1.3.1 IEEE 802.15.4 superframe structure A node wishing to send data to the PAN coordinator needs to receive a beacon to understand the current superframe structure. If it has been allocated a GTS, it sends its data during the CFP, otherwise, it sends its data using CSMA-CA in the CAP. For communications from the coordinator to the devices, in order to allow devices to be in power saving mode at their own will to save energy, transaction requests can be initiated from the devices themselves rather than from the coordinator. A device sends a data request commands to the coordinator during the CAP if its address is in the data pending list of the beacon. The coordinator sends an acknowledgement frame with a flag indicating that data is forthcoming and sends the packet afterwards. Once the data is received, the device sends an acknowledgement back to the PAN coordinator. A disadvantage of a device with GTS is that it has to track the beacon frames from the coordinator periodically in order to transmit data during the GTS slot assigned to it which can lead to higher energy consumption, but clearly, with GTS, a device can get dedicated bandwidth which achieves 100% delivery ratio and low latency regardless of the background traffic load in the network. [3]
10
References
[1] http://en.wikipedia.org/wiki/Wsn [2] http://erika.tuxfamily.org/flex.html [3] Performance Evaluation of the IEEE 802.15.4 MAC for Low-Rate Low-Power Wireless Networks, Gang Lu, Bhaskar Krishnamachari, Cauligi S. Raghavendra, 2004 IEEE
11