Sei sulla pagina 1di 94

Dissertation for Masters Degree

Master of Engineering

DESIGN AND DEPLOYMENT OF A WIRELESS


SENSOR NETWORK FOR THE MONITORING OF
PLANTS

September 2013

Classified Index: TP311


U.D.C: 681

Dissertation for the Masters Degree in Engineering

DESIGN AND DEPLOYMENT OF A WIRELESS


SENSOR NETWORK FOR THE MONITORING OF
PLANTS

Candidate

Wenbo CHEN

Supervisor

Shu Liu

Associate Supervisor:

Susan Arbon Leahy

Industrial Supervisor:

Gil De Sousa

Academic Degree Applied for

Master of Engineering

Speciality

Software Engineering

Affiliation

School of Software

Date of Defence

September, 2013

Degree-Conferring-Institution
Harbin Institute of Technology

Abstract
In recent years, with the rise of wireless sensors, wireless sensor networks
(WSN) are used in many applications in day-to-day life. In smart agriculture, WSN
has been applied to monitor the development of crops from remote places. The
monitored data includes temperature, humidity and soil moisture.
This thesis focuses on the wireless sensor device Libelium Waspmote and
corresponding modules including the XBee ZigBee Pro module and the real time
clock module, agricultural sensor board, Waspmote Gateway, Meshlium,
MCP9700A sensor and 808H5V5 sensor. The aim was to realize a wireless sensor
network to monitor crops development. The network is a star topology structure.
The Meshlium works as the center point while Waspmotes are around working as
nodes. Different sensors are plugged into an agricultural sensor board which is, in
its turn, plugged on a Waspmote. The final WSN can be divided into three parts:
collecting data, storing data and sending data. In collecting data, corresponding
sensors collect the environmental data at a fixed frequency. In storing data,
Waspmotes store the data in flash memory or SD cards. In sending data, Waspmotes
send the data by the XBee ZigBee Pro module to a Meshlium based on ZigBee
protocol. Meshlium stores the data in local files or, local or external database. To
design the WSN, this project requires the programming and the testing of all the
modules of the Waspmote. The programmed modules are used in the final design of
the network. Communication among Waspmotes, communication between
Waspmotes and Waspmote Gateway are tested to design communication between
Waspmotes and Meshlium. In the project, Waspmote has changed from version v1.1
to version v1.2 on hardware.
The final wireless sensor network is based on Waspmote v1.2 and a Meshlium
stores temperature, humidity and other environmental parameters sent by multiple
Waspmote wireless sensor nodes.
Keywords: wireless sensor network; wireless sensor; ZigBee Pro protocol

II

Rsum
Au cours des dernires annes, avec lvolution technologique des capteurs
sans fil, les rseaux de capteurs sans fil (RCSF) sont utiliss dans de nombreuses
applications dans la vie de tous les jours. Dans l'agriculture intelligente, un RCSF
est utilis pour surveiller distance le dveloppement des cultures agricoles. Les
donnes surveilles comprennent la temprature, l'humidit et l'humidit du sol.
Ce rapport porte sur le capteur sans fil Libelium Waspmote et ses modules
associs, y compris le module XBee ZigBee Pro et le module d'horloge temps rel,
la carte dextension agricole, la passerelle Waspmote Gateway, le routeur Meshlium,
les capteurs MCP9700A et 808H5V5. L'objectif est de raliser un RCSF pour
surveiller le dveloppement des cultures. Le rseau a une topologie en toile. Le
Meshlium fonctionne comme un point central autour duquel sont prsents les
Waspmotes en tant que nuds. Diffrents capteurs sont branchs sur une carte
dextension agricole qui est, son tour, branche sur un Waspmote. Le
fonctionnement du RCSF final peut tre divis en trois parties : la collecte, le
stockage et l'envoi de donnes. Lors de la collecte, les capteurs correspondants
recueillent des donnes de l'environnement une frquence fixe. Pour le stockage,
les Waspmotes utilisent de la mmoire flash ou des cartes SD. Pour lenvoi, les
Waspmotes les transmettent par leur module ZigBee XBee Pro un Meshlium. Le
Meshlium stocke ensuite les donnes dans des fichiers locaux ou une base de
donnes locale ou externe. Pour concevoir le RCSF, ce projet exige la
programmation et l'essai de tous les modules du Waspmote. Les modules
programms sont ainsi utiliss dans la version finale du rseau. La communication
entre Waspmotes, la communication entre Waspmotes et une passerelle Waspmote
Gateway ont t testes pour concevoir la communication entre Waspmotes et un
Meshlium. Durant ce projet, la version matrielle du Waspmote a chang, passant
de la version v1.1 la version v1.2.
Le RCSF final est bas sur la version v1.2 des Waspmotes. Au final, le
Meshlium recueille diffrentes donnes environnementales sur la temprature et
lhumidit envoyes par plusieurs nuds de capteurs sans fil Waspmotes.
Mots Clefs: Rseau de capteurs dans fil ; Capteur sans fil ; ZigBee
III

Table of contents
ABSTRACT .......................................................................................................... II

RSUM ............................................................................................................. III

CHAPTER 1 INTRODUCTION ........................................................................... 1


1.1 BACKGROUND ............................................................................................... 1
1.2 THE PURPOSE OF PROJECT ............................................................................. 3
1.3 THE STATUS OF RELATED RESEARCH ............................................................. 3
1.3.1 Wireless sensor network ....................................................................... 3
1.3.2 Smart Agriculture project with Waspmote ........................................... 7
1.4 MAIN CONTENT AND ORGANIZATION OF THE THESIS ................................... 12

CHAPTER 2 SYSTEM REQUIREMENT ANALYSIS...................................... 14


2.1 THE GOAL OF THE SYSTEM .......................................................................... 14
2.2 THE FUNCTIONAL REQUIREMENTS ............................................................... 15
2.2.1 The functional requirements of the Waspmote................................... 15
2.2.2 The functional requirements of the Waspmote Gateway ................... 24
2.2.3 The functional requirements of the Meshlium ................................... 25
2.2.4 The functional requirements of the agricultural sensor board ........... 26
2.3 THE UN-FUNCTIONAL REQUIREMENTS ......................................................... 28
2.3.1 The un-functional requirements of the Waspmote ............................. 28
2.3.2 The un-functional requirements of the Meshlium .............................. 29
2.4 BRIEF SUMMARY ......................................................................................... 29

CHAPTER 3 SYSTEM DESIGN ........................................................................ 31


3.1 DESIGN OF THE WASPMOTE ........................................................................ 31
3.1.1 Design of the real time clock module ................................................. 31
IV

3.1.2 Design of the SD card module ............................................................ 34


3.1.3 Design of the GSM/GPRS module ..................................................... 36
3.1.4 Design of the accelerometer module .................................................. 38
3.1.5 Design of the 802.15.4/ZigBee module .............................................. 41
3.1.6 Design of the XBee 868 networking module ..................................... 51
3.2 DESIGN OF THE WASPMOTE GATEWAY ....................................................... 55
3.3 DESIGN OF THE MESHLIUM ......................................................................... 58
3.4 KEY TECHNIQUES ........................................................................................ 60
3.5 BRIEF SUMMARY ......................................................................................... 61

CHAPTER 4 SYSTEM IMPLEMENTATION AND TESTING ........................ 62


4.1 THE ENVIRONMENT OF SYSTEM IMPLEMENTATION ...................................... 62
4.2 KEY PROGRAM FLOW CHARTS ..................................................................... 63
4.3 KEY INTERFACES OF THE SOFTWARE SYSTEM ............................................. 64
4.4 SYSTEM TESTING ........................................................................................ 67
4.4.1 Test of the real time clock module ..................................................... 67
4.4.2 Test of the utility module ................................................................... 68
4.4.3 Test of the SD card module ................................................................ 70
4.4.4 Test of the accelerator module............................................................ 71
4.4.5 Test of the XBee ZigBee Pro module ................................................. 72
4.5 BRIEF SUMMARY ......................................................................................... 83

CONCLUSION .................................................................................................... 84

REFERENCES .................................................................................................... 85

ACKNOWLEDGEMENTS ................................................................................. 88

Chapter 1 Introduction
1.1 Background
Today, with the development of wireless sensor, wireless network
communication, digital electronics and micro electro mechanical systems, wireless
sensors have become smaller in size and lower in cost and more powerful. Besides,
wireless sensors have become more multifunctional and can communicate with each
other in short and medium distances. Based on these new wireless sensors that can
be used for environment sensing, data processing, data storing and short distance
communicating, Wireless Sensor Network (WSN) has been developed and applied
to many fields.
A sensor is a device which can measure one or more physical quantities and
convert the measured physical quantities into a signal that could be recognized and
read by observers or electronic instruments. Based on sensor, wireless sensors are
standard measurement devices that measure one or more physical quantities

[1]

and

use the equipped transmitters to convert the measured physical quantities into radio
signal and send the radio signal out through communication model and antenna. The
radio signal is interpreted by the receiver or electronic instruments which then
convert the wireless radio signal into a specific, desired output.
Compared to common sensors, the primary benefits of using wireless sensors
are safety, convenience and reducing costs. Wireless sensors can be used in
locations that are difficult to access due to extreme conditions such as high
temperature, humidity and pressure. Besides, wireless sensors can also be used to
form a wireless sensor network which would allow technicians to monitor a large
number of different locations far from the monitoring place. In addition, through
using wireless sensors in manufacture filed, it is able to decrease the cost of
monitoring and running factories by reducing the cost of costly accessories
including extension cables, conduit and etc.
A sensor network is a group of specialized sensors that equipped with
communication infrastructures for the purpose of monitoring and recording
environmental parameters of a specific location and send the result to receivers

through network. A sensor network consists of a number of sensor nodes, every


sensor node is small, light in weight and portable.
A Wireless Sensor Network (WSN) consists of a number of independent
sensors to monitor physical or environmental conditions of a specific location. The
monitored data includes temperature, humidity, lighting, sound and pressure. After
collected enough data, the WSN will send the collected data through the wireless
network to receivers or other terminal devices. A wireless sensor network is built of
a number of wireless sensor nodes which are connected to one or several sensors. In
common, every wireless sensor node consists of several parts including a radio
transceiver module that equipped with an internal or external

antenna, a micro

controller that embedded in the sensor board, a sensor board with pins provided as
interfaces for others specific sensors and energy sources.
Because of the characteristics including low cost, rapid deployment, flexibility,
high fault tolerance, high sensitivity and etc., WSN has a wilder use in many new
and exciting applications and fields for remote sensing.
In agriculture and environment areas, smart wireless sensor network has been
applied in several applications as follows [2]:
1) Increase wine quality. Monitoring environmental parameters of vineyards
including soil moisture, temperature, diameter of trunk and etc. to control the health
of the grape trees and enhance wine quality.
2) Irrigation in golf green. Through monitoring the soil moisture of the golf
green and irrigating the dry zones, the cost of irrigation and water resources in golf
green can be reduced.
3) Weather forecast. By deploying the wireless sensor network in fields,
technicians can forecast the weather condition including rain, snow, drought, wind
and etc.
4) Control compost. Monitoring the humidity and temperature of compost to
prevent it from bacterial pollution such as fungus and etc.
Wireless sensor network can be used to monitor different environmental
parameters related to agriculture such as air temperature and humidity, soil
temperature and humidity, weather condition, leaf wetness and many other
parameters. The monitoring of these environmental parameters allows the user to
minimize the cost of time and money as well as maximize the agricultural results.
2

1.2 The purpose of project


This project design and deployment of a wireless sensor network for the
monitoring of plants aims to design and develop a wireless sensor network using a
wireless development kit provided by Libelium that includes Waspmote, Waspmote
Gateway, Meshlium, agricultural sensor board, MCP9700A sensor and 808H5V5
sensor. The project also needs to develop and upload some programs on the wireless
sensor devices Waspmote to monitor and collect the data of plants and send the
collected data to the router Meshlium. Router Meshlium stores the data in local files
or local databases or transfer data to other terminals by the Internet. The project
needs to analyze, design and test the wireless sensor device Waspmote according to
the different modules. All the used and tested modules need to be integrated into the
final wireless sensor network to monitor plant development.

1.3 The status of related research


1.3.1 Wireless sensor network
Nodes in a wireless sensor network may be equipped with different types of
sensors including video sensor, audio sensor, infrared sensor, seismic sensor, radar
sensor and low sampling rate magnetic sensor. With the corresponding sensors, a
wireless sensor network is able to monitor a large number of environmental
parameters which includes the followings [3]:
1) Air temperature and humidity
2) Soil temperature and humidity
3) Air pressure
4) Lighting condition
5) Soil moisture
6) Presence, absence, and movement of specific objects
7) Parameter of objects such as speed, direction and size
With the development of these new wireless sensors that can be used in data
sensor, data processing, data storing and wireless network connections [4], a wireless
sensor network is able to be deployed in many new application areas including
environmental

application,

home

application,

application and other commercial applications.


3

health

application,

military

In the environmental area, a wireless sensor network can be used for detection
of floods and forest fires, bio-complexity mapping of the environment, precision
agriculture and tracking the movements of animals. Forest fire detection needs
wireless sensor nodes that are able to be left in forest for months and even years, so
sensors are equipped with effective power modules

[5]

like solar panels. Besides,

wireless sensor nodes should ignore the obstacles which block the wireless sensors
line of sight like rocks and trees and communicate with each other nodes in short
distance. An example of wireless sensor network used in the detection of the flood
[6]

is the ALERT system deployed in US. The rainfall, water level and weather

sensors deployed in ALERT system collect and send information in a programmed


way to the centralized server. In precision agriculture, wireless sensor network can
be used for monitoring the development of crops, level of soil erosion and level of
air pollution in real-time.
Wireless sensor network can be used in home applications including smart
environments and home automation. In smart environment areas, furniture and other
appliances

[7]

are equipped with wireless sensor nodes that are able to communicate

with each other nodes and users. Theses self-organizing wireless sensor nodes
should be integrated with existing embedded devices, provide communication
among room users to share information and services they offered such as printing
and faxing

[8]

. In home automation, smart sensor nodes are embedded in home

appliances and devices like refrigerators and micro-wave ovens. Residents are able
to control the home devices outside of home.
Wireless sensor network applications related to health include tracking and
monitoring doctors and patients inside a hospital, drug administration and control in
hospitals, telemonitoring of human physical data and etc. The installed wireless
sensor network can be used to monitor and detect the behavior of elderly people and
the disability like a fall and store the collected physical and biological data for a
long period of time

[9]

for the medical exploration

[10]

. An example of applying

wireless sensor network in health field is the Health Smart Home deployed in the
Faculty of Medicine in Grenoble in France to validate such system [11].
Because of the specific characteristics of wireless sensor network including
rapid deployment, self-organization of network, high fault tolerance, high
sensitivity and etc., wireless sensor networks have a wide range of applications in
military field. Wireless sensor networks have been applied in fields such as
4

monitoring of nuclear power stations, detection and reconnaissance of biological


and chemical attack, battlefield surveillance, monitoring of friendly forces,
equipment and ammunition, reconnaissance of opposing forces and terrain.
Some of the commercial applications of wireless sensor network include
environmental control in office buildings, interactive museums, detecting and
monitoring car parking places, managing inventory control and vehicle tracking and
detection

[12]

. In interactive museums, people are able to interact with objects in

museums that are able to respond to peoples action to learn more about the
exhibition. The real time cause-and-effect environment is already provided and
deployed for people to take part in

[13]

. An example of such a museum is the San

Francisco Exploratorium that combines data measurement and cause-and-effect


experiments.
Regarding the communication architecture of wireless sensor network, in a
wireless sensor network each node is able to collect data and transmit data by a
multi-hop infrastructure less architecture to the sink and terminals. The sink node
can communicate with end users on a PC or mobiles by Internet or satellite. The
communication architecture of wireless sensor network is shown in Figure 1-1.

