[IEEE 2012 IEEE 18th International Conference on Parallel and Distributed Systems (ICPADS) -...

5
A Smart Home System Based On ZigBee And IOS Software Hui-Liang Shang 1 , Ren-Mei Xu 2 , and Jun-Kang Yuan 3 Electronics Engineering Department of Fudan Univerisity Shanghai, China 1 Hui-Liang Shang :Email [email protected] 2 Ren-Mei Xu :Email [email protected] 3 Jun-Kang Yuan :Email [email protected] Electronics Engineering Department of Fudan Univerisity, Shanghai, China AbstractA smart home system based on ZigBee and iOS is proposed. ZigBee is a low-power personal area network. This technology is combined with the mainstream IOS operational system, which established a wireless smart home system. The system uses CC2430 chip and ZigBee2006 protocol stack from TI as the core of the main system with the aid of iOS which enables the realization of remote control and monitoring. Specific designs including light intensity detection module, temperature sensitive module, light control module and curtain control module are demonstrated in this paper. The whole system demonstrates characteristics of low cost, low power dissipation, user-friendliness and scalability. Keywords-ZigBee, Smart home system, CC2430, iOS, energy- saving, low power dissipation, UDP, TCP/IP, HTTP I. INTRODUCTION Smart home is defined as the enrichment of a living environment which employs a family home as a platform to integrate the control of temperature, light intensity, curtain and other devices or environmental parameters. [1]. Usually the smart home integrates separate devices into a network for a better life experience. In order to enhance the application level and service level of home digitalization, the technology of ZigBee and IOS are both incorporated into the smart home system. This system relays data collected from sensors among sub-nodes using ZigBee, assisted by iOS which provides controller platform on iPhone to control and monitor home environment with ease [2]. The system structure is as Figure (Fig) 1. Figure1. System structure ZigBee is a short-distance, two-way wireless communication technology with low complexity, low power consumption, low data rate and low cost [3]. Thus, ZigBee is deployed to pass data through intermediate devices to reach distant devices. IOS, a mobile operating system developed and distributed by Apple Inc, operates together with ZigBee to provide the user interface, using multi-touch gestures. The user input is direct and convenient while the response is immediate and smooth. With the aid of three communication protocols UDP, TCP/IP and HTTP, a connection between handheld device and the server through LAN or the Internet is established. In addition, the application of IOS reflects the benefits of convenience and contentment for the users. In this paper, a wireless smart house system has been established based on ZigBee and iOS, realizing remote control and home monitoring. The rest of this paper is organized as follows: topology of ZigBee wireless network is reviewed in Section 2 and design of the core hardware and software process in system is described in Section 3 and 4 respectively. Finally, we conclude this study in Section 5. II. TOPOLOGY OF ZIGBEE WIRELESS NETWORK A variety of network forms are supported by ZigBee technology including star network structure, ring network structure, tree network structure and mesh network structure [4]. Depending on the core position of ZigBee in smart home system, the design of the ZigBee network structure, which is closely related to the selection of topology, determines the performance of communication through the network [5]. Corresponding to the requirements of a smart home network, mesh structure is the most suitable for applying ZigBee in the network. Such structure supports the system with characteristics of scalability, high flexibility and reliability, ease of maintenance and management. Explanations in detail will be introduced in the following passage. Mesh topology, also referred to as peer-to-peer topology, consists of a mesh of interconnected routers and end devices. Each router is typically connected through at least two pathways and can transfer information for its neighbors. Mesh technology utilizes multi-hop transmission so that even if the transmission on one path is interrupted, data can still be transmitted through nearby nodes. The realization of data relay through multiple intermediate nodes to the end leads to multi-hop network [6]. In contrast, traditional single-hop network will suffer from message 2012 IEEE 18th International Conference on Parallel and Distributed Systems 1521-9097/12 $26.00 © 2012 IEEE DOI 10.1109/ICPADS.2012.155 940 2012 IEEE 18th International Conference on Parallel and Distributed Systems 1521-9097/12 $26.00 © 2012 IEEE DOI 10.1109/ICPADS.2012.155 940 2012 IEEE 18th International Conference on Parallel and Distributed Systems 1521-9097/12 $26.00 © 2012 IEEE DOI 10.1109/ICPADS.2012.155 940

Transcript of [IEEE 2012 IEEE 18th International Conference on Parallel and Distributed Systems (ICPADS) -...

Page 1: [IEEE 2012 IEEE 18th International Conference on Parallel and Distributed Systems (ICPADS) - Singapore, Singapore (2012.12.17-2012.12.19)] 2012 IEEE 18th International Conference on

A Smart Home System Based On ZigBee And IOS Software

Hui-Liang Shang1, Ren-Mei Xu2, and Jun-Kang Yuan3

Electronics Engineering Department of Fudan Univerisity Shanghai, China

1 Hui-Liang Shang :Email [email protected] Ren-Mei Xu :Email [email protected] Jun-Kang Yuan :Email [email protected]

Electronics Engineering Department of Fudan Univerisity, Shanghai, China

Abstract— A smart home system based on ZigBee and iOS is proposed. ZigBee is a low-power personal area network. This technology is combined with the mainstream IOS operational system, which established a wireless smart home system. The system uses CC2430 chip and ZigBee2006 protocol stack from TI as the core of the main system with the aid of iOS which enables the realization of remote control and monitoring. Specific designs including light intensity detection module,temperature sensitive module, light control module and curtain control module are demonstrated in this paper. The whole system demonstrates characteristics of low cost, low power dissipation, user-friendliness and scalability.

Keywords-ZigBee, Smart home system, CC2430, iOS, energy-saving, low power dissipation, UDP, TCP/IP, HTTP

I. INTRODUCTION

Smart home is defined as the enrichment of a living environment which employs a family home as a platform to integrate the control of temperature, light intensity, curtain and other devices or environmental parameters. [1]. Usually the smart home integrates separate devices into a network for a better life experience. In order to enhance the application level and service level of home digitalization, the technology of ZigBee and IOS are both incorporated into the smart home system. This system relays data collected from sensors among sub-nodes using ZigBee, assisted by iOS which provides controller platform on iPhone to control and monitor home environment with ease [2]. The system structure is as Figure (Fig) 1.

Figure1. System structure

ZigBee is a short-distance, two-way wireless communication technology with low complexity, low power consumption, low data rate and low cost [3]. Thus, ZigBee is deployed to pass data through intermediate devices to reach

distant devices. IOS, a mobile operating system developed and distributed by Apple Inc, operates together with ZigBee to provide the user interface, using multi-touch gestures. The user input is direct and convenient while the response is immediate and smooth. With the aid of three communication protocols — UDP, TCP/IP and HTTP, a connection between handheld device and the server through LAN or the Internet is established. In addition, the application of IOS reflects the benefits of convenience and contentment for the users. In this paper, a wireless smart house system has been established based on ZigBee and iOS, realizing remote control and home monitoring.

The rest of this paper is organized as follows: topology of ZigBee wireless network is reviewed in Section 2 and design of the core hardware and software process in system is described in Section 3 and 4 respectively. Finally, we conclude this study in Section 5.

II. TOPOLOGY OF ZIGBEE WIRELESS NETWORK

A variety of network forms are supported by ZigBee technology including star network structure, ring network structure, tree network structure and mesh network structure [4]. Depending on the core position of ZigBee in smart home system, the design of the ZigBee network structure, which is closely related to the selection of topology, determines the performance of communication through the network [5].

Corresponding to the requirements of a smart home network, mesh structure is the most suitable for applying ZigBee in the network. Such structure supports the system with characteristics of scalability, high flexibility and reliability, ease of maintenance and management. Explanations in detail will be introduced in the following passage.

Mesh topology, also referred to as peer-to-peer topology,consists of a mesh of interconnected routers and end devices. Each router is typically connected through at least two pathways and can transfer information for its neighbors. Mesh technology utilizes multi-hop transmission so that even if the transmission on one path is interrupted, data can still be transmitted through nearby nodes. The realization of data relay through multiple intermediate nodes to the end leads to multi-hop network [6]. In contrast, traditional single-hopnetwork will suffer from message

2012 IEEE 18th International Conference on Parallel and Distributed Systems

1521-9097/12 $26.00 © 2012 IEEE

DOI 10.1109/ICPADS.2012.155

940

2012 IEEE 18th International Conference on Parallel and Distributed Systems

1521-9097/12 $26.00 © 2012 IEEE

DOI 10.1109/ICPADS.2012.155

940

2012 IEEE 18th International Conference on Parallel and Distributed Systems

1521-9097/12 $26.00 © 2012 IEEE

DOI 10.1109/ICPADS.2012.155

940

Page 2: [IEEE 2012 IEEE 18th International Conference on Parallel and Distributed Systems (ICPADS) - Singapore, Singapore (2012.12.17-2012.12.19)] 2012 IEEE 18th International Conference on

transmission failure due to a device malfunction or a data blockage. Topology is shown in Fig. 2.

Fig 2. Mesh network topology

The benefits of mesh network topology are as follows: (1) Flexibility can be achieved by simply adding more routers to the network. Then, the newly added node will automatically find its neighboring nodes, creating a proper route. (2) This topology is highly reliable and robust. When an individual router becomes inaccessible, an alternative route can replace the invalid one. (3) The extension of network coverage is equally possible by using intermediate devices in pathways. (4) Each node only communicate with nearby nodes, thus the network reduces both the interference from long-distance communication and the average power consumption [7]. (5) Unlike a tree network where an increase in the number of sub-nodes will cause congestion, the availability of an alternative pathway enables high utilization of the network [8].

Therefore, mesh network is selected as the most appropriate structure for our smart home system based on the above reasons.

III. DESIGN OF THE CORE HARDWARE PROCESS INSYSTEM

The smart home system deploys the TI CC2430 hardware platform. The CC2430 SoC chip integrates CC2420 radio core, ZigBee RF frontend, built-in memory and a microcontroller [9] [10]. Each node in the system is equipped with a unique module to collect information or control certain devices.

A. Temperature Sensitive Module In the system, we select DS18B20 as the temperature

sensor. This temperature sensitive sensor has a variety of instructions. In our module, several instructions are mainly used such as skip ROM command CCH, starting temperature conversion instruction 44H, reading register instruction BEH [11]. This module’s structure is shown in Fig. 3.

Fig 3. Temperature sensitive module structure

B. Light Sensitive Module: The advantages of light detection module are

demonstrated in both its environment detection function and in its capability of active communication. When the light intensity is strong enough or weak enough, the light detection module will send information to the coordinator. Those received information will be processed by the coordinator in order to control the indoor lighting system. For the hardware design, the main task is to set a light intensity threshold. Therefore, photoresistor is used in this module. And the realization of the module function can be achieved by setting the resistance threshold of the photoresistor [12]. If the photoresistor’s value changes, a low-level pulse will trigger system tasks using Z-stack. This module structure is shown in Fig. 4.

Fig 4. Light sensitive module structure

C. Light Control Module: In this system, we select a two-way switch to control two

lines of lights in the room. At the same time, the two-way switch is connected to the light sensitive module for light intensity adjustment. This module structure is shown in Fig. 5.

941941941

Page 3: [IEEE 2012 IEEE 18th International Conference on Parallel and Distributed Systems (ICPADS) - Singapore, Singapore (2012.12.17-2012.12.19)] 2012 IEEE 18th International Conference on

Fig 5. Light control module structure

D. Curtain Control Module: The curtain control module automates the control of curtains. Both prior programmed opening and closing time and information acquired from the light sensor can be used in the control of curtains. Light sensitive module and motor control are major parts in the circuit. This module structure is shown in Fig. 6.

Fig 6. Curtain control module structure

IV. DESIGN OF THE CORE SOFTWARE PROCESS INSYSTEM

A. ZigBee Controller Process In our system, Z-stack from TI and IAR Workbench are

employed as development tools. Once the coordinator is powered on, the initialization of the expansion board is completed in the first place. And application objects are also initialized, including the establishment of the ZigBee network. After the ZigBee network is established, sub-nodes identified as routers or terminals can join or exit the network in mesh network topology at any time. Using the data transmission method mentioned above, the coordinator can exchange information with the computer in a bidirectional way: (1) the coordinator receives instructions from the computer and sends those information in a converted form to the other nodes in the system; (2) the coordinator receives data from other nodes and sends converted data to the computer. After the above process, messages from serial interface and wireless network are processed in a message loop from a class (sub-nodes only need to send messages through wireless network). ZigBee controller process is shown in Fig 7.

Fig 7. ZigBee controller process

With the combination of software and hardware design in the smart home system, an Operator Interface has been accomplished as shown in figure 8

Fig 8. Operator interface

B. IOS Application Interface Process To increase the flexibility and scalability of our smart

home system, mobile device support is developed. Considering that users have the demand of monitoring and controlling home condition with a long distance range, mobile device support enhances the mobility, enabling remote monitoring.

IOS system is developed by Apple Inc for iPhone. Apple also introduced a software development package (SDK) for

942942942

Page 4: [IEEE 2012 IEEE 18th International Conference on Parallel and Distributed Systems (ICPADS) - Singapore, Singapore (2012.12.17-2012.12.19)] 2012 IEEE 18th International Conference on

IOS, including Xcode compiler and iPhone online simulator. This text is based on the development environment on Mac OSX 10.7 and Xcode 4.2.

The realization of the communication among LAN and the Internet incorporates the usage of three communication protocols to connect the handheld device and the home server in different conditions. TCP/IP protocol and rapid non-connected UDP-based protocol are used to transfer commands and voice files in LAN [13]. HTTP request is sent to the server (connected to the coordinator) of a web site in order to transfer information through the internet.

a) UDP Protocol: UDP protocol has characteristics of fastness, non-

connectedness and it is used to search for IP of the server. Once entering the connection page through handheld device, specific data header will be sent in UDP protocol standard and the validity of the feedback received will be examined. If the feedback is qualified, this IP address can be used as server IP in connection with the handheld device.

b) TCP/IP Protocol: TCP/IP protocol is connection-based, stable, low-speed

