writing literature review for wireless sensor single-hop network

profilemainoon_95
lab7.docx

Lab Assignment 6: Ping Pong using Tasks

Ali Alshamali, Stephen Board

Dept. of Electrical Engineering and Computer Science

Los Angeles, USA

[email protected]

Abstract— The objective of this lab is to create single-hop network using two wireless Iris node. The single-hop take the luminosity measurement and send it to the sink. The system used in this lab includes hardware and software parts. Four source files have been created and two MD100CB sensor boards were used to detect the light. The code starts the radio control at boot time and a periodic timer start when the radio has been initialized. The measurement of the luminosity is requested every time the timer fires. When all measurements fit in one packet is obtained, the packet is transmitted. The objective was observed using the listen and oscilloscope application.

Introduction

The objective of this lab assignment is to measure the luminosity using two wireless node and its required to send the measurements to sink in a single-hop manner. The application is developed to perform single-hop network. In a single-hop network, when a packet leaves the source and it just takes a single-hop before reaching its destination.

The importance of this lab assignment is to introduce single-hop network and help to understand how the network system works. Also, its led to multi-hop networks where single-hop become part of it. Single-hops network also are powerful since they have less packets loses and that because they only have one path to travel in the network system.

The organization of this report follows the following order. Section II discusses a literature reviews of other project using single-hop network system. Section III describes the system containing hardware and software parts that is used to install and run the application. Section IV proposes a solution to solve the missing code required to complete the single-hop network system. Section V evaluates the experiment that was followed and showed the obtained result. Section VI draws the conclusion of the lab. Section VII provides the reference of all the literature reviews and information used.

II. Literature Reviews

1. System Description

Hardware

The hardware used in this lab includes a Ubuntu OS installed on a PC and USB cable to connect the nodes. Three wireless Iris nodes that are going to be used. Two nodes used to perform single-hop network . The last one is for installing the base station. Two MDA100CB sensor boards were used for censoring the luminosity. It also includes the MIB520 board to install the application. The AA battery is needed to demonstrate the application on the two Iris nodes.

Software

The Eclipse IDE was used since TinyOS code was built. The four source files of the program that were compiled in the application. Those files are the configuration SensingLuminosityAppC, the module SensingLuminosityC, the Makefile, and header file SensingLuminosity. The listen application is used to monitor the nodes and packets. The Oscilloscope application where used to show visual representation of luminosity measurement.

Proposed Solution

In this lab assignment, a single-hop network system is required to be built. First, start with the contents of header file SensingLuminosity as below in Fig. 1. The header file includes the period of the number of samples, default period, node ID’s, and base station ID. The constant AM_LUMINOSITY used to show the measurement of the sensor. The data structures used to define variables (16 unsigned) in this project are in the header file.

Fig. 1. Header file

Before explain the main code in the module for the application, the configuration file need to have the components connected as in Fig. 2. The important of components in the project include the main, active message, LEDs, timer, photo sensor, AMSender, and AMReceiver. It has all the connections and wiring all interfaces to be used in the module file.

Fig. 2. Configuration file

The next code is shown below in Fig. 3a. demonstrates module file code. The module file controls the operation of the application. The code started by defining the interfaces that will be used in the application, shown in Fig. 3a. Also, it shows the message type, mydata type, and current sample number type.

Fig. 3a. Module file part1

The nodes need to use the LEDs as in Fig. 3b. to show the state of the packet. LED2 is to be turned on to report problem whenever there are unexpected results such as failures to start the radio or failure to transmit a packet. LED0 will be toggled for reporting every finished packet transmission. Lastly, LED1 will be toggled for reporting every packet reception. Also, the task is defined to send a packet. Boot.booted() event starts the radio of the node at boot time and report problem if the radio control did not start.

Fig. 3b. Module file part2

The following code in Fig. 3c. shows the event radio control, if it has an error then it reports a problem. Otherwise it calls the timer to collect the current sample. The timer is fired to request a measurement of the luminosity, and if the request is not granted, report the problem using the function report_problem().

Fig. 3c. Module file part3

The read Luminosity event shown in Fig. 3d. is to check whether the measurement was done successfully. Once all the measurements that can fit in one packet have been obtained, the packet is transmitted. If the measurement was not done successfully, make the sample equal to the highest possible number it can take on (0xFFFF) and report the problem using the function report_problem(). If it was, store the measurement in 8 bit variable.

Fig. 3d. Module file part4

The last part of the code is using receive interface to receive all measurement in one packet as in Fig. 3e.

Fig. 3e. Module file part5

Expiremental Evaluation

To install the single-hop system, first the code was installed on two wireless nodes and verify it is working. The MDA100CB sensor board was connected to the two nodes after that. The sensor board used to measure luminosity as it has the photo resistor. The listen application is used to monitor nodes and the luminosity value. The transmission channel for the nodes’ ID are 01 and 02 ( column number 14 from the lift) as shown in Fig. 4.

Fig. 4. Listen application

The Oscilloscope application was used to monitor the luminosity of the two wireless nodes. The Oscilloscope shows the luminosity of the two nodes are turned on at the same time. It is shown that they are both on the same axis as in Fig. 6. The y axis is being modified to 0-1100 since the light was not bright.

Fig. 6. Oscilloscope application without disturbing the light

The next Fig. 7. shows the luminosity level when the photo resistor is covered by hand. As it can be seen, the luminosity value of both nodes had sharp drop from 900 to 450. Each color represent one node as on the right of the oscilloscope window.

Fig. 7. Oscilloscope application when covering the two nodes

The last Fig. 8. shows the luminosity level after both nodes were exposed for a short time and then covered again. All of the that proves that this lab has been successfully performed.

Conculsion

The objective of this assignment was to program two wireless sensor nodes that measure luminosity and send the measurements as a single-hop network. The missing code of fired timer is completed which request a measurement of the luminosity, and if request is not granted, problem will be reported. Also, complete the code to read luminosity if it succeeded, if not report problem and set the sample to high possible number. The code was installed on the two nodes, and tested using the base station and oscilloscope application. The luminosity was measured using the photo resistor on the sensor boards, and the response was observed on the oscilloscope application and base station. When both nodes are covered, the luminosity measurement decreases and if they exposed to light, the luminosity measurement increases which proves that the code works successfully.