Figure 1-1 communication architecture of wireless sensor network [4]

The sink nodes and other sensors use the same protocol stack. The protocol
statck includes five layers: application layer, transport layer, network layer, data
link layer and physical layer. The protocol stack also includes three planes: task
management plane, mobility management plane and power management plane

[4]

The five layers are used for communication while the three planes are used for
management. The five layers and the three planes are shown in Figure 1-2.
5

Figure 1-2 The protocol stack of the sink node and other sensors [4]

On the application layer, various types of applications designed for different


sensing tasks are built and used. The transport layer is used for controlling the flow
of data when the sensor network application requires it. The network layer is in
charge of routing the data provided from the tranport layer. The MAC protocol of
the data link layer should be able to minimize the collision with a neighbors
broadcast because of the noisy environment and mobile sensor nodes. The physical
layer defines the transmission and receving techinques with modulation.
Power, movement and task distribution are monitored by the power
management plane, mobility management plane, and task management plane. The
wireless sensor nodes can coordinate and share the sensing tasks and lower the
power consumption with the help of power management plane, mobility
management plane and task management plane. The task management plane shares
the sensing tasks among the sensors in a specific region. The mobility mangaement
plane monitors and stores the movement and position of sensor nodes. The power
management plane is in charge of saving power consumption of sensor nodes.
The design of Wireless Sensor Network (WSN) is influenced by many factors
which are divided into three parts

[14]

. The first part is factors related to wireless

sensor nodes such as power consumption, production costs, scalability and hardware
constraints. The second part is factors related to network such as fault tolerance,
sensor network topology and transmission media. And the last part is factors related
to environment such as operating environment [15].
6

Considering falut tolerance, wireless sensor network must be able to sustain


the network when some wireless sensor nodes in the network fail to work. The fault
tolerance of the wirless sensor network has realtionship with the environment.
When deployed in house, the wirless sensor network needs low fault tolerance,
while deployed in battlefield for monitoring, the sensot network needs high
reliability for critical environment.
The wireless sensor nodes are always equipped with a limited power source. In
many applications such as detection of floods and forest fires, it is unable and
expensive to replace the power module of wireless sensor nodes. Therefore, the
power consumption needs to be considered. In many applications, the wireless
sensor nodes have different modes including sleep, deep sleep and hibernate mode.
The change of different modes can help the wireless sensor nodes to reduce the
consumption of power.
In deployment of the wireless sensor network, the number of nodes in the
specific region might reach an extreme hight value like hundreds or thousands. The
WSN must be able to use this number of nodes effectively. In reality, the density of
the nodes can range from a few sensor nodes to dozens of sensors in the specific
region. The WSN should consider the scalability.
The sensor network topology of the WSN can be divided into three parts,
deployment phase, post-deployment phase and re-deployment phase. In deployment
phase, the nodes are delivered in the sensor field in mass way or one by one. In
post-deployment phase, because of the nodes changes of position and energy, the
topology may also change. In re-deployment phase, new nodes can be added. The
new added nodes will change the topology of the network.

1.3.2 Smart Agriculture project with Waspmote


Today agriculture is facing two major problems: soil compaction and water
scarcity. Wireless sensor networks can be used to monitor different environmental
parameters related to crops development such as temperature and humidity to
maximize the agriculture results and minimize the cost. Wireless sensor networks
have been deployed and applied in smart agricultural fields.
An example of an agricultural project is the Siega System developed by Grupo
Austen, a Spanish company specialized in wireless sensor networks. The Siega
System has been deployed in a vineyard in the north of Spain. It is used to collect
7

environmental parameters such as temperature, humidity, wind, leaf wetness and


other parameters related to agriculture.
The Siega System has two benefits, real-time and traceability. On one hand, it
can be used to monitor environment in real-time, which could help vineyard
technicians to take actions according to the impact of disease in the vineyard to
minimize the time and money cost due to the phenomenon.
On the other hand, the Siega System monitors and controls the grape and
transmits the collected environmental parameters from the vineyard to the end users
in real time. In this way technicians could stay in their offices while monitoring
grapes in real time from plantation to wine manufacturing. Also, RFID (Radio
Frequency Identification) technology is used to improve viticulture.
The Siega System nodes consist of Libelium Waspmote and are able to collect
different data as follows:
1) Ambient temperature and humidity
2) Atmospheric pressure
3) Pluviometer
4) Anemometer
5) Ultraviolet radiation
6) Solar radiation
7) Soil temperature
8) Soil moisture
9) Leaf wetness
The Siega System uses Libelium agriculture sensor board extension to connect
different types of sensors to the Waspmote. This sensor board contains the
electronics needed to implement an easy hardware integration of these sensors.
With the help of these various measured parameters, statistical prediction models
can be implemented in the Siega System.
The Waspmote proto sensor board is used to control air conditioning in the
wine cellar and irrigation systems in the vineyard. For example, turning them on or
off according to the real-time weather conditions. The Waspmote RFID module can
be used in the traceability of the grapes, adding a new feature to this Smart
Agriculture system. The agriculture sensor board, proto sensor board
module

[17]

are shown in Figure 1-3.


8

[16]

and RFID

Figure 1-3 a) Waspmote agriculture sensor board b) Waspmote proto sensor board c) Waspmote
RFID module

The Siega System uses a Meshlium, a multi-protocol router provided by


Libelium, to collect data from wireless sensor nodes and transmit the data onto
Internet. Every Waspmote is equipped with a GPS module which can deliver the
accurate position and time information to show the location of the wireless sensors.
The Waspmote has different power consumption according to its operating mode,
the consumption details are as follows:
1) 9 mA, ON mode
2) 62 A, sleep mode
3) 0.7 A, hibernate mode
Regarding battery/energy saving, the Waspmote is in sleep mode most of the
time. The sleep time is programmed and set by the user. When Waspmote wakes up
from sleep mode, it reads from the sensors, deals with the data, implements the
wireless communication and goes back to sleep mode again. A Waspmote is
powered by rechargeable batteries and solar panel making the system clean and
autonomous.
As we have said before, the Siega System is deployed in a vineyard in the
north of Spain. It includes 10 Waspmotes and 1 Meshlium. All these devices have
been deployed to monitor a local wine cellar in order to get the results to test and
improve the system.
The purpose of the Siega System is to provide IOT (Internet of Things)
paradigm to rural things, helping to provide a better quality end product and
minimize the impact of the pesticides.

The deployment process was divided into the following different tasks:
1) Module development: development of measuring module, communication
module and statistical prediction model.
2) Interface development: development of irrigation system interface, user
interface such as a PC or smart phone and air conditioning system interface.
3) Communication development: development of traceability of the grape
based on a RFID system.
The global architecture diagram of the Siega System is shown in Figure 1-4.
The deployed wireless sensors collect data at a fixed frequency and send them to a
Meshlium which stores them in a database or sends them to web application models.

Figure 1-4 Architecture Diagram of the Siega System

In implementation, measuring nodes that were installed in the vineyard are


used to collect data from the environment at a fixed frequency. The collected data
includes temperature, soil humidity, leaves wetness and so on. The nodes used to
collect data from environment in the Siega System are shown in Figure 1-5.

Figure 1-5 Siega System sensor nodes used to collect data from environment

10

Meshlium was installed in the center of the vineyard to gather all the data
coming from the sensor nodes and storing this data in a database or sending this
data to a web application, PC or mobiles. The Meshlium used in Siega System is
shown in Figure 1-6.

Figure 1-6 Meshlium used to gather data in the Siega System

Once the base system was deployed, both PC and smartphone applications
were developed to help the user to manage irrigation system, air conditioning
machines and to prevent possible plagues. The Siega Systems PC application is
shown in Figure 1-7.

Figure 1-7 PC Application of the Siega System

Sensor nodes are located using Google Maps and the user can access to
real-time data from each sensor node, and even obtain a visual representation of the
different parameters measured by that node. A smartphone application is able to

11

control the system from anywhere when connected to the Internet. The graphical
user interface of Siega smartphone application is shown in Figure 1-8.

Figure 1-8 Smartphone application of the Siega System

All these nodes are autonomous, taking advantage of Waspmote's energy


saving features. Wireless sensor nodes obtain sensor data every 15 minutes or every
5 minutes, depending on the sensors connected to them.

1.4 Main content and organization of the thesis


The thesis consists in four parts. The first part is the introduction. It makes a
brief introduction of wireless sensors and wireless sensor networks. It also talks
about some related research and shows a smart agricultural project as an example.
The second part is the project requirement analysis. Considering the project is
based on Libelium Waspmote, the modules of this device should be described and
analyzed. These modules include XBee ZigBee Pro modules, XBee 868 modules,
real time clock (RTC) modules, accelerator modules, SD card modules, utility
modules, WIFI modules and power modules. This part focuses on the
communication

between

Waspmotes

and

Waspmote

communication between Waspmotes and a Meshlium.


12

Gateway

or

the

The third part is the project design. It focuses on the design and development
of the different Waspmote modules. All modules used in the communication
between Waspmote and Meshlium have to be programmed and tested in this part.
As the core of this thesis, this chapter focuses on the collecting of data from sensors,
storing data in the memory, and transmitting the data to the Meshlium. Then as a
router, the Meshlium transmits the data to the Internet or other terminal end users.
The last part is the conclusion. This chapter makes a conclusion of each
chapter and makes a summary of the project and thesis.

13

Chapter 2 System Requirement Analysis


2.1 The goal of the system
The goal of the system is to design and deploy a Wireless Sensor Network
(WSN) for the monitoring of crops based on the Libelium Waspmote

[18]

that works

as a wireless sensor device equipped with different specific modules. For this
project, I firstly need to become familiar with different modules of Waspmote first.
Each module has to be programmed and tested before being used in the project. The
modules of Waspmote that will be used in this project include USB modules, utility
modules, power modules, XBee ZigBee Pro modules, XBee868 modules, real time
clock (RTC) modules, accelerator modules, SD card modules and WIFI modules.
After programming and testing all the related Waspmote modules, we have to
focus on the XBee ZigBee Pro module and the XBee 868 module will be focused on
because they are in charge of transmitting data and thus the communications
between different devices. In this project, there are three types of wireless
communications. They are communication between Waspmotes, communication
between Waspmotes and a Waspmote Gateway, communication between
Waspmotes and a Meshlium. The final wireless sensor network is based on the
communication

between

Waspmotes

and

Meshlium.

However,

this

communication is based on the first two communications.


This project includes the study and testing of hardware and software. Each
module that will be used in the communication between Waspmote and Meshlium
had to be programmed and tested independently. The Waspmote Gateway and the
Meshlium also need to be tested. The Waspmote Gateway cannot be programmed
but can be modified through specific software X-CTU provided by Digi. The
modification of Waspmote Gateway is on parameters including PANID, channel,
enable encryption and encryption key, ZigBee stack profile, baud rate. The
Meshlium, working as a Linux router provided by Libelium, provides a graphical
user interface Manager System that can be used to modify simple parameters and
monitor the flow data of Meshlium. Other operations and parameters should be
settled by SHH software. In this project, we choose the Putty tool to monitor the

14

data of Meshlium in real-time and modify some parameters that cannot be modified
using the Manager System of the Meshlium.
In the wireless communication based on XBee ZigBee Pro module and XBee
868 module, apart from the USB module, power module, real time clock module
and SD card module, other needed hardware are agricultural sensor board,
temperature sensor MCP9700A, humidity sensor 808H5V5, soil moisture sensor
and etc. As a result, environmental data, including air temperature, air humidity,
soil moisture and battery level, has to be collected by Waspmote equipped with
corresponding sensors. Waspmote stores the data in flash memory or SD card, and
uses the wireless communication module to transmit the collected data from
Waspmote to Meshlium. The Meshlium stores the collected data in local files or in
local database or even stores them on external database through the Internet.

2.2 The functional requirements


The functional requirements of this project include three parts according to the
hardware. They are the functional requirements of Waspmote, the functional
requirements of Waspmote Gateway and the functional requirements of Meshlium.
As the core part, the functional requirements of Waspmote can be divided into
different modules that will be used in communication between the Waspmote and
Meshlium. These modules include USB module, utility module, power module,
XBee ZigBee Pro module, XBee 868 module, real time clock (RTC) module,
accelerator module, SD card module and WIFI module.

2.2.1 The functional requirements of the Waspmote


As the core part of this project, the Waspmote is a wireless sensor device
provided by Libelium for developing of wireless sensor network. Currently, the
Waspmote has three different radio frequencies 2.4GHz, 868MHz and 900MHz. It
works with four different protocols, the ZigBee protocol, the Bluetooth protocol, the
GSM/GPRS protocol and the WIFI protocol. A Waspmote equipped with XBee
ZigBee Pro module is able to make links up to 7000m while a Waspmote equipped
with XBee 868 module is theoretically able to make links up to 12000m. When a
Waspmote is not transmitting data, it can be settled to the hibernate mode that just
costs 0.6 A/h for reducing power consumption and saving battery. It can also be
settled to sleep mode that just cost 60 A/h. In addition, Libelium also provides an
15

open source IDE (Integrated Development Environment) including API libraries


and a compiler with more than fifty available sensors

[14]

. An example of the

Waspmote with WIFI module is shown in Figure 2-1.

Figure 2-1 Waspmote with WIFI module

In this project, Waspmote works as a wireless sensor node to collect


environmental data with the help of corresponding sensors including temperature
sensor MCP9700A, humidity sensor 808H5V5 and soil moisture sensor, store the
data in its flash memory like EEPROM or SD card, and use a XBee ZigBee Pro
module or a XBee 868 module to transmit the data to a Waspmote Gateway or a
Meshlium. To realize the communication purpose, considering the wireless sensor
network is influenced by many factors, many different Waspmote modules need to
be programmed and tested independently [19].
The real time clock (RTC) module is used in order to setting and reading the
time and the alarm clock. Since energy saving is one of the most important factors
in designing wireless sensor network, most of the time the Waspmote is in sleep or
in hibernate mode. The Waspmote only wakes up when the programmed sleep time
is over. When Waspmote wakes up, it collects environmental parameters, stores the
collected data in flash memory or SD card, transmits the stored data using wireless
communication modules like XBee ZigBee Pro module or XBee 868 module, and
afterwards, it changes into sleep mode, deep sleep mode or hibernate mode to
decrease energy consumption again.
The SD card module is used for saving environmental parameters collected by
corresponding sensors. Because the Waspmote just has 4KB EEPROM (Electrically
16

Erasable Programmable Read-Only Memory), 8KB SRAM (Static RAM) and 128
KB flash memory that are not enough for saving the whole environmental
parameters collected by the temperature sensor MCP9700A, the humidity sensor
808H5V5 and the soil moisture sensor. So the external SD card with a maximum
size of 2GB is necessary.
The Accelerator module is used for get accelerator and checking the status of
the Waspmote. In deployment, the Waspmote could be placed on high places like
poles or trees, since the accelerator has a function to check the free fall status by
getting the accelerator in X axis, Y axis and Z axis, it can be used to check whether
the Waspmote has fallen or not to avoid the missing of data.
The GSM/GPRS module is used for using GSM network. With this module, the
Waspmote is able to make calls, send and receive messages, upload and download
files from FTP web servers. In deployment, when the server is an FTP server, the
collected data from the specific sensors may be uploaded to the FTP server to
update the data in real time.
The XBee ZigBee Pro module is one of the most important wireless
communication modules used on the Waspmote. Based on the ZigBee protocol, this
module is used for sending data from Waspmote to Waspmote, from Waspmotes to
a Waspmote Gateway and from Waspmotes to a Meshlium. The XBee ZigBee
module has a radio range of 500m while the XBee ZigBee Pro module has a range
of 7000m that is enough for field deployment to monitor the crops development [20].
The XBee 868 module is another wireless communication module used on the
Waspmote. With a higher transmission power and sensitivity, the radio range of the
XBee 868 module is 12km. The radio frequency of XBee 868 is 868MHz.
Compared to the XBee ZigBee Pro module, the XBee 868 module is more powerful
and has a wilder use in monitoring crops development.
2.2.1.1 The functional requirements of the utility module
As the one of the basic modules, the utility module needs to be tested first. The
utility module takes control of several useful parts: USB port, LEDs, flash memory
EEPROM, basic sensors including temperature sensor MCP9700A and humidity
sensor 808H5V5 and basic libraries including type converting functions [21].
The USB function is used to transmit data from the Waspmote to the IDEs
serial monitor on a PC through an USB cable. Through the IDE provided by
Libelium, the Waspmote can print out some important parameters for users to know
17

