SlideShare a Scribd company logo
1 of 9
Download to read offline
Environmental Sensor Network
The New Jersey Governor’s School of Engineering and Technology
2014
Arthur Belkin
Wayne Hills High School
Shweta Dutta
South Brunswick High School
Yunhee Kang
Ridge High School
Hope McGovern
Haddonfield Memorial High School
Matthew Scalamandre
Moorestown Friends School
Abstract
In order to demonstrate how technology can be
used to facilitate human interaction with the en-
vironment, the research team designed and built
a proof-of-concept mesh network to collect data
about the home environment and display it to a
base station. Simplifying human to environment
interaction makes life easier in a world where
many people, devices, and tasks require a person’s
attention. The network connects two sensors that
report data to Arduino platforms. These platforms
communicate with XBee radios, which in turn talk
to a base laptop that displays the data to the user of
the network. A mesh network that reports condi-
tions within a house is a viable way of monitoring
and regulating an area; this eases human to envi-
ronment interactions. Subsequent work might im-
plement technology for the mesh network to auto-
matically respond to changes in the environment,
as opposed to only reporting them back to the user.
1. Introduction
Modern technology is intrinsically interactive.
While it does connect humans to virtual reality and
to each other, it can also be used to connect humans
to their environment; such interactions can be both
monitored and regulated. Sensor network technol-
ogy has been previously used to communicate data
from remote locations quickly and effectively. For
example, a satellite-based remote sensor network
allows researchers at the University of Hawaii to
analyze the eruptions of volcanoes on remote is-
lands off the coast of Antarctica within mere hours
of the explosion1
.
Figure 1. A Nest Temperature Thermostat2
Sensors can also be utilized in more quotidian sit-
uations; Nest home thermostats include tempera-
ture, humidity, light, and activity sensors in the
unit in order to construct a personalized heating
and cooling schedule. The Nest system automat-
ically adjusts the temperature of a home accord-
ing to activity, season, ambient temperature, and
recorded preferences. It also communicates data
about a user’s energy utilization and can be con-
trolled via a smartphone application3
.
These systems provided the initial inspiration for
the project; however, the group was determined
2 THE GOVERNOR’S SCHOOL OF ENGINEERING AND TECHNOLOGY 2014
to create a simpler and cheaper in-home monitor-
ing system it dubbed a “Smart-Home”. A “Smart-
Home” is a house that has multiple sensors set up
to detect the condition of appliances and objects
throughout the building and report them to a cen-
tral computer. As a proof-of-concept of how tech-
nology can be used to organize environmental data
and facilitate regulation, the group created a wire-
less sensor network to perform and regulate vari-
ous household tasks. Sensors were used to mon-
itor the progress of a washing machine cycle and
the ambient light level.
2. Background
2.1 Open-Source Movement
Programmers and hardware developers alike take
part in the ever-changing open-source movement.
The concept of open-source refers to the freedom
to distribute code and hardware for reuse and mod-
ification. The operating system GNU, which re-
cursively stands for “GNU’s Not UNIX,” is one of
the more well-known products of this movement,
with UNIX referring to the more restrictive operat-
ing system controlled by AT&T and the University
of California, Berkeley4
. Today, platforms such
as Arduino allow for easy integration of hardware
and software into anything from personal projects
to full-scale replicable and marketable products.
Open-source allows amateur coders and builders,
start-up companies, or any person with an idea
to contribute to the world of technology, putting
some power into the hands of consumers who oth-
erwise must rely on the giant technology compa-
nies of today. Essential to the project, the open-
source movement allows for effective development
of proof-of-concept designs.
2.2 Arduino
Arduino is an open-source computing platform
based on a simple microcontroller and an In-
tegrated Development Environment (IDE). The
physical board, known as the microcontroller, has
multiple pins and outputs which can be used to
build circuits. Unlike other programmable circuit
boards, Arduino requires only a USB cable to load
new code onto the microcontroller. Additionally,
the simplicity of Arduino’s IDE - which has a lan-
guage based on C++ - makes the programming
easy to learn and manipulate5
. Other advantages
of Arduino include its relatively cost-effective plat-
form (with the more expensive modules valued at
$50), cross-platform capabilities as it can run on
Windows, Macintosh OSX, and Linux operating
systems, and the open-source nature of its software
and hardware6
.
2.3 Sensors
Sensors are devices that allow humans or comput-
ers to detect changes in their environment. Most
sensors are designed to respond to one particular
type of stimulus, such as temperature or light, and
output data that corresponds to the intensity of the
event. The sensors used by Arduino output data
as either a digital or analog signal. The two sen-
sors used for this project were a light sensor and
a piezoelectric sensor. The light sensor combines
a silicon diode that converts incipient light into an
electric current with a device which converts this
current into a square wave with frequency directly
proportional to the current, and therefore propor-
tional to the light intensity. This signal can be
read by the Arduino as a digital input7
. Piezoelec-
tric sensors detect vibrations, shocks, and impacts.
Such an impact causes the sensor to deform, which
in turn produces a voltage. The voltage level cor-
responds to the degree of deformation the sensor
experiences; this level can be read by the Arduino
board8
. Thus, sensor networks allow technology
to collect, analyze, and respond to environmental
data otherwise inaccessible to humans.
2.4 XBee and Mesh Network
XBee radios, manufactured by Digi International,
Inc., are small chips that wirelessly transmit infor-
mation and allow multiple Arduinos. to communi-
cate with each other. The protocol, or digital rules
for data exchange between the radios, is ZigBee,
which is typically used by small, low power ra-
dios to transmit small amounts of data over a short
range9
. Multiple XBee radios can be connected
ENVIRONMENTAL SENSOR NETWORK 3
to form a mesh network, providing a more exten-
sive range with each XBee acting as a node. Much
like the networking system used by cellular de-
vices, XBees act as radio towers to relay wireless
information. For multiple radios to be able to send
and receive information, they must be set to Ap-
plication Programming Interface (API) mode10
, as
opposed to Attention (AT) mode, which only lets
two radios communicate11
. API mode sends and
receives data in frames, a technical term for radio
messages. Radios can be configured into two con-
nection arrangements: full mesh and partial mesh
topologies. In the former case, all radios are inter-
connected; in the latter, some nodes in the network
have restricted communicating ability with respect
to the other nodes12
. A full mesh network was cho-
sen to connect all of the XBee radios.
3. Methods
3.1 Sensor Selection
The research group decided to create a network of
multiple sensors to monitor in-home activities as
a proof-of-concept of how technology can collect
and react to ambient data. A piezoelectric sensor
converts motion into electrical voltage, which can
be monitored in the home environment to deter-
mine whether a washing machine is running. A
light sensor can be used to determine the level of
light in an environment. Substantial documenta-
tion exists for both of the sensors, and they are both
extremely cost-effective.
3.2 Arduino Platform
Extensive information on the Arduino microcon-
troller and its corresponding programming lan-
guage is readily available online from the creators
of the Arduino board as well as from amateur de-
velopers. Therefore, it was not necessary to fab-
ricate a wholly new design for an Arduino-based
mesh network. The open-source nature of the
board encourages developers and coders to share
their projects on the internet. In addition to of-
ficial documentation for using the selected sen-
sors on the Arduino platform, many examples of
sensor-interfacing Arduino projects were available
Figure 2. Piezoelectric Sensor: SEN-1029313
Figure 3. Light to Frequency Conversion Sensor: Model
TSL235R14
to the research team to use and modify. It was also
necessary for the researchers to familiarize them-
selves with the Arduino programming language it-
self, which is based on C++. This project uses two
Arduino Uno boards and one Arduino Mega board.
3.3 Circuit Development and Testing
The light sensor returns the intensity of the light
it senses with the units µW/cm2
, while the piezo-
electric sensor returns a number from 0 to 1023,
with 0 being the lowest and 1023 being the highest.
Safety factors, particularly resistors, were incorpo-
4 THE GOVERNOR’S SCHOOL OF ENGINEERING AND TECHNOLOGY 2014
Figure 4. Arduino Uno: Model R315
Figure 5. Arduino Mega: Model 2560 R216
rated into each design to shield the Arduino from
voltage spikes; the piezoelectic sensor generates a
potential difference when it senses a vibration that
deforms it. Each circuit was then prototyped on a
breadboard.
The sensors were thoroughly tested before being
incorporated into the final network. To confirm
that each sensor worked properly, they were as-
sessed in different conditions. It was determined
that the piezoelectric sensor required a very se-
cure attachment to a vibrating object in order to
accurately measure the oscillation level. The light
sensor was tested under varying intensities to de-
termine its sensitivity. Perfecting data passing
from one sensor to a separate laptop required trou-
bleshooting and incremental development; for ex-
ample, instead of creating the full mesh network
and testing it, the research team started by passing
sensor information from one Arduino to another
and then to a computer, fixing hardware and soft-
ware challenges as they arose.
3.4 XBee Radios and Creation of Mesh Network
XBee radios constitute the nodes of the mesh net-
work. A diagram of the mesh network is seen in
Figure 6. Using X CTU software, the four XBee
radios were configured with one as the coordina-
tor and the others as routers. This setup allows
for simplified packaging of sensor messages by the
Arduinos, as the destination address is easily set to
the coordinator XBee radio that is connected to the
base station for data display. Each Arduino plat-
form must package the messages, often referred
to as a frame for the XBee radios to both trans-
mit and read the information. The frame contains
fields the XBee radios will recognize, with a mes-
sage containing a start byte, which alerts the ra-
dio that a valid message transmission is beginning.
Next in the frame are frame details, which spec-
ify attributes such as the length of the message
and the type of message being sent. A frame ID
asks for a specific return sequence confirming that
a message was sent successfully, left empty for
this project as the network created is too small to
require this check. This is followed by two ad-
dresses, one 64-bit and another 16-bit. The 64-bit
address is unique to all devices in the world and
is called a destination address, whereas the 16-bit
destination network address references the coor-
dinator XBee radio, unique to the mesh network
created. A broadcast radius was set, declaring the
maximum number of nodes for the frame to pass
through before reaching its destination. Setting the
radius to 0 allows the data to reach the receiver in
however many nodes are necessary, and this is the
radius used in the mesh network. Transmission
options can also be set allowing for data encryp-
tion, unnecessary for a low-security smart-home
network. Finally, the actual sensor data formatted
by the Arduino was added to the frame, followed
by a checksum byte which ensures the entire data
packet was received.
filler filler filler filler filler filler filler filler filler
filler filler filler filler filler filler filler filler filler
filler filler filler filler filler filler filler filler filler
filler filler filler filler filler filler filler filler filler
filler filler filler filler filler filler filler
ENVIRONMENTAL SENSOR NETWORK 5
Figure 6. Concept of Operations: Mesh Network
6 THE GOVERNOR’S SCHOOL OF ENGINEERING AND TECHNOLOGY 2014
Figure 7. XBee Radio: Model XBEE217
3.5 Formatting Sensor Data for User
Data is sent from Arduino nodes to a host com-
puter via XBee radios. However, this data must be
formatted accordingly in order to be understood by
a human user. For this task, a program was created
using the Python programming language to capture
data from the Serial monitor, format it, and display
it in an organized fashion. PySerial is a Python
application programming interface module used to
create an application to store and display data. The
Arduino platform that is connected to the piezo-
electric sensor transmits one byte of sensor infor-
mation: a 0 indicating no vibration, or a 1 indi-
cating vibration. These values are only sent if the
state changed from the last sensor reading, other-
wise no data is sent. If a 0 is sent to the coordinator
XBee, then PySerial will display a message telling
the user that the washing machine/dryer cycle is
done. The Arduino connected to the light sensor
sends the intensity of the light in µW/cm2
, which
is converted by PySerial to a low to high intensity
scale from 1 to 10 and displayed in a manner easily
understood by the user18
.
4. Results and Discussion
The research team built a mesh network that suc-
cessfully communicates environmental data to a
host computer. Sensor data is relayed from one
Arduino board to another by way of XBee radio
signals, which pack information into data frames.
Messages are sent to the one XBee attached to
a host laptop and are displayed on the base sta-
tion monitor through a Python program. Arduino
code for the two sensor nodes is included in the
Appendix B. The objective of the project was to
demonstrate the usefulness of a mesh network in
facilitating human interaction with the environ-
ment. However, the result was limited by factors
including the reliability and range of the available
sensors and the practicality of a mesh network on
the scale to which it was built. The design would
have to be modified to be implemented on a larger
scale.
Significant difficulty was experienced in applying
a conceptual understanding of the mesh network to
the challenge of physically creating working code
to send messages between nodes on the network.
The majority of difficulties the team encountered
was in writing the programs to run the project. Two
distinct codes were needed to power the network:
one to send and receive sensor data and one to
display the data on the host laptop. Reading the
piezoelectric sensor was straightforward as it out-
puts an analog voltage signal that the Arduino can
read easily. However, it was difficult to acquire us-
able data from the washing machine, as the values
returned were too low. The piezoelectric sensor
was tested in various configurations, but it was un-
able to detect any meaningful events until a weight
was placed on the sensor. The weight vibrated
in concert with the washing machine, intensifying
the stimulus. The program used by the Arduino
is also designed to increase accuracy by averag-
ing the readings over a period of one second. The
light sensor presented a different set of problems.
It was easy to set up physically; however, reading
the light sensor proved more difficult as the sensor
output a square wave that cannot be natively inter-
preted by an Arduino. The problem was resolved
by finding sample code online that treated each
peak of the square wave as a digital input and in-
troduced an interrupt that kept count of the number
of inputs that occurred each second19
. This allows
the Arduino to calculate the intensity of incipient
ENVIRONMENTAL SENSOR NETWORK 7
light with acceptable accuracy. At higher inten-
sities, the interrupts occur with enough frequency
to overload the Arduino’s processor, causing it to
return incorrect values; however, this problem is
not relevant at the intensities of light for which the
proof-of-concept network is intended to be used.
The team also encountered difficulties in program-
ming the message passing system. Our main chal-
lenge was formatting the data into a message that
the XBee radios would understand. The group de-
cided that the problem of differentiating between
two sensors would most easily be solved by having
the message be of different lengths for each sensor.
For the piezoelectric sensor, we simplified the re-
sponse into one byte, whereas for the light sensor
we stored the value into two bytes. The light sen-
sor returns a value that is often greater than 255,
and therefore must be stored in two separate bytes.
However, in dark environments, the sensor returns
a value less than 255. If the XBee attempted to
send this data, the base station would misinterpret
the message as coming from a piezoelectric sensor.
To resolve this problem, the code was modified to
force the Arduino to parse the data into two vari-
ables before sending it. This approach forces the
radio to send two values in the message, which pre-
serves the base station’s ability to discern between
the two sensors.
Setting up the XBee radios required the use of X
CTU software, which allows for easy installation
of firmware. One XBee was made a coordinator,
while the others were made into routers. Origi-
nally, the data was hard-coded as a long series of
write method statements that wrote information to
the Serial port one byte at a time, problematic as
the frame was being sent in parts and received in
parts as viewed through X CTU. While testing the
network, the X CTU software was sending mes-
sage requests and receiving partial data, but this
issue was fixed in formatting the package of data
as a receive request in a byte array. Using a for
loop, we filled an array of bytes one byte at a time
with the correct frame format as discussed in sec-
tion 3.5. In this loop, the checksum byte is filled
with a 0, as it has to be calculated before being put
in the byte. A second loop calculates the check-
sum, summing the values from the fourth byte to
the last non-checksum byte, dividing by 256, and
then taking the remainder when dividing by 256
yet again. This byte is inserted as the last byte
of the data, and then the package is transmitted
using the write method that accepts a byte array
and its size as arguments. Through trial and error,
the team recognized the need to send the bytes in
hex instead of decimal, as the hex number system
is what the X CTU software reads the messages
in. Finally, PySerial was implemented to read the
values sent in hex and translate them into console
messages.
5. Conclusion
Based on the research completed, a mesh network
has the ability to simplify human interaction with
the environment. This type of network allows tech-
nology to act as an interface between the real world
and humans, reading and interpreting raw data and
formatting it so that it is easy to understand and
respond to. The team’s network consisted of two
sensors and a base station, and the setup can eas-
ily be expanded to include more sensors and re-
port other environmental information to the user.
The group’s network successfully communicated
data about the home environment, specifically data
about the light level in a room and about the func-
tioning of a washing machine. Possible additions
and improvements that could be made to the cre-
ated mesh network include adding multiple sensors
to one Arduino platform, adding more nodes to the
network to collect data from other locations, de-
veloping a Graphical User Interface (GUI) to dis-
play formatted sensor data and integrating it into a
smartphone application, and creating actuators that
allow the network to not only transmit data, but
also react to the conditions sensed by taking physi-
cal action, e.g. opening and closing window blinds
in response to light levels. Further research might
look into making mesh networks secure, in order
to avoid others from reading data transmitted, or
possibly broadcasting malicious signals that com-
promise the performance of the network.
As the open source movement continues to expand
and include programmers and hardware-builders
8 THE GOVERNOR’S SCHOOL OF ENGINEERING AND TECHNOLOGY 2014
alike, the future application of mesh networks also
grows. Mesh networks can also be used in outdoor
settings where people might have trouble checking
certain conditions manually due to physical limita-
tions. A sensor placed in such areas could provide
a live feed of such conditions, connected in a full
mesh creating a local network that does not require
the internet to send and receive data. Such a net-
work would require sensors that are weather resis-
tant and robust code that ensures network security,
both easily developed and obtained from the open
source movement. Mesh networks, when com-
bined with the advantages of open source, have the
potential to facilitate human to environment inter-
actions.
6. Acknowledgements
We would like to acknowledge our project mentors
Josef Grossmann, Joe Mirizio, Ryan Flynn, and
Edward Kahn from Lockheed Martin who have
generously provided their time along with the nec-
essary resources and information to successfully
complete our proof-of-concept mesh network. The
team would also like to acknowledge the New Jer-
sey Governor’s School of Engineering and Tech-
nology’s Program Director Dr. Ilene Rosen, along
with the Assistant Program Director Jean Patrick
Antoine and the entire GSET staff for present-
ing such an incredible opportunity to the team,
key to the coordination and organization of such
a comprehensive and exciting summer program.
We also extend thanks to our Residential Teach-
ing Assistant Maya Saltzman for overseeing the
project, making sure we had the required tools and
workspace. A final thank you goes to all of the
sponsors of the New Jersey Governor’s School of
Engineering and Technology, specifically Rutgers
University, The State of New Jersey, Morgan Stan-
ley, Lockheed Martin, Silverline Windows, Jersey
South Industries, Inc., The Provident Bank Foun-
dation, and Novo Nordisk.
7. References
[1]
Schmidt, Laurie J. "Sensing Remote Volca-
noes." NASA Earth Observatory. National Aero-
nautics Space Administration, 13 July 2004. Web.
11 July 2014.
[2]
Nest Temperature Thermostat. Digital image.
Amazon. N.p., n.d. Web. 11 July 2014.
[3]
"Home." Nest. Nest Labs, n.d. Web. 13 July
2014.
[4]
Henderson, Harry. "Open-Source Movement."
Science Online. Facts On File News Services, n.d.
Web. 10 July 2014.
[5]
"Arduino Introduction." Arduino - Introduction.
Arduino, n.d. Web. 13 July 2014.
[6]
"What Is an Arduino?" SparkFun. SparkFun
Electronics, 26 Feb. 2013. Web. 8 July 2014.
[7]
Light-To-Frequency Converter Datasheet. N.p.:
Texas Advanced Optoelectronic Solutions, Sept.
2007. PDF.
[8]
Piezoelectric Sound Components. N.p.: Murata
Manufacturing Co., Ltd., n.d. PDF.
[9]
"XBee Buying Guide." SparkFun. SparkFun
Electronics, n.d. Web. 19 July 2014.
[10]
"What Is API (Application Programming Inter-
face) Mode and How Does It Work?" Digi. Digi
International Inc., n.d. Web. 19 July 2014.
[11]
"The AT Command Set." Digi. Digi Interna-
tional Inc., n.d. Web. 19 July 2014.
[12]
Brinton, Stephen. Mesh Networks. N.p.: Gor-
don College, 2009. PPT.
[13]
Piezoelectric Sensor. Digital image. SparkFun.
SparkFun Electronics, n.d. Web. 15 July 2014.
[14]
Light to Frequency Conversion Sensor. Digi-
tal image. SparkFun. SparkFun Electronics, n.d.
Web. 15 July 2014.
[15]
Arduino Uno. Digital image. Tested. N.p., n.d.
Web. 15 July 2014.
[16]
Arduino Mega. Digital image. Electroschemat-
ics. N.p., n.d. Web. 15 July 2014.
[17]
XBee S2. Digital image. Entesla. N.p., n.d.
Web. 15 July 2014.
[18]
Liechti, Chris. "Welcome to PySerial’s Doc-
umentation." PySerial. N.p., n.d. Web. 19 July
2014.
[19]
Tillaart, Rob. "Arduino Playground - Sen-
sor TSL235R." Arduino Playground. Arduino, 30
Nov. 2013. Web. 10 July 2014.
Appendix A
A1. Arduino Code for Light Sensor
ENVIRONMENTAL SENSOR NETWORK 9
filler filler filler filler filler filler filler filler filler
no A2. Arduino Code for Piezoelectric Sensor
filler filler filler filler filler filler filler filler filler
filler filler filler filler filler filler filler filler filler
filler filler filler filler filler filler filler filler filler
filler filler filler filler filler filler filler filler filler
filler filler filler filler filler filler filler filler filler