so that it is applied to the transmission of commands, which can secure the validity and stability of the command. TCP/IP protocol requires connection with client before data transferring [14]. Once the connection is established through request to the server, the transmission between handheld device and the server can be achieved through specific command format [15].

c) HTTP Protocol: When LAN is in absence, HTTP protocol provides

request and response standards between a client and the server. The client, which is the handheld device in our text, sends an HTTP request to transmit command to the intermediate server and a PHP script in the server will process the request. This script then extracts information and saves it in MySql database. There are certain restrictions, for example: communication between handheld device and the server must be realized by regular request.

After the establishment between the handheld device and the server using above protocols, a user interface on the handheld device is needed for further operation. Thus, iOS interface design is also an important part in iOS programming. IOS provides a special graphic toolbox to facilitate developers with personalized graphic space. Meanwhile, cutting edge hardware resources such as sensors and gesture recognition can be fully made use of. There is a corresponding code file behind each window file.

Through programming and integration, the final controller platform is shown in Fig 9.

Fig 9. Controller platform

When the cell phone receives searching signals, corresponding words will show on the screen. When the command is executed successfully, exact index of light intensity and environment temperature will be printed on the screen.

V. CONCLUSION

The smart home system based on ZigBee and iOS is a novel solution which is used to meet the demand of highlyautomated and intelligent home. We propose the mesh network topology applied to the smart home system for its reliability, robust, scalability, high utilitarian and low power consumption. IOS system and three communication protocols are introduced to enhance user experience. Our future work will mainly focus on the optimization of controller interface, realizing simulation of real object controller interface and develop voice recognition technology, adding convenience to the whole system. Also, we will focus on the extension of the range of controlled objects and parameters, improving security and quality of life.