the status of the running programs better. Besides printing on serial monitor, in this
function the serial monitor can also send data to the Waspmote node when the USB
port is available [22]. The USB function is important in all other modules for printing
out the results of the executed commands to help developers to know the status of
the Waspmote.
The LED function is used to control the two LEDs embedded on the Waspmote
board and to check the different status of the running programs. Both LEDs can be
controlled by the uploaded program, including turning on, turning off and blinking
for a certain time. When testing the communication module, the LEDs can be used
to check whether the network is joined successfully or the data packets are sending
correctly.
With a size of 4 KB, the EEPROM can be used to save temporal data. Except
for the first 1 KB that is occupied by the operating system, the other 3 KB can be
used. In this project the flash memory of Waspmote is not enough for saving the
environmental parameters collected by the temperature sensor MCP9700A, the
humidity sensor 808H5V5 and the soil moisture sensor, so the SD card module that
can be extended to 2 GB will be introduced later.
The basic sensor function is a new function. In Waspmote v1.1, there are not
any specific pins on boards for the temperature sensor MCP9700A or the humidity
sensor 808H5V5. So an agricultural sensor board is necessary for these
corresponding sensors to collect data. The agricultural sensor board is plugged into
the Waspmote board and all the needed sensors are plugged into the agricultural
sensor board. However, in Waspmote v1.2, the hardware has been changed as well
as the API (Application Programming Interface). The basic sensors including the
temperature sensor MCP9700A and the humidity sensor 808H5V5, they can be
plugged directly on the Waspmote board. Besides, the corresponding specific
functions have been developed to collect basic environmental data including air
temperature and humidity.
In the utility program, all the functions needed to be tested. The test program
had to be compiled and uploaded on the Waspmote v1.2.
2.2.1.2 The functional requirements of the real time clock module
Considering that saving energy is one of the most important factors in design
of wireless sensor network, the Waspmote should have an effective function to
change the status between sleep mode and active (ON) mode. The real time clock
18

(RTC) module is used for setting time and alarm clock. As the core part of
deceasing energy consumption and saving energy, this part has wild use in the
communication between Meshlium and Meshlium.
Real time clock module has an embedded thermometer to get temperature. The
getting temperature function will be used later in communications based on XBee
ZigBee Pro module and XBee 868 module as a node to collect the temperature [23].
Alarm clock part contains setting alarm clock and getting interruption to wake
up. Real time clock module has two alarm clocks. One is based on
day/hour/minute/second format. The other is based on hour/minute/second format.
So the first alarm clock is used more widely. After setting the alarm clock that
defines a corresponding sleep time in program, the Waspmote will change into sleep
mode where all modules except the real time clock one are powered off. When the
sleep time is over, the real time clock module will send the RTC_INT

[24]

interruption, when the Waspmote get the RTC_INT interruption, it wakes up from
sleep mode to active mode. When Waspmote wakes up, all modules need to be
initialized and turned on again.
In the program of real time clock module, it should be focused on the alarm
clock part where absolute time and offset time need to be tested as well as the alarm
clock 1 and the alarm clock 2 with all corresponding alarm clock modes. These
programs should have two versions according to the hardware. One should be
uploaded and tested based on the Waspmote v1.1. The other should be uploaded and
tested based on the Waspmote v1.2.
2.2.1.3 The functional requirements of the SD card module
The SD card module is used for saving the environmental data including air
temperature, air humidity and soil moisture data from corresponding sensors.
Considering that the Waspmote only has 4 KB EEPROM and 128 KB flash
memory, when in the deployment, the environmental data needs a large memory to
save, so the 2GB extended SD card is necessary.
The SD card module provides basic files operations including reading files,
writing files, deleting files, searching content in file, basic folder operations
including creating folder, deleting folder, basic SD card operation including
calculating the number of files in card and getting the disk size and etc. The
checking SD card function is used to check whether the Waspmote has a SD card

19

before storing data in it. It is important to check every time to detect broken SD
card event in order to reduce the possibility of losing collected data [25].
The creating and deleting folders functions make the SD card clear in
architecture. Because SD card module uses tree architecture, so there could be
different layers. Each layer could have different folders and files. The name format
of SD card module is 8.3. The name of the created file contains at most 8 letters
while the suffix contains at most 3 letters. The change directory function and show
files function are also provided for users to check the whole file architecture as well
as the content of the SD card.
Because the SD cards are only provided in the Waspmote v1.2 tool kit, the SD
card module only needs to be tested on Waspmote v1.2, all functions including
operation related to files and operations related to folder are needed to be tested. In
our program, the different processes includes checking SD card status, getting basic
parameter of SD card including number of files and disk size, creating files, writing
files, appending sentences in files, reading files and showing content, deleting files,
creating folders, deleting folders and etc. The test program needs to be compiled
and uploaded on Waspmote v1.2.
2.2.1.4 The functional requirements of the GSM/GPRS module
The Waspmote v1.2 tool kit has a Waspmote v1.2 board equipped with a
SIM900 module designed for using the GSM network service. When a SIM card is
plugged, this module can be used to make and receive calls, send and receive
messages, download files from a FTP server as well as upload files to a FTP server.
In the project, if the collected environmental data needs to be stored on a FTP
server, other Waspmote devices in the same network can send data to the
GSM/GPRS module through communication modules like the XBee ZigBee Pro
module or the XBee 868 module. And with its GSM/GPRS module, this Waspmote
node can resend the data to a FTP server. Besides, when the monitored
environmental parameters such as temperature and humidity are outside of the
normal level including too high or too low, the GSM/GPRS module could send
messages or make calls to the settled phone number.
The GSM/GPRS module provides setting PIN and checking GSM network
status functions that need to be used during each initialization to ensure the
connection to the GSM network with the used SIM card. In the program, the
marking calls and sending messages function are tested on Waspmote v1.2. The
20

functions of uploading files to a FTP server and downloading files from a FTP
server are reserved until they are needed on the communications based on the XBee
ZigBee Pro module and the XBee 868 module [26].
2.2.1.5 The functional requirements of accelerometer module
An accelerometer is embedded on the Waspmote board. It provides several
functions such as getting acceleration on X axis, Y axis and Z axis, checking free
fall status and etc.
In deployment, Waspmote equipped with corresponding sensor could be placed
on trees or wire poles for better collecting specific environmental data. In case of
falling from high places and losing data without any alarms, technicians can use the
accelerometer module to check whether the Waspmote is in free fall status. When
the accelerometer checks the free fall status, it can send an interruption named
ACC_INT which could wake the Waspmote up from sleep or deep sleep mode, then
use the GSM/GPRS module to send messages to technicians as an alarm [27].
The program that includes the functions of getting acceleration on X axis, Y
axis and Z axis and check free fall status has been compiled uploaded and tested on
both Waspmote v1.1 and Waspmote v1.2. The free fall status is simulated by using
hands to protect the Waspmote devices.
2.2.1.6 The functional requirements of the XBee ZigBee Pro module
As the core part of the project, the XBee ZigBee Pro module is used for
sending the collected environmental data from Waspmote to other Waspmotes, from
Waspmote to Waspmote Gateway or from Waspmote to Meshlium based on ZigBee
protocol. As a communication module that costs lots of energy, most of the time the
XBee ZigBee Pro module is in sleep mode until it is the right time to send the
packet to destination. When the collected data is enough to fulfill the packet, the
XBee ZigBee Pro module is turned on and tries to join the network and send
packets.
In the program to make sure that the data is received correctly, the joining
network function has been settled to a maximum trying time value called
MAX_JOIN_NET_TIME while the sending data function has also been settled to a
maximum sending time called MAX_SEND_TIME. For example, in this project the
joining network and sending packets will try at most 10 times to reach a node of the
network. On one hand, this method tries to make a stable connection and tries to
send the packets to the receiver. On the other hand, this method tries to save battery
21

in avoid of wasting too much energy on trying to join network when the network
falls off. The settled maximum time has to be considered both on making stable
connection and saving energy [28].
The first time of turning on XBee ZigBee Pro module, it needs to be initialized
including setting PANID, channel, channel verification, encryption mode and
encryption link key. Then each time when the Waspmote wakes up from sleep
mode, Waspmote just needs to turn on this module with the stored hardware and
network parameters without initialization. The first time of initialization also needs
to print out the network parameters including operating 16-b PAN ID, operating
64-b PAN ID, channel, MAC address and etc.
The sending packet includes three parts; the first part is the header containing
some necessary information. The second part is the data part with the collected
environmental data. The last part is the CRC (Cyclic Redundancy Check) part in
order to check data integrity. The data structure of a sending packet is shown in
Figure 2-2.

Figure 2-2 Data structure of the sending packet

Because the collecting data and the sending data frequencies are not the same,
a sending packet may consist of collected data. The aggregated data number of the
sending packet has relationship with the sending data frequency and the collecting
data frequency. The formula to calculate the aggregated data number is shown in
Figure 2-3.

Figure 2-3 Formulation for calculating aggregated data number

22

After collecting enough data to fulfill a sending packet, the XBee ZigBee Pro
module needs to use the join net function to connect to the network. This module
finds the coordinator in the network with the same PANID, tries at most
MAX_JOIN_NET_TIME times. If it succeeds in joining a coordinator, the return
value is true so the program will go on to send packet. Otherwise, the program
changes into sleep mode and waits until the next loop. If the joining network is
successful, in the sending data part, the data packet is fulfilled with the collected
data stored in the SD card. And the module will try at most MAX_SEND_TIME
times, whether sending data successful or not. Afterwards, whether sending of data
is successful or not, this module will change into sleep mode to save energy.
In sleep mode, all modules except real time clock module are powered off to
reduce energy consumption. After the sleep time that settled in program is over, the
real time clock module and USB module are turned on and Waspmote goes into the
next loop.
This module has to be tested on both Waspmote v1.1 and Waspmote v1.2. The
program includes two parts. The first part is the set up part including the
initialization of real time clock module for setting the time and alarm clock, USB
module for monitoring the running parameters on IDEs serial monitor, XBee
ZigBee Pro module for communication between Waspmote and Gateway or
Meshlium. The second part is the loop part that contains collecting data, joining
network, sending data and sleeping and waking up.
2.2.1.7 The functional requirements of the XBee 868 module
As another important communication module, the XBee 868 module has a
wilder radio range up to 12000m while the radio range of XBee ZigBee Pro module
is just 7000m.The functional requirements of XBee 868 module is similar to XBee
ZigBee Pro module as well as the test programs.
The test of the XBee 868 module includes initialization, collecting data,
storing data in SD card, joining network, sending packets and sleeping and waking
up. Similar to the XBee ZigBee Pro module, energy saving should also be
considered. So in joining network step, the XBee 868 module will try at most
MAX_JOIN_NET_TIME times. And in sending packet step, the XBee 868 module
will try at most MAX_SEND_TIME times. Both values are settled as 10 by default

23

in this project. On one hand, this will do the best to join network and send packets.
On the other hand, this will avoid waste energy when the network falls down [29].
As a communication module, the XBee 868 module should be tested in three
ways: communication between Waspmotes, communication between Waspmotes
and Waspmote Gateway, communication between Waspmotes and Meshlium. In
communication between Waspmotes, this communication is used to test the
self-organized network of Waspmote. Each Waspmote node works as a sender as
well as a receiver. After sending a packet, the sender node will wait a specific time
to receive back messages. After receiving packet, the receiver node will send the
assurance packet to the sender node. The communication between Waspmote and
Waspmote Gateway works as a simple simulation of communication between
Waspmote and Meshlium. Besides, this could also be used for checking multiple
Waspmotes connecting to one coordinator. The most important part is the
communication between Waspmote and Meshlium because this will be used in
agriculture for monitoring crops development.
Considering of saving energy, most of time the XBee 868 module is in sleep
mode. When enough data have been collected, this module wakes up. Similar to the
XBee ZigBee Pro module, it only needs one initialization on the first time, in other
cases it just needs to be turned on. After checking the network with the same
PANID and channel to find the coordinator, the XBee 868 module will send a
packet and goes back into sleep mode again.
The XBee 868 module is a new hardware in Waspmote v1.2 tool kit. So it has
only been tested on this version of Waspmote. The program has two parts. The first
part is the set up part for initialization of the related modules including USB
modules, real time clock modules and the XBee 868 modules. The second part is the
loop part for collecting specific environmental data including temperature data from
the MCP9700A sensor, humidity data from the 808H5V5 sensor, soil moisture from
the soil moisture sensor, battery level data from the power module.

2.2.2 The functional requirements of the Waspmote Gateway


As a data bridge and Access Point (AP) between sensor network and receiving
equipment, the Waspmote Gateway is used for collecting data that flows from the
wireless sensor network into a PC or other devices equipped with a standard USB
port. The Waspmote Gateway is responsible for receiving data and using depending
24

on the specific needs of the application. The Waspmote Gateway equipped with the
XBee ZigBee Pro module is shown in Figure 2-4.

Figure 2-4 A Waspmote Gateway with the XBee ZigBee Pro module

In deployment, the Waspmote Gateway is pulgged in receiving equipment that


provides at leat a standard USB port. When the Waspmote Gateway is installed, a
new UART port is shown in the IDEs serial port that has two functions. One is for
receving data packets from the wireless sensor network. The other is for modifying
and consulting the XBees configuration parameter.
In our project, the Waspmote Gateway is used in communication based on the
XBee ZigBee Pro module and the XBee 868 module. The Waspmote Gateway
works as a coordinator for receiving data while multiple Waspmotes with different
sensors organizing a network for collecting, storing and sending data. The
Waspmote Gateway module can not be programmed. So all parameters are settled
by hand including PANID for identification of the network, channel for
communication, encryption enable and encryption link key for security. These
parameters are settled through X-CTU that is provided by Digi for setting
parameters of the Waspmote Gateway.

2.2.3 The functional requirements of the Meshlium


Working as a gateway of the Libelium Waspmote wireless sensor network, the
Libelium Meshlium is a Linux router that contains 5 different radio interfaces, WIFI
2.4GHz, WIFI 5GHz, 3G/GPRS, Bluetooth and ZigBee. The Meshlium can be
25

powered by solar panel, battery or both and can be integrated with a GPS module
for monitoring of vehicle applications and mobile applications. Because of the
wrapped aluminum IP-65 enclosure, the Meshlium is able to be placed outside.
Libelium provides a Manager System that works as a web application for
developers to control Meshlium quickly and easily. The Manager System provides
graphical configurations of WIFI, ZigBee, Bluetooth and 3G/GPRS module and
storage options of sensor and received data

[30]

. The Meshlium equipped with two

WIFI antennas and two ZigBee antennas is shown in Figure 2-5.


As a coordinator receiving the collected environmental parameters, Meshlium
is used in communication with Waspmote equipped with the XBee ZigBee Pro
module. In the Manager System, Meshlium can be settled to save the collected data
in local files, local base, or even external database with a specific address and a port
on Internet. Although Manager System is user friendly, other complex parameters
should be settled by using SSH (Secure Shell) software. In the project, the Putty
software is used for checking the data. In this project, through Putty, the data
received by the Meshlium can be shown in real time. The files that define the format
of the received frame are stored in the Meshlium system. Through SSH software,
technicians have access to the system files. After specific files are modified and
compiled, the defined format can be changed according to corresponding data [31].

