design and implementation of wireless sensor network … · machines and transmits to control room...

14
Design and Implementation of Wireless Sensor Network Based on MATLAB Interfaced with Arduino Dr. Mahmood F. Mosleh 1,a , Dr. Rashid A. Fayadh 2, b , Shahad A. Hamid 3, c 1,2,3 College of Electrical Engineering Techniques,Middle Technical University Aldora, Baghdad, Iraq a [email protected], b [email protected], c [email protected] Abstract.Wireless Sensor Network (WSN) have a great influence in various applications in recent years. Monitoring the surrounding environments is one of the most important uses in many aspects of modern life under the great technological improvement which saves effort and time. In this research, a facility of interfacing of new version of Matlab with the Arduino microprocessor has exploiting to implement a flexible network. The data of each sensor is collected in wireless manor exploiting the ZigBee protocol with its XBee hardware platform through a router which connected wirelessly through coordinator to Personal Computer (PC) as a base station. The gathering data is interpreted using Matlab to store and/or displayed as a schedule or graphical. The proposed network consists of many routers each one is associated with a group of sensors directly with one hope or indirectly with multi-hope given the network high flexibility in expansion to cover variable area on demand. In this research, one router with four sensors are used as a part of the proposed network for experimental implementation. The results show that the Matlab with Arduino support the performance of such network to process the collected data for storing and displaying. Also, it can be designed a program for any function serving user requirements. Keywords: Matlab, Arduino, WSN, monitoring I. INTRODUCTION WSN has important applications such as remote environmental monitoring and target tracking, especially in last years with the help of sensors that are smaller, cheaper, and intelligent. The technology of wireless sensor networks evolves very fast gratitude to the advancement of digital electronic technology and wireless communication technology. WSNs are collected of a large number of sensor nodes that are deployed spatially through indoor or outdoor environment. These sensor nodes can be used to detect the surround conditions such as gas, humidity, light, temperature, sound and so on. It means that there are various application areas for WSNs. The challenges of WSNs are the limitation of energy because of small battery used, the transmission bandwidth and small size of memory. The node in WSN can't transmit a large number of data so that it used a system with low power consumption such as Wi-Fi, Bluetooth and ZigBee [1]. A simulation model is better to evaluate the performance of WSN. Among of many tools that used recently for such simulation is the MATLAB package. In WSNs, this tool can be used as interfaced technique between coordinator that receive data from all sensors and sends it to the base station which is used in this research as a Personal Computer (PC). Also, can be designed a special program included more than one function and control all processing to execute a full task of WSN. In addition, a monitoring of environment can be done along a limited period using such technique with alarm can be designed easily by some of commands added to the special program. Many research has been implemented a WSN with Matlab tools for the purpose of performing some tasks such as, [2] who suggested an algorithm for WSN in Matlab environment. This model can reflect the reality networks effectively to verify the performance of the localization algorithms including location node numbers, run time and location error. In [3] the authors mainly focuses on the correlated measures made to reduce human interaction with machines by using industrial observation robot. This robot collects the parameters from the machines and transmits to control room using Zigbee protocol. The control room interface with the robot is designed using MATLAB GUI model. MATLAB GUI interface shows the parameter readings from the robot and plotted in graph. The robot mainly observes smoke, temperature, gases and light intensity that defect in manufacturing machines and security purposes using cameras. This paper attempt to design and implemented a WSN based on interface with Matlab to collect the information from various nodes using the ZigBee protocol based on IEEE 802.15.4 report as an efficient communication link. Such network has an advantage for extension in any size of area to cover and monitor the environments including recorded data for any parameters such as lighting, gas, motion and distance. ISSN (Print) : 2319-8613 ISSN (Online) : 0975-4024 Dr. Mahmood F. Mosleh et al. / International Journal of Engineering and Technology (IJET) DOI: 10.21817/ijet/2017/v9i4/170904031 Vol 9 No 4 Aug-Sep 2017 2871

Upload: leminh

Post on 14-Jul-2018

217 views

Category:

Documents


0 download

TRANSCRIPT

Design and Implementation of Wireless Sensor Network Based on MATLAB

Interfaced with Arduino Dr. Mahmood F. Mosleh1,a, Dr. Rashid A. Fayadh2, b, Shahad A. Hamid3, c

1,2,3College of Electrical Engineering Techniques,Middle Technical University Aldora, Baghdad, Iraq

[email protected], [email protected],[email protected]

Abstract.Wireless Sensor Network (WSN) have a great influence in various applications in recent years. Monitoring the surrounding environments is one of the most important uses in many aspects of modern life under the great technological improvement which saves effort and time. In this research, a facility of interfacing of new version of Matlab with the Arduino microprocessor has exploiting to implement a flexible network. The data of each sensor is collected in wireless manor exploiting the ZigBee protocol with its XBee hardware platform through a router which connected wirelessly through coordinator to Personal Computer (PC) as a base station. The gathering data is interpreted using Matlab to store and/or displayed as a schedule or graphical. The proposed network consists of many routers each one is associated with a group of sensors directly with one hope or indirectly with multi-hope given the network high flexibility in expansion to cover variable area on demand. In this research, one router with four sensors are used as a part of the proposed network for experimental implementation. The results show that the Matlab with Arduino support the performance of such network to process the collected data for storing and displaying. Also, it can be designed a program for any function serving user requirements.