REFERENCES [1] V. Ricquebourg, D. Menga, D. Durand et al., “The smart

home concept: our immediate future”, Proc. IEEE International Conference on E-Learning in Industrial Electronics(ICELIE 06), IEEE Press, Dec. 2006, pp. 23-28,doi: 10.1109/ICELIE.2006.347206 .

[2] D. Mark, J. Nutting, J. LaMarche: “Beginning iPhone 4 Development: Exploring the iOS SDK,” 1st ed., pp. 92-276,January 2011.

[3] M. Osipov: “Home automation with ZigBee: Next Generation Teletraffic and Wired/Wireless Advanced Networking”, Proc. NEW2AN the 8th International Conference on Next Generation Teletraffic and Wired/Wireless Advanced Networking(NEW2AN 08), Springer-Verlag Press, Oct. 2008, pp. 263-270, doi: 10.1007/978-3-540-85500-2_26.

[4] K.K. Lee, S.H. Kim, H.S. Park: “Cluster Label-based ZigBee Routing Protocol with High Scalability”, Proc. IEEE Second International Conference on Systems and Networks Communications(ICSNC 07), IEEE Press, Aug. 2007, pp.12, doi: 10.1109/ICSNC.2007.27.

[5] M. Horton., J. Suh: “A vision for wireless sensor networks,”Proc. IEEE MTT-S International Microwave