Figure 2-5 A Meshlium with two WFIF antennas and two ZigBee antennas

2.2.4 The functional requirements of the agricultural sensor board


The agricultural sensor board is developed by Libelium for Waspmote v1.1 to
monitor multiple environmental parameters including a wide range of applications
26

such as temperature, humidity, soil moisture, light condition, air pressure and etc.
At most 14 different sensors can be plugged on the agricultural sensor board at most
at the same time. The specifications and electrical characteristics of an agricultural
sensor board are shown in Table 2-1. The top side of the agricultural sensor board
[32]

is shown in Figure 2-6.


In our project, the agricultural sensor board is used on Waspmote v1.1 for

collecting temperature data from the MCP9700A sensor, humidity data from the
808H5V5 sensor

[33]

, soil moisture from the soil moisture sensor and battery level

data from the power module of the Waspmote. The agricultural sensor board is
plugged on the Waspmote v1.1 while the corresponding sensors are plugged in the
pins of the agricultural sensor board.
The agricultural sensor board can be programmed through the Waspmote
program, in the collecting data part of communication based on the XBee ZigBee
Pro module, the agricultural sensor board needs to be turned on each time before
getting the data of corresponding sensors. After getting data, the agricultural sensor
board has to be turned off for saving energy [34].
Table 2-1 Specifications and electrical characteristics of the agricultural sensor board [32]
Hardware Parameter

Value

Weight

20 g

Dimensions

73.5 * 51* 1.3 mm

Board power voltages

3.3V & 5V

Maximum admitted current (continuous)

200mA

Maximum admitted current (peak)

400mA

Figure 2-6 Agricultural sensor board top side


27

2.3 The un-functional requirements


As an emerging wireless sensor device, Waspmote has a fast update frequency.
In the project, Waspmote has changed from version 1.1 to version 1.2. The
corresponding IDE has changed from version 01 to version 03. The API has also
changed from version 001 to version 003. As a result, the compatibility has to be
considered in the project.

2.3.1 The un-functional requirements of the Waspmote


During the development of this project, Waspmote has change from version 1.1
to 1.2. Although most functions are still the same or unchanged, some hardware and
API have changed. Considering hardware part, some parts have been added like a
radio socket and a unique serial number ID chip. Some parts have been replaced like
battery socket and jumpers. Some parts have been removed like the RSSI LEDs.
The top side of Waspmote v1.1 is shown in Figure 2-7 and the top side of
Waspmote v1.2 is shown in Figure 2-8.
Consider the API part, some bugs like the millis function has been fixed. In
v1.1 the millis function refreshes the time every second while in v1.2 the millis
function refreshes the time every one thousandth second. Many variables, constants
and functions have been changed. So the developed program has to consider the
version changes to keep compatibility [35].

Figure 2-7 Top side of the Waspmote v1.1

28

In the new Waspmote development tool kit associated to the Waspmote v1.2,
three XBee 868 modules, one GSM/GPRS module with a specific antenna and two
expansion boards have been added.

Figure 2-8 Top side of the Waspmote v1.2

2.3.2 The un-functional requirements of the Meshlium


As a router based on Linux system, the Meshlium is used for receiving packet
sent from Waspmote equipped with corresponding sensors based on the XBee
ZigBee Pro module or the XBee 868 module. The sending packet contains
temperature data, humidity data, soil moisture data, battery level data and etc. The
format of data is settled by the developers. In order to recognize the different format
of data, the Meshlium needs to be reprogrammed [36].

2.4 Brief summary


This chapter analyzes the requirements of the project and focuses on two parts:
functional requirement analysis and un-functional requirement analysis.
In the functional requirement analysis, the requirements are divided into three
parts according to the hardware used in this project: the Waspmote part, the
Waspmote Gateway part and the Meshlium part. The Waspmote part has been
divided by the different modules such as real time clock module, the USB module,
the utility module, the XBee ZigBee Pro module, the XBee 868 module, the
29

GSM/GPRS module and etc. The XBee ZigBee Pro module and XBee 868 module
are the most important parts for the communication between Waspmote and
Waspmote, communication between Waspmote and Gateway, communication
between Waspmote and Meshlium. Other parts are basic parts that could be used in
the three kinds of communications. The requirement analysis makes a brief
introduction of each module, focuses on the needed functions of each module and
talks about how to test and program these modules, including testing process and
important parts.
The un-functional requirement analysis focuses on the compatibility of the
system between Waspmote v1.1 and the Waspmote v1.2. Considering the changes
in the hardware and in the API, the system will be tested on both hardware versions.

30

Chapter 3 System Design


According to the requirement analysis in Chapter 2, the system design can be
divided into three parts. The first part is the Waspmote that can also be divided into
several modules according to different functions. The second part is the Waspmote
Gateway that works as a coordinator in the wireless sensor network for monitoring
of the transmitting data, the last part is the Meshlium that works as a Linux router
for collecting data sent by Waspmote nodes, storing data in local files or local
database and transmitting the data to Internet or storing the data in external database
on Internet.

3.1 Design of the Waspmote


3.1.1 Design of the real time clock module
Waspmote has a real time clock (RTC) module that can be programmed and
controlled through the I2C bus. The real time clock module stores and automatically
updates the time for Waspmote and allows Waspmote to be programmed to finish
specific tasks including waking up after sleeping for a specific time or waking up
every day at a specific time to perform corresponding tasks.
The core part of real time clock module is the alarm clocks that can be
programmed in two specific formats including day/hour/minute/second and
hour/minute/second. Alarm clocks give users total control when Waspmote wakes
up to capturer sensor values and perform programmed actions and when Waspmote
changes into saving energy mode. In other words, alarms allow Waspmote to be in
deep sleep mode or hibernate mode for saving energy and make Waspmote wake up
just at the required moment.
The real time clock module is based on the hardware DS3231SN that has a
frequency of 32.786Hz which allows real time clock module to calculate time
variations with high precision. As one of the accurate clocks, DS3231SN uses
internal compensation mechanism and has a loss of just 2ppm which equals to
variation of 0.16s per day while most RTCs on market has a 1.7s loss of accuracy
per day.

31

The real time clock module is powered by a chargeable battery and is


responsible for waking Waspmote up from three energy saving modes: sleep mode,
deep sleep and hibernate mode. In sleep mode, the consumption is of 55 A,
Waspmote uses its battery just to power the real time clock. The real time clock
controls when to wake up Waspmote and perform the programmed action.
Related API libraries of the real time clock module are WaspRTC.h and
WaspRTC.cpp. In Waspmote real time clock library, an object called RTC from the
class WaspRTC is already created and is public to all libraries. All variables are
uninitialized by default when creating this constructor.
There are some constants related with register address, some functions, inputs
and alarm modes already defined in WaspRTC.h. Besides, other variables have been
defined for storing time, date and alarm data. Various flags are used for handling
interruptions when using Waspmote RTC such as global interruption flag, global
interruption flag array and global interruption counter. The class diagram of the
class WaspRTC is shown in Figure 3-1.

Figure 3-1 Class diagram of the class WaspRTC

In the test of the real time clock module, functions including setting and
reading time, setting and reading alarm clocks, using embeded thermometer to get
32

temperature in celsius degree, getting real time clock interruption to wake up


Waspmote from sleep mode to working mode have all been tested. The activity
diagram of the real time clock module is shown in Figure 3-2.

Figure 3-2 Activity diagram of the real time clock module

In the set up part, the USB module is turned on for monitoring the running
parameters of the program on IDEs serial monitor, the real time clock module is
turned on for setting time. After setting time, the getting time function is used to
show local time. After the initializaiton part, program goest into loop part.
In the loop part, the thermometer and the two alarm clocks have been tested.
Firstly, using the embeded thermometer to get temperature in celsius degrees, then
set the two alarm clocks in different modes to test the wake up interruption as well
as the sleep mode. The alarm clock can be settled in two ways: the absolute way and
the offset way. In absolute mode the Waspmote receive interruption according to
the right time of day or date. In offset mode the Waspmote receive interruption
every specific interval. After setting and getting alarm clock, the Waspmote changes
33

into sleep mode in which all modules except the rea time clock module have been
turned off. When the real time clock interruption RTC_INT is received by the
Waspmote, Waspmote wakes up and turns on the USB module and real time clock
module as well as showing the wake up time. The program will go to the next loop.
The six alarm clock modes of alarm clock 1 is shown in Table 3-1.
Table 3-1 The six alarm clock modes of the alarm clock 1
Mode of alarm clock 1

Functions

RTC_ALM1_MODE1

Match day, hours, minutes and seconds

RTC_ALM1_MODE2

Match date, hours, minutes and seconds

RTC_ALM1_MODE3

Match hours, minutes and seconds

RTC_ALM1_MODE4

Match minutes and seconds

RTC_ALM1_MODE5

Match seconds

RTC_ALM1_MODE6

Once per second

3.1.2 Design of the SD card module


Waspmote makes external storage support for the SD (Secure Digital) card that
is also provided by Libelium. Waspmote uses the FAT16 file system and can
support SD cards up to 2GB. Different operating systems such as Linux, Windows
or Mac OS have access to the information saved in the SD card. Besides, the
specific SD cards provided officially by Libelium have been implemented with a
specific process to ignore defective blocks even when using the Over The Air
(OTA) programming.
Waspmote communicates with the SD module through SPI bus. SPI bus,
including lines for the incoming and outgoing data, clock and a selected pin, is a
communication standard for transmitting information between electronic devices
which gets clock regulated bit flow. The SD card is powered by a digital pin from
the microcontroller. Considering a sensor frame in Waspmote usually occupies
approximately 100 bytes, the 2 GB SD card could have enough capacity to save 20
million measurements. Related API libraries are WaspSD.h and WaspSD.cpp. An
object from class WaspSD call SD is already created inside the Waspmote SD
library and is public to all libraries. No variables are initialized by default when

34

creating this constructor. The class diagram of class WaspSD is shown in Figure
3-3.
Waspmote has 8 KB SRAM, 4 KB EEPROM and 128 KB flash memory. These
memories are not enough for storing the environmental data collected by
corresponding sensors. So the 2GB extended SD card is necessary in this project.
Apart from checking whether there are blocks, the program also needs to test the
file editing functions (reading, writing, appending and deleting) and folder editing
functions (creating and deleting).

Figure 3-3 Class diagram of the class WaspSD

The test program includes two parts, the set up part and the loop part. In the set
up part, the USB module is turned on for showing the running parameters on the PC
screen. The SD card module is also turned on. The output basic parameter of SD
card includes the check whether the SD card is inserted or not, the disk size of SD
card, the total number of files in the card. Then, the program makes and removes
directories, shows the content of SD card module in tree architecture, creates file

35

with the name format that there are at most 8 characters in the name and at most 3
characters in the file suffix and appends sentences into the created file.
In the loop part, the program just appends sentences into the created file in
each loop and used two sub functions to show the content of the file. One sub
function is reading file by lines. The other function is reading file by buffer. Due to
buffer size, there is a limitation in size. If the read data is bigger than the size of the
buffer, the function will activate the TRUNCATED_DATA value in the flag. This
value is checked to ensure the data integrity. The activity diagram of the SD card
module is shown in Figure 3-4.

Figure 3-4 Activity diagram of the SD card module

3.1.3 Design of the GSM/GPRS module


In the Waspmote v1.2 development tool kit, a Waspmote v1.2 board is
equipped with GSM (Global System for Mobile communications) / GPRS (General
Packet Radio Service) module to enable communication with the mobile telephone
network. With the help of the GSM/GPRS module, Waspmote v1.2 is able to finish
tasks including making and receiving calls, making missed calls, sending and
receiving SMS (Short Message Service) message, uploading files to a FTP server,
downloading files from a FTP server and etc. The GSM/GPRS module uses the
36

UART_1 at a 57600 bps speed to communicate with the microcontroller. Related


API

libraries

are

WaspGPRS_Pro.h,

WaspGPRS_Pro.cpp

and

WaspGPRS_Proconstans.h.
An object called GPRS_Pro from class WaspGRPS_Pro is created inside the
Waspmote GPRS_Pro library and is public to all libraries. In creating the object
GPRS_Pro, some variable have already been initialized with a default value. For
example, the baudrate defines baud rate used to transmit data, the socket
defines the socket used to communicate with the Waspmote, and the pwrMode
defines the power mode. The class diagram of the class WaspGPRS_Pro is shown in
Figure 3-5.

Figure 3-5 Class diagram of the class WaspGPRS_PRO

The testing program has two parts: the set up part and the loop part. In the set
up part, the USB module is turned on for showing the running parameters on the PC
screen and the GPRS_PRO module is turned on for checking the GSM network
service. In the initialization of the GPRS_PRO module, the PIN code is checked
firstly, followed by a wait for the connection to the network. After connected to
GSM network successfully, the program goes into loop part.
The loop part has several sub functions such as making and receiving calls,
sending and receiving messages, download files from FTP server, uploading files to
FTP server, getting IMSI (International Mobile Subscriber Identification Number)

37

and IMEI (International Mobile Equipment Identity), etc. The activity diagram of
the GSM/GPRS module is shown in Figure 3-6.

Figure 3-6 Activity diagram of the GSM/GPRS module

3.1.4 Design of the accelerometer module


Waspmote is equipped with an accelerometer LIS3331LDH provided by
STMicroelectronics company to get the acceleration values on each one of the three
axes, X axis, Y axis and Z axis. Besides, the accelerometer is also able to test 4
kinds of events: free fall, inertial wake up, 6D movement and 6D positions.
Table 3-2 Output data rates and corresponding power modes of accelerometer
Power mode

Output data rate (Hz)

Power down

--

Normal mode

1000

Lower-mode 1

0.5

Lower-mode 2

Lower-mode 3

Lower-mode 4

Lower-mode 5

10

38

The acceleration sensor has 3 scales including 2G, 4G, and 8G and can
measure accelerations with output radio rates from 0.5 Hz to 1 KHz. The
accelerometer has 7 power modes. The relationship between output data rates and
the power modes is shown in Table 3-2.
The micro controller has communication with the accelerometer sensor by the
2

I C interface, in which INT pin is used to generate the interruptions while SCL pin
and SDA pin are used for task. The four types of events mentioned before (free fall,
inertial wake up, 6D movement and 6D positions) are able to generate interrupts.
Related API libraries are WaspACC.cpp and WaspACC.h. Besides, the times and
thresholds of those four events are also set in WaspACC.h file by default.
An object called ACC from class WaspACC is created inside the Waspmote
ACC library and is public to all libraries. No variables are initialized by default
when creating the constructor. The class diagram of the class WaspACC is shown in
Figure 3-7.

Figure 3-7 Class diagram of the class WaspACC

The accelerator module testing program incudes two parts: the set up part and
the loop part. In the set up part, USB module is turned on for monitoring accelerator
parameters on serial monitors. Accelerator module is also initialized and turned on.
In loop part, there are two sub functions. One is for getting accelerations on the
X, Y and Z axsis, this sub function needs the Waspmote be placed in different
directions, the other sub function is for testing free fall interruption. In testing free
fall interruption, the accelerometer is initialized with a ful-scale value choosen from
39

2G, 4G and 6G. After the free fall interrup is setted, Waspmote changes intor sleep
mode that the main program is paused and the micro controller passes to a latent
state, from which it can be woken by accelerator interruption. After checking the
free fall status, the Waspmote wakes up and clear the interruption flags, turn on the
USB module because it is turned off in sleep mode. The activity diagram of the
accelerator module is shown in Figure 3-8.
In real testing, the Waspmote equipped with accelerator module should be
tested by hand for simulating the free fall situation. The free fall function checks the
accelerometer on the X, Y and Z axes. If the accelerometer on one axis is lower than
a specific level, the free fall interruption will get by Waspmote interruptions module.
This level of checking free fall interruption can be set in program as well as the
accelerometers full-scale value. Each time before the accelerometer is used, the
check register should be checked for proper functionality of the accelerometer.