More Related Content

What's hot

IRJET - Talking Plant using IoT and Machine Laerning
IRJET -  	  Talking Plant using IoT and Machine LaerningIRJET -  	  Talking Plant using IoT and Machine Laerning
IRJET - Talking Plant using IoT and Machine LaerningIRJET Journal
 
IRJET - Intelligent Lighting Solution
IRJET -  	  Intelligent Lighting SolutionIRJET -  	  Intelligent Lighting Solution
IRJET - Intelligent Lighting SolutionIRJET Journal
 
IRJET- IoT based Solar Street Light Intensity Control System
IRJET- IoT based Solar Street Light Intensity Control SystemIRJET- IoT based Solar Street Light Intensity Control System
IRJET- IoT based Solar Street Light Intensity Control SystemIRJET Journal
 
next generation smart sensor
next generation smart sensornext generation smart sensor
next generation smart sensorRicha Ritambhara
 
HOME APPLIANCES CONTROL USING LIFI
 HOME APPLIANCES CONTROL USING LIFI HOME APPLIANCES CONTROL USING LIFI
HOME APPLIANCES CONTROL USING LIFIKamal Spring
 
Design and implementation home security system and monitoring by using wirele...
Design and implementation home security system and monitoring by using wirele...Design and implementation home security system and monitoring by using wirele...
Design and implementation home security system and monitoring by using wirele...IJECEIAES
 
