on the design of a flexible gateway for wireless sensor ...users.ictp.it/~mzennaro/m4d.pdf · for...

8
On the design of a flexible gateway for Wireless Sensor Networks Marco ZENNARO 1 , Hervé NTAREME 1 and Antoine BAGULA 2 1 Royal Institute of Technology, Stockholm, Sweden Email: [email protected] , [email protected] 2 University of Cape Town, South Africa Email: [email protected] Abstract: The development of a Wireless Sensor Network (WSN) gateway is challenging for countries where limited infrastructures lead to frequent power shortages and network unreliability. In this paper we describe the design of a flexible gateway that collects data from WSN, stores them in a database and makes them available via wireless links. In the design of such device, low power, low-cost and flexibility must be taken into account. Our prototype is flexible as it can work as WiFi client, serve as WiFi access point and can connect to OLSR mesh networks. Based on low-cost hardware and on open- source software, it is suitable for being used in challenging environments. 1. Introduction A WSN is a self-configuring network of small sensor nodes (so-called motes) deployed in quantity to sense the physical world [1]. Sensor nodes are essentially small computers with extremely basic functionality that communicate among them using radio signals in a multi- hop fashion to route the information collected about their environment to a gateway where this information is either processed locally or transferred to a remote location where it is processed and appropriate decisions are taken. They consist of a processing unit with limited computational power and a limited memory, a radio communication device, a power source and one or more sensors. They are being deployed in a wide variety of applications such as environmental, health and water quality monitoring. The gateway (or base station) is one of the most important components upon which the efficiency of the sensing activity of a WSN depends. While motes are used to report any activities happening in their surroundings and relay the information received from neighbour nodes to other nodes in transit to the gateway, the gateway collects all the information received from the motes in a database and makes this information available usually via a wireless network. It is made of one or more distinguished elements of the WSN with some additional computational, energy and communication resources. It provides the interface between the sensor nodes and the network infrastructure. A gateway must have enough computing power to be able to run a database, perform local calculation and communicate with an existing network, but should be low power enough to run autonomously in the field. 2. Background: WSN and Developing Countries WSNs have a great role to play in Developing Countries not only to expedite novel solutions that help mitigate development problems, but also to facilitate research activities [2]. We believe that the use of WSN in Developing Countries can help fill this gap, with low-cost and state-of-the-art solutions. Possible applications range from water quality monitoring to irrigation optimization.

Upload: others

Post on 23-Sep-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: On the design of a flexible gateway for Wireless Sensor ...users.ictp.it/~mzennaro/m4d.pdf · for resource-poor farmers. A WSN has been deployed in rural Karnataka (India), and a

On the design of a flexible gateway for

Wireless Sensor Networks

Marco ZENNARO1, Hervé NTAREME

1 and Antoine BAGULA

2

1Royal Institute of Technology, Stockholm, Sweden

Email: [email protected], [email protected]

2 University of Cape Town, South Africa

Email: [email protected]

Abstract: The development of a Wireless Sensor Network (WSN) gateway is

challenging for countries where limited infrastructures lead to frequent power

shortages and network unreliability. In this paper we describe the design of a

flexible gateway that collects data from WSN, stores them in a database and

makes them available via wireless links. In the design of such device, low

power, low-cost and flexibility must be taken into account. Our prototype is

flexible as it can work as WiFi client, serve as WiFi access point and can

connect to OLSR mesh networks. Based on low-cost hardware and on open-

source software, it is suitable for being used in challenging environments.

1. Introduction

A WSN is a self-configuring network of small sensor nodes (so-called motes) deployed in

quantity to sense the physical world [1]. Sensor nodes are essentially small computers with

extremely basic functionality that communicate among them using radio signals in a multi-

hop fashion to route the information collected about their environment to a gateway where

this information is either processed locally or transferred to a remote location where it is

processed and appropriate decisions are taken. They consist of a processing unit with limited

computational power and a limited memory, a radio communication device, a power source