Figure 3-8 Activity diagram of the acclerator module

40

3.1.5 Design of the 802.15.4/ZigBee module


Digi XBee modules that communicate with microcontroller using the UART_0
and UART_1 at 115200 bps are integrated with Waspmote for communications in
the ISMB (Industrial Scientific Medical Band) bands. Libelium provides 7 possible
XBee modules for Waspmote, such as XBee-802.15.4, XBee-802.15.4-Pro,
XBee-ZB, XBee-ZB-Pro, XBee-868, XBee-900. Only XBee-ZB-Pro and XBee-868
are used in this project. The parameters of XBee ZigBee PRO and XBee ZigBee are
shown in Table 3-3 [37].
Table 3-3 Parameters of XBee ZigBee Pro module and XBee ZigBee module
Model

Protocol

Frequency

Power

Range

Number of channel

XBee-ZB-Pro

ZigBee-Pro

2.40 2.48 GHz

50mW

7km

13

XBee-ZB

ZigBee-Pro

2.40 2.48 MHz

2mW

500m

16

As ZigBee is supported in the IEEE 802.15.4 link layer, the frequency used in
XBee ZigBee is the free band of 2.4 GHz, using 16 channels with a bandwidth of 5
MHz per channel while the number of channels of XBee ZigBee PRO is limited to
13. The channels and frequencies of XBee ZigBee Pro module and XBee ZigBee
module are shown in Table 3-4.
Table 3-4 Channels and frequencies of XBee ZigBee module
Channel Number

Frequency

Supported by

0x0B Channel 11

2.400 2.405 GHz

XBee-ZigBee-PRO/XBee-ZigBee

0x0C Channel 12

2.405 2.410 GHz

XBee-ZigBee-PRO/XBee-ZigBee

0x0D Channel 13

2.410 2.415 GHz

XBee-ZigBee-PRO/XBee-ZigBee

0x0E Channel 14

2.415 2.420 GHz

XBee-ZigBee-PRO/XBee-ZigBee

0x0F Channel 15

2.420 2.425 GHz

XBee-ZigBee-PRO/XBee-ZigBee

0x10 Channel 16

2.425 2.430 GHz

XBee-ZigBee-PRO/XBee-ZigBee

0x11 Channel 17

2.430 2.435 GHz

XBee-ZigBee-PRO/XBee-ZigBee

0x12 Channel 18

2.435 2.440 GHz

XBee-ZigBee-PRO/XBee-ZigBee

0x13 Channel 19

2.440 2.445 GHz

XBee-ZigBee-PRO/XBee-ZigBee

0x14 Channel 20

2.445 2.450 GHz

XBee-ZigBee-PRO/XBee-ZigBee

0x15 Channel 21

2.450 2.455 GHz

XBee-ZigBee-PRO/XBee-ZigBee

41

Continued Table 3-4 Channels and frequencies of XBee ZigBee module


Channel Number

Frequency

Supported by

0x16 Channel 22

2.455 2.460 GHz

XBee-ZigBee-PRO/XBee-ZigBee

0x17 Channel 23

2.460 2.465 GHz

XBee-ZigBee-PRO/XBee-ZigBee

0x19 Channel 25

2.470 2.475 GHz

XBee-ZigBee

0x1a Channel 26

2.475 2.480 GHz

XBee-ZigBee

Complying with the ZigBee-PRO v2007 standard, the XBee-ZigBee modules


add several functions to those contributed by ZigBee such as node discovery and
duplicated packet detection. Some heading are added so that other nodes within the
same network can be discovered. Besides, it allows a node discovery message to be
sent. Then, that the rest of the network nodes respond indicating their specific
information such as node identifier, MAC, RSSI (Received Signal Strength
Indication), etc.
XBee ZigBee module and XBee ZigBee Pro module use two kinds of network
topologies, one is star topology and the other is tree topology. In star topology,
there is one coordinator that might be a Waspmote Gateway or a Meshlium while
there are many end devices that are Waspmote equipped with corresponding
sensors. In tree topology, there is one coordinator that might be the Waspmote
Gateway or the Meshlium while there are multiple routers that are Waspmotes
connected to the coordinator. Also there are many end devices that are Waspmotes
that are connected to the routers. The star topology is shown in Figure 3-9 while the
tree topology is shown in Figure 3-10.

Figure 3-9 Network architecture of Waspmote XBee ZigBee Pro module - Star topology

42

Related

API

libraries

are

WaspXBeeCore.h,

WaspXBeeCore.cpp,

WaspXBeeZB.h and WaspXBeeZB.cpp. An object called xbeeZB from class


WaspXBeeZB is created inside Waspmote XBee library and is public to all
libraries. Some variables are defined with a value by default when creating the
constructor.

Figure 3-10 Network architecture of Waspmote XBee module - Tree topology

In Waspmote XBee ZigBee Pro module, the WaspXBeeZB class inherits from
the class WaspXBeeCore. Class WaspXbeeCore is one of the most important
classes in XBee communication modules, it extends various classes like class
WaspXBee802, class WaspXBee868, class WaspXBee900, class WaspXBeeDM
and class WaspXBeeZB. Most basic functions of class WaspXBeeZB are inherited
from the class WaspXBeeCore, including functions related to setting network
parameters

like

setPAN

and

getPAN,

setChannel

and

getChannel,

setEncryptionMode, setLinkKey and etc., functions related to sending and receiving


packets like setDestionParams, sendXBee, treadData and etc. Class WaspXBeeZB
also has its unique functions including initialization functions like WaspXBeeZB
and

functions

related

getOperating16PAN,

to

setting

its

getOperating64PAN

WaspXBeeZB is shown in Figure 3-11.

43

unique
and

etc.

network
The

parameters
class

diagram

like
of

Figure 3-11 Class diagram of WaspXBeeZB

Waspmote XBee ZigBee Pro module is one of the most important


communication modules of Waspmote. In this project, it is used in three
communications:

communication

between

Waspmote

and

Waspmote,

communication between Waspmote and Waspmote Gateway, communication


between Waspmote and Meshlium. The communication between Waspmote and
Waspmote is used to test the sending and receiving packets functions of wireless
sensor nodes. In this communication node A as sender send packets to node B as
receiver. After sending packets, node A will wait for a specific time for receiving an
acknowledgment message from node B, while node B will send an acknowledgment
packet to node A after receiving packets. The communication between Waspmote
and Waspmote Gateway is used to test the confliction of two multiple end devices.
In this communication mode, node A and node B will send packets to a Waspmote
Gateway. The result of received packets on the Waspmote Gateway will show
whether there is a conflictin or not. The communication between Waspmote and
Waspmote Gateway can be seen as a simulation of the communication between
Waspmote and Meshlium. The communication between Waspmote and Meshlium is
used as final wireless sensor network for monitoring of the environmental
parameters for crops development. In this configuration, multiple Waspmote
equipped with corresponding sensors will send packets with specific data to a
44

Meshlium. The Meshlium will receive these packets, extract and store their data in
local files, local database or external database on Internet.
In communication between Waspmote and Waspmote, Waspmote node A and
Waspmote node B both have to realize sending packets function and receiving
packets function. The progarm of node A has two parts: the set up part and the loop
part. In set up part, the USB module is initialized for transmitting running
parameters on IDEs serial monitor. The real time clock module is turned on for
counting waiting time in receiving packets function, the XBee ZigBee Pro module
is initialized including setting PANID that identifies the network, setting channel
for communication, setting node verification for finding the coordinator in network,
setting encryption mode and link key for security [38] and etc. At last, the parameters
of the network including 16-b PANID, 64-b PANID and channel are printed out in
serial monitor. Then node A tries to join the network and find the cordinator.
Considering

saving

energy,

the

joining

network

has

time

limit

MAX_JOIN_NET_TIME, if in MAX_JOIN_NET_TIME times, the coordinator is


still not found, Waspmote will stop to join the network. If node A succeeds in
finding the coordiantor and joining network, it goes into loop part. Otherwise the
program ends. The activity diagram of sender node is shown in Figure 3-12.

Figure 3-12 Activity diagram of sender node

45

In loop part, the program gets right now time in format hour/minute/second
with the help of real time clock module, fulfills the header of the sending packet
with the right now time as well as other necessary information like MAC address of
destination and sends the packet. Considering saving energy aspect, the sending
time has a limit MAX_SEND_TIME. If in MAX_SEND_TIME times, the packet is
not sent successfully, this packet will be discarded. On one hand, this action does
the best to send packets to destination. On the other hand, this action avoids
waisting energy when the network falls down. After sending a packet, the LEDs
blink as a signal for the technicians, the memory of the packet is freed for saving
memory, otherwise the memory will still be occupied. If the packet is sent
successfully, the program goes into receiving packets function. In receiving
function, the program waits a specific programmed time to receive the
acknowledgment packets sent by node B. In the waiting loop, this receiving packets
function stays in a loop to check the XBee ZigBee Pro module and receive packets.
When packet is received, the parameters of the received packet including source
MAC address, packet data, RSSI signal and etc. will be printed out on the serial
monitor. At last, this received packet will be freed for saving memory. The
Waspmote XBee ZigBee Pro module provides a queue for the receiving packets and
according to the first-come-first-serve rule, the packets are dealed with in order.
Besides, the length of this queue can be fixed in the program.
The program of node B is similar to the program of node A, including two
parts, the set up part and the loop part, the only difference is on the order of sending
and receiving functions in the loop part. In set up part, the USB module is turned on
for checking the running status of Waspmote and real time clock module is turned
on for setting time and alarm clock. The initialization of XBee ZigBee Pro module
includes setting PANID for recongnizing network, encryption mode and link key for
security, channel for wireless communication and etc. The initialization parameters
need to be saved in Waspmote so that XBee ZigBee Pro module will use the saved
parameters to join network and find the coordinator in next time without another
initializaiton. The check of coordinator and network is also necessary. If it joins a
network successfully, it will go to the loop part. In this communication, node A
works as end deivice whitle node B works as a coordinator. The activity diagram of
receiver node is shown in Figure 3-13.

46

Figure 3-13 Activity diagram of receiver node

In loop part, node B waits a specific programmed time to wait for the packets
sent by node A in the same network. When received packets, the source MAC
address, packet data, RSSI signal and etc. will be shown on the serial monitor and
the memory of the packet will be freed for next coming packets. If node B receives
packet successfully, node B will send back an assurance packet that only includes a
sentence as a ACK message back to node A. The packet is also needed to be
fulfilled with other necessary information like destination parameters including
MAC address of node A. Similar to node A, the trying times of sending function
also has a limit called MAX_SEND_TIME. If in MAX_SEND_TIME times, the
packet is not sent successfully, this packet will be abandoned for saving energy. On
one hand, this action does the best to send packets to node A, on the other hand, this
action avoids waisting energy when the network falls down. After sending packet,
the LEDs blinks as a signal for the techinicians, the memory of the packet will be
freed for saving memory, otherwise the memory will all be occupied.

47

The communication between Waspmote and Waspmote Gateway needs 2


Waspmote and 1 Wapmote Gateway. The 2 Waspmotes have the almost same
program except for the part of collecting/sending data. Waspmote node A sends the
temperature data collected by the MCP9700A sensor, humidity data collected by the
808H5V5 sensor and battery level data from Waspmotes power module while
Waspmote B sends the temperature data gotten by real time clcok modules
thermometer and battery level data provided by Waspmotes power component. The
packet sent by node A is marked with identification word Node_A_[T,H] while
the packet sent by node B is marked with identification word Node_B_[TR].
These identification words will help the Waspmote Gateway to recognize the source
of the received packets.

Figure 3-14 Activity diagram of the Waspmote XBee ZigBee Pro module

48

In set up part, the USB module is turned on for monitoring the content of the
sending packets. The real time clock module is turned on for setting time and alarm
clock, the XBee ZigBee Pro module is turned on for wireless communication. The
initialization of XBee ZigBee Pro moudle includs setting PANID that identifies the
network, setting encryption mode and link key for secruity, setting channel for
communication. The link key has 16 bytes. The encryption mode is AES encryption.
After saving the hardware and network parameters of XBee ZigBee Pro module for
the use in the loop part, the parameters of the network including operating 16-b
PANID, operating 64-b PANID, channel and etc. are printed to the serial monitor on
the IDEs serial monitor. Then the data that will be used in the packet is initialized
with the specific format. The activity diagram of Waspmote node is shown in Figure
3-14.
In loop part, the use of Waspmote agricultural sensor board depends on the
Waspmote board version. Because the Waspmote v1.2 intergrates some sensor pins
on its board, so the agricultural sensor board is only used on Waspmote v1.1.
Considering Waspmote v1.2, node A is equipped with MCP9700A sensor for
collecting temperature data and 808H5V5 sensor for collecting humidity data while
node B has no sensors. After collecting data, there is a sub function to check
whether the collected quantity is enough for fulfilling a packet. If enough data is
collected, the XBee ZigBee Pro module is turned on and saved parameters are
restored. Then the node tries to join the network. This joining network step will be
executed at most MAX_JOIN_NET_TIME times and the sending packets step will
be tried at most MAX_SEND_TIME times. In this project, these two values are
settled as 10 by default. On one hand, this action does the best to send packets to the
Waspmote Gateway. On the other hand, the times limit avoids of waisting energy
when then network falls down. In sending packet function, the destination MAC
address parameter is set as the Waspmote Gateways MAC one. After sending a
packets successfully, the Waspmote changes into sleep mode for saving energy. All
modules except the real time clock module are powered off. A real time clock
interruption RTC_INT will be caught when the specific programmed sleep time is
over. When Waspmote wakes up, the USB module and real time clock module are
turned on because these modules are turned off under sleep mode. This is one loop,
the loop part will repeat these tasks again and again.

49

The communication between Waspmotes and a Meshlium has the same


architecture as the communication between Waspmotes and a Waspmote Gateway.
Considering the developed program, the only difference is the sending packets
function. The destination parameters like MAC address depend on the remote
terminal like Waspmote Gateway or Meshlium. Considering used devices, in this
communication, three Waspmotes equipped with XBee ZigBee Pro modules, two
agricultural sensor boards, 1 MCP9700A temperature sensor, 1 808H5V5 humidity
sensors, 1 soil moisture sensor and 1 Meshlium are needed to build a wireless
sensor network.
In this wireless sensor network, Waspmote node A is equipped with an
agricultural sensor board as well as one MCP9700A temperature sensor and one
808H5V5 humidity sensor to collect the air temperature and humidity. Waspmote
node B is equipped with an agricultural sensor board as well as a soil moisture
sensor to collect the soil moisture. Waspmote node C just uses the embedded
thermometer to collect the temperature data. The collected data will be store in
Waspmote until it equals to the default value MAX_NUM_IN_PACK. Then
Waspmote nodes turn on the communication module with default hardware and
network parameters, join the network and find the coordinator, send the packet to
the Meshlium. When receive packets sent by Waspmote nodes, Meshlium store the
data in local files, local database or external database. Before the Meshlium starts,
in the Manager System, we have to configure the location of the local file, local
database or external database to store the received data. When the three Waspmotes
are turned on, the Meshlium starts to scan the network and receive data, according
to the settled parameters of storing place. The data will be then stored in the
Meshlium. When the three Waspmotes are turned off and Meshlum stops the
scanning of network, the local files can be downloaded or the local database can be
exported from the Meshlium. The data can even be stored in an external database on
Internet with a specific address and account. The functions and frequencies of the
three Waspmote nodes are shown in Table 3-5.

50