Design and Implementation of Bluetooth Based Industrial Automation
Design and Implementation of Bluetooth Based Industrial AutomationDesign and Implementation of Bluetooth Based Industrial Automation
Design and Implementation of Bluetooth Based Industrial Automationijtsrd
 
Presentation on IoT Based Home Automation using android & NodeMCU
Presentation on IoT Based Home Automation using android & NodeMCUPresentation on IoT Based Home Automation using android & NodeMCU
Presentation on IoT Based Home Automation using android & NodeMCUSouvik Kundu
 
Smart home Environment using iot
Smart home Environment using iotSmart home Environment using iot
Smart home Environment using iotparvathy s m
 
Smartsensor 120713051429-phpapp02
Smartsensor 120713051429-phpapp02Smartsensor 120713051429-phpapp02
Smartsensor 120713051429-phpapp02Chakridhar Chakri
 
Smart sensors seminar'
Smart sensors seminar'Smart sensors seminar'
Smart sensors seminar'Naresh Kannan
 
IRJET- IoT based Industrial Level Sensor Data Acquisition & Monitoring
IRJET- IoT based Industrial Level Sensor Data Acquisition & MonitoringIRJET- IoT based Industrial Level Sensor Data Acquisition & Monitoring
IRJET- IoT based Industrial Level Sensor Data Acquisition & MonitoringIRJET Journal
 