and one or more sensors. They are being deployed in a wide variety of applications such as

environmental, health and water quality monitoring.

The gateway (or base station) is one of the most important components upon which the

efficiency of the sensing activity of a WSN depends. While motes are used to report any

activities happening in their surroundings and relay the information received from neighbour

nodes to other nodes in transit to the gateway, the gateway collects all the information

received from the motes in a database and makes this information available usually via a

wireless network. It is made of one or more distinguished elements of the WSN with some

additional computational, energy and communication resources. It provides the interface

between the sensor nodes and the network infrastructure. A gateway must have enough

computing power to be able to run a database, perform local calculation and communicate

with an existing network, but should be low power enough to run autonomously in the field.

2. Background: WSN and Developing Countries

WSNs have a great role to play in Developing Countries not only to expedite novel solutions

that help mitigate development problems, but also to facilitate research activities [2]. We

believe that the use of WSN in Developing Countries can help fill this gap, with low-cost and

state-of-the-art solutions. Possible applications range from water quality monitoring to

irrigation optimization.

Page 2: On the design of a flexible gateway for Wireless Sensor ...users.ictp.it/~mzennaro/m4d.pdf · for resource-poor farmers. A WSN has been deployed in rural Karnataka (India), and a

There are many challenges in implementing a WSN in Developing Countries. Power

consumption is an important issue in deployments [3]. Although for WSN nodes this is a

well-addressed issue (using solar panels, for example), most commercial solutions today

assume that WSN gateways will encounter ideal scenarios in terms of power and connectivity

when deployed. In a Developing World scenario, the gateway must operate with bounded

energy supplies and with unreliable connectivity. A gateway to be used in such environment

should therefore be low power and flexible enough to be reached via different topologies of

wireless networks.

1.1 – WSN deployments

There have seen a couple of deployments of WSN in Developing Countries. We briefly

describe their aim and focus, and we summarize their technical characteristics. These projects

are still few, and sometimes do not go beyond the design and simulation stage.

• The COMMON-Sense Net [4] is an ongoing project on improved water management

for resource-poor farmers. A WSN has been deployed in rural Karnataka (India), and

a decision support system for crop yields has been implemented. The wireless sensor

network has been deployed over a small area of 2 acres to measure temperature,

humidity, ambient light and barometric pressure. Soil moisture has been measured

with a special probe connected to the motes. The first prototype of the sensor

network was developed in early 2005, and has been operating in an outdoor

controlled environment since April 2005. Data from the sensors are visualized

through the project's website. From the gateway point of view, the system consists of

several network clusters, each with their own Base Station (BS) that communicates

with a local server (LS) over 802.11 (or WiFi). Data packets from the sensor nodes

are transmitted in a multi-hop fashion to the BS, which gathers data packets from the

sensor nodes and transfers them over a WiFi link to the LS, where it is temporarily

stored. From time to time, the data is retrieved by the central server (CS) over a dial-

up connection, and stored into a database.

• A system called “Senslide: A Distributed Landslide Prediction System” [5] has been

developed with the support of Microsoft Research India to predict landslides in the

hilly regions of western India. They have implemented the design on a small scale

using a laboratory testbed of 65 sensor nodes, and simulated results for larger

systems up to 400 sensor nodes. The results are sufficiently encouraging that they

intend to do a field test of the system during the monsoon season in India. Because of

the low-cost of these devices this would be feasible, even for poorer nations whom

have areas at risk of landslide. From the gateway point of view, a subset of the nodes

are designated as aggregators that collect locally smoothed sensor data and create

summaries, which are then communicated to the base station that is closest to the

aggregator node. Base stations have access to ground power, in addition to GPRS and

WiFi connectivity. Base stations are PCs that have wired power and network

connectivity.

• Researchers is Sri Lanka have developed a system called BusNet [6] to monitor road

surface conditions as well as pollution. BusNet is a sensor network that uses sensors

mounted on public transport buses that cover a large geographical area. When the

buses arrive at bus stations, which also function as data collection centres, gathered