Keywords: Matlab, Arduino, WSN, monitoring

I. INTRODUCTION

WSN has important applications such as remote environmental monitoring and target tracking, especially in last years with the help of sensors that are smaller, cheaper, and intelligent. The technology of wireless sensor networks evolves very fast gratitude to the advancement of digital electronic technology and wireless communication technology. WSNs are collected of a large number of sensor nodes that are deployed spatially through indoor or outdoor environment. These sensor nodes can be used to detect the surround conditions such as gas, humidity, light, temperature, sound and so on. It means that there are various application areas for WSNs. The challenges of WSNs are the limitation of energy because of small battery used, the transmission bandwidth and small size of memory. The node in WSN can't transmit a large number of data so that it used a system with low power consumption such as Wi-Fi, Bluetooth and ZigBee [1]. A simulation model is better to evaluate the performance of WSN. Among of many tools that used recently for such simulation is the MATLAB package. In WSNs, this tool can be used as interfaced technique between coordinator that receive data from all sensors and sends it to the base station which is used in this research as a Personal Computer (PC). Also, can be designed a special program included more than one function and control all processing to execute a full task of WSN. In addition, a monitoring of environment can be done along a limited period using such technique with alarm can be designed easily by some of commands added to the special program.

Many research has been implemented a WSN with Matlab tools for the purpose of performing some tasks such as, [2] who suggested an algorithm for WSN in Matlab environment. This model can reflect the reality networks effectively to verify the performance of the localization algorithms including location node numbers, run time and location error. In [3] the authors mainly focuses on the correlated measures made to reduce human interaction with machines by using industrial observation robot. This robot collects the parameters from the machines and transmits to control room using Zigbee protocol. The control room interface with the robot is designed using MATLAB GUI model. MATLAB GUI interface shows the parameter readings from the robot and plotted in graph. The robot mainly observes smoke, temperature, gases and light intensity that defect in manufacturing machines and security purposes using cameras.

This paper attempt to design and implemented a WSN based on interface with Matlab to collect the information from various nodes using the ZigBee protocol based on IEEE 802.15.4 report as an efficient communication link. Such network has an advantage for extension in any size of area to cover and monitor the environments including recorded data for any parameters such as lighting, gas, motion and distance.

ISSN (Print) : 2319-8613 ISSN (Online) : 0975-4024 Dr. Mahmood F. Mosleh et al. / International Journal of Engineering and Technology (IJET)

DOI: 10.21817/ijet/2017/v9i4/170904031 Vol 9 No 4 Aug-Sep 2017 2871

A WScommunipossibly connecteaware of has to csynchroncombinatsensor noinfrastrucwhich prthe sensodata need

Many aphardwarewas MATvisualizafamiliar mIt providdesigningcommuni

MATLA

The MAcable. In MATLAWindowsport, the

Installi

In this rand writiThe follo

1- click "2-

shown

SN can be deicate the inforvia multiple hd to other ne

f their locationonsider the e

nization, schetion of embeodes over adctures unlike trocesses readinors in differended to be trans

pproaches are e emulation, oTLAB. MAT

ation, and progmathematical

des an interacg, simulationications, contr

AB with Ardu

ATLAB Suppothis case the

AB directly wits, 64-bit Macsteps listed in

ing of Packag

research it haing the data oowing steps m First, start M"Get Hardwar In this step it

n in Fig. 3.

efined as a nermation collechops, to a sin

etworks (e.g., n or not and heffects of eneeduling strateedded system -hoc wirelessthose in WLAngs from its o

nt nodes locatesmitted from t

II

used for simuoperating systLAB is a highgramming in notation. Sim

ctive graphican, implemenrols, signal pr

uino

ort Packages Arduino beco

thout need to OS and Linu

n the next subs

ges

s been exploiof sensors coll

must be appliedMATLAB and re Support Pact may be need

II.

etwork of devcted from the

nk (sometimesthe Internet)

homogeneous ergy consumpgies, quality and wireless

s networks asAN or cellularown sensors aed near each othe two sensor

Fig. 1. Ad

II. MATLAB

ulation and mem and applich-performancan easy-to-us

mulink is an enal environmenntation, and rocessing, vide

for Arduino omes as data additional co

ux. To apply section can be

it the facility lecting from td to install theclick the "Ad

ckages". It wild to connect to

WSN Overv

vices, denotedmonitored fie

s denoted as cthrough a ga

or not [4]. Duption, system

of service as communicats shown in Fir networks. Thand, in some cother may be r nodes can be

d Hoc Wireless Se

B Interfacing

modeling WSNcation level. T

ce language fose environmennvironment fornt and a custo

testing a eo processing,

Hardware to acquisition ormponent. Thethe interfacin

e done to insta

of interfacingthe network w

e Arduino to bd-Ons" whichll start the paco the internet t

view

d as nodes, wheld through wcontroller or mateway. The nuring the desig

m topology, faand coordination which alig. 1. The adhe brain of eacases, readinghighly correlae cooperativel

ensor Networks

with Hardwa

N. They operaThe environmor technical cont where probr multi domaiomizable set variety of

, and image pr

communicater to interface te support packng between Mall the Arduino

g the Matlab wwhich can be e interfaced w

h lead to drop ckage installerthen select "In

hich can senswireless links. monitor) that nodes can begn of Wirelesault tolerance