IRJET- Earthquake Early Warning System for Android
IRJET-  	  Earthquake Early Warning System for AndroidIRJET-  	  Earthquake Early Warning System for Android
IRJET- Earthquake Early Warning System for AndroidIRJET Journal
 
IRJET- Design and Development of Low Power Sensor Node For Plant Monitori...
IRJET-  	  Design and Development of Low Power Sensor Node For Plant Monitori...IRJET-  	  Design and Development of Low Power Sensor Node For Plant Monitori...
IRJET- Design and Development of Low Power Sensor Node For Plant Monitori...IRJET Journal
 
An IOT Project Integrated with RFID and GPRS
An IOT Project Integrated with RFID and GPRSAn IOT Project Integrated with RFID and GPRS
An IOT Project Integrated with RFID and GPRSIJMTST Journal
 
Environmental Monitoring using Wireless Sensor Networks (WSN) based on IOT.
Environmental Monitoring using Wireless Sensor Networks (WSN) based on IOT.Environmental Monitoring using Wireless Sensor Networks (WSN) based on IOT.
Environmental Monitoring using Wireless Sensor Networks (WSN) based on IOT.IRJET Journal
 

What's hot (20)

Intelligent sensor
Intelligent sensorIntelligent sensor
Intelligent sensor
 
IRJET - Talking Plant using IoT and Machine Laerning
IRJET -  	  Talking Plant using IoT and Machine LaerningIRJET -  	  Talking Plant using IoT and Machine Laerning
IRJET - Talking Plant using IoT and Machine Laerning
 
IRJET - Intelligent Lighting Solution
IRJET -  	  Intelligent Lighting SolutionIRJET -  	  Intelligent Lighting Solution
IRJET - Intelligent Lighting Solution
 
IRJET- IoT based Solar Street Light Intensity Control System
IRJET- IoT based Solar Street Light Intensity Control SystemIRJET- IoT based Solar Street Light Intensity Control System
IRJET- IoT based Solar Street Light Intensity Control System
 
smart sensor
smart sensorsmart sensor
smart sensor
 
next generation smart sensor
next generation smart sensornext generation smart sensor
next generation smart sensor
 
HOME APPLIANCES CONTROL USING LIFI
 HOME APPLIANCES CONTROL USING LIFI HOME APPLIANCES CONTROL USING LIFI
HOME APPLIANCES CONTROL USING LIFI
 
Design and implementation home security system and monitoring by using wirele...
Design and implementation home security system and monitoring by using wirele...Design and implementation home security system and monitoring by using wirele...
Design and implementation home security system and monitoring by using wirele...
 
'Sentrollers" and the Internet of Things
'Sentrollers" and the Internet of Things'Sentrollers" and the Internet of Things
'Sentrollers" and the Internet of Things
 
Design and Implementation of Bluetooth Based Industrial Automation
Design and Implementation of Bluetooth Based Industrial AutomationDesign and Implementation of Bluetooth Based Industrial Automation
Design and Implementation of Bluetooth Based Industrial Automation
 
Presentation on IoT Based Home Automation using android & NodeMCU
Presentation on IoT Based Home Automation using android & NodeMCUPresentation on IoT Based Home Automation using android & NodeMCU
Presentation on IoT Based Home Automation using android & NodeMCU
 
Smart home Environment using iot
Smart home Environment using iotSmart home Environment using iot
Smart home Environment using iot
 
Smart sensor
Smart sensorSmart sensor
Smart sensor
 
Smartsensor 120713051429-phpapp02
Smartsensor 120713051429-phpapp02Smartsensor 120713051429-phpapp02
Smartsensor 120713051429-phpapp02
 
Smart sensors seminar'
Smart sensors seminar'Smart sensors seminar'
Smart sensors seminar'
 
IRJET- IoT based Industrial Level Sensor Data Acquisition & Monitoring
IRJET- IoT based Industrial Level Sensor Data Acquisition & MonitoringIRJET- IoT based Industrial Level Sensor Data Acquisition & Monitoring
IRJET- IoT based Industrial Level Sensor Data Acquisition & Monitoring
 
IRJET- Earthquake Early Warning System for Android
IRJET-  	  Earthquake Early Warning System for AndroidIRJET-  	  Earthquake Early Warning System for Android
IRJET- Earthquake Early Warning System for Android
 
IRJET- Design and Development of Low Power Sensor Node For Plant Monitori...
IRJET-  	  Design and Development of Low Power Sensor Node For Plant Monitori...IRJET-  	  Design and Development of Low Power Sensor Node For Plant Monitori...
IRJET- Design and Development of Low Power Sensor Node For Plant Monitori...
 
An IOT Project Integrated with RFID and GPRS
An IOT Project Integrated with RFID and GPRSAn IOT Project Integrated with RFID and GPRS
An IOT Project Integrated with RFID and GPRS
 
Environmental Monitoring using Wireless Sensor Networks (WSN) based on IOT.
Environmental Monitoring using Wireless Sensor Networks (WSN) based on IOT.Environmental Monitoring using Wireless Sensor Networks (WSN) based on IOT.
Environmental Monitoring using Wireless Sensor Networks (WSN) based on IOT.
 

Viewers also liked

Review Paper on Smart Sensor Network for Air Quality Monitoring
Review Paper on Smart Sensor Network for Air Quality MonitoringReview Paper on Smart Sensor Network for Air Quality Monitoring
Review Paper on Smart Sensor Network for Air Quality MonitoringAM Publications
 
Sensor Cloud Infrastructure - Small Survey Report
Sensor Cloud Infrastructure - Small Survey ReportSensor Cloud Infrastructure - Small Survey Report
Sensor Cloud Infrastructure - Small Survey ReportVintesh Patel
 
Seminar Report on RFID Based Trackin System
Seminar Report on RFID Based Trackin SystemSeminar Report on RFID Based Trackin System
Seminar Report on RFID Based Trackin SystemShahrikh Khan
 
Smartphone sensor and gesture
Smartphone sensor and gestureSmartphone sensor and gesture
Smartphone sensor and gestureBhavya5800
 
Android - Sensor Manager
Android - Sensor ManagerAndroid - Sensor Manager
Android - Sensor ManagerYong Heui Cho
 
Wireless Sensor Networks
Wireless Sensor NetworksWireless Sensor Networks
Wireless Sensor NetworksKarthik
 
wireless sensor network my seminar ppt
wireless sensor network my seminar pptwireless sensor network my seminar ppt
wireless sensor network my seminar pptEisha Madhwal
 

Viewers also liked (10)

Review Paper on Smart Sensor Network for Air Quality Monitoring
Review Paper on Smart Sensor Network for Air Quality MonitoringReview Paper on Smart Sensor Network for Air Quality Monitoring
Review Paper on Smart Sensor Network for Air Quality Monitoring
 