Table 3-5 Functions and frequencies of different nodes


Nodes

Function

Content

Node A

Collecting every 10 minutes, temperature

Waspmote with XBee pro module,

data with the MCP9700A sensor, humidity

agricultural sensor board,

data with the 808H5V5 sensor and battery

MCP9700A temperature and

level data from the power module of

808H5V5 humidity sensors.

Waspmote.
Node B

Node C

Collecting every hour, soil moisture data

Waspmote with XBee pro module,

using a specific sensor and battery level

agricultural sensor board and soil

data from the power module of Waspmote.

moisture sensor.

Collecting every 30 minutes, temperature

Waspmote with XBee pro module.

using embedded thermometer of Waspmote


and battery level data from Waspmote RTC
component.

3.1.6 Design of the XBee 868 networking module


The frequency used in XBee 868 module is the 869 MHz frequency, using 1
single channel with 0.25 MHz bandwidth. The hardware details of Waspmote XBee
868 module is shown in Table 3-6.
Table 3-6 Hardware parameters of XBee-868 module
Model

Frequency

Transmission

Range

Power
XBee 868

869.4869.65

Number

of

channel

315 mW

12 km

MHz

The topology used in the communication based on XBee 868 module is a star
topology. The network architecture of XBee 868 module is shown in Figure 3-15,
nodes in this type of network are able to establish point to point connections with
other

brother

nodes

through

MAC

address.

Related

API

libraries

are

WaspXBeeCore.h, WaspXBeeCore.cpp, WaspXBee868.h and WaspXBee868.cpp.

51

Figure 3-15 Network architecture of Waspmote XBee 868 module - Star topology

In Waspmote XBee 868 module, the WaspXBee868 class also inherits from
the class WaspXBeeCore as the WaspXBeeZB class. Most basic functions are
inherited from the class WaspXBeeCore, including functions related to setting
network parameters like setPAN and getPAN, setChannel and getChannel,
setEncryptionMode, setLinkKey and etc., functions related to sending and
receiving packets like setDestinationParams, sendXBee, treatData and etc. Class
WaspXBee868 also has its unique functions including initialization function like
WaspXBee868, functions related to setting its unique network like getDeviceType,
setMultipleBroadcast and etc. The class diagram of the class WaspXBee868 is
shown in Figure 3-16.
Compared to the XBee ZigBee Pro module, as a new hardware provided in
Waspmote v1.2 development tool kit that has higher sensitivity and more powerful
transmission radio power, the XBee 868 module has a longer radio range as far as
12000m while the range of XBee ZigBee Pro is 7000m. The test program of XBee
868 also includes two parts: the set up part and the loop part.
In the set up part, the USB module is turned on for checking the sending and
receiving status of the packets and real time clock module is also turned on for
setting time and alarm clock. The initialization of XBee 868 moudle includs setting
PANID that identifies the network, setting channel for wireelss communication,
setting encryption mode and link key for security. The link key has 16 bytes using
AES encryption. After saving the parameters of the XBee 868 module for the use in
the loop part, the parameters of the network including node identifier and etc. are
52

printed out on the IDEs serial monitor. Then the data that will be used in the packet
is initialized with the specific format. Afterwards, the program goes into loop part.
The set up part of the XBee 868 module is simpler than the set up part of the XBee
ZigBee Pro module.

Figure 3-16 Class diagram of the class WaspXBee868

In loop part, the temperature sensor MCP9700A and humidity sensor


808H5V5 are plugged directly on a Waspmote v1.2 without agricluture sensor
board. The loop part includes three parts: collecting data, sending data, sleeping/
waking parts. Similar to the XBee ZigBee Pro module, in collecting data part, the
termperature and humidity are collected from corresponding sensors. When the
number of collected data is equal to the settled value, in this project, the
MAX_NUM_IN_PACK is settled 3 by default, the XBee 868 module is turned on
and tries to join network and sends the packet to the router like Waspmote Gateway
or Meshlium. The number of joining network has a maximum value
MAX_JOIN_NET_TIME while the number of sending packets also has a maximum
value MAX_SEND_TIME for saving energy. Both values are settled as 3 by default
in this module. Compare to XBee ZigBee Pro module, because of higher
transmission power and higher sensitivity, the trying times of joining network in
53

XBee 868 module is lower than the XBee ZigBee Pro module. When the sending
packets step succeeds, the Waspmote changes into sleep mode and waits for the
alarm clcok interruption RTC_INT. When the sleep time is over and RTC_INT
interruption is detected, Waspmote wakes up part. The it turns on USB module and
real time clock module and goes into next loop. The loop part keeps on collecting
data, storing data, check number of data, sending packet, sleeping and waking up.
Since XBee 868 module is more powerful, the joining network time and sending
packets are significantly less than the joining network time of the XBee Zig Bee Pro
module. The activity diagram of the Waspmote XBee 868 module is shown in
Figure 3-17.

Figure 3-17 Activity diagram of the Waspmote XBee 868 module

54

3.2 Design of the Waspmote Gateway


As a data bridge and access point between the wireless sensor network and a
receiving equipment, a Waspmote Gateway is used for receiving IEEE
802.15.4/ZigBee frames. A Waspmote Gateway is used to collect data which flows
through the wireless sensor network into a PC or a device with a standard USB port.
In this project, the receiving equipment is a PC with Windows compatible with
standard USB connectivity. Once the Waspmote Gateway is correctly installed, a
new communication serial port connecting directly to the XBee modules UART
appears in the receiving equipment. It allows the XBee to communicate directly
with the device and being able to receive data packets from the wireless sensor
network as well as modify and consult the XBee modules configuration
parameters. Another important function worth pointing out is the possibility of
updating or changing the XBee modules firmware.
A Waspmote Gateway cannot be programmed, but can be set by X-CTU.
X-CTU is a data monitoring software developed by Digi to test and configure the
radio modems in the actual environment with a computer and the items included
with the radio modems. X-CTU operates strictly for Windows Platforms. The
features of X-CTU are as follows:
1) Automatically detect module type.
2) Integrated terminal window.
3) Display of Receive Signal Strength Indication (RSSI).
4) Display both ASCII and hexadecimal characters in terminal window.
5) Compose test packets in either ASCII or hexadecimal for transmitting in
terminal interface.
6) Save and retrieve commonly used module configurations (profiles).
7) Restore factory default parameters.
8) Display help about each of the radio parameters.
9) Program radio profiles in a production environment using command line
interface.
There are two communication modules in this project: XBee 868 module and
XBee ZigBee Pro module. The parameters of these two modules are not the same.
The firmware parameters of the XBee 868 module and the XBee ZigBee Pro
module are shown in Table 3-7.
55

Table 3-7 Firmware parameters of XBee 868 and XBee ZigBee Pro module
Module

Modem

Function Set

Version

XBee 868

XBP8-DP

XBee-PRO 868 single channel

1061

XBee ZigBee Pro

XBP24-ZB

ZigBee coordinator API

21A0

In X-CTU

[39]

, the parameters of XBee 868 module have been divided into 8

parts, including networking, addressing, security, serial interfacing, I/O settings, AT


commands options, diagnostic commands and sleep commands. In this project, only
the first four parts have been used. In networking part, the modem VID is settled to
identify module itself. In addressing part, the node identifier and device type
identifier are settled to identify the module in the network. In security part, the
encryption enable is set to enable in this case AES encryption with a 16 characters
key. In serial interfacing part, the baud rate is settled to 115200 for the transmission
rate of a Waspmote. The API enable is settled to 2 for API with escapes. The
parameter details of the Waspmote Gateway equipped with the XBee 868 module is
shown in Figure 3-18.

Figure 3-18 Parameters of the Waspmote Gateway equipped with XBee 868 module

56

In X-CTU, the parameters of XBee ZigBee Pro module have been divided into
8 parts, including networking, addressing, RF interfacing, security, serial
interfacing, sleep modes, I/O settings and diagnostic commands. In this project,
only the networking, security and serial interfacing are used. In networking part, the
modem VID is settled to identify module itself. In addressing part, the PANID is
settled to an identification of the network. The Waspmote will join the Gateway that
has the same PANID. In security part, the encryption enable is settled to enable
ZigBee encryption with a 16 characters key. In serial interfacing part, the baud rate
is settled to 115200 for the transmission rate of a Waspmote. The API enable is
settled to 2 for API with escapes. The parameter details of the Waspmote Gateway
equipped with the XBee ZigBee Pro module is shown in Figure 3-19.

Figure 3-19 Parameters of Waspmote Gateway equipped with XBee ZigBee Pro module

57

3.3 Design of the Meshlium


As a Linux router which works as a classical network gateway for a Waspmote
wireless sensor network, a Meshlium can contain 5 different radio interfaces: WIFI
2.4GHz, WIFI 5GHz, 3G/GPRS, Bluetooth and ZigBee. Meshlium can work as:
1) a ZigBee to Ethernet router for Waspmote nodes
2) a ZigBee to 3G/GPRS router for Waspmote nodes
3) a WIFI Access Point
4) a WIFI Mesh node (dual band 2.4GHz-5GHz)
5) a WIFI to 3G/GPRS router
6) a GPS-3G/GPRS real-time tracker
All the networking options can be controlled from two different sources:
1) Manager System: a web interface which comes with the Meshlium. It is
used to control all the interfaces and system options in a secure, easy and quick
way.
2) SSH (Secure Shell) console: a network protocol for direct access to the
shell console.
Meshlium is also a complete Linux station which offers different services,
programming environments and storage systems. The more common services
activated are http / https and SSH.
All the information coming from all the interfaces including ZigBee,
Bluetooth, 3G/GPRS, WIFI and from the GPS module can be stored in the Local
Data Base as explained in the Storage Options section or even exported to an
external Data Base connected to the Internet. There are three folders where the
captured data is stored when the Store to a File or Data Base option is activated:
1) /mnt/user/zigbee_data
2) /mnt/user/bluetooth_data
3) /mnt/user/gps_data
The Local Data Base files are stored in: /mnt/user/mysql/MeshliumDB.
In this project, two application models are used. One is the Meshlium AP. The
other is the Meshlium ZigBee AP. In the Meshlium AP model, Clients can connect
to the Meshlium via WIFI with laptops and smart phones and get access to the
58

Internet. In order to give Internet access, the Meshlium uses the Ethernet connection
and gets an IP from a network using DHCP protocol. The model of Meshlium AP is
shown in Figure 3-20.

Figure 3-20 Model of Meshlium AP

Meshlium can take the sensor data which comes from a ZigBee Wireless
Sensor Network (WSN) made with Waspmote sensor devices and send it to the
Internet using the Ethernet interface. Users can also connect directly to the
Meshlium using the WIFI interface to control it and access to the sensor data. The
model of the Meshlium ZigBee AP is shown in Figure 3-21.

Figure 3-21 Model of the Meshlium ZigBee AP

59

3.4 Key techniques


There are three key techniques used in this project: the real time clock module,
the XBee ZigBee Pro module and the XBee 868 module.
1) The real time clock module is in charge of setting time and alarm clocks.
Since energy saving is one of the most important factors in design of wireless
sensor network, this project uses the real time clock module to change the mode of
Waspmote for saving energy. Most of the time a Waspmote is in sleep mode or in
hibernate mode to save energy. When the programmed sleep time is over, the
Waspmote catches real time interruption RTC_INT and wakes up from sleep mode.
Then it turns on corresponding modules and sensors and finishes corresponding
tasks. The real time clock module controls Waspmote to change its status between
sleep mode and wake up mode by setting the embedded alarm clock.
2) As one of the communication modules based on ZigBee protocol, the XBee
ZigBee Pro module is used for making communication between Waspmote and
Waspmote, communication between Waspmote and Waspmote Gateway or
communication between Waspmote and Meshlium. In set up part of communication
program, XBee ZigBee Pro module needs to initialize network and hardware
parameters for the use in loop part, the parameters include PANID that identifies the
network, channel for wireless communication, encryption mode and link key for
encryption of packet and etc. After initialization, Waspmote collects the
environmental parameters with the help of corresponding sensors. If the collected
data is enough for fulfilling the packet, Waspmote tries to join in network and find
coordinator. If it joins network successfully, Waspmote tries to send packets and
check whether the sent packet is correctly received or not. The action of joining in
network has a maximum limit MAX_JOIN_NET_TIME

while the action of

sending packets has a maximum limit MAX_SEND_TIME. In this project, both


values are settled as 10 by default. By setting time limits in joining network and
sending packets, on one hand Waspmote can do the best to send the packets, on the
other hand Waspmote avoids of wasting all energy when the network falls down.
3) Waspmote XBee 868 module is a new communication module provided by
Libelium in Waspmote v1.2 development tool kit. As a new communication
module, XBee 868 module has more powerful transmission power and a longer
radio range. The program of XBee 868 module is similar to the program of
Waspmote XBee ZigBee Pro module. It should focus on the energy saving part,
60

joining network part, sending packets part and etc. The time of XBee 868 module
for finding coordinator and joining network is shorter than the time of XBee ZigBee
Pro module because of the transmission power.

3.5 Brief summary


This chapter focuses on the system design of this project. It is divided into
several parts in consideration of different hardware modules that include real time
clock module, SD memory card module, GSM/GPRS module, accelerator module,
XBee ZigBee Pro module, XBee 868 module and etc. In each part, the module is
introduced with explanations on hardware parameters and on class architecture with
specific functions and variables. Besides, the corresponding programs, class
diagrams and activity diagrams are also provided for a better understanding of the
global program.
The three most important modules, the real time clock module, XBee ZigBee
Pro module and the XBee 868 module, are analyzed completely. The real time clock
module focuses on the alarm clock to change into normal mode from sleep mode or
hibernate mode after a specific sleep is over. The XBee ZigBee Pro module focuses
on the ZigBee communication between Waspmotes and a Meshlium as well as the
XBee 868 module. In the developed program, the initialization of these
corresponding modules and functions such as joining a network, finding, sending a
packet, checking packet status, sleeping and waking up are all introduced. Besides,
the Waspmote Gateway and the Meshlium are also introduced in terms of hardware
and operations.

61

Chapter 4 System Implementation and Testing


This chapter will focus on the implementation and testing of the project,
including the environment of the system implementation, the flow charts of
different modules, the system testing of different modules and etc.

4.1 The environment of system implementation


The project is developed on a PC with Windows 7 operating system. The
environmental development parameters of the system implementation are shown in
Table 4-1.
Table 4-1 Environment development parameters of the system implementation
Environment

Content

Operating system

Windows 7 Professional

System memory

4 GB

Other hardware

1)1 Waspmote v1.1 development tool kit including 6 Waspmote v1.1,


1 Waspmote Gateway, 6 antennas, 6 batteries, 6 XBee ZigBee Pro
modules, 1 USB cable.
2)1 Waspmote v1.2 development tool kit including 3 Waspmote v1.2,
1 GSM/GPRS module, 1 Waspmote Gateway, 3 XBee 868 modules, 1
XBee ZigBee Pro module, 6 antennas, 5 batteries, 5 SD card, 2
expansion boards, 1 GSM/GPRS module antenna.
3)1 Waspmote agricultural sensor board.
4)2 MCP9700A sensors.
5)2 808H5V5 sensors.
6)2 soil moisture sensors.
7)1 Meshlium tool kit, including 1 Meshlium, 2 antennas, 1 power
cable, 1 USB cable.

Software

1)Waspmote Pro IDE version 03 with Waspmote Pro API version 003
X-CTU provided by Digi
2)Firefox web browser
3)Putty

62

4.2 Key program flow charts


Turn on USB module and RTC
module. Turn on and initialize
XBee ZigBee Pro promodule.

Collect environmental data with


corresponding sensors, including
temperature, humidity and soil moisture.

Store the collected data in


Waspmotes SD card memory

No

Check if collected data is


enough?