ation protocolllows data tr

d hoc networkach WSN nodegs from adjaceated and hencly reduced [6]

are

ate in differenment for buildiomputing. It i

blems and solun simulation aof block librtime-varying

rocessing [7].

e with Arduinthe other partkages are avai

MATLAB and o as external h

with Arduino immediately

with the Matladown menu. I

r window as shnstall from Int

se the environThe data is focan use it loc

e stationary ors Sensor Netw

e, communicals [5]. WSNansmission amks requires noe is the microent nodes as w

ce the amount .

nt levels of siing a simulatiintegrates comutions are expand embeddedraries that facg systems,

no board throts of the netwilable for 32 aArduino thro

hardware.

for purpose oseen in the M

ab: In the drop dohown in Fig. 2ternet" and the

nment and forwarded, cally or is r moving, works one ation, and s are the mong the o existing

ocontroller well since of sensor

imulating: ion model mputation, pressed in d systems. cilities the

including

ough USB ork to the and 64-bit ough USB

of reading MATLAB.

own menu 2. en next as

ISSN (Print) : 2319-8613 ISSN (Online) : 0975-4024 Dr. Mahmood F. Mosleh et al. / International Journal of Engineering and Technology (IJET)

DOI: 10.21817/ijet/2017/v9i4/170904031 Vol 9 No 4 Aug-Sep 2017 2872

3- Select installa

4- Now tagreemenall the req

Testing t

Once thecommand

the Arduino ation as shown

the installer ant on the nextquired packag

the package i

e packages ared window:

package andn in Fig. 4.

ask to log in Mt screen and cges.

instilled

e installed, con

Fig. 2. Ge

Fig

d then check

Fig. 4. S

MathWorks accontinue to do

nnect Arduino

et hardware suppo

g. 3. Install packa

and select all

elect Packages of

ccount or creaownload the p

o board to PC

ort package

ages

l packages di

f Arduino

ate account dupackages. The

and type the f

isplayed and

uring installaten MATLAB

following com

click next to

tion. Accept thdownloads an

mmand in MA

o continue

he license nd installs

TLAB

ISSN (Print) : 2319-8613 ISSN (Online) : 0975-4024 Dr. Mahmood F. Mosleh et al. / International Journal of Engineering and Technology (IJET)

DOI: 10.21817/ijet/2017/v9i4/170904031 Vol 9 No 4 Aug-Sep 2017 2873

If there a

MATLAthe ArduconnecteFig. 5:

The prop

End Nod

The comsurroundcomponelast compsubsectio

are more than

AB will then atuino board cod, the model

posed system u

de

mponents of ending environment is Arduino

mponent is theons each part w

one Arduino c

ttempt to comonnected to of the Arduin

use in this rese

nd node are sment into eleco for collectine Zigbee basewill be explain

connected to t

mmunicate witthe PC. This

no board, and

Fig. 5. Ard

IV. Th

earch is shown

Fig

sensor, Arduinctrical signal eng and processed IEEE 802.ned in detail a

the PC, specif

th Arduino bos informationavailable pins

duino board conn

he Proposed

n in Fig. 6.

g. 6. Proposed sys

no, XBee andeither in digising the data 15.4 which i

as shown in Fi

Fig. 7. End Node

fy the board ty

oard. If succesn displays thes and libraries

nected to PC

system

stem

d Xbee shieldital or continuin addition tos used as comig. 7.

e

ype that will b

ssful, it will de port on whs available for

. The sensor uo signal. Tho produce a summunication

be communica

isplay the pro

hich Arduino r the board as

which is tranhe second paruitable commpart. In the

ating with:

operties of board is shown in

nsduce the rt of node ands. The following

ISSN (Print) : 2319-8613 ISSN (Online) : 0975-4024 Dr. Mahmood F. Mosleh et al. / International Journal of Engineering and Technology (IJET)

DOI: 10.21817/ijet/2017/v9i4/170904031 Vol 9 No 4 Aug-Sep 2017 2874

Sensor

Manfour type

i- Gas

Thissensitivitcould be

This

ii- Ligh Matlab topower anDepende

iii- DisIt

The modare listed

ny types of sees in this resea

Sensor

s sensor is aty to carbon mused to detect

sensor has 4 p