GPS
GPSGPS
GPS
 
Sensor Cloud Infrastructure - Small Survey Report
Sensor Cloud Infrastructure - Small Survey ReportSensor Cloud Infrastructure - Small Survey Report
Sensor Cloud Infrastructure - Small Survey Report
 
Seminar Report on RFID Based Trackin System
Seminar Report on RFID Based Trackin SystemSeminar Report on RFID Based Trackin System
Seminar Report on RFID Based Trackin System
 
Android Sensor System
Android Sensor SystemAndroid Sensor System
Android Sensor System
 
Smartphone sensor and gesture
Smartphone sensor and gestureSmartphone sensor and gesture
Smartphone sensor and gesture
 
Android Sensor
Android SensorAndroid Sensor
Android Sensor
 
Android - Sensor Manager
Android - Sensor ManagerAndroid - Sensor Manager
Android - Sensor Manager
 
Wireless Sensor Networks
Wireless Sensor NetworksWireless Sensor Networks
Wireless Sensor Networks
 
wireless sensor network my seminar ppt
wireless sensor network my seminar pptwireless sensor network my seminar ppt
wireless sensor network my seminar ppt
 

Similar to Environmental Sensor Network Paper

WSN Based Temperature Monitoring System for Multiple Locations in Industry
WSN Based Temperature Monitoring System for Multiple Locations in IndustryWSN Based Temperature Monitoring System for Multiple Locations in Industry
WSN Based Temperature Monitoring System for Multiple Locations in Industryijtsrd
 
IoT Based Water Level Meter for Alerting Population about Floods
IoT Based Water Level Meter for Alerting Population about FloodsIoT Based Water Level Meter for Alerting Population about Floods
IoT Based Water Level Meter for Alerting Population about Floodsijtsrd
 
A ZigBee Based Wireless Sensor Network for an Agricultural Environment
A ZigBee Based Wireless Sensor Network for an Agricultural EnvironmentA ZigBee Based Wireless Sensor Network for an Agricultural Environment
A ZigBee Based Wireless Sensor Network for an Agricultural Environmentijsrd.com
 
Mobile and Web Applications for Sensing Hazardous Room Temperature using Wire...
Mobile and Web Applications for Sensing Hazardous Room Temperature using Wire...Mobile and Web Applications for Sensing Hazardous Room Temperature using Wire...
Mobile and Web Applications for Sensing Hazardous Room Temperature using Wire...Mysa Vijay
 
IRJET - Forest Fire Detection, Prevention and Response System using IoT
IRJET - Forest Fire Detection, Prevention and Response System using IoTIRJET - Forest Fire Detection, Prevention and Response System using IoT
IRJET - Forest Fire Detection, Prevention and Response System using IoTIRJET Journal
 
Design and implementation smart home alarm system with zigbee transceiver
Design and implementation smart home alarm system with zigbee transceiverDesign and implementation smart home alarm system with zigbee transceiver
Design and implementation smart home alarm system with zigbee transceiverzaidinvisible
 
Design and implementation smart home alarm system with zig bee transceiver
Design and implementation smart home alarm system with zig bee transceiverDesign and implementation smart home alarm system with zig bee transceiver
Design and implementation smart home alarm system with zig bee transceiverzaidinvisible
 
Intelligent fire detection and alert system using labVIEW
Intelligent fire detection and alert system using labVIEWIntelligent fire detection and alert system using labVIEW
Intelligent fire detection and alert system using labVIEWIJECEIAES
 
Decibel meter using IoT with notice board
Decibel meter using IoT with notice boardDecibel meter using IoT with notice board
Decibel meter using IoT with notice boardIRJET Journal
 
Monitoring and Controlling Device for Smart Greenhouse by using Thinger.io Io...
Monitoring and Controlling Device for Smart Greenhouse by using Thinger.io Io...Monitoring and Controlling Device for Smart Greenhouse by using Thinger.io Io...
Monitoring and Controlling Device for Smart Greenhouse by using Thinger.io Io...ijtsrd
 
Performance Evaluation of Smart Home System using Internet of Things
Performance Evaluation of Smart Home System using   Internet of Things Performance Evaluation of Smart Home System using   Internet of Things
Performance Evaluation of Smart Home System using Internet of Things IJECEIAES
 
Distance Measurement Using Ultrasonic Sensor and Nodemcu
Distance Measurement Using Ultrasonic Sensor and NodemcuDistance Measurement Using Ultrasonic Sensor and Nodemcu
Distance Measurement Using Ultrasonic Sensor and NodemcuIRJET Journal
 
IJSRED-V2I5P2
IJSRED-V2I5P2IJSRED-V2I5P2
IJSRED-V2I5P2IJSRED
 
IRJET- Development of Data Transmission using Smart Sensing Technology for St...
IRJET- Development of Data Transmission using Smart Sensing Technology for St...IRJET- Development of Data Transmission using Smart Sensing Technology for St...
IRJET- Development of Data Transmission using Smart Sensing Technology for St...IRJET Journal
 
Raspberry PI and Arduino UNO Working Together as a Basic Meteorological Station
Raspberry PI and Arduino UNO Working Together as a Basic Meteorological StationRaspberry PI and Arduino UNO Working Together as a Basic Meteorological Station
Raspberry PI and Arduino UNO Working Together as a Basic Meteorological StationAIRCC Publishing Corporation
 
Low cost wireless sensor networks and smartphone applications for disaster ma...
Low cost wireless sensor networks and smartphone applications for disaster ma...Low cost wireless sensor networks and smartphone applications for disaster ma...
Low cost wireless sensor networks and smartphone applications for disaster ma...eSAT Publishing House
 
Development of Personal Weather Report for Home Security
Development of Personal Weather Report for Home SecurityDevelopment of Personal Weather Report for Home Security
Development of Personal Weather Report for Home SecurityIOSRJVSP
 
LORA BASED DATA ACQUISITION SYSTEM
LORA BASED DATA ACQUISITION SYSTEMLORA BASED DATA ACQUISITION SYSTEM
LORA BASED DATA ACQUISITION SYSTEMIRJET Journal
 
Smart Container
Smart ContainerSmart Container
Smart ContainerSupritha k
 

Similar to Environmental Sensor Network Paper (20)

WSN Based Temperature Monitoring System for Multiple Locations in Industry
WSN Based Temperature Monitoring System for Multiple Locations in IndustryWSN Based Temperature Monitoring System for Multiple Locations in Industry
WSN Based Temperature Monitoring System for Multiple Locations in Industry
 
IoT Based Water Level Meter for Alerting Population about Floods
IoT Based Water Level Meter for Alerting Population about FloodsIoT Based Water Level Meter for Alerting Population about Floods
IoT Based Water Level Meter for Alerting Population about Floods
 
A ZigBee Based Wireless Sensor Network for an Agricultural Environment
A ZigBee Based Wireless Sensor Network for an Agricultural EnvironmentA ZigBee Based Wireless Sensor Network for an Agricultural Environment
A ZigBee Based Wireless Sensor Network for an Agricultural Environment
 
Mobile and Web Applications for Sensing Hazardous Room Temperature using Wire...
Mobile and Web Applications for Sensing Hazardous Room Temperature using Wire...Mobile and Web Applications for Sensing Hazardous Room Temperature using Wire...
Mobile and Web Applications for Sensing Hazardous Room Temperature using Wire...
 
IRJET - Forest Fire Detection, Prevention and Response System using IoT
IRJET - Forest Fire Detection, Prevention and Response System using IoTIRJET - Forest Fire Detection, Prevention and Response System using IoT
IRJET - Forest Fire Detection, Prevention and Response System using IoT
 