YES
Create a packet and fill the packet with the
collected data such as temperature,
humidity, soil moisture, battery level. Use
the XBee module to send the packet

Turn off USB module, XBee pro module.


Set the alarm clock. Enter into sleep
mode.

Get real time clock interruption and wake up,


turn on USB module, real time clock module
and XBee ZigBee Pro module

Figure 4-1 Process diagram of the XBee ZigBee Pro module

XBee ZigBee Pro module is the core part of the project. The process diagram
of XBee ZigBee Pro module is shown in Figure 4-1. As shown in this figure, the
first step is the set up part. The rest is the loop part. In the set up part, the USB
module is turned on for monitoring the running parameters on IDESs serial
monitor, the real time clock module is turned on for setting time and alarm clock,
63

the XBee ZigBee Pro module is turned on and initialized for wireless
communication. The initialized parameter of XBee ZigBee Pro module includes
setting PANID, channel, encryption mode, link key and etc. After initialization of
all modules, the program goes into loop part.
In the loop part, environmental data including temperature and humidity and
soil moisture are collected by corresponding sensors like temperature sensor
MCP9700A and humidity sensor 808H5V5 and soil moisture sensors, battery level
data is collected by power module. Then the collected data are store in SD memory
card. After checking whether the stored data is enough to fulfill a packet with a
level of MAX_NUM_IN_PACK, the process goes into two different ways. If the
data is not enough, all the modules are powered off and the Waspmote changes into
sleep mode to save energy waiting for the next loop. If the data is enough, a new
packet is created. The Waspmote uses the stored data to fulfill the created packet
and adds other necessary information including MAC address of the Meshlium and
etc. Afterwards, the initialized XBee ZigBee Pro module is turned on and the
Waspmote tries to join a network and find a coordinator. The joining network step
will be executed at most MAX_JOIN_NET_TIME times and the sending packets
step will be executed at most MAX_SEND_TIME times. On one hand, this action
does the best to send packets to Waspmote Gateway or Meshlium. On the other
hand, the time limit avoids the waste of energy when the network falls down. After
sending the fulfilled packet to the Meshlium, the program goes into sleep mode and
all the modules are powered off. When the settled sleep time is over, the real time
clock interruption RTC_INT is caught and the Waspmote wakes up from sleep
mode, goes back to work mode and turns on all the modules including the USB
module and the real time clock module and goes into next round.

4.3 Key Interfaces of the software system


In this project, all the programs are edited, compiled and uploaded using the
IDE (Integrated Development Environment) provided by Libelium. The Waspmote
Pro API version is the 003. The Waspmote Pro IDE version is the 03

[40]

. The

Waspmote IDE is based on Arduino IDE which is an open project. Besides the
compiling and uploading functions, the serial monitor is an important part of the
Waspmote IDE. The serial monitor is used for monitoring the running parameters of
the Waspmote. Through the USB module, the Waspmote can show the running data
64

on serial monitor for developers to check the status of the program. In addition, the
Waspmote IDE also provides some examples for each different modules. The
Waspmote IDE is shown in Figure 4-2.

Figure 4-2 The Waspmote IDE

Meshlium Manager System is a graphical user interface provided by Libelium


for developers to manage the Meshlium. It is user friendly and easy for operation.
The basic functions of Manager System include captureing the packets sent by
wireless sensor network based on ZigBee protocol, getting specific format data
from the captured packet, storing the specific data in local files or in local database,
even on an external database on Internet, connectting with Waspmote nodes using
ZigBee protocol, connecting with PC using Wifi protocol. The local files used to
store the data could be downloaded, deleted. The data of the local file and local
database can also be shown for monitoring the status of the wireless sensor network
in real time. The Meshlium Manager System is shown in Figure 4-3.

65

Figure 4-3 The Meshlium Manager System

Beyond the Meshlium Manager System, Meshlium can also be managed using
SSH (Secure Shell) protocol/software. In this project, Putty software is used to
access to the Meshlium configuration. After setting some network parameters
including IP address and port of the Meshlium, login user and password, the file
system of Meshlium can be shown in Putty. The file architecture of Meshlium is
similar to a Linux operating system. Through command /etc/init.d/ZigbeeScanD.sh
stop, we can get the data sent by the Waspmote wireless sensor network. Through
the command capturer S0 38400, the Meshlium will capture the data on its S0
port with a data rate of 38400 bits/second. The data sent by Waspmote nodes and
received by the Meshlium can be shown and updated in Putty in real time. The SSH
software Putty used for showing the data of the Meshlium is shown in Figure 4-4.

Figure 4-4 SSH software Putty used for showing the data of the Meshlium

66

4.4 System Testing


The system test of this project includes tests of the different hardware
including Waspmote, Waspmote Gateway and Meshlium. The system test of
Waspmote includes tests of the different modules such as the RTC (real time clock)
module, utility module, SD card module, accelerator module, power module, XBee
ZigBee Pro module, XBee 868 module and etc. The core part of the system test is
the test of XBee ZigBee Pro module. All other modules are used more or less when
the XBee ZigBee Pro module is used for developing the wireless sensor network.
The USB module is used for monitoring running parameters of XBee ZigBee Pro
module and showing the running data on IDEs serial monitor. The utility module is
used for testing LEDs which will be used as signals in XBee ZigBee Pro module
and testing basic sensors including temperature sensor MCP9700A and humidity
sensor 808H5V5 that will be used to collect environmental parameters in XBee
ZigBee Pro module. The SD card module is used to store the collected data in the
extension 2G SD memory card. The accelerator module is used for checking free
fall situation to avoid the Waspmote from falling off from high places and losing
data. All these modules are tested separately while in the XBee ZigBee Pro module
that needs other modules they are integrated to finish the same task different
Waspmote nodes collect corresponding environmental parameters, store the
collected data in memory and SD card, wait for the right time, turn on the
communication module, join the wireless network, send packets to Meshlium,
change into sleep mode, wake up and go into next loop. While Meshlium receives
the packets sent by Waspmote nodes, store the data of the packets in local file, local
database or external database on Internet.

4.4.1 Test of the real time clock module


For the RTC (real time clock) module, we focus on three elements: the
embedded thermometer to get temperature, the clock to set and get time and the
alarm clock to set and get alarm clock. The alarm clock is the most important part in
this module. Through alarm clock, a Waspmote is able to change into sleep mode
and wakes up from sleep mode to work mode at a specific programmed time.
The program uses all the three functions. In the set up part, it turns on the USB
module for showing running parameters of real time clock module on IDEs serial
monitor. Besides, it turns on the real time clock module and sets and reads the time.
67

In the loop part, firstly, it gets the temperature using the embedded
thermometer, then, it shows the current time and sets alarm clock with offset time
mode, in this test, the settled sleep time of Waspmote is 20 seconds. When the
programmed sleep time is over, Waspmote detects the RTC_INT interruption,
wakes up and shows the wake up time. Then the program goes into the next loop.
The serial monitor of the real time clock module is shown in Figure 4-5.

Figure 4-5 Serial monitor of the real time clock module

4.4.2 Test of the utility module


As the one of the basic modules, the utility module is used in all other
programs. It focuses on several parts including USB part, LED part, type converting
functions part, EEPROM function part, basic sensors part and etc. The USB part,
LED part and the basic sensors part are the most important parts for the later
communication module including XBee ZigBee Pro module. The USB part is used
to show running data on IDEs serial monitor for checking the status of the running
program. All types including int, float, char, char point are all tested in the USB
part. The LED part is used as a signal to show whether the specific actions are
finished or not, in XBee ZigBee Pro module it is used to check the status of joining
network and sending packets. The EEPROM is used as a temporal memory to save
data. The basic sensors part is used to get temperature from temperature sensor
68

MCP9700A, get humidity from humidity sensor 808H5V5. These data will be used
in XBee ZigBee Pro module. In a Waspmote v1.1, these sensors need the Waspmote
Agricultural Sensor Board to be used on the Waspmote while in a Waspmote v1.2,
these sensors can be plugged directly on Waspmote board because of the hardware
changes. The serial monitor result of the utility module is shown in Figure 4-6 and
Figure 4-7.

Figure 4-6 Serial monitor of the utility module

Figure 4-7 Serial monitor of the utility module

69

4.4.3 Test of the SD card module


Although Waspmote has 8KB SRAM and 4KB EEPROM, it is not enough for
storing data. Thus, SD card module is used for storing the collected environmental
parameters including temperature data, humidity data, soil moisture data, battery
level data and etc. A 2GB SD memory card is large enough for storing all the
collected data. The SD card module includes two part, the file part and the folder
part. The file part is the most important part and including file create, read, write,
delete, append functions and etc. Besides, the architecture of SD card can also be
shown on the IDEs serial monitor.
In the set up part of the test program, firstly, some basic parameters of the SD
card module are listed, including the status, size and number of total files of SD
card. Secondly, functions related to folder including create new folder, delete
existing folder with files are shown. The different folders can be used to store
different types of data. For example, temperature folder and humidity folder can be
used to store the corresponding environmental data of different types. The file
functions including creating file, deleting file, writing file, reading file and etc. are
shown. In the loop part, the existed is appended a sentence in each loop, the
appended file is shown in the IDEs serial monitor. There are two functions to show
the file. One is reading a file line by line. The other is using a buffer to store the
read data from the file. Both functions has to check the size of the read data because
of the limit of the buffer size. The serial monitor of the SD card module is shown in
Figure 4-8 and 4-9.

Figure 4-8 Serial monitor of the SD card module


70

Figure 4-9 Serial monitor of the SD card module

4.4.4 Test of the accelerator module


The Waspmote has an embedded accelerometer. The accelerator module
focuses on two parts. One is the get accelerator part used to get the accelerator on
the three axes X axis, Y axis and Z axis. The other is the checking status part that
is used to check the free fall interruption. This function is created to check whether
Waspmote has fallen from high places to help technicians to fix unexpected
situations to avoid losing data.
The test program of the accelerator module includes two parts. In the set up
part, the accelerator is turned, besides, the USB module is turned on for transmitting
running parameters on IDEs serial monitor. In the loop part, firstyly, the check
register is used to check the proper functionality of the acceleromter. If the return
value of the check register is equal to the right value 0x32, the accelerometer goes
on and gets acceleration on X axis, Y axis and Z axis. Aftereard, the free fall
interruption is initialized with a specific full-scale value. This value is settled by
developers for different situations. In this project, 2G is enough. After setting the
free fall interruption, the Waspmote goes into sleep mode to save energy. When the
71

free fall is detected, the free fall interruption ACC_INT will be created by the
accelerator module. After detecting the interruption, Waspmote wakes up, turns on
USB modules and accelerator module and goes into another loop. The serial
monitor of the accelerator module is shown in Figure 4-10.

Figure 4-10 Serial monitor of the accelrator module

4.4.5 Test of the XBee ZigBee Pro module


As the core part of this project, the XBee ZigBee Pro module works as the
communication part of the system. It integrates all other modules such as USB
module, utility module, accelerator module, RTC (real time clock) module, power
module and etc. In this project, this module has been tested on three parts:
communication between Waspmote and Waspmote, communication between
Waspmotes and Waspmote Gateway, communication between Waspmotes and
Meshlium.
In communication between Waspmote and Waspmote, two Waspmotes are
used. One works as the sender, the other works as the receiver. Both Waspmote
nodes are equipped with XBee ZigBee Pro module. The data sent by the sender is

72

the time gotten from the real time clock module and the data sent by the receiver is
a sentence for assurance of the right receiving packets sent by sender.
In the set up part, the real time clock module is turned on for setting time and
alarm clock. USB module is turned on for showing parameters of the program on
the IDEs serial monitor. Besides, hardware and network parameters of the XBee
ZigBee Pro module are also initialized including setting PANID for identifying the
network, setting encryption mode and link key for security, setting channel
verification for finding a coordinator and etc. The basic parameters of the network
are also shown such as operating 16-b PAN ID, operating 64-b PAN ID, channel,
MAC address and etc. Afterwards, the sender tries to join a network and find the
coordinator. The joining network action will try at most MAX_JOIN_NET_TIME.
This value is defined by users according to different network environments. In this
project, it is settled to 10 by default. Besides, the sent data is also initialized. After
that these previous tasks are finished, the program goes into loop part. The initial
part of the sender is shown in Figure 4-11.

Figure 4-11 The initial part of the sender in communication among Waspmotes

The loop part includes three sub functions: the collecting data function,
sending packet function and the receiving packet function. The first step is the
73

collecting data part. In the sub function collecting data, the first parameter is the
sensor type. According to the sensor type, different values including time, battery
level, temperature data gotten by the embeded thermometer , temperature gotten by
the temperature sensor MCP9700A, humidity gotten by the humidity sensor
808H5V5 can be collected and stored as string data. After the coordinator has been
already found and the network been already joined in, in the sending part, the
packet is directly sent to the receiver. After sending a packet the sender will wait for
the acknowledgment message sent from the receiver to make sure that the packet is
well received. When the time is off or the ACK message is gotten, the test program
goest into the next loop. The sending data part of the sender is shown in Figure
4-12.

Figure 4-12 The sending part of the sender in communication among Waspmotes

Considering the receiver, the set up part of the receiver is as same as the sender
one. The set up part includes turning on USB module and real time clock module as
well as initializaton of XBee ZigBee Pro module. The difference is on the firmware
of the XBee module. The firmware of the receiver is the coordinator API while the
firmware of the sender is the router API. The firmware of receiver is settled by
X-CTU. Besides, the receiver will also join a network and find a coordinator in the
set up part. Because the receiver works as a coordinator in the network, the join
74

network step will try 0 times After sending packets, sender will show the
parameters of the packet including frame length, frame type, hex frame, string
frame and etc.
In the loop part, the receiver waits for a packet sent by the sender. After
receiving a packet, the receiver shows the parameters of this one including source
MAC address, packet data, node identifier, RSSI (Received Signal Strength
Indication) and etc. Then, the receiver will send a packet fulfilled with a
acknowledgment message to the source address and goes into another loop. The
loop part of the receiver that includes receiving data packets and sending
acknowledgment packets is shown in Figure 4-13.

Figure 4-13 The receiving part of the receiver in the communication among Waspmotes

In the communication between Waspmotes and a Waspmote Gateway, two


Waspmotes and a Waspmote Gateway are used. The Waspmote used in this test is
Waspmote version 1.2. So the sensors are plugged directly on the Waspmote board
without the need of an Agricultural Sensor board. In this communication, a
Waspmote node A will collect temperature data from a temperature sensor
MCP9700A and humidity data from a humidity sensor 808H5V5. Waspmote node B
75

will collect soil moisture data from a soil moisture sensor. In test program, both
sensors are connected to PC B through USB cable for monitoring the parameters of
running programs. After collecting enough data, both Waspmote nodes send packets
to Waspmote Gateway based on ZigBee protocol, Waspmote Gateway is also
connected on PC A for monitoring the received packets. The architecture of the
communication between Waspmote and Waspmote Gateway is shown in Figure
4-14.

Figure 4-14 Architecture of the communication between Waspmote and Waspmote Gateway

In this communication, the set up part of Waspmote node A is similar to the set
up part of the communication among Waspmotes. The firmware of the Waspmote
node A is router API as well as the Waspmote node B one. The firmware of the
Waspmote Gateway is the coordinator API. In set up part, the RTC module and
USB module are turned on. The XBee ZigBee module is initialized including setting
PANID, encryption mode, link key, channel verification and etc. The basic
parameters of the network are also shown such as operating 16-b PAN ID, operating
64-b PAN ID, channel, MAC address and etc. In this communication, the sleep and
wake up functions are needed. So the joining network will be done in each loop.
When a Waspmote wakes up from the sleep mode, all modules are turned on,
Waspmote nodes need to rejoin the network and refined the coordinator, otherwise
the packets will not be sent correctly.

76