ht Sensor It is a photoceo record and nd don't weant Resistors (L

stance Sensor t is an ultrasondules includes d in table 2 [10

ensors can bearch.

a MQ-7 semicmonoxide, stat different am

Circuit vUsing teStorage Relative

pins like GND

ell which useddisplay the ac

ar out. It is LDR) and pho

nic ranging moultrasonic tra

0]:

Voltage

WorkinWorkinMax RMin Ra

e used in the p

conductor of able, long life

mount of gases

TABLE I

Parameter

voltage emperature temperature

e humidity

D (Ground), +5

F

d to sense thectivation timeoften referre

oto-resistors a

F

odule HC - SRansmitters, rec

TABLE II The

e Source

ng Current ng Frequencyange ange

proposed netw

carbon monoe, low cost ancontains CO,

IGas Sensor Spec

-20-20Les

5V (VCC), AO

Fig. 8. MQ-7 Sens

e light and sene. The featured to photore

as shown in Fi

Fig. 9. Light Sens

R04 provides ceiver and con

e Parameters of D

D15404m2c

work, but for

oxide as shownd suitable fo the specificat

cifications

Value5v

0C to +50C 0C to +50C ss than 95% R

OUT (Analog

sor

nd a signal to e of this sensosistors, a Caig. 9 [9].

sor

(2- 400) cm, antrol circuit. T

Distance Sensor

C 5V 5mA 0Hz m cm

experimental

wn in Fig. 8or different aption of MQ-7

RH

g Pin) and DO

the Arduino wor is cheap, smadmium-Sulfid

and having a rThe electric pa

, it has been

. Its featurespplications. Tis listed in tab

OUT (Digital P

which in turn mall, easy to de (CdS) cel

ranging accurarameter of su

used only

are high The sensor ble 1 [8]:

Pin).

active the use, low-ls, Light-

racy 3mm. uch sensor

ISSN (Print) : 2319-8613 ISSN (Online) : 0975-4024 Dr. Mahmood F. Mosleh et al. / International Journal of Engineering and Technology (IJET)

DOI: 10.21817/ijet/2017/v9i4/170904031 Vol 9 No 4 Aug-Sep 2017 2875

There aas shown

iv- MotiThis

are cheapapplianceelectric, o

Arduino

Arduino developminteractiva USB pcomputerwork stanelectronicconnecto