data are transferred over a wireless link to the collection point. Data gathered in

regional collection points are transferred to buses travelling between the regional

centres and the main collection centre. In this scenario the public transport system

Page 3: On the design of a flexible gateway for Wireless Sensor ...users.ictp.it/~mzennaro/m4d.pdf · for resource-poor farmers. A WSN has been deployed in rural Karnataka (India), and a

functions as a data delivery network as well as the data collection network. From the

gateway point of view, the BusNet has three main components; Sensor Units, Sub

Stations, and a Main Station. The sub stations are the collection nodes located at the

regional bus stations. Regional bus routes span out from the sub stations. The sub

stations route these collected data to the main station over the bus network.

Analyzing the gateway solutions as presented by these projects, we can notice that:

1. They all use a two-step process. Data is gathered from the motes in an intermediate,

low-power device that then transmits it to a more powerful device serving as a

database server.

2. They all rely on stable power for the database server. The intermediate device is not

able to store data locally if the database server is down for a power shortage.

1.2 – Gateway requirements

If a gateway is to be used for WSNs in Developing Countries, it is clear that the scenario

requires a device designed around the following constraints:

• Low-power consumption: to run using solar panels or using batteries (in case of a

short deployment).

• High storage capabilities: to be able to store data for a long period of time, in case of

remote deployments.

• Flexible connectivity: to be able to connect to the gateway via wired or wireless

networks. Different wireless network typologies should be possible: the gateway

could serve as an Access Point, as a client or as a node of a mesh network.

• Low-cost: to be suitable for deployments in Developing Countries.

• Web-based design: to allow users to visualize the data from the WSN without

installing specific software.

1.3 – Usage scenarios

Different usage scenarios can be envisioned for such a gateway. As examples:

• WSN in a remote location such as a mountain or a jungle. The gateway serves as

client to a wireless network linking the base of the mountain to the top. A long shot

connects the gateway to the network.

• WSN in a research institution (agricultural research centre or water basin). The

gateway serves as an Access Point for the visiting scientists. Selected users can use

their laptops to access the data.

• WSN in a community mesh network. Mesh networks can serve as a way to connect

rural communities to the Internet. One of the nodes of the mesh can be the gateway.

In this way, the whole community can make use of the data coming from the sensor

network.

• WSN in a remote community. The gateway can both connect to the Internet via a

long wireless link and serve as an Access Point for local users (Schools, Hospitals,

etc). Data from the sensors can be used by the community and shared via the Internet.

The gateway should be flexible and powerful enough to support the three-above mentioned

typologies: wireless client, access point and mesh node.

Page 4: On the design of a flexible gateway for Wireless Sensor ...users.ictp.it/~mzennaro/m4d.pdf · for resource-poor farmers. A WSN has been deployed in rural Karnataka (India), and a

2. Proposed Gateway solution

From our first experiments with a low-power gateway (FoxBoard by ACME Systems [7]), it

was clear that to be flexible the device needed to be powerful enough. In this section we will

describe the overall system architecture, the hardware solution and the software

implementation.

2.1 – System Architecture

The technical components that make up a WSN system are as follows:

• Data collection subsystem: these are the motes, monitoring the environment and

sending data wirelessly to the gateway.

• Data logging, processing and web-based GUI: this is the gateway, which stores the

data in a database, processes it and presents it to the final user via a web-based

interface.

• Networking: the data collection subsystem and the gateway need to be connected to

the world in some way. Wired and wireless connections should both be available.

The components that make up our gateway are:

• An embedded Linux single board computer (SBC). We decided for a Linux board

due to the flexibility given by Open Source software.

• A memory card to store the Operating System and the database.

• One or two wireless cards, to connect using WiFi.

• A solar energy system composed of a solar panel, voltage regulator and battery.

2.2 – Hardware solution

SunSPOT motes [8] compose the data collection subsystem. What distinguishes the Sun

SPOT mote from comparable devices is that it runs a Java Micro Edition Virtual Machine