The loop part includes again three sub functions, the collecting data function,
the sending packets function and the sleeping and waking up function. The first step
is the collecting data. In this sub function, the input parameter is the sensor type.
According to the sensor type value, different values including time, battery level,
temperature gotten by the embedded thermometer, temperature gotten by the sensor
MCP9700A, humidity gotten by the sensor 808H5V5 can be collected and stored as
string data. Because the frequency of collecting data is different from the frequency
of sending data, several data will be integrated in a packet. So the program will test
whether collected data is enough to fulfill a packet. In this project, the variable
MAX_NUM_IN_PACK indicates the number of data in a packet. This variable is
settled to 3 by default. If the collected data is enough, program goes into send
packets function and after goes into sleep and wake up function. Otherwise,
program goes into sleep and wake up function directly. In the sending packets
function, a Waspmote needs to join a network and find a coordinator. This function
is used only when the data is enough to send a packet in the purpose of reducing
power consumption. In joining network sub function, a Waspmote will try at most
MAX_JOIN_NET_TIME times. Otherwise, this action will be abandoned for saving
energy. After finding a coordinator successfully, a Waspmote fulfills the packet
with the collected data as well as other necessary information. For example, Node A
inserts A into the header of the packet as identification of the packet while node B
inserts B into the header. Besides, the fulfilled data of node A is temperature data
and humidity data while the fulfilled data of node B is soil moisture data. The
sending packet function will try at most MAX_SEND_TIME times. If this action
does not succeed, the packet will be discarded for saving energy. After sending a
packet, the data string is cleared and program goes into sleep and wake up
function. In the sleep and wake up step, a Waspmote will change into sleep mode
and wait for a wake up interruption. The sleep time is settled by users for reducing
power consumption. When a Waspmote wakes up, the RTC module and USB
module are turned on. Then the program goes into next loop. The serial monitor of
the Waspmote node A is shown in Figure 4-15 while the serial monitor of the
Waspmote node B is shown in Figure 4-16.

77

Figure 4-15. Serial monitor of the Waspmote node A

Figure 4-16 Serial monitor of the Waspmote node B

The communication between Waspmotes and a Waspmote Gateway forms a


simple wireless sensor network. In this network, the two Waspmotes work as node
while the Waspmote Gateway works as a router. This communication is closed to
the communication between Waspmotes and a Meshlium. The serial monitor of the
Waspmote Gateway is shown in Figure 4-17.

78

Figure 4-17 Serial monitor of the Waspmote Gateway

In the communication between Waspmotes and a Meshlium, two Waspmotes


equipped with corresponding sensors are used as wireless sensor nodes while one
Meshlium is used as the rooter. The Waspmote node A is equipped with temperature
sensor MCP9700A and humidity sensor 808H5V. Both Waspmote nodes use XBee
ZigBee Pro module. The set up part of these Waspmote nodes are similar to the
Waspmote nodes in a communication between Waspmotes and a Waspmote
Gateway. Both firmwares of these Waspmote nodes are the router API. In the set up
part, the RTC module, the USB module and the XBee ZigBee Pro module are turned
on. XBee ZigBee module is initialized including setting PANID, encryption mode,
link key, channel verification and etc. Also, the parameters of the network are
shown on the serial monitor of the IDE including PANID, operating 16-b PAN ID,
operating 64-b PAN ID, channel, MAC address and etc. Because in each loop the
Waspmote has to sleep and wake up, the joining network part should be run each
time when the Waspmote wakes up in order to find the coordinator. The initial part
of the Waspmote node A is as same as the initial part of the Waspmote node B, the
only difference is in the loop part. The initial part of these Waspmote nodes is
shown in Figure 4-18.

79

Figure 4-18 Initial part in communication beween Waspmote and Meshlium

In the loop part, similar to the communication between Waspmotes and a


Waspmote Gateway, the program can be divided into three sub functions: the
collecting data function, the sending packets function, the sleeping and waking up
function. In the collecting data part, the Waspmote node A equipped with
temperature and humidity sensors will get the temperature and humidity as well as
its battery level. The Waspmote node B will get the temperature through the
embeded thermometer as well as its battery level. Both nodes store the collected
data until the data is enough for fulfilling a packet. The number of data in a packet
is settled by users. In this project, its default value is 3. The collecting data part of
the Waspmote node A is shown in Figure 4-19.

Figure 4-19 Collecting data part in the communication beween Waspmote and Meshlium

80

When the collected data is enough, program goes into the sending packet
function. In this part, firstly, the Waspmote tries to join a network and find a
coordinator. Since the XBee ZigBee Pro module has already been initialized, this
module just needs to be turned on and can find coordinator automatically. In the
program, the number of joining network attempts is counted and shown in the
serial monitor. After sending a packet, the program goes into sleep and wake up
function. In this function, the Waspmote will change into sleep mode, and wait for a
wake up interruption. The sleep time is settled by users for reducing power
consumption. When the Waspmote wakes up, the RTC module and the USB module
are turned on. Then program goes into next loop. The sleep time, alarm clock time
and wake up time are all shown in the IDEs serial monitor for checking the status
of the running program. The sending packet part of the Waspmote node A is shown
in Figure 4-20. The sending packet part of the Waspmote node B is shown in Figure
4-21.

Figure 4-20 The Sending packet part of the Waspmote node A

81

Figure 4-21 The Sending packet part of the Waspmote node B

Considering the Meshlium, as a router in the wireless sensor network, it


receives the packets sent by the Waspmote nodes A and B, extracts the information
from these packets and stores them in local files or a local database. In this
program, Putty is used to have access to the Meshlium. In this project, another PC
uses WIFI to connect to the Meshlium. With Putty, using a specific IP and a port to
connect to the Meshliums open port and using corresponding commands to monitor
the S0 port with a speed of 38400 bits/s, the received data will be shown on the
screen in real time. The data of Meshlium displayer on Putty is shown in Figure
4-22.

Figure 4-22 Received data of Meshlium displayed on Putty

82

4.5 Brief summary


This chapter focuses on the system provides in order to test the different
modules of the Waspmote and test of different types of communications between
Libelium devices. The modules that will be used in the wireless sensor network are
all tested separately, and be integrated in the XBee ZigBee Pro module. The real
time clock module is tested for setting time and alarm clock. The utility module is
tested for controlling LEDs and converting type. The SD card module is tested for
storing the collected data in a Waspmote itself. The accelerator module is tested for
checking the status of a Waspmote to avoid physical damage. The XBee ZigBee Pro
module is the most important part and takes part in three types of communication:
communication among Waspmotes, communication between multiple Waspmotes
and a Waspmote Gateway, communication between multiple Waspmotes and a
Meshlium. In communication among Waspmotes, each Waspmote works as sender
as well as receiver. In communication between multiple Waspmotes and a
Waspmote Gateway, two Waspmote nodes work as end devices and make wireless
sensor network with the Gateway that works as a router. In communication between
multiple Waspmotes and a Meshlium, two Waspmotes and the Meshlium format a
wireless sensor network. The Meshlium works as a router that collects packets sent
from nodes, stores the data in local files or database in real time.

83

Conclusion
With the development of wireless sensors, wireless sensor network has been
applied in many aspects of day-to-day life. This document focuses on the
application of wireless sensor network in agriculture especially for plants
development. With the help of the wireless sensor network, people could monitor
the environmental parameters of crops in real-time from remote places. This project
is based on an emerged wireless sensor device called Waspmote developed by
Libelium Company. Other needed accessories are agriculture sensor board,
Waspmote Gateway and Meshlium. In the final system, multiple Waspmotes use
corresponding sensors to collect environmental data and use their wireless
communication modules to send the collected data to a Meshlium. Then, the
Meshlium stores the data in a local database or local files. Meshlium can also
update the received data to a specific server in real-time. To realize the final
wireless sensor network, the different modules of a Waspmote were analyzed and
tested in this project, including USB modules, utility modules, real time clock
modules, accelerometer modules, XBee ZigBee Pro modules and etc. These
modules are integrated in the wireless network communication as sub functions.
This document includes four parts. Firstly, a brief introduction of the
background and the related research are made. Secondly, the project from the
perspective of system requirements is analyzed. Thirdly, the design and
development of the project are shown in details according to the different modules.
Finally, the process diagram and tests of all the modules as well as the different
types of wireless communications are shown. As the project needs to upload code
on hardware, the system test includes both hardware and software. In the fourth
chapter, the result of the tests is shown in many figures clearly.
This project can be further extended. The next goal of this project is to focus
on the Meshlium and other Waspmote modules. In Meshlium, the files that control
the receiving data format can be modified for recognizing different data formats.
Besides, the local database of Meshlium can be optimized. Also, other Waspmote
modules can be added like video camera module for the visual monitoring of the
crops development.

84

References
[1] Definition of wireless sensor, available from
http://www.omega.com/prodinfo/wirelesssensors.html
[2] Libelium Comunicaciones Distribuidas S.L. 50 Sensor Applications for a
Smarter World. 14~15
[3] D. Estrin, R. Govindan, J. Heidemann, S. Kumar, Next century challenges:
scalable coordination in sensor networks, ACM MobiCom99, Washingtion,
USA, 1999, pp. 263270.
[4] I. F. Akyildiz, W. Su, Y. Sankarasubramaniam, E. Cayirci. Broadband and
Wireless Networking Laboratory, School of Electrical and Computer
Engineering, Georgia Institute of Technology, Atlanta, GA 30332, USA.
Wireless sensor networks: a survey. Computer Networks 38 (2002) 393422.
[5] A. Chandrakasan, R. Amirtharajah, S. Cho, J. Goodman, G. Konduri, J. Kulik,
W. Rabiner, A. Wang, Design considerations for distributed micro-sensor
systems, Proceedings of the IEEE 1999 Custom Integrated Circuits Conference,
San Diego, CA, May 1999, pp. 279286.
[6] P. Bonnet, J. Gehrke, P. Seshadri, Querying the physical world, IEEE Personal
Communications (October 2000) 1015.
[7] C. Herring, S. Kaplan, Component-based software systems for smart
environments, IEEE Personal Communications, October 2000, pp. 6061.
[8] I. A. Essa, Ubiquitous sensing for smart and aware environments, IEEE
Personal Communications (October2000) 4749.
[9] P. Johnson et al., Remote continuous physiological monitoring in the home,
Journal of Telemed Telecare 2 (2) (1996) 107113.
[10] M. Ogawa et al., Fully automated biosignal acquisition in daily routine
through 1 month, International Conference on IEEE-EMBS, Hong Kong, 1998,
pp. 19471950.
[11] N. Noury, T. Herve, V. Rialle, G. Virone, E. Mercier, G. Morey, A. Moro, T.
Porcheron, Monitoring behavior in home using a smart fall sensor, IEEE-EMBS
Special Topic Conference on Microtechnologies in Medicine and Biology,
October 2000, pp. 607610.

85

[12] G.

J.

Pottie,

W.

J.

Kaiser,

Wireless

integrated

network

sensors,

Communications of the ACM 43 (5) (2000) 551558.


[13] J. M. Rabaey, M. J. Ammer, J. L. da Silva Jr., D. Patel, S. Roundy, PicoRadio
supports ad hoc ultra-low power wireless networking, IEEE Computer
Magazine (2000) 4248.
[14] Libelium comunicacions distribuidas S.L. Wireless sensor networks with
waspmote and meshlium. Libelium document v4.0 02/2013: 2-3. P. Bonnet, J.
Gehrke,

P.

Seshadri,

Querying

the

physical

world,

IEEE

Personal

Communications (October 2000) 1015.


[15] I. F. Akyildiz, I. H. Kasimoglu. Broadband and Wireless Networking
Laboratory, School of Electrical and Computer Engineering, Georgia Institute
of Technology, 250 14th Street, NW Room 556, Atlanta, GA 30332, USA.
Wireless sensor and actor networks: research challenges. Ad Hoc Networks 2
(2004) 351367.
[16] Libelium comunicacions distribuidas S.L. Proto sensor 2.0 technicial guide.
Libelium document v4.0 02/2013.
[17] Libelium comunicacions distribuidas S.L. Waspmote RFIC/NFC 13.56 MHZ
networking guide. Libelium document v4.1 04/2013.
[18] Libelium comunicacions distribuidas S.L. Waspmote quickstart guide.
Libelium document v4.1 03/2013.
[19] Libelium comunicacions distribuidas S.L. Waspmote programming guide.
Libelium document v4.1 04/2013.
[20] Libelium comunicacions distribuidas S.L. Waspmote data frame programming
guide. Libelium document v4.1 04/2013.
[21] Libelium comunicacions distribuidas S.L. Wireless sensor networks with
waspmote and meshlium. Libelium document v4.0 02/2013: 2-3.
[22] Libelium comunicacions distribuidas S.L. Waspmote utilities programming
guide. Libelium document v4.0 02/2013.
[23] Libelium comunicacions distribuidas S.L. Waspmote RTC programming guide.
Libelium document v4.0 02/2013.
[24] Libelium

comunicacions

distribuidas

S.L.

Waspmote

interruptions

programming guide. Libelium document v4.1 04/2013.


[25] Libelium comunicacions distribuidas S.L. Waspmote SD card programming
guide. Libelium document v4.0 02/2013.
86

[26] Libelium

comunicacions

distribuidas

S.L.

Waspmote

GSM/GPRS

programming guide. Libelium document v4.1 06/2013.


[27] Libelium

comunicacions

distribuidas

S.L.

Waspmote

accelerometer

programming guide. Libelium document v4.0 02/2013.


[28] Libelium comunicacions distribuidas S.L. Waspmote ZigBee networking guide.
Libelium document v4.1 04/2013.
[29] Libelium comunicacions distribuidas S.L. Waspmote 868MHZ networking
guide. Libelium document v4.1 04/2013.
[30] Libelium comunicacions distribuidas S.L. Waspmote xtreme quickstart guide.
Libelium document v4.0 02/2013.
[31] Libelium comunicacions distribuidas S.L. Meshlium Xtreme technical guide.
Libelium document v4.1 04/2013.
[32] Libelium comunicacions distribuidas S.L. Agriculture 2.0 technicial guide.
Libelium document v4.1 04/2013.
[33] Libelium comunicacions distribuidas S.L. Sensor compatibility. Libelium
document v4.1 06/2013.
[34] Libelium comunicacions distribuidas S.L. Waspmote plug&sense! technical
guide. Libelium document v4.2 04/2013.
[35] Libelium comunicacions distribuidas S.L. Waspmote (v1.1) VS Waspmote
PRO (v1.2).
[36] Libelium comunicacions distribuidas S.L. Meshlium Xtreme datasheet.
Libelium document v4.0 02/2013.
[37] Libelium comunicacions distribuidas S.L. Waspmote 802.15.4 networking
guide. Libelium document v4.1 04/2013.
[38] Libelium comunicacions distribuidas S.L. Waspmote encryption libraries
programming guide. Libelium document v4.0 02/2013.
[39] Digi International. X-CTU configuration & test utility software. Digi
document 20/08/2008.
[40] Libelium comunicacions distribuidas S.L. Waspmote IDE user guide. Libelium
document v4.0 06/2013.

87

Acknowledgements
First of all, I would like to express my thankfulness to my four tutors, they are
Mrs. Shu Liu from HIT, Mr. Gil De Sousa from Irstea, Madam Susan from ISIMA,
UBP and Prof. Kun-Mean Hou from ISIMA, UBP. They helped me a lot in my
project and in this paper. They gave me a lot of advices in my report, requirement
analysis, system design and development. Thanks to their patience and enthusiasm,
I can finish this project and the paper in time.
Also I want to thank my colleges in Irstea, they are helpful and hospitable.
Since I worked at Irstea, they helped me a lot in my daily life, gave me suggestions
on my paper and talked with me about the new technology. Besides, I want to offer
my regards to my classmates, they supported me in all aspects of the project.

88

Potrebbero piacerti anche