The typethis reseATmega2UARTs (reset butt

are four pins in in Fig. 10.

ion Sensor sensor can bep, small, low-es and gadgeor IR motion s

o

is an open sment environmve objects or cplug to conner or from a 9Vndalone. On tcs, such as

ors are arrange

e of Arduino iearch, the use2560. It has 5(hardware serton [14].

in this sensor w

e used to detec-power, easy ts use in homsensors as sho

source physicment that implcan be connecect to the comV battery. It cathe other handmotors, rela

ed like this so

is depend on med Arduino M4 digital inpurial ports), 16

which are VC

Fig

ct the motion to use and do

mes or busineown in Fig.10

Fig

cal computinglements the prted to softwarmputer and can be controlld there are a n

ays, light senthat called “sh

many factors Mega 2560 i

ut/output pins (6 MHz crystal

CC (Power), T

g. 10. Distance Se

of a human won't wear outesses. It is of[11].

g. 11. Motion Sen

g platform barocessing langre on the compcan either be led from the cnumber of consors, laser dhield” boards

like microconis a microcon(of which 14 l oscillator, U

rig (Trigger),

ensor

who moves in t. For those reften referred

nsor

ased on a simguage. Arduinputer [12]. It ipowered throomputer or prnnection sockdiodes, loudscan be plugge

ntroller, size ontroller boardcan be used a

USB connectio

Echo (Receiv

its range. Theeasons they ato as Passive

mple input/outno can be usedis a small micough the USBrogrammed ankets that can bspeakers, miced on to the m

of memory, nd shown in s PWM outpuon, power jac

ve), and GND

e features of thare commonlye Infrared (PI

tput (I/O) boad to develop scrocontroller bB connection nd then disconbe wired up tocrophones…et

main board [13

number of pinFig. 12 base

uts), 16 analogck, ICSP head

(Ground)

his sensor y found in IR), Pyro-

ard and a standalone board with

from the nnected to o external tc. These

3].

s…etc. In ed on the g inputs, 4 der, and a

ISSN (Print) : 2319-8613 ISSN (Online) : 0975-4024 Dr. Mahmood F. Mosleh et al. / International Journal of Engineering and Technology (IJET)

DOI: 10.21817/ijet/2017/v9i4/170904031 Vol 9 No 4 Aug-Sep 2017 2876

All chara

In order tgeneral f

Zigbee S

short timreliabilitythan 65,0

acteristics of A

Digital I/

to execute all form for all tas

Standard IEE

Zigbee is oneme delay chary. The IEEE 8000 nodes per

Arduino mega

Micr

Opera

Input voltag

Input V

/O Pins (of wh

Analo

DC Cur

DC Curr

Flas

E

Clo

functions for sks.

EE 802.14.5

e of the most racteristics, si802.15.4 standr network. Zig

Fig. 1

a use in this su

TABLE III C

rocontroller

ating Voltage

ge (recommen

Voltage (limits

hich 14 provid

og Input Pins

rrent per I/O P

rent for 3.3V P

sh Memory

SRAM

EEPROM

ock Speed

this research,

Fig. 1

widely utilizeimple to devdard employs gBee network

2. Arduino MEG

ubsection are l

Characteristics of A

nded)

s)

de PWM outp

Pin

Pin

the program

13. End node Alg

ed WSN standelop and dep64-bit and 16

k can have up

GA [14]

listed in table

Arduino Mega

put)

shown in the

orithm

dards with lowploy to provid6-bit short add

to 653356 de

3 [14]:

ATmega256

5V

7-12 V

6-20 V

54 pins

15 Pins

40 mA

50 mA

256 KB

8 KB

4 KB

16 MHz

algorithm of F

w power, low de a robust sdresses to supevices, the dis

60

Fig. 13 is desi

data rate, lowsecurity and

pport theoreticstance betwee

igned in

w cost and high data

cally more en ZigBee

ISSN (Print) : 2319-8613 ISSN (Online) : 0975-4024 Dr. Mahmood F. Mosleh et al. / International Journal of Engineering and Technology (IJET)

DOI: 10.21817/ijet/2017/v9i4/170904031 Vol 9 No 4 Aug-Sep 2017 2877

devices cmaking aincludes which are

i- XBXbee

module icreate comore conThis XBemodule slow latenii- XBee

multipoinversion (has lowebased mefficientladapter bout. How

The follo

Out

T

Idl

can be up to a very large nmany techniqe shown in Fig

ee Series 2 (Se S2 module iincorporates tomplex mesh nnfiguration to ee wireless desupports data ncy and predice S2C

XBee is a 2mnt device conn(S2C) of XBeer current draw

modules to suply. This XBeeboards and easwever, Series 1

owing compar

Specifi

Indoor/Urb

tdoor RF line-

Transmit Pow

RF Data

Receiver Se

Supply V

Transmit Curr

le/Receive Cu

Power-down

Freque

Network To

50 meters, annetwork whichques called (Xg. 14.

S2) is used for emthe ZigBee PRnetworks. Howfully implem

evice can be drates of up to

ctable commun

mW wire antnectivity withee ZigBee Serw, and has sipport more ne module, simsy interfacing1 modules can

rison between

TAB

fication

ban range

-of-sight rang

wer Output

a Rate

ensitivity

Voltage

ent (typical)

urrent (typical)

n Current

ency

opologies

nd each node h covering sig

XBee). In this

mbedded solutRO feature wwever, the inf

ment. This moddirectly conne 250kbps. It inication timin

tenna S2C wh ease providinries 2 moduleignificantly mnetwork traffimilar to its pr within any p

nnot communi

Fig. 14.

n the two prod

LE IVThe Comp

up t

e up to

2

-98

4

) 4

I

Point t

can relay dagnificant distaresearch it ha

tions providinwith set mesh

frastructure ofdule can give ected to the seis designed fong [16].

which is the lang cost-effect

e utilizes EM3more RAM anic, have morredecessors haroject. Series icate with Seri

(a) Xbee S2 (b) X

ducts shown in

parison between T

XBee S2

to 133 ft. (40

o 400 ft. (120

mW (+3dbm)

250 Kbps

8dBm (1% PE

2.8 - 3.6 V

0 mA ( 3.3 V)

40 mA (3.3 V)

1 μA

ISM 2.4 GHz

to point, Star,

ata to other noances [15]. Thas been use th

g wireless endnetworking pf a ZigBee nerange of 40 mrial port (at 3r high-throug

atest of its kitive wireless s357 transceivend Flash. These memory foave 2 mm pin1 and Series

ies 2 modules

Xbee S2C

n table 4 [17]:-

Two Products of X

m)

m)

) 63

R) -1-10

) 43

) 2

Mesh

odes. Which he Zigbee is

he following t

d-point conneprotocol. Serieetwork is moremeters indoor .3V level) of hput (35kbps)

ind in Series solutions for eer. The EM35se advanced for code updan spacing. It 2 XBee modu[17].

-

XBee.

XBe

up to 200

up to 4000

6.3mW (+8dB.1mW (+1dBm

250

102dBm (1% P00dBm (1% P

2.1

45 mA (+8dB33 mA (+5dBm

31 mA (+8dB28 mA (+5dBm

1

ISM 2

Point to poi

creates a posa general pro

types of XBee

ectivity to deves 2 modules e complex andor 120 metersa microcontro) applications

2 and offerselectronic dev57 transceiverfeatures allow

ates, and opercan be used oules have the

ee S2C

0 ft. (60 m)

0 ft. (1200 m)

Bm) Boost mom) Normal m

0 Kbps

PER) Boost mER) Normal M

- 3.6V

Bm) Boost Mom) Normal M

Bm) Boost Mom) Normal M