directly on the processor without an operating system. A Sun SPOT kit comes with free-

range Sun SPOT motes and one base station unit. The base station unit is thinner, does not

have a battery board, communicates wirelessly with the Sun SPOT and streams the data via a

USB connection.

As single board computer we chose the ALIX 2 embedded Linux board [9] built by PC

engines. It is based on the 500 MHz AMD Geode processor with 256MB of DRAM, has two

USB ports, one Compact Flash socket, two miniPCI slots and two Ethernet ports. It is

powerful enough to run a database and a web server. We decided to use a 1G CF memory

card, capable enough to store the OS and sampled data. As wireless card, we opted for the

Compex WLM series Wireless-AG MiniPCI network adapter [10]. It is compact, lightweight,

has high-performance and low power consumption. Built on Atheros chipset, it can be used

for all IEEE802.11b/g or a/g compatible WLAN and is ideally suited for integration in a wide

range of OEM devices. The total cost of the system is 177 Euros (42 Euros for the wireless

card, 100 for the Linux board and 35 for the CF card).

Figure 1 shows a picture of the assembled system.

Page 5: On the design of a flexible gateway for Wireless Sensor ...users.ictp.it/~mzennaro/m4d.pdf · for resource-poor farmers. A WSN has been deployed in rural Karnataka (India), and a

Figure 1: the assembled system. The single board computer hosts the wireless card and the CF

memory card. It is connected via a USB cable to the SunSPOT base station that communicates

wirelessly with the free-range SunSPOTs.

2.2– Software implementation

We installed an embedded version of Debian Linux called Voyage [11] on the gateway. We

chose Debian for the number of existing packages and for its user-friendliness. The software

component of the system has three functions: (1) to log the sensor data in a database (2) to

present them via a web page in form of graphs or of downloadable files (3) to take care of the

network connection. The first two functions are accomplished using the LAMP software

bundle consisting of Linux, Apache, MySQL, and PHP. Drivers for the miniPCI cards are

already included in the Voyage kernel, so the third part is taken care of by the system itself.

The workflow is the following: data coming from the sensor network reach the SunSPOT

base station via a 805.14 wireless link. The java code running on the base station connects to

the MySQL database that runs on the gateway and stores the received data in the database. At

the same time, the gateway is running a web server with some user-friendly webpages. The

gateway is connected to the Internet via an 802.11 wireless link.

Page 6: On the design of a flexible gateway for Wireless Sensor ...users.ictp.it/~mzennaro/m4d.pdf · for resource-poor farmers. A WSN has been deployed in rural Karnataka (India), and a

Figures 2 and 3 show some screenshots of the web GUI.

Figure 2: screenshot of the Status page. Users can check how many measurements are in the database

and from how many sensors. They can plot the last five values coming from the sensors to get a feeling

of the measurements.

Figure 3: screenshot of the Graph page. On the left: users can select the sensor they want to plot and

the time span. On the right: the graph is produced. Users can zoom in the graph and select the value

they want to plot (in this example light or temperature).

3. Performance Evaluation

To evaluate the performance of the gateway, we run three tests:

1. Measure the CPU usage under different scenarios (idle, reading data from the sensors,

connecting to a wireless network, etc)

2. Measure the power consumption under different scenarios (just single board, WiFi traffic

or not, etc)

3. Measure the disk space usage.

Page 7: On the design of a flexible gateway for Wireless Sensor ...users.ictp.it/~mzennaro/m4d.pdf · for resource-poor farmers. A WSN has been deployed in rural Karnataka (India), and a

Following are some preliminary results:

1. The CPU usage was very small in all conditions. In average, it was 1%. This means that

the single board computer is powerful enough for all the tasks required.

2. We used a power meter to measure the power consumption in different scenarios. Figure 4

shows the Watt’s-Up power meter [12] we used.

Figure 4: the power meter is connected to the power source and to the load. It shows, in real-time, the

power consumption expressed in Watts.

We powered the gateway with a 12V power supply and measured consumption in 4

