TopologyFig.1: ZigBee topology Table 1:Comparison of technologies used for homeautomation 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.
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. 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.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 is themicrocontroller used as the ‘brain’. This 40 pincontroller has 32 I/O pins.XBee – The ZigBee module working on 2.4 GHzand equipped with an omni-directional antenna.
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 ZigBeecommunicationXBee 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
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 “Comparison of wireless technologies” [online]http://www.windowsfordevices.com/c/a/News/Module-adds-ZigBee-to-PC104-stacks/ Sinem Coleri Ergen "ZigBee/IEEE 802.15.4Summary", September 10, 2004 “ZigBee mesh networks” [online]http://www.ehow.com/list_7507031_zigbee-applications-features.html ZigBee Alliance, ZigBee Specification, Apil 1,2012, [online]: www.zigbee.org Johan lonn and Jonas Olsson. "ZigBee forwireless networking", www.webstaff.itn.liu, 2005 “ZigBee based energy management” [online]http://www.anewtech.wordpress.com 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 Atmel,AtMega16 Datasheet, [online]:http://www.atmel.com/Images/doc2466.pdf Digi-Maxstream,XBee24 datasheet [online]http://datasheet.octopart.com/XB24-AWI-001-MaxStream-datasheet-34843.pdf