μA

2.4 GHz

int, Star, Mesh

sibility of otocol that e products

vices. This allows to

d requires s outdoor. oller. This requiring

s point to vices. This r is faster,

w EM357-rate more one of its same pin-

ode mode

mode Mode

ode ode

ode ode

h

ISSN (Print) : 2319-8613 ISSN (Online) : 0975-4024 Dr. Mahmood F. Mosleh et al. / International Journal of Engineering and Technology (IJET)

DOI: 10.21817/ijet/2017/v9i4/170904031 Vol 9 No 4 Aug-Sep 2017 2878

Both typconductiv

Router

It is pwhich toend nodethat was several sdecision.router ranthan oneprogrammFig. 16. Trunning agateway

pes of XBee vity without a

possible to ha increase the

es, in each onedesigned for equence comm On the othernge which lea

e router with ming the routeThe structure an applicationto pass the da

are installedany losses

ve more than area under coe a sensor canthe Arduino

mands. In addr hand any enads to more ex

its group ofer to perform of the router

n function, a rata [18].

d to the Ardu

Fi

one router inontrol by incrn perform a spor responding

dition, the usend node may bxtending the cf nodes as inall above theinclude of A

router is act a

Fig.

uino through

ig. 15. XBee Shie

n this researchreasing the nupecific task ang to the progrer can intervenbe performs acoverage arean router1 to de tasks, a progArduino, Xbeeas an intermed

16. Router Algor

XBee shield

eld

h to give the pumber of routend sends the dram that has bne at any mom

as a gateway ta of the netwoduplicate the

gram has beene shield and Xdiate router b

rithm

d shown in F

proposed netwers. Each routdata either accbeen designedment in order to joint any faork. Also, it is

network aren designed shoXbee as shownetween coord

Fig. 15 to e

work for featurter is linked tcording to thed in Matlab toto monitor or

ar node whichs possible to hea. For the puown in the algn in Fig. 17.A

dinator and en

nsure the

re through to a set of e program o perform r take any h is out of have more urpose of

gorithm of As well as nd node to

ISSN (Print) : 2319-8613 ISSN (Online) : 0975-4024 Dr. Mahmood F. Mosleh et al. / International Journal of Engineering and Technology (IJET)

DOI: 10.21817/ijet/2017/v9i4/170904031 Vol 9 No 4 Aug-Sep 2017 2879

One board carthe digitainternal pArduino Uno in ro

All chara

of the Arduinrries an 8-bit mal pins can beperipherals abUno board (F

outer node is n

acterstics of A

Digital I/

no family is thmicrocontrolle programmedble of running

Fig. 18) can benot needing to

Arduino Uno u

Micr

Opera

Input voltag

Input V

/O Pins (of wh

Analo

DC Curr

DC Curre

Flas

E

Clo

Fig. 17.

he Arduino Uler, and it comd to send pulsg the UART,e as big as 30 o have a large

Fig. 1

use in this subs

TABLE VC

rocontroller

ating Voltage

ge (recommen

Voltage (limits

hich 14 provid

og Input Pins

rent per I/O Pi

ent for 3.3V P

sh Memory

SRAM

EPROM

ock Speed

The Router Con

Uno which is tmes with 14 dise width mod, SPI, and I2CKbytes and rnumbers of p

8. Arduino UNO

section are lis

Characterstics of A

nded)

s)

de PWM outpu

in

Pin

nstruction

the most extenigital input/oudulation (PWMC communicarun at 16 MHzins.

O Board

ted in table 4

Arduino Uno.

ut)

nded board asutput pins and M). The Uno ation protocolz [19]. The re

[20]:

ATmega3

5V

7-12 V

6-20 V

16 pins

6 Pins

40 mA

50 mA

32 KB

2 KB

1 KB

16 H

s shown in Fig6 analog inpuboard also cols. Programs ason for using

328

V

V

s

A

A

Hz

g. 18. The uts. Six of omes with using the

g Arduino

ISSN (Print) : 2319-8613 ISSN (Online) : 0975-4024 Dr. Mahmood F. Mosleh et al. / International Journal of Engineering and Technology (IJET)

DOI: 10.21817/ijet/2017/v9i4/170904031 Vol 9 No 4 Aug-Sep 2017 2880

Coordin

It is a gatXBee (S2it must deach rout

Base Sta

Matlab hsending receive d

There arelighting sand a bodlogical vregular pas shown

ator

teway device 2) installed onefined its addter that define

ation

has many featdata for spec

data from sens

e two types osensor which dy moved in tvalue. The secperiod and plon in the design

that received n XBee adaptedress to each re the address o

tures includincific times. Thsors as shown

of reading accrecords the re

the range of PIcond type inc

ot the results ifned algorithm

the data fromer connected touter in X-CT

of such coordin

Fig.

ng storing, senherefore, a spin the algorith