scenarios:

1. Single Board Computer connected via Ethernet. No Base Station and no wireless

card.

2. Single Board Computer connected via Ethernet. Base Station receiving data and no

wireless card.

3. Single Board Computer connected via Ethernet. Base Station receiving data and

active wireless card connected to an Access Point.

4. Single Board Computer connected via Ethernet. Base Station receiving data and

active wireless card connected to an Access Point. Laptop requesting two webpages

at the same time.

Figure 5 indicates that the power consumption for a gateway in a real-world deployment will

be 4.4 W. This value is low enough to be able to use a 20W solar panel and a 14 AH battery

to make the gateway autonomous. It also indicates that having users browse the data does not

require more energy.

3. The data we collected in our experiment was: temperature, light level and battery level.

They are stored as long in the MySQL database. It took 44k to store 1000 samples in the

database. One million samples require 44M in the database. At one sample every minute

coming from two sensors, 44M disk space would last for one year (694 days / 2). With a 2G

memory card one could store months of data from a complex wireless sensor network.

Page 8: On the design of a flexible gateway for Wireless Sensor ...users.ictp.it/~mzennaro/m4d.pdf · for resource-poor farmers. A WSN has been deployed in rural Karnataka (India), and a

Figure 5: power consumption in four scenarios.

5. Conclusions

We have proposed in this paper a gateway designed for applications in Developing Countries,

which has not been deployed on the field yet. However, several connectivity scenarios were

considered during the system design procedure. It is a low-power and low-cost system, which

provides data-logging facilities for a Sun SPOT network. Moreover, it is based on open

source software and offers a user-friendly interface.

References

[1] D. Estrin et al., Embedded, Everywhere: A Research Agenda for Networked Systems of Embedded

Computers, National Research Council Report, 2001.

[2] M.Zennaro, B.Pehrson and A.Bagula. Wireless Sensor Networks: a great opportunity for

researchers in Developing Countries, in 2nd IFIP Intl. Symposium on Wireless Communications and

Information Technology in Developing Countries. South Africa, 2008

[3] E Brewer, M Demmer, Bowei W. Du, M Ho, M Kam, S Nedevschi, J Pal, Rabin Patra, S Surana,

and K Fall, The case for technology in developing regions, IEEE Pervasive Computing, vol. 5, no. 2,

pp. 15-23, Apr-Jun, 2006

[4] J. Panchard, S. Rao, T. Prabhakar, H. Jamadagni, and J.-P. Hubaux. COMMON-Sense Net:

Improved Water Management for Resource-Poor Farmers via Sensor Networks, in International

Conference on Communication and Information Technologies and Development (ICTD2006)

[5] A. Sheth, K. Tejaswi, P. Mehta, C. Parekh, R. Bansal, S. Merchant, T. Singh, U.B. Desai, C.A.

Thekkath, and K. Toyama. SenSlide: a sensor network based landslide prediction system, in

Proceedings of the 3rd international Conference on Embedded Networked Sensor Systems (San Diego,

California, USA, November 02 - 04, 2005). SenSys '05. ACM, New York, NY, 280-281

[6] K. De Zoysa, C. Keppitiyagama, G.P. Seneviratne, and W.W. Shihan. A public transport system

based sensor network for road surface condition monitoring, in Proceedings of the 2007 Workshop on

Networked Systems For Developing Regions (Kyoto, Japan, August 27 - 27, 2007). NSDR '07. ACM,

New York, NY, 1-6.

[7] AcmeSystems FOX board. Available: http://www.acmesystems.it/?id=4

[8] SunSPOT world. Available: http://www.sunspotworld.com

[9] Alix2 board. Available: http://www.pcengines.ch/alix2c2.htm

[10] Compex WLM series. Available: http://www.compex.com.sg

[11] Voyage Linux. Available: http://linux.voyage.hk/

[12] Powerwerx. Available: http://www.powerwerx.com/product.asp?ProdID=3809&CtgID=3575