943943943

Page 5: [IEEE 2012 IEEE 18th International Conference on Parallel and Distributed Systems (ICPADS) - Singapore, Singapore (2012.12.17-2012.12.19)] 2012 IEEE 18th International Conference on

Symposium(IMS 05), IEEE Press, Jun. 2005, pp.4, doi: 10.1109/MWSYM.2005.1516602.

[6] J.Y. Teo, Y. Ha, C.K. Tham: “Interference-Minimized Multipath Routing with Congestion Control in Wireless Sensor Network for High-Rate Streaming,” The IEEE Transactions on Mobile Computing (TMC 08), vol. 7, Sept.2008, pp.1124-1137, doi: 10.1109/TMC.2008.24.

[7] S.K. Chong, S.W. Loke, S. Krishnaswamy: “Wireless Sensor Networks: From Data to Context to Energy Saving,” 2005 International Workshop on Ubiquitous Data Management(UDM 05), April 2005, pp.33-40, doi: 10.1109/UDM.2005.23.

[8] P. Orlik, J. Zhang, B. Bhargava, G. Ding, G. Ding, Z.Sahinoglu, Z. Sahinoglu: “Reliable broadcast in zigbee networks,” Proc. IEEE Second Annual IEEE Communications Society Conference (SECON 05), IEEE Press, Sept. 2005, pp.510-520, doi: 10.1109/SAHCN.2005.1557103.

[9] X. Yang., R.Y. Zhao, Y.Y. Zhang.: “Design of control terminal for intelligent family system based on ZigBee,”Microcomputer Information, vol. 03, 2009, pp. 55, doi: CNKI:SUN:WJSJ.0..

[10] Y. Zheng, R.H. Liu: “Low power consumption smart home data aquisition system based on CC2430,” Electronic Design Engineering, vol. 19, 2001, pp. 178-180, doi: CNKI:SUN:GWDZ.0..

[11] G.S. Yang: “Wireless Temperature Data Acquisition System based on NRF905,” Control and Automation, vol. 24, 2008,pp. 43, doi: CNKI:SUN:WJSJ.0..

[12] H.T. WANG, Z.Y. ZHU: “Economical Street LED Lamp Control System Based on ZigBee,” Journal of East China Institute of Technology (Natural Science), vol. 32, 2009, pp. 18, doi: CNKI:SUN:HDDZ.0..

[13] Choi, J., Choi, B., Seo, J., Sohn, R., Ryu, M., Yi, W., Park, K.: A system for ubiquitous health monitoring in the bedroom via a bluetooth network and wireless lan: Proc. 26th Annual International Conference of the IEEE Engineering in Medicine and Biology Society(IEMBS 04), IEEE Press, Sept. 2004, pp. 3362–3365, doi: 10.1109/IEMBS.2004.1403944.

[14] Y. Nishida: “Enhancing 802.11 DCF MAC for TCP/IP communication,” Proc. IEEE Wireless Communications and Networking Conference(WCNC 05), IEEE Press, March 2005, vol. 3, pp. 1620-1625, doi: 10.1109/WCNC.2005.1424756.

[15] S. William: “Wireless Communication and Networking,” 2nd ed., Dec. 2004, pp.200–500.

944944944