Wireless automation using zigbee protocols


Published on

For more projects visit @ www.nanocdac.com

Published in: Technology, Business
  • Be the first to comment

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Wireless automation using zigbee protocols

  1. 1. Wireless Automation using ZigBee protocols1Kartik Rathod, 2Nilay Parikh, 3Aesha Parikh, 4Prof. Vrushank ShahDepartment of Electronics and CommunicationL. J. Institute of Engineering and TechnologyAhmedabad, IndiaEmail IDs: 1kartik.rathod27@gmail.com, 2nilay.90@gmail.com, 3aesha.prkh@gmail.com,4shah_vrushank@gtu.edu.inKeywords: Automation, ZigBee, sensor network, IEEE 802.15.4, Wireless communicationAbstractThe current automation industry uses WiFi orBluetooth for wireless automation which has veryhigh power consumption.[1]There are manywireless monitoring and control applications forindustrial and home environments which requirelonger battery life, lower data rates and lesscomplexity than those from existing standards. Ourresearch project indicates that wireless automationusing ZigBee protocols is beneficial to the industryas it has long battery life, has reliable and securecommunication and also it supports 65000 nodes.Moreover the power consumption is very low forthe ZigBee based sensor network. These featuresmake it an apt option to create a wireless networkof number of sensors and appliances and thus ourresearch is an impetus to wireless automation.IntroductionThis paper evaluates the potential of ZigBee foraddressing automation problems through the designand implementation of flexible home automationarchitecture. A dedicated virtual home isimplemented to cater for the system’s security andsafety needs. To demonstrate the feasibility andeffectiveness of the proposed system, a ZigBeebased system prototype has been developed andevaluated with the home automation system.Smart home using wireless communication isreplacing the wired system which was very messyand difficult to setup. However, the existingwireless smart home system only can cover up to acertain range of area that is limited by the range ofwireless module being used. This paper introducesthe conceptual understanding and strategy ofZigBee IEEE 802.15.4 standard [2]to be deployedin smart home environment. ZigBee technologyoffers a multi-hop communication capability fordata transfer. Prototype systems of home securityand automation are built utilizing ZigBee basedsensor network to present an insight.The aim of our project work is to design fullyfunctional wireless home automation network usingZigBee and IEEE 802.15.4 protocols and toevaluate applications in a sensor network. Thiswork will result in two fully functional ZigBeemodules and the sensors can be networkedwirelessly. Each sensor in the automation andsecurity network is a node and the collection ofnodes is tied together to create a mesh. The mesh iscontrolled from one single point through a wirelessnetwork. Zigbee technology gives each componentthe ability to run on a single, low voltage battery.Once established, the mesh is easy to maintain andchange. Nodes can be added or deleted, and themesh can be reconfigured to meet the homesecurity systems demands and scope. Zigbee alsoallows the owner to manipulate one segment of thesystem without affecting the remainder of themesh.[3]ZigBee technology enables very low powerconsumption for home automation and aides to setup a low cost, low power, better range version of apersonal wireless network.Issues with existing home automation technologiesSo far wireless networking has been focused onhigh-speed and long range applications.We currently use Wi-Fi or Bluetooth for wirelessautomationWi-Fi has very high power consumption and hencewe need a more practical solution.Bluetooth has comparatively higher data rate andthereby higher power consumption; also it cannothandle a large number of nodes.ZigBee TechnologyFeatures [4]x Reliable and extensive rangex Mesh networkingx Low data-rate applicationsx Very long battery lifex Securex RF applicationsx Low power, Low cost wireless technologyx Global applicabilityx Addressing space up to 65000 networks978-1-4673-1989-8/12/$31.00 ©2012 IEEE
  2. 2. TopologyFig.1: ZigBee topology [5]Table 1:Comparison of technologies used for homeautomation [1]Name ZigBee® Wi-Fi™Bluetooth™Standard 802.15.4 802.11b 802.15.1TransmissionRange(meters) 1 – 100 1 – 100 1 – 10Battery Life(days) 100 – 1,000 0.5 – 5.0 1 – 7Network Size(# of nodes) > 65,000 32 7ApplicationMonitoring& ControlWeb,Email,VideoCableReplacementStack Size(KB) 4 – 32 1,000 250Throughput(kb/s) 20 – 250 11,000 720Fig.2: Comparison of TechnologiesProposed System ImplementationThis project offers two importance features of asmart home - home security and home automation.In home security system, the triggered sensor node(indicating an unauthorized intrusion or a fire) willsend an alert signal to the main controller throughthe intermediate nodes.In home automation system, user can control theirhouse by sending the command through SMS to themain controller at home. When the home maincontroller receives the command, it will send thecommand to the destination node through theintermediate nodes. The destination node then willcarry out the task as commanded by the user.Sensor nodes can be added in the house by simplyputting them at desired locations accordingly. Themain controller will detect the new nodeautomatically. User just has to inform the maincontroller by keying-in the specific use of the newnode.Sensor network for the prototypeAutomatic temperature controlA thermocouple measures the room temperaturewhen the temperature goes beyond a specifiedlimit, the fan turns on based on control signalreceived by ZigBee.Automatic light controlWhen light resistance goes beyond specified limitlight is turned on.
  3. 3. Intrusion detectionA RF transmitter and receiver is placed acrosswindows or doors. When the RF signal is cut aintruder is detected and a control signal is sentwirelessly at the receiver block of the system andan alarm rings which warns the user.ZigBee based Real time location trackingFig.3: Proposed concept of location tracking byusing 3 ZigBee modulesUser convenienceThe automation experience is customized as perusers’ needs and requirements.The output device can be LEDs, flashing lights,fan, Air conditioner or even a telephone callas per of advanced security enhancementEnergy managementA large amount of power can be saved due to thestandby property and low data rate. This isvery important aspect in today’s world where inenergy crisis management is essential. [6]Fig.4: Energy management via ZigBee resourcesBlock diagramFig.5: Detailed structure of the transmitterFig.6: Detailed structure of the receiverMethodologyThe methodology of this project design can bedivided into two sections; hardware and softwareimplementations. The hardware implementationconsists of the development of the main controller,sensor network and the smart automation network.[7]On the other hand, the software implementationfocuses on the programming of the microcontrollerusing AVR studios and configuration andprogramming of ZigBee modules using X-CTU.Hardware ImplementationMicrocontroller will be the interface between theuser and the system. AtMega16 [8]is themicrocontroller used as the ‘brain’. This 40 pincontroller has 32 I/O pins.XBee – The ZigBee module [9]working on 2.4 GHzand equipped with an omni-directional antenna.
  4. 4. LM 7805, LM 317, LDR, Fire sensor and variousother sensors/devices as per the complexity of thehome automation network.Fig.7: Hardware implementation of the project(a)Tramsmitter (b)receiver (c)sensor prototypeSoftware ImplementationThe software part consists of programming theAtMega16 using AVR Studios. The simulation ofcircuit was carried out by the use of Proteus 10 andthe configuration of XBee module is by X-CTUsoftware provided by Digi, Inc. The scope ofprogramming includes sensor working, USARTcommunication programming, DIO pinsconfiguration of XBee modules and voltage levelconversion.Softwares used:X-CTU – Configuration and test utilitysoftware for XBee modulesAVR Studios 4 – coding, development anddebugging software for AtMega controllerProteus 10 – Circuit debugging, simulation andPCB design softwareConfiguration of ZigBee modules was done byusing ‘DIO pins enable’ instead of USART codingDevice ConfigurationUsing DIO pins for communication was moreconvenient than USART communication as itavoided forming of data bytes with start bit andstop bit. DIO communication can be configuredusing X-CTU software.Network architecture and configuration for ZigBeecommunication[9]XBee is a user friendly RF module which canprovide communication between two devices. TwoXBee modules can be kept at distance 30 m indoorsand 100 m outdoor. We use DIO pins to sendsignals directly to communicate between twomodules without any requirement of additionalhardware.Enabling the DIO Lines (Remote):The DIO feature can be enabled on the remote withthe ATDn=3 where n= 0-7(the DIO pin you wish touse).Enabling the DIO Lines (Base):The DIO feature can be enabled on the base withATDn=4, 5 (4 is DO default low and 5 is DOdefault high) where n= 0-7(the DIO pin you wish touse). The inputs and outputs need to be mappedtogether, so if you enable DI2 on the remote youmust enable DO2 on the base.Each DIO line is connected to a specific pin on themodule and some pins may have other features onthem.Fig. 8: ZigBee module configuration by X-CTU
  5. 5. DIO Line Sampling and TimersOnce the proper DIO lines have been enabled thenyou should set the sampling rate and timeout timersof the DIO lines. The sampling rate needs to be seton the remote and the timer needs to be set on thebase. On the remote the sampling rate can be setwith the IR parameter (the sampling rate is in unitsof ms). The timer is set on the base by the Tnparameter where n=0-7 (the Tn parameter is inunits of 100s ms). If after the Tn timer has expiredand the module hasnt received any new data thenthe DOn will return to its default state. This meansthat you should always set the sampling rate lessthan (in most cases much less than) the timeouttimer.Change DetectThe XBee can also be setup for change detectwhere it will transmit a DIO shift whenever achange takes place. If Change Detect is not enabled(default) the module will not transmit when theDIO lines change, but only on their sample interval.To enable Change Detect set IC to the Bit mask ofthe corresponding DIO lines, where DIO0 is theLSB and DIO7 is the MSB.Samples before TransmissionThe XBee allows the user to set the number ofsamples to be taken before the data is transmitted,this command is ATIT. The XBee can buffer up to90 bytes worth of sample data, since all the DIOinformation is stored in 2 bytes the XBee canbuffer up to 22 samples or ATIT=0x44.DIO link between the XBee radiosRemote BaseDL = 0x1234 DL = 0x5678MY = 0x5678 MY = 0x1234D0 = 0x3 D0 = 0x4D1 = 0x3 D1 = 0x4IC = 0x18 T3 = 0x64IT = 0x2 T4 = 0x64IR = 0x32 IA = 0x5678 (or FFFF)These settings will set the remote to sample DI0 &DI1 once each every 50ms. It will then buffer 2samples each before sending them back to the base.That should lead to the base receiving a 16 bytetransmission (4 bytes data and 12 bytes framing)every 100ms.ConclusionThis paper has reviewed the existing state of homeautomation systems. This paper describes ZigBeecommunication protocol and presents its potentialdeployment in smart home environment i.e.wireless automation. Applications in home securityand automation utilizing a ZigBee based wirelesssensor network are illustrated in the prototype. Thebenefits of this system over the existing automationsystems are explained. This system has attractivefeatures for home automation and convenience bythe use of Wireless Personal Area Network(WPAN). In general, sensors and communicationdevices used for the deployment in smart home arenot required to have high speed communicationcapacities; rather more consideration needs to befocused on a limited amount of delay incommunication and a low energy consumption. Inthis perspective, ZigBee is an emerging networktechnology as a wireless communication standardthat is capable to satisfy such requirements.Moreover, its specification, which is based onIEEE 802.15.4 wireless protocols, promises robustmesh network and complete interoperability.AcknowledgementThis work has been done as a research projectunder the guidance of Prof. Vrushank Shah ofDepartment of Electronics and Communication atL. J. Institute of Engineering and Technology.References[1] “Comparison of wireless technologies” [online]http://www.windowsfordevices.com/c/a/News/Module-adds-ZigBee-to-PC104-stacks/[2] Sinem Coleri Ergen "ZigBee/IEEE 802.15.4Summary", September 10, 2004[3] “ZigBee mesh networks” [online]http://www.ehow.com/list_7507031_zigbee-applications-features.html[4] ZigBee Alliance, ZigBee Specification, Apil 1,2012, [online]: www.zigbee.org[5] Johan lonn and Jonas Olsson. "ZigBee forwireless networking", www.webstaff.itn.liu, 2005[6] “ZigBee based energy management” [online]http://www.anewtech.wordpress.com[7] Rozeha A. Rashid, Mohd Adib B. Sarijari,Mohd Rozaini Abd Rahim, Nur Hija Mahalin."Wireless Home Security and Automation SystemUtilizing ZigBee based Multi-hopCommunication", 2009[8] Atmel,AtMega16 Datasheet, [online]:http://www.atmel.com/Images/doc2466.pdf[9] Digi-Maxstream,XBee24 datasheet [online]http://datasheet.octopart.com/XB24-AWI-001-MaxStream-datasheet-34843.pdf