Design and implementation smart home alarm system with zigbee transceiver
Design and implementation smart home alarm system with zigbee transceiverDesign and implementation smart home alarm system with zigbee transceiver
Design and implementation smart home alarm system with zigbee transceiver
 
Design and implementation smart home alarm system with zig bee transceiver
Design and implementation smart home alarm system with zig bee transceiverDesign and implementation smart home alarm system with zig bee transceiver
Design and implementation smart home alarm system with zig bee transceiver
 
Intelligent fire detection and alert system using labVIEW
Intelligent fire detection and alert system using labVIEWIntelligent fire detection and alert system using labVIEW
Intelligent fire detection and alert system using labVIEW
 
Decibel meter using IoT with notice board
Decibel meter using IoT with notice boardDecibel meter using IoT with notice board
Decibel meter using IoT with notice board
 
Hn3114461450
Hn3114461450Hn3114461450
Hn3114461450
 
Monitoring and Controlling Device for Smart Greenhouse by using Thinger.io Io...
Monitoring and Controlling Device for Smart Greenhouse by using Thinger.io Io...Monitoring and Controlling Device for Smart Greenhouse by using Thinger.io Io...
Monitoring and Controlling Device for Smart Greenhouse by using Thinger.io Io...
 
Performance Evaluation of Smart Home System using Internet of Things
Performance Evaluation of Smart Home System using   Internet of Things Performance Evaluation of Smart Home System using   Internet of Things
Performance Evaluation of Smart Home System using Internet of Things
 
Distance Measurement Using Ultrasonic Sensor and Nodemcu
Distance Measurement Using Ultrasonic Sensor and NodemcuDistance Measurement Using Ultrasonic Sensor and Nodemcu
Distance Measurement Using Ultrasonic Sensor and Nodemcu
 
IJSRED-V2I5P2
IJSRED-V2I5P2IJSRED-V2I5P2
IJSRED-V2I5P2
 
IRJET- Development of Data Transmission using Smart Sensing Technology for St...
IRJET- Development of Data Transmission using Smart Sensing Technology for St...IRJET- Development of Data Transmission using Smart Sensing Technology for St...
IRJET- Development of Data Transmission using Smart Sensing Technology for St...
 
Raspberry PI and Arduino UNO Working Together as a Basic Meteorological Station
Raspberry PI and Arduino UNO Working Together as a Basic Meteorological StationRaspberry PI and Arduino UNO Working Together as a Basic Meteorological Station
Raspberry PI and Arduino UNO Working Together as a Basic Meteorological Station
 
Low cost wireless sensor networks and smartphone applications for disaster ma...
Low cost wireless sensor networks and smartphone applications for disaster ma...Low cost wireless sensor networks and smartphone applications for disaster ma...
Low cost wireless sensor networks and smartphone applications for disaster ma...
 
Development of Personal Weather Report for Home Security
Development of Personal Weather Report for Home SecurityDevelopment of Personal Weather Report for Home Security
Development of Personal Weather Report for Home Security
 
LORA BASED DATA ACQUISITION SYSTEM
LORA BASED DATA ACQUISITION SYSTEMLORA BASED DATA ACQUISITION SYSTEM
LORA BASED DATA ACQUISITION SYSTEM
 
Smart Container
Smart ContainerSmart Container
Smart Container
 