ording to the eading when tIR sensor in thcludes distancf need so the of Fig. 21.

Fig. 20. Algorit

m each router to the USB poTU software tonator in its X-

19. XBee Coordi

nding commapecial Matlabhm of Fig. 20.

function of ththere a changehis cases the Mce and gas seMatlab progra

thm for Receive d

and passed toort of PC as sho enable such -CTU softwar

inator

ands, designinb program has.

he sensor. The is happenedMatlab will diensor, they ream has been d

data from Sensor

o the base statihown in Fig. 1

coordinator tre.

ng monitorings been design

he first type ind for example,isplay suddenlead the distandesigned for d

ion. It is cons19. To install tto receive the

g software, stned in this re

ncludes the m, turn on or ofly those new rnce and gas adata analysis o

structed of this XBee data from

oring and esearch to

motion and ff lighting reading as amount at of sensors

ISSN (Print) : 2319-8613 ISSN (Online) : 0975-4024 Dr. Mahmood F. Mosleh et al. / International Journal of Engineering and Technology (IJET)

DOI: 10.21817/ijet/2017/v9i4/170904031 Vol 9 No 4 Aug-Sep 2017 2881

As mentifor experthe capabof Arduin

Fig

The resunumberdistancewithout For the reading.distance

ioned previourimentally appbility of each no.

g. 22. The reading

ults shown in s, for example in centimeteany numbers purpose of di. Also, it can e and gas sens

Fig

usly, it has beeplication. Firssensor readin

g of sensors in ser

the Fig.22 ine, the distancer, same as fto indicate th

isplaying the be cleared ou

sors reading fo

(a)

Fig.

g. 21. Algorithm f

VI. Ren used four st, the result re

ng. Fig. 22 sho

rial monitor of A

ndicate sensor ce sensor usesfor gas sensorhe appearance previous readut the readingor a period of

) (b)

23. Plotting of se

flow chart for dat

Results and densors (Distanecorded in thiows the readin

rduinoDistance s

readings. Eacs the letter (Dr. The light aof light or per

ding with timeg by plotting second.

ensors Distance s

ta analysis of sen

discussions nce, Motion, Lis section for ng of each sen

ensor. (b) Light s

ch sensor is inD) and numberand motion serson. e. The Matlabthe result vs.

ensor. (b) Gas Se

nsors

Light, and Gaeach sensor innsor that displ

sensor. (c) Gas se

ndicated by a r beside it to ensors use (L

b can show eatime. Fig. 23

ensor.

as) connected ndividually tolayed on seria

ensor. (d) PIR sen

letter with anindicate the a

L) and (P) res

ach values wit3 shows the p

to router1 o clear out al monitor

nsor.

nd without amount of spectively

th its time plotting of

ISSN (Print) : 2319-8613 ISSN (Online) : 0975-4024 Dr. Mahmood F. Mosleh et al. / International Journal of Engineering and Technology (IJET)

DOI: 10.21817/ijet/2017/v9i4/170904031 Vol 9 No 4 Aug-Sep 2017 2882

In thereadings time, evesensors.

Fig. 25 snetwork alone andand put activate oIn advancto monito

In this reaccordingdata fromcan be dolike monlimited olarge netnetwork the result

e above figuris changing e

ery second a n

shows the ovecan be used fd recording tha command tother device foced, this networ and remote

esearch, it hasg to the area,

m all sensors tone in the Ma

nitoring, shooor every timestwork consistscan response ts are displaye

re, (a) which every second, new reading i

erall network for various aphe results depethat be enabl

for self-protectwork can be co

control of the

s been designeexploiting th

through its spatlab and dispting alarm acs. The hardwas of huge sento the demand

ed in a serial m

represents the(b) represent

is recorded.Fi

Fig. 24. Time ar

connecting anpplication likeending on the ed after any tion. onnected to ane proposed net

Fig. 25. Ha

VII

ed a WSN forhe facility of Mpecific router tplay it as the uccording to thare implemen

nsors divided hd of user to dimonitor, readi

e distance betts the amount g. 24 displaye

rrival for PIR and

nd running wie designing a p

user need. Invalue approa

ny other commtwork to meet

ardware design o

I. Conclus

r monitoring aMatlab versiothat pass the user need. Alshreshold valuentation in this hierarchicallyisplay the readng with time a

tween the senof gas in the

ed the time ar

d LM393 sensors

ith its results program to le

n addition, the ach this thresh

munication net user requirem

of a network

ions:

any area. It ison R2016a intinformation toso, a program e of any sensresearch incl

y. The results ding in the mand graphicall

nsor and any room and the

rrival in secon

displayed in eave the netw

user can be inhold to do so

etwork like Wments.

s a flex netwoterfaced with o the Matlab. was designed

sor reading anluded four senshow the impanner of user'ly.

other object e readings chnd for PIR an

the laptop scrork for operatnstall a thresh

omething like

Wi-Fi, Internet

ork which canArduino to reAnalyzing an

