Skip to main content
Open Access Publications from the University of California

Design and Analysis of Arduino, Raspberry Pi, and Xbee based Wireless Sensor Networks

  • Author(s): Cassero, Sean
  • Advisor(s): Hespanha, Joao
  • et al.

With a constantly changing technological landscape, the Engineering world is

continually tasked with justifying the optimality of accepted standards and practices. The

recent development of inexpensive simple microprocessors and linux computers has the

potential to replace various methodologies for low energy, low-rate information transfer and

control such as environmental monitoring, smart houses, smart lighting and others.

In the area of wireless sensor networks, a design standard is developing

incorporating Xbee series 2 as a wireless bridge between Arduino or Raspberry Pi sensor

and data aggregate nodes. In this thesis I construct an Xbee series 2 ZigBee wireless star

topology network with an Arduino as a ZigBee End Device and Raspberry Pi as the ZigBee

network coordinator.

The End Device uses an Arduino Uno v3 for local signal processing on a Parallax

PMB-648 GPS and DS18B20 temperature sensor for periodic signal transmission via Xbee

series 2. Xbee uses API mode 2 with escaping for package formation and transmission and

is connected to the Arduino via the hardware serial port.

The Coordinator node consists of an Xbee Series 2 with Coordinator firmware

communicating via the Raspberry Pi GPIO serial input ports. The Raspberry Pi uses

specialized Python libraries to parse incoming API statements from active end devices.

The Raspberry Pi doubles as an internet gateway to an SQLite database run on a

Ruby on Rails web application framework. The Raspberry Pi uses the Python requests

library to transmit received End Device sensor measurements to the cloud server as URL

parameters. The Ruby on Rails framework uses a Model View Controller architecture to

pass data as URL parameters to an SQLite database, as well as display End Device sensor

data on an interactive user interface upon a browser request. The user interface uses

Gmaps4Rails to render an interactive map consisting of the GPS markers of reporting End

Devices and their corresponding temperature measurements. The cloud server functions as a

shared database linking multiple complete wireless sensor networks together under a single

web app.

By testing End Device node lifetimes with various data transmission frequencies, an

experimental relationship between Arduino/Xbee sleep duration and End Device lifetime is

found. Using direct current measurements and information on the End Device hardware, a

theoretical relationship between battery charge and End Device charge consumption during

runtime is used to generate experimental equations relating End Device average current

consumption during different phases in End Device lifetime. Multiple regression analysis is

performed to derive an experimental value for the average current consumption of the End

Device during all phases of operation, resulting in an experimental relationship between End

Device average current and data transmission frequency of

I avg=

(2.3mA∗t sleep+131.3mC )

(t sleep+2.6s)

+34.0mA , where t sleep is the End Device sleep cycle

duration in seconds. The above relationship was able to predict the average current for all

End Device trials to within 5% error.

Main Content
Current View