Environmental Sensor Network Paper

  • 1. Environmental Sensor Network The New Jersey Governor’s School of Engineering and Technology 2014 Arthur Belkin Wayne Hills High School Shweta Dutta South Brunswick High School Yunhee Kang Ridge High School Hope McGovern Haddonfield Memorial High School Matthew Scalamandre Moorestown Friends School Abstract In order to demonstrate how technology can be used to facilitate human interaction with the en- vironment, the research team designed and built a proof-of-concept mesh network to collect data about the home environment and display it to a base station. Simplifying human to environment interaction makes life easier in a world where many people, devices, and tasks require a person’s attention. The network connects two sensors that report data to Arduino platforms. These platforms communicate with XBee radios, which in turn talk to a base laptop that displays the data to the user of the network. A mesh network that reports condi- tions within a house is a viable way of monitoring and regulating an area; this eases human to envi- ronment interactions. Subsequent work might im- plement technology for the mesh network to auto- matically respond to changes in the environment, as opposed to only reporting them back to the user. 1. Introduction Modern technology is intrinsically interactive. While it does connect humans to virtual reality and to each other, it can also be used to connect humans to their environment; such interactions can be both monitored and regulated. Sensor network technol- ogy has been previously used to communicate data from remote locations quickly and effectively. For example, a satellite-based remote sensor network allows researchers at the University of Hawaii to analyze the eruptions of volcanoes on remote is- lands off the coast of Antarctica within mere hours of the explosion1 . Figure 1. A Nest Temperature Thermostat2 Sensors can also be utilized in more quotidian sit- uations; Nest home thermostats include tempera- ture, humidity, light, and activity sensors in the unit in order to construct a personalized heating and cooling schedule. The Nest system automat- ically adjusts the temperature of a home accord- ing to activity, season, ambient temperature, and recorded preferences. It also communicates data about a user’s energy utilization and can be con- trolled via a smartphone application3 . These systems provided the initial inspiration for the project; however, the group was determined
  • 2. 2 THE GOVERNOR’S SCHOOL OF ENGINEERING AND TECHNOLOGY 2014 to create a simpler and cheaper in-home monitor- ing system it dubbed a “Smart-Home”. A “Smart- Home” is a house that has multiple sensors set up to detect the condition of appliances and objects throughout the building and report them to a cen- tral computer. As a proof-of-concept of how tech- nology can be used to organize environmental data and facilitate regulation, the group created a wire- less sensor network to perform and regulate vari- ous household tasks. Sensors were used to mon- itor the progress of a washing machine cycle and the ambient light level. 2. Background 2.1 Open-Source Movement Programmers and hardware developers alike take part in the ever-changing open-source movement. The concept of open-source refers to the freedom to distribute code and hardware for reuse and mod- ification. The operating system GNU, which re- cursively stands for “GNU’s Not UNIX,” is one of the more well-known products of this movement, with UNIX referring to the more restrictive operat- ing system controlled by AT&T and the University of California, Berkeley4 . Today, platforms such as Arduino allow for easy integration of hardware and software into anything from personal projects to full-scale replicable and marketable products. Open-source allows amateur coders and builders, start-up companies, or any person with an idea to contribute to the world of technology, putting some power into the hands of consumers who oth- erwise must rely on the giant technology compa- nies of today. Essential to the project, the open- source movement allows for effective development of proof-of-concept designs. 2.2 Arduino Arduino is an open-source computing platform based on a simple microcontroller and an In- tegrated Development Environment (IDE). The physical board, known as the microcontroller, has multiple pins and outputs which can be used to build circuits. Unlike other programmable circuit boards, Arduino requires only a USB cable to load new code onto the microcontroller. Additionally, the simplicity of Arduino’s IDE - which has a lan- guage based on C++ - makes the programming easy to learn and manipulate5 . Other advantages of Arduino include its relatively cost-effective plat- form (with the more expensive modules valued at $50), cross-platform capabilities as it can run on Windows, Macintosh OSX, and Linux operating systems, and the open-source nature of its software and hardware6 . 2.3 Sensors Sensors are devices that allow humans or comput- ers to detect changes in their environment. Most sensors are designed to respond to one particular type of stimulus, such as temperature or light, and output data that corresponds to the intensity of the event. The sensors used by Arduino output data as either a digital or analog signal. The two sen- sors used for this project were a light sensor and a piezoelectric sensor. The light sensor combines a silicon diode that converts incipient light into an electric current with a device which converts this current into a square wave with frequency directly proportional to the current, and therefore propor- tional to the light intensity. This signal can be read by the Arduino as a digital input7 . Piezoelec- tric sensors detect vibrations, shocks, and impacts. Such an impact causes the sensor to deform, which in turn produces a voltage. The voltage level cor- responds to the degree of deformation the sensor experiences; this level can be read by the Arduino board8 . Thus, sensor networks allow technology to collect, analyze, and respond to environmental data otherwise inaccessible to humans. 2.4 XBee and Mesh Network XBee radios, manufactured by Digi International, Inc., are small chips that wirelessly transmit infor- mation and allow multiple Arduinos. to communi- cate with each other. The protocol, or digital rules for data exchange between the radios, is ZigBee, which is typically used by small, low power ra- dios to transmit small amounts of data over a short range9 . Multiple XBee radios can be connected
  • 3. ENVIRONMENTAL SENSOR NETWORK 3 to form a mesh network, providing a more exten- sive range with each XBee acting as a node. Much like the networking system used by cellular de- vices, XBees act as radio towers to relay wireless information. For multiple radios to be able to send and receive information, they must be set to Ap- plication Programming Interface (API) mode10 , as opposed to Attention (AT) mode, which only lets two radios communicate11 . API mode sends and receives data in frames, a technical term for radio messages. Radios can be configured into two con- nection arrangements: full mesh and partial mesh topologies. In the former case, all radios are inter- connected; in the latter, some nodes in the network have restricted communicating ability with respect to the other nodes12 . A full mesh network was cho- sen to connect all of the XBee radios. 3. Methods 3.1 Sensor Selection The research group decided to create a network of multiple sensors to monitor in-home activities as a proof-of-concept of how technology can collect and react to ambient data. A piezoelectric sensor converts motion into electrical voltage, which can be monitored in the home environment to deter- mine whether a washing machine is running. A light sensor can be used to determine the level of light in an environment. Substantial documenta- tion exists for both of the sensors, and they are both extremely cost-effective. 3.2 Arduino Platform Extensive information on the Arduino microcon- troller and its corresponding programming lan- guage is readily available online from the creators of the Arduino board as well as from amateur de- velopers. Therefore, it was not necessary to fab- ricate a wholly new design for an Arduino-based mesh network. The open-source nature of the board encourages developers and coders to share their projects on the internet. In addition to of- ficial documentation for using the selected sen- sors on the Arduino platform, many examples of sensor-interfacing Arduino projects were available Figure 2. Piezoelectric Sensor: SEN-1029313 Figure 3. Light to Frequency Conversion Sensor: Model TSL235R14 to the research team to use and modify. It was also necessary for the researchers to familiarize them- selves with the Arduino programming language it- self, which is based on C++. This project uses two Arduino Uno boards and one Arduino Mega board. 3.3 Circuit Development and Testing The light sensor returns the intensity of the light it senses with the units µW/cm2 , while the piezo- electric sensor returns a number from 0 to 1023, with 0 being the lowest and 1023 being the highest. Safety factors, particularly resistors, were incorpo-
  • 4. 4 THE GOVERNOR’S SCHOOL OF ENGINEERING AND TECHNOLOGY 2014 Figure 4. Arduino Uno: Model R315 Figure 5. Arduino Mega: Model 2560 R216 rated into each design to shield the Arduino from voltage spikes; the piezoelectic sensor generates a potential difference when it senses a vibration that deforms it. Each circuit was then prototyped on a breadboard. The sensors were thoroughly tested before being incorporated into the final network. To confirm that each sensor worked properly, they were as- sessed in different conditions. It was determined that the piezoelectric sensor required a very se- cure attachment to a vibrating object in order to accurately measure the oscillation level. The light sensor was tested under varying intensities to de- termine its sensitivity. Perfecting data passing from one sensor to a separate laptop required trou- bleshooting and incremental development; for ex- ample, instead of creating the full mesh network and testing it, the research team started by passing sensor information from one Arduino to another and then to a computer, fixing hardware and soft- ware challenges as they arose. 3.4 XBee Radios and Creation of Mesh Network XBee radios constitute the nodes of the mesh net- work. A diagram of the mesh network is seen in Figure 6. Using X CTU software, the four XBee radios were configured with one as the coordina- tor and the others as routers. This setup allows for simplified packaging of sensor messages by the Arduinos, as the destination address is easily set to the coordinator XBee radio that is connected to the base station for data display. Each Arduino plat- form must package the messages, often referred to as a frame for the XBee radios to both trans- mit and read the information. The frame contains fields the XBee radios will recognize, with a mes- sage containing a start byte, which alerts the ra- dio that a valid message transmission is beginning. Next in the frame are frame details, which spec- ify attributes such as the length of the message and the type of message being sent. A frame ID asks for a specific return sequence confirming that a message was sent successfully, left empty for this project as the network created is too small to require this check. This is followed by two ad- dresses, one 64-bit and another 16-bit. The 64-bit address is unique to all devices in the world and is called a destination address, whereas the 16-bit destination network address references the coor- dinator XBee radio, unique to the mesh network created. A broadcast radius was set, declaring the maximum number of nodes for the frame to pass through before reaching its destination. Setting the radius to 0 allows the data to reach the receiver in however many nodes are necessary, and this is the radius used in the mesh network. Transmission options can also be set allowing for data encryp- tion, unnecessary for a low-security smart-home network. Finally, the actual sensor data formatted by the Arduino was added to the frame, followed by a checksum byte which ensures the entire data packet was received. filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler
  • 5. ENVIRONMENTAL SENSOR NETWORK 5 Figure 6. Concept of Operations: Mesh Network
  • 6. 6 THE GOVERNOR’S SCHOOL OF ENGINEERING AND TECHNOLOGY 2014 Figure 7. XBee Radio: Model XBEE217 3.5 Formatting Sensor Data for User Data is sent from Arduino nodes to a host com- puter via XBee radios. However, this data must be formatted accordingly in order to be understood by a human user. For this task, a program was created using the Python programming language to capture data from the Serial monitor, format it, and display it in an organized fashion. PySerial is a Python application programming interface module used to create an application to store and display data. The Arduino platform that is connected to the piezo- electric sensor transmits one byte of sensor infor- mation: a 0 indicating no vibration, or a 1 indi- cating vibration. These values are only sent if the state changed from the last sensor reading, other- wise no data is sent. If a 0 is sent to the coordinator XBee, then PySerial will display a message telling the user that the washing machine/dryer cycle is done. The Arduino connected to the light sensor sends the intensity of the light in µW/cm2 , which is converted by PySerial to a low to high intensity scale from 1 to 10 and displayed in a manner easily understood by the user18 . 4. Results and Discussion The research team built a mesh network that suc- cessfully communicates environmental data to a host computer. Sensor data is relayed from one Arduino board to another by way of XBee radio signals, which pack information into data frames. Messages are sent to the one XBee attached to a host laptop and are displayed on the base sta- tion monitor through a Python program. Arduino code for the two sensor nodes is included in the Appendix B. The objective of the project was to demonstrate the usefulness of a mesh network in facilitating human interaction with the environ- ment. However, the result was limited by factors including the reliability and range of the available sensors and the practicality of a mesh network on the scale to which it was built. The design would have to be modified to be implemented on a larger scale. Significant difficulty was experienced in applying a conceptual understanding of the mesh network to the challenge of physically creating working code to send messages between nodes on the network. The majority of difficulties the team encountered was in writing the programs to run the project. Two distinct codes were needed to power the network: one to send and receive sensor data and one to display the data on the host laptop. Reading the piezoelectric sensor was straightforward as it out- puts an analog voltage signal that the Arduino can read easily. However, it was difficult to acquire us- able data from the washing machine, as the values returned were too low. The piezoelectric sensor was tested in various configurations, but it was un- able to detect any meaningful events until a weight was placed on the sensor. The weight vibrated in concert with the washing machine, intensifying the stimulus. The program used by the Arduino is also designed to increase accuracy by averag- ing the readings over a period of one second. The light sensor presented a different set of problems. It was easy to set up physically; however, reading the light sensor proved more difficult as the sensor output a square wave that cannot be natively inter- preted by an Arduino. The problem was resolved by finding sample code online that treated each peak of the square wave as a digital input and in- troduced an interrupt that kept count of the number of inputs that occurred each second19 . This allows the Arduino to calculate the intensity of incipient
  • 7. ENVIRONMENTAL SENSOR NETWORK 7 light with acceptable accuracy. At higher inten- sities, the interrupts occur with enough frequency to overload the Arduino’s processor, causing it to return incorrect values; however, this problem is not relevant at the intensities of light for which the proof-of-concept network is intended to be used. The team also encountered difficulties in program- ming the message passing system. Our main chal- lenge was formatting the data into a message that the XBee radios would understand. The group de- cided that the problem of differentiating between two sensors would most easily be solved by having the message be of different lengths for each sensor. For the piezoelectric sensor, we simplified the re- sponse into one byte, whereas for the light sensor we stored the value into two bytes. The light sen- sor returns a value that is often greater than 255, and therefore must be stored in two separate bytes. However, in dark environments, the sensor returns a value less than 255. If the XBee attempted to send this data, the base station would misinterpret the message as coming from a piezoelectric sensor. To resolve this problem, the code was modified to force the Arduino to parse the data into two vari- ables before sending it. This approach forces the radio to send two values in the message, which pre- serves the base station’s ability to discern between the two sensors. Setting up the XBee radios required the use of X CTU software, which allows for easy installation of firmware. One XBee was made a coordinator, while the others were made into routers. Origi- nally, the data was hard-coded as a long series of write method statements that wrote information to the Serial port one byte at a time, problematic as the frame was being sent in parts and received in parts as viewed through X CTU. While testing the network, the X CTU software was sending mes- sage requests and receiving partial data, but this issue was fixed in formatting the package of data as a receive request in a byte array. Using a for loop, we filled an array of bytes one byte at a time with the correct frame format as discussed in sec- tion 3.5. In this loop, the checksum byte is filled with a 0, as it has to be calculated before being put in the byte. A second loop calculates the check- sum, summing the values from the fourth byte to the last non-checksum byte, dividing by 256, and then taking the remainder when dividing by 256 yet again. This byte is inserted as the last byte of the data, and then the package is transmitted using the write method that accepts a byte array and its size as arguments. Through trial and error, the team recognized the need to send the bytes in hex instead of decimal, as the hex number system is what the X CTU software reads the messages in. Finally, PySerial was implemented to read the values sent in hex and translate them into console messages. 5. Conclusion Based on the research completed, a mesh network has the ability to simplify human interaction with the environment. This type of network allows tech- nology to act as an interface between the real world and humans, reading and interpreting raw data and formatting it so that it is easy to understand and respond to. The team’s network consisted of two sensors and a base station, and the setup can eas- ily be expanded to include more sensors and re- port other environmental information to the user. The group’s network successfully communicated data about the home environment, specifically data about the light level in a room and about the func- tioning of a washing machine. Possible additions and improvements that could be made to the cre- ated mesh network include adding multiple sensors to one Arduino platform, adding more nodes to the network to collect data from other locations, de- veloping a Graphical User Interface (GUI) to dis- play formatted sensor data and integrating it into a smartphone application, and creating actuators that allow the network to not only transmit data, but also react to the conditions sensed by taking physi- cal action, e.g. opening and closing window blinds in response to light levels. Further research might look into making mesh networks secure, in order to avoid others from reading data transmitted, or possibly broadcasting malicious signals that com- promise the performance of the network. As the open source movement continues to expand and include programmers and hardware-builders
  • 8. 8 THE GOVERNOR’S SCHOOL OF ENGINEERING AND TECHNOLOGY 2014 alike, the future application of mesh networks also grows. Mesh networks can also be used in outdoor settings where people might have trouble checking certain conditions manually due to physical limita- tions. A sensor placed in such areas could provide a live feed of such conditions, connected in a full mesh creating a local network that does not require the internet to send and receive data. Such a net- work would require sensors that are weather resis- tant and robust code that ensures network security, both easily developed and obtained from the open source movement. Mesh networks, when com- bined with the advantages of open source, have the potential to facilitate human to environment inter- actions. 6. Acknowledgements We would like to acknowledge our project mentors Josef Grossmann, Joe Mirizio, Ryan Flynn, and Edward Kahn from Lockheed Martin who have generously provided their time along with the nec- essary resources and information to successfully complete our proof-of-concept mesh network. The team would also like to acknowledge the New Jer- sey Governor’s School of Engineering and Tech- nology’s Program Director Dr. Ilene Rosen, along with the Assistant Program Director Jean Patrick Antoine and the entire GSET staff for present- ing such an incredible opportunity to the team, key to the coordination and organization of such a comprehensive and exciting summer program. We also extend thanks to our Residential Teach- ing Assistant Maya Saltzman for overseeing the project, making sure we had the required tools and workspace. A final thank you goes to all of the sponsors of the New Jersey Governor’s School of Engineering and Technology, specifically Rutgers University, The State of New Jersey, Morgan Stan- ley, Lockheed Martin, Silverline Windows, Jersey South Industries, Inc., The Provident Bank Foun- dation, and Novo Nordisk. 7. References [1] Schmidt, Laurie J. "Sensing Remote Volca- noes." NASA Earth Observatory. National Aero- nautics Space Administration, 13 July 2004. Web. 11 July 2014. [2] Nest Temperature Thermostat. Digital image. Amazon. N.p., n.d. Web. 11 July 2014. [3] "Home." Nest. Nest Labs, n.d. Web. 13 July 2014. [4] Henderson, Harry. "Open-Source Movement." Science Online. Facts On File News Services, n.d. Web. 10 July 2014. [5] "Arduino Introduction." Arduino - Introduction. Arduino, n.d. Web. 13 July 2014. [6] "What Is an Arduino?" SparkFun. SparkFun Electronics, 26 Feb. 2013. Web. 8 July 2014. [7] Light-To-Frequency Converter Datasheet. N.p.: Texas Advanced Optoelectronic Solutions, Sept. 2007. PDF. [8] Piezoelectric Sound Components. N.p.: Murata Manufacturing Co., Ltd., n.d. PDF. [9] "XBee Buying Guide." SparkFun. SparkFun Electronics, n.d. Web. 19 July 2014. [10] "What Is API (Application Programming Inter- face) Mode and How Does It Work?" Digi. Digi International Inc., n.d. Web. 19 July 2014. [11] "The AT Command Set." Digi. Digi Interna- tional Inc., n.d. Web. 19 July 2014. [12] Brinton, Stephen. Mesh Networks. N.p.: Gor- don College, 2009. PPT. [13] Piezoelectric Sensor. Digital image. SparkFun. SparkFun Electronics, n.d. Web. 15 July 2014. [14] Light to Frequency Conversion Sensor. Digi- tal image. SparkFun. SparkFun Electronics, n.d. Web. 15 July 2014. [15] Arduino Uno. Digital image. Tested. N.p., n.d. Web. 15 July 2014. [16] Arduino Mega. Digital image. Electroschemat- ics. N.p., n.d. Web. 15 July 2014. [17] XBee S2. Digital image. Entesla. N.p., n.d. Web. 15 July 2014. [18] Liechti, Chris. "Welcome to PySerial’s Doc- umentation." PySerial. N.p., n.d. Web. 19 July 2014. [19] Tillaart, Rob. "Arduino Playground - Sen- sor TSL235R." Arduino Playground. Arduino, 30 Nov. 2013. Web. 10 July 2014. Appendix A A1. Arduino Code for Light Sensor
  • 9. ENVIRONMENTAL SENSOR NETWORK 9 filler filler filler filler filler filler filler filler filler no A2. Arduino Code for Piezoelectric Sensor filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler