ISSN (Print) : 2319-8613 ISSN (Online) : 0975-4024
Dr. Mahmood F. Mosleh et al. / International Journal of Engineering and Technology (IJET)
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,3
College of Electrical Engineering Techniques,Middle Technical University Aldora, Baghdad, Iraq a
[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.
DOI: 10.21817/ijet/2017/v9i4/170904031
Vol 9 No 4 Aug-Sep 2017
2871
ISSN (Print) : 2319-8613 ISSN (Online) : 0975-4024
Dr. Mahmood F. Mosleh et al. / International Journal of Engineering and Technology (IJET)
II. WSN Overv view A WS SN can be deefined as a neetwork of devvices, denoted d as nodes, whhich can sensse the environ nment and communiicate the inforrmation colleccted from the monitored fieeld through wireless w links. The data is forwarded, fo possibly via multiple hops, h to a sinnk (sometimess denoted as controller c or monitor) m that can use it loccally or is n can bee stationary orr moving, connected to other neetworks (e.g., the Internet) through a gaateway. The nodes h or not [4]. Du uring the desiggn of Wireless Sensor Netw works one aware off their locationn or not and homogeneous e of eneergy consumpption, system m topology, faault tolerancee, communicaation, and has to consider the effects a coordinaation protocolls [5]. WSNs are the synchronnization, scheeduling strategies, quality of service and combinattion of embeedded system and wirelesss communicattion which alllows data transmission am mong the sensor noodes over ad-hoc wirelesss networks ass shown in Fiig. 1. The add hoc networkks requires no o existing infrastrucctures unlike those t in WLA AN or cellularr networks. Th he brain of eaach WSN nodee is the micro ocontroller which prrocesses readinngs from its own o sensors and, a in some cases, c readinggs from adjaceent nodes as well w since the sensoors in differennt nodes locateed near each other o may be highly correlaated and hencce the amount of sensor data needded to be transsmitted from the t two sensorr nodes can bee cooperativelly reduced [6].
Fig. 1. Add Hoc Wireless Seensor Networks
IIII. MATLAB B Interfacing with Hardwaare Many appproaches are used for simuulation and modeling m WSN N. They operaate in differennt levels of siimulating: hardwaree emulation, operating o system and appliccation level. The T environm ment for buildiing a simulatiion model was MAT TLAB. MATLAB is a highh-performancce language fo or technical coomputing. It iintegrates com mputation, visualizaation, and proggramming in an easy-to-usse environmen nt where probblems and soluutions are exp pressed in familiar mathematical m mulink is an ennvironment forr multi domain simulation aand embedded d systems. notation. Sim It providdes an interacctive graphicaal environmennt and a custo omizable set of block librraries that faccilities the designingg, simulationn, implemenntation, and testing a variety of time-varyingg systems, including communiications, contrrols, signal prrocessing, videeo processing,, and image prrocessing [7]. MATLA AB with Ardu uino The MA ATLAB Suppoort Packages for Arduino Hardware to communicatee with Arduinno board thro ough USB cable. In this case the Arduino becoomes as data acquisition orr to interface the t other partts of the network to the AB directly witthout need to additional component. Thee support packkages are avaiilable for 32 and a 64-bit MATLA Windowss, 64-bit Mac OS and Linuux. To apply the interfacin ng between MATLAB M and Arduino thro ough USB port, the steps listed inn the next subssection can bee done to instaall the Arduinoo as external hhardware. Installiing of Packagges In this research r it has been exploiit the facility of interfacing g the Matlab with w Arduino for purpose of o reading and writiing the data of o sensors colllecting from the t network which w can be immediately seen in the MATLAB. M The folloowing steps must m be appliedd to install thee Arduino to be interfaced with w the Matlaab: 1- First, start MATLAB M and click the "Add-Ons" which h lead to drop down menu. IIn the drop do own menu " Hardwarre Support Pacckages". It willl start the pacckage installerr window as shhown in Fig. 2. 2 click "Get 2- In this step itt may be needd to connect too the internet then t select "Innstall from Intternet" and theen next as shownn in Fig. 3.
DOI: 10.21817/ijet/2017/v9i4/170904031
Vol 9 No 4 Aug-Sep 2017
2872
ISSN (Print) : 2319-8613 ISSN (Online) : 0975-4024
Dr. Mahmood F. Mosleh et al. / International Journal of Engineering and Technology (IJET)
Fig. 2. Geet hardware suppo ort package
Figg. 3. Install packaages
3- Select the Arduino package andd then check and select alll packages diisplayed and click next to o continue installaation as shownn in Fig. 4.
Fig. 4. Select Packages off Arduino
4- Now the t installer ask a to log in MathWorks M acccount or creaate account duuring installattion. Accept th he license agreemennt on the nextt screen and continue c to doownload the packages. p Theen MATLAB downloads an nd installs all the reqquired packagges. Testing the t package instilled i Once thee packages aree installed, connnect Arduinoo board to PC and type the following f com mmand in MATLAB commandd window:
DOI: 10.21817/ijet/2017/v9i4/170904031
Vol 9 No 4 Aug-Sep 2017
2873
ISSN (Print) : 2319-8613 ISSN (Online) : 0975-4024
Dr. Mahmood F. Mosleh et al. / International Journal of Engineering and Technology (IJET)
If there are a more than one Arduino connected c to the t PC, speciffy the board tyype that will bbe communicaating with:
MATLA AB will then atttempt to com mmunicate witth Arduino bo oard. If successsful, it will display the pro operties of the Arduuino board coonnected to the PC. Thiss information n displays thee port on whhich Arduino board is connected, the model of the Arduinno board, and available pinss and librariess available forr the board as shown in Fig. 5:
Fig. 5. Ardduino board conn nected to PC
IV. Th he Proposed system u in this reseearch is shownn in Fig. 6. The propposed system use
Figg. 6. Proposed sysstem
End Nod de The com mponents of ennd node are sensor, s Arduinno, XBee and d Xbee shield. The sensor which is tran nsduce the surroundding environm ment into elecctrical signal either e in digiital or continuuo signal. Thhe second parrt of node componeent is Arduinoo for collectinng and processsing the data in addition too produce a suuitable commands. The last comp mponent is thee Zigbee baseed IEEE 802.15.4 which is used as com mmunication part. In the following subsectioons each part will w be explainned in detail as a shown in Fiig. 7.
Fig. 7. End Nodee
DOI: 10.21817/ijet/2017/v9i4/170904031
Vol 9 No 4 Aug-Sep 2017
2874
ISSN (Print) : 2319-8613 ISSN (Online) : 0975-4024
Dr. Mahmood F. Mosleh et al. / International Journal of Engineering and Technology (IJET)
Sensor Manny types of seensors can bee used in the proposed p netw work, but for experimental, it has been used only four typees in this reseaarch. i- Gas Sensor Thiss sensor is a MQ-7 semicconductor of carbon mono oxide as show wn in Fig. 8. Its features are high sensitivitty to carbon monoxide, m staable, long lifee, low cost an nd suitable foor different appplications. The T sensor could be used to detectt different am mount of gases contains CO, the specificattion of MQ-7 is listed in tab ble 1 [8]: TABLE IGas I Sensor Speccifications
Parameter Circuit voltage v Using teemperature Storage temperature Relativee humidity
Value 5v -20 0C to +50C -20 0C to +50C Lesss than 95% RH R
This sensor has 4 pins p like GND D (Ground), +55V (VCC), AO OUT (Analogg Pin) and DO OUT (Digital Pin). P
F 8. MQ-7 Senssor Fig.
Lighht Sensor nd a signal to the Arduino w which in turn active the It is a photoceell which usedd to sense thee light and sen mall, easy to use, lowMatlab too record and display the acctivation timee. The featuree of this sensoor is cheap, sm power annd don't weaar out. It is often referred to photoresistors, a Caadmium-Sulfidde (CdS) cells, LightDependent Resistors (L LDR) and phooto-resistors as a shown in Fiig. 9 [9]. ii-
F 9. Light Senssor Fig.
Disstance Sensor Itt is an ultrasonnic ranging moodule HC - SR R04 provides (2- 400) cm, and a having a rranging accurracy 3mm. The moddules includes ultrasonic traansmitters, recceiver and con ntrol circuit. The T electric paarameter of su uch sensor are listedd in table 2 [100]: iii-
TABLE II Thee Parameters of Distance D Sensor
Voltagee Source Workinng Current Workinng Frequency Max Range Min Raange
DOI: 10.21817/ijet/2017/v9i4/170904031
DC 5V 15 5mA 40 0Hz 4m m 2ccm
Vol 9 No 4 Aug-Sep 2017
2875
ISSN (Print) : 2319-8613 ISSN (Online) : 0975-4024
Dr. Mahmood F. Mosleh et al. / International Journal of Engineering and Technology (IJET)
There are a four pins in i this sensor which w are VC CC (Power), Trig (Trigger), Echo (Receivve), and GND (Ground) as shownn in Fig. 10.
Figg. 10. Distance Seensor
iv- Motiion Sensor This sensor can bee used to detecct the motion of a human who w moves in its range. Thee features of th his sensor y found in are cheapp, small, low--power, easy to use and doon't wear outt. For those reeasons they aare commonly appliancees and gadgets use in hom mes or busineesses. It is offten referred to as Passivee Infrared (PIIR), Pyroelectric, or o IR motion sensors s as shoown in Fig.10 [11].
Figg. 11. Motion Sen nsor
Arduinoo Arduino is an open source s physiccal computingg platform baased on a sim mple input/outtput (I/O) boaard and a ment environm ment that impllements the prrocessing lang guage. Arduinno can be usedd to develop standalone s developm interactivve objects or can c be connected to softwarre on the comp puter [12]. It is i a small miccrocontroller board b with a USB plug p to conneect to the com mputer and can c either be powered throough the USB B connection from the computerr or from a 9V V battery. It caan be controllled from the computer or prrogrammed annd then discon nnected to work stanndalone. On the t other handd there are a number n of connection sockkets that can bbe wired up to o external electroniccs, such as motors, relaays, light sennsors, laser diodes, d loudsspeakers, miccrophones…ettc. These connectoors are arrangeed like this so that called “shhield” boards can be pluggeed on to the m main board [13 3]. The typee of Arduino is i depend on many m factors like microcon ntroller, size of o memory, nnumber of pins…etc. In this reseearch, the useed Arduino Mega M 2560 is i a microcon ntroller boardd shown in Fig. 12 baseed on the ATmega22560. It has 54 digital inpuut/output pins (of ( which 14 can be used as PWM outpuuts), 16 analog g inputs, 4 UARTs (hardware ( serrial ports), 166 MHz crystall oscillator, USB U connectioon, power jacck, ICSP head der, and a reset buttton [14].
DOI: 10.21817/ijet/2017/v9i4/170904031
Vol 9 No 4 Aug-Sep 2017
2876
ISSN (Print) : 2319-8613 ISSN (Online) : 0975-4024
Dr. Mahmood F. Mosleh et al. / International Journal of Engineering and Technology (IJET)
Fig. 12. Arduino MEG GA [14]
All charaacteristics of Arduino A megaa use in this suubsection are listed l in table 3 [14]: TABLE III Characteristics C of Arduino A Mega
Micrrocontroller
ATmega25660
Operaating Voltage Input voltagge (recommennded) Input Voltage V (limitss) Digital I//O Pins (of whhich 14 providde PWM outp put)
5V 7-12 V 6-20 V 54 pins
Analoog Input Pins DC Currrent per I/O Pin P DC Currrent for 3.3V Pin P Flassh Memory SRAM E EEPROM
15 Pins 40 mA 50 mA 256 KB 8 KB 4 KB
Cloock Speed
16 MHz
In order to t execute all functions for this research, the program shown in the algorithm of F Fig. 13 is desiigned in general form f for all tassks.
Fig. 13. 1 End node Algorithm
Zigbee Standard S IEE EE 802.14.5 Zigbee is onee of the most widely utilizeed WSN stand dards with low w power, low data rate, low w cost and short tim me delay charracteristics, siimple to develop and dep ploy to providde a robust ssecurity and high data reliabilityy. The IEEE 802.15.4 8 standdard employs 64-bit and 16 6-bit short adddresses to suppport theoreticcally more than 65,0000 nodes perr network. ZiggBee networkk can have up to 653356 deevices, the disstance betweeen ZigBee DOI: 10.21817/ijet/2017/v9i4/170904031
Vol 9 No 4 Aug-Sep 2017
2877
ISSN (Print) : 2319-8613 ISSN (Online) : 0975-4024
Dr. Mahmood F. Mosleh et al. / International Journal of Engineering and Technology (IJET)
devices can c be up to 50 meters, annd each node can relay daata to other noodes. Which creates a possibility of making a very large network n whichh covering siggnificant distaances [15]. Thhe Zigbee is a general pro otocol that includes many techniqques called (X XBee). In this research it haas been use thhe following ttypes of XBeee products which aree shown in Figg. 14. iXBee Series 2 (S S2) i used for em mbedded soluttions providing wireless endd-point conneectivity to dev vices. This Xbeee S2 module is module incorporates i t ZigBee PR the RO feature with w set mesh networking protocol. p Seriees 2 modules allows to create coomplex mesh networks. n How wever, the inffrastructure off a ZigBee neetwork is moree complex and d requires more connfiguration to fully implem ment. This moddule can give range of 40 meters m indoor or 120 meterss outdoor. This XBeee wireless deevice can be directly d conneected to the serial port (at 3.3V level) of a microcontro oller. This module supports s data rates of up to 250kbps. It is i designed for high-throughput (35kbps)) applications requiring low latenncy and predicctable communnication timinng [16]. ii- XBeee S2C XBee is a 2m mW wire anttenna S2C which w is the laatest of its kiind in Series 2 and offerss point to multipoinnt device connnectivity withh ease providinng cost-effecttive wireless solutions s for eelectronic dev vices. This version (S2C) ( of XBeee ZigBee Serries 2 modulee utilizes EM3 357 transceiveer. The EM3557 transceiverr is faster, has loweer current draw w, and has siignificantly more m RAM an nd Flash. Thesse advanced ffeatures allow w EM357based modules m to suppport more network n traffiic, have more memory foor code updaates, and operrate more efficientlly. This XBeee module, sim milar to its prredecessors haave 2 mm pinn spacing. It can be used one o of its adapter boards b and eassy interfacing within any project. Series 1 and Series 2 XBee moduules have the same pinout. How wever, Series 1 modules cannnot communiicate with Seriies 2 modules [17].
Fig. 14. (a) Xbee S2 (b) Xbee X S2C
The folloowing comparrison betweenn the two prodducts shown in n table 4 [17]:-TABLE IVThe Compparison between Two T Products of XBee X .
Specifi fication
XBee S2
XBeee S2C
Indoor/Urbban range
up to t 133 ft. (40 m)
up to 2000 ft. (60 m)
Outtdoor RF line--of-sight range Transmit Pow wer Output
up too 400 ft. (120 m) 2 mW (+3dbm))
up to 40000 ft. (1200 m) 6 6.3mW (+8dB Bm) Boost mo ode 3.1mW (+1dBm m) Normal mode m 2500 Kbps
RF Dataa Rate
250 Kbps
Receiver Seensitivity
-988dBm (1% PER)
-1102dBm (1% P PER) Boost mode m -1000dBm (1% PER) Normal Mode M
Supply Voltage V Transmit Current (typical) T
2.8 - 3.6 V 40 mA ( 3.3 V))
Idlle/Receive Cuurrent (typical))
4 mA (3.3 V)) 40
2.1 - 3.6V 445 mA (+8dB Bm) Boost Mo ode 3 mA (+5dBm 33 m) Normal Mode 31 mA (+8dB Bm) Boost Mo ode 2 mA (+5dBm 28 m) Normal Mode
Power-downn Current Frequeency
1 μA I ISM 2.4 GHz
1 μA ISM 22.4 GHz
Network Toopologies
Point to t point, Star, Mesh
Point to poiint, Star, Mesh h
DOI: 10.21817/ijet/2017/v9i4/170904031
Vol 9 No 4 Aug-Sep 2017
2878
ISSN (Print) : 2319-8613 ISSN (Online) : 0975-4024
Dr. Mahmood F. Mosleh et al. / International Journal of Engineering and Technology (IJET)
Both typpes of XBee are installedd to the Arduuino through XBee shieldd shown in F Fig. 15 to ensure the conductivvity without any a losses
Fiig. 15. XBee Shieeld
Router It is possible p to have more than one router inn this research h to give the proposed p netw work for featurre through which to increase the area under coontrol by incrreasing the nu umber of routeers. Each routter is linked to t a set of nd sends the data d either acccording to thee program end nodees, in each onee a sensor cann perform a sppecific task an that was designed for the Arduino or respondingg to the progrram that has been b designedd in Matlab to o perform mands. In adddition, the useer can interven ne at any mom ment in order to monitor orr take any several sequence comm b performs as a a gateway to t joint any faar node which h is out of decision. On the otherr hand any ennd node may be c areaa of the netwoork. Also, it iss possible to have h more router rannge which leaads to more exxtending the coverage than onee router with its group off nodes as inn router1 to duplicate d the network areea. For the pu urpose of programm ming the routeer to perform all above thee tasks, a prog gram has beenn designed shoown in the alg gorithm of Fig. 16. The T structure of the router include of Arduino, A Xbeee shield and Xbee X as shownn in Fig. 17.A As well as running an a applicationn function, a router r is act as a an intermed diate router between coorddinator and en nd node to gateway to pass the daata [18].
Fig. 16. Router Algorrithm
DOI: 10.21817/ijet/2017/v9i4/170904031
Vol 9 No 4 Aug-Sep 2017
2879
ISSN (Print) : 2319-8613 ISSN (Online) : 0975-4024
Dr. Mahmood F. Mosleh et al. / International Journal of Engineering and Technology (IJET)
Fig. 17. The Router Con nstruction
One of the Arduinno family is thhe Arduino Uno U which is the t most extennded board ass shown in Fig g. 18. The board carrries an 8-bit microcontroll m ler, and it com mes with 14 diigital input/ouutput pins and 6 analog inpu uts. Six of the digitaal pins can bee programmedd to send pulsse width mod dulation (PWM M). The Uno board also co omes with internal peripherals p abble of runningg the UART,, SPI, and I2C C communicaation protocolls. Programs using the Arduino Uno board (F Fig. 18) can bee as big as 30 Kbytes and run r at 16 MHzz [19]. The reason for using g Arduino n needing too have a large numbers of pins. Uno in roouter node is not
Fig. 18. Arduino UNO O Board
All charaacterstics of Arduino A Uno use u in this subssection are listed in table 4 [20]: TABLE VC Characterstics of Arduino A Uno.
Micrrocontroller
ATmega3328
Operaating Voltage Input voltagge (recommennded) Input Voltage V (limitss) Digital I//O Pins (of whhich 14 providde PWM outpu ut) Analoog Input Pins
5V 7-12 V 6-20 V 16 pinss 6 Pins
DC Currrent per I/O Piin DC Curreent for 3.3V Pin P Flassh Memory SRAM EEPROM Cloock Speed
DOI: 10.21817/ijet/2017/v9i4/170904031
Vol 9 No 4 Aug-Sep 2017
40 mA A 50 mA A 32 KB 2 KB 1 KB 16 H Hz
2880
ISSN (Print) : 2319-8613 ISSN (Online) : 0975-4024
Dr. Mahmood F. Mosleh et al. / International Journal of Engineering and Technology (IJET)
Coordinator It is a gatteway device that received the data from m each router and passed too the base statiion. It is consstructed of XBee (S22) installed onn XBee adapteer connected to t the USB po ort of PC as shhown in Fig. 119. To install this t XBee it must defined its adddress to each router in X-CT TU software to o enable such coordinator tto receive the data from o such coordinnator in its X--CTU softwarre. each routter that definee the address of
Fig. 19. XBee Coordiinator
Base Staation Matlab has h many feattures includinng storing, sennding commaands, designinng monitoringg software, storing and sending data for speccific times. Thherefore, a sppecial Matlab b program hass been designned in this reesearch to d from senssors as shown in the algorithhm of Fig. 20.. receive data There aree two types of o reading according to the function of th he sensor. Thhe first type inncludes the motion m and lighting sensor s which records the reeading when there t a changee is happenedd for example,, turn on or offf lighting and a boddy moved in the t range of PIIR sensor in thhis cases the Matlab M will diisplay suddenlly those new reading r as logical value. v The seccond type inccludes distancce and gas seensor, they reead the distannce and gas amount a at regular period p and ploot the results iff need so the Matlab prograam has been designed d for ddata analysis of o sensors as shownn in the designned algorithm of Fig. 21.
Fig. 20. Algoritthm for Receive data d from Sensor
DOI: 10.21817/ijet/2017/v9i4/170904031
Vol 9 No 4 Aug-Sep 2017
2881
ISSN (Print) : 2319-8613 ISSN (Online) : 0975-4024
Dr. Mahmood F. Mosleh et al. / International Journal of Engineering and Technology (IJET)
Figg. 21. Algorithm flow f chart for datta analysis of sennsors
VI. R Results and discussions d As mentiioned previouusly, it has beeen used four sensors (Distan nce, Motion, Light, L and Gaas) connected to router1 for experrimentally appplication. First, the result reecorded in thiis section for each sensor inndividually to o clear out the capabbility of each sensor readinng. Fig. 22 shoows the readin ng of each sennsor that displlayed on seriaal monitor of Arduinno.
Figg. 22. The readingg of sensors in serrial monitor of ArduinoDistance sensor. (b) Light sensor. s (c) Gas seensor. (d) PIR sen nsor.
The resuults shown in the Fig.22 inndicate sensor readings. Eacch sensor is inndicated by a letter with an nd without numbers, for example, the distancce sensor usess the letter (D D) and numberr beside it to indicate the amount a of f gas sensorr. The light and a motion seensors use (L L) and (P) resspectively distancee in centimeteer, same as for without any numbers to indicate thhe appearance of light or perrson. For the purpose of diisplaying the previous readding with timee. The Matlabb can show eaach values witth its time p of reading.. Also, it can be cleared ouut the readingg by plotting the result vs. time. Fig. 233 shows the plotting distancee and gas senssors reading foor a period of second.
(a)) (b) Fig. 23. Plotting of seensors Distance sensor. (b) Gas Seensor.
DOI: 10.21817/ijet/2017/v9i4/170904031
Vol 9 No 4 Aug-Sep 2017
2882
ISSN (Print) : 2319-8613 ISSN (Online) : 0975-4024
Dr. Mahmood F. Mosleh et al. / International Journal of Engineering and Technology (IJET)
In thee above figurre, (a) which represents thee distance bettween the sennsor and any other object and these readings is changing every e second, (b) representts the amount of gas in the room and thee readings change with n reading is i recorded.Fig. 24 displayeed the time arrrival in seconnd for PIR an nd LM393 time, eveery second a new sensors.
Fig. 24. Time arrrival for PIR and d LM393 sensors
s the oveerall network connecting annd running wiith its results displayed in the laptop scrreen. This Fig. 25 shows network can be used for f various appplication likee designing a program p to leeave the network for operatting stand n addition, the user can be innstall a thresh hold value alone andd recording thhe results depeending on the user need. In and put a command that t be enabled after any value approaach this threshhold to do soomething like alarm or o device for fo self-protecttion. activate other In advancced, this netw work can be coonnected to anny other comm munication neetwork like W Wi-Fi, Internet and GSM to monitoor and remote control of thee proposed nettwork to meett user requirem ments.
Fig. 25. Haardware design of o a network
VIII. Conclusions: In this reesearch, it hass been designeed a WSN forr monitoring any a area. It iss a flex netwoork which can n extended accordingg to the area, exploiting thhe facility of Matlab M versio on R2016a intterfaced with Arduino to reeceive the data from m all sensors through t its sppecific router that t pass the information too the Matlab. Analyzing an nd storing can be doone in the Maatlab and dispplay it as the user u need. Alsso, a program was designedd to apply any y function like monnitoring, shooting alarm acccording to thhreshold valuee of any senssor reading annd display reesults in a limited or o every timess. The hardwaare implemenntation in this research inclluded four sennsors as a part of very large nettwork consistss of huge sennsors divided hierarchically h y. The results show the impplemented parrt of such network can response to the demandd of user to diisplay the read ding in the manner of user''s need. In this research m reading with time and a graphicallly. the resultts are displayeed in a serial monitor,
DOI: 10.21817/ijet/2017/v9i4/170904031
Vol 9 No 4 Aug-Sep 2017
2883
ISSN (Print) : 2319-8613 ISSN (Online) : 0975-4024
Dr. Mahmood F. Mosleh et al. / International Journal of Engineering and Technology (IJET)
REFERENCES [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18] [19] [20]
Zhejun Feng, "Design and Implementation of an Experimental Platform for Performance Analysis in Wireless Sensor Networks", M.Sc. Thesis, KTH Royal Institute Technology, 2011. Fangwei Liu, Zhilong Shan, "Node Location Model and Simulations in Matlab for Wireless Sensor Networks", Advanced Materials Research, Vol. (694-697.1060), (2013). 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. Chiara Buratti, Andrea Conti, Davide Dardari, Roberto Verdone, "An Overview on Wireless Sensor Networks Technology and Evolution", Sensors, 2009. 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. Vongsagon Boonsawat, Jurarat Ekchamanonta, Kulwadee Bumrungkhet, and Somsak Kittipiyakul, "XBee Wireless Sensor Networks for Temperature Monitoring", Sirindhorn International Institute of Technology, Thammasat University, 2013. 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. Datasheet of Carbon Monoxide Sensor ISO 9001-2008 Certified Company Available in the Site http://forum.researchdesignlab.com/datasheet/carbon%20monoxide%20sensor%20mq7.pdf. Photocell Tutorial by Adafruit in Electronics Available in the Site http://www.instructables.com/id/Photocell-tutorial/. Datasheet of Ultrasonic Ranging Module HC SR04 by Elec Freaks Available in the Site https://cdn.sparkfun.com/datasheets/Sensors/Proximity/HCSR04.pdf. Datasheet of Motion Sensor by Lady Ada Available in the Site https://learn.adafruit.com/pir-passive-infrared-proximity-motionsensor/overview. Massimo Banzi, "Getting Started with Arduino the Open Source Electronics Prototyping Platform", 2nd edition. Simon Monk, "30 Arduino Projects for the Evil Genius", 2010. Datasheet of Arduino Mega, "Arduino MEGA 2560" by Allide Electronics Available in the Site https://www.arduino.cc/en/Main/arduinoBoardMega2560. Shanmugaraj Madasamy, R. Prabakaran, "Study on ZigBee technology", Conference Paper, April 2011. "XBee (S2) 2mw Wireless Communication Module" by Nex Robotics Available in the Site http://www.nexrobotics.com/products/wireless-devices/xbee-s2-2mw-wireless-communication-module-wire-antenna.html. "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. 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. Andreas Goranson and David Cuartielles Ruiz, "Professional Android Open Accessory Programming with Arduino", Published by John Wiley & Sons, Inc. , Canada, 2013. Datasheet of Arduino Uno, "Arduino UNO" Available in the Site https://www.arduino.cc/en/main/arduinoBoardUno, 2017.
DOI: 10.21817/ijet/2017/v9i4/170904031
Vol 9 No 4 Aug-Sep 2017
2884