d to apply anynd display rensors as a paplemented par's need. In thi

and these ange with

nd LM393

reen. This ting stand hold value

alarm or

and GSM

n extended eceive the nd storing y function esults in a rt of very rt of such s research

ISSN (Print) : 2319-8613 ISSN (Online) : 0975-4024 Dr. Mahmood F. Mosleh et al. / International Journal of Engineering and Technology (IJET)

DOI: 10.21817/ijet/2017/v9i4/170904031 Vol 9 No 4 Aug-Sep 2017 2883

REFERENCES [1] Zhejun Feng, "Design and Implementation of an Experimental Platform for Performance Analysis in Wireless Sensor Networks",

M.Sc. Thesis, KTH Royal Institute Technology, 2011. [2] Fangwei Liu, Zhilong Shan, "Node Location Model and Simulations in Matlab for Wireless Sensor Networks", Advanced Materials

Research, Vol. (694-697.1060), (2013). [3] Vijaya Kk, Surender S, "Industry Monitoring Robot Using Arduino Uno with Matlab Interface", Department of Electronics and

Instrumentation, St. Joseph’s College of Engineering, Advances in Robotics & Automation, 2016. [4] Chiara Buratti, Andrea Conti, Davide Dardari, Roberto Verdone, "An Overview on Wireless Sensor Networks Technology and

Evolution", Sensors, 2009. [5] Leelavathi G, Shaila K, Venugopal K R and L M Patnaik, "Design Issues on Software Aspects and Simulation Tools for Wireless

Sensor Networks", International Journal of Network Security & Its Applications (IJNSA), Vol.5, No.2, March 2013. [6] Vongsagon Boonsawat, Jurarat Ekchamanonta, Kulwadee Bumrungkhet, and Somsak Kittipiyakul, "XBee Wireless Sensor Networks

for Temperature Monitoring", Sirindhorn International Institute of Technology, Thammasat University, 2013. [7] Qutaiba Ibrahem Ali, Akram Abdulmaowjod and Hussein Mahmood Mohammed, "Simulation & Performance Study of Wireless

Sensor Network (WSN) Using MATLAB", International Conference on Energy, Power and Control (EPC-IQ), College of Engineering, University of Basrah, Basrah, Iraq, November 30 - December 2, 2010.

[8] Datasheet of Carbon Monoxide Sensor ISO 9001-2008 Certified Company Available in the Site http://forum.researchdesignlab.com/datasheet/carbon%20monoxide%20sensor%20mq7.pdf.

[9] Photocell Tutorial by Adafruit in Electronics Available in the Site http://www.instructables.com/id/Photocell-tutorial/. [10] Datasheet of Ultrasonic Ranging Module HC - SR04 by Elec Freaks Available in the Site

https://cdn.sparkfun.com/datasheets/Sensors/Proximity/HCSR04.pdf. [11] Datasheet of Motion Sensor by Lady Ada Available in the Site https://learn.adafruit.com/pir-passive-infrared-proximity-motion-

sensor/overview. [12] Massimo Banzi, "Getting Started with Arduino the Open Source Electronics Prototyping Platform", 2nd edition. [13] Simon Monk, "30 Arduino Projects for the Evil Genius", 2010. [14] Datasheet of Arduino Mega, "Arduino MEGA 2560" by Allide Electronics Available in the Site

https://www.arduino.cc/en/Main/arduinoBoardMega2560. [15] Shanmugaraj Madasamy, R. Prabakaran, "Study on ZigBee technology", Conference Paper, April 2011. [16] "XBee (S2) 2mw Wireless Communication Module" by Nex Robotics Available in the Site http://www.nex-

robotics.com/products/wireless-devices/xbee-s2-2mw-wireless-communication-module-wire-antenna.html. [17] "XBee S2C Low-Power Module, with Wire Antenna for ZigBee Mesh networks" by Hacktronics India Available in the Site

https://hacktronics.co.in/2-4-ghz-wireless-sensors/xbee-s2c-low-power-module-with-wire-antenna-for-zigbee-mesh-networks. [18] Anshul Agarwal, Mukesh Agarwal, Manju Vyas, Richa Sharma, "A Study of Zigbee Technology", International Journal on Recent and

Innovation Trends in Computing and Communication, ISSN 2321 – 8169, Volume: 1 Issue: 4, IJRITCC | APR 2013. [19] Andreas Goranson and David Cuartielles Ruiz, "Professional Android Open Accessory Programming with Arduino", Published by

John Wiley & Sons, Inc. , Canada, 2013. [20] Datasheet of Arduino Uno, "Arduino UNO" Available in the Site https://www.arduino.cc/en/main/arduinoBoardUno, 2017.

ISSN (Print) : 2319-8613 ISSN (Online) : 0975-4024 Dr. Mahmood F. Mosleh et al. / International Journal of Engineering and Technology (IJET)

DOI: 10.21817/ijet/2017/v9i4/170904031 Vol 9 No 4 Aug-Sep 2017 2884