Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

Feature: A Zigbee Based Home Automation: System Design and Implementation

A Zigbee
and security. In this paper, the system requirements are
discussed in the next section. After that the proposed
system architecture is explained. Then the system

Based Home
implementation is given. The final section presents the
conclusions.

Automation: Home Automation System Analysis


Basic Requirements of the home automation system

System Design and


The basic functionality of a home automation system is
home appliance. In general, the home automation system
should be capable of controlling those devices which can
play important roles in the daily life, such as light control

Implementation system, heating system, garden irrigation system, home


security system and so on. Since different systems have
different working styles, the use of home automation
system is to deliver users’ commands to the devices
rather than create a universal mechanism to take the
place of the existing working procedure in the targeting
system. Making devices controllable is the fundamental
purpose of home automation systems. Figure 1 shows the
Fang Yao and Research into the intelligent home has been ongoing since typical relationship between home automation system and
Shuang-Hua Yang the1980s. Casimir described and predicted the possible other home appliances. The home automation system only
Department of Computer technologies which may be involved in the exciting new gives instruction to “Turn On/Off” appliances without
Science, Loughborough home design [1]. In Casimir’s description, some scenarios directly intervening.
University were used to present a brief picture of what the intel-
ligent home can be and what it can do. For instance, the
Bokai Xia home owner can control the whole progress of pipe
College of Information & repair service in the office when the repair person comes
Control Engineering, to the home during day time. Users can subscribe to
University of Petroleum, electronic newspapers, which only contain the news they
East China are interested in. The author also identified two research
areas which need to be explored to improve home
automation system. These are Informatics and Ergonomics.
Due to the high level of complexity and difficulty, which
existed in the early days of the development of the home
electronics system, home automation products in the Figure 1: Relationship between the home automation system
early days were not practical for use. and home appliances
As defined by the famous Moore’s law (the capability of
the computer hardware increases doubly and meanwhile Intelligence
the cost reduces to approximately half), the continuously The term “intelligence” is achieved by adding additional
developing technologies have contributed tremendously functions to help the home automation system decide how
to realize home automation systems in the 1990s, such as to control the appliances. This will be a little more complex
energy management units, security systems and lighting than the “On/Off” signal. Typical algorithms such as PID
control systems etc. However, the obstacle was that these (proportional integral derivative) control and machine
systems can only be controlled individually, even those state are the most commonly used. Fuzzy logic and neural
produced by the same manufacturer. The cross product network are rapidly developed technologies being used
compatibility and complete system integration were still for many intelligent control systems. Although intelligent
a problem. Technologies such as Power Line Bus, X-10, control algorithms have been studied for many years,
Consumer Electronic Bus, and Infrared were proposed as they are not widely applied to home automation systems
possible solutions for integrating the system [2]. because of the operating cost and limited hardware capac-
In the past few years, many innovative technologies such ity. This problem is being solved gradually as a result of the
as Internet, WiFi, Bluetooth, Zigbee, and smart sensors increased computing capability of MCU (Microcontroller
have become mature and widely supported by the market. Unit) and DSP (Digital Signal Processing) [3].
In particular, embedded systems with microcontrollers are
being used in most of the electronic appliances currently Independent Platform
o the market which provide a convenient opportunity The lack of system integration is a serious obstacle for
for intelligent control. Through the integration of relevant the development of home automation systems. Although
technologies, home automation systems can be properly manufacturers have produced efficient products and
designed for the purpose of offering residents comfort achieved satisfactory results for specific applications, these

310 • Measurement + Control Vol 41/10 December 2008 www.instmc.org.uk


Feature: A Zigbee Based Home Automation: System Design and Implementation

products are still not able to integrate together to build a complete system. The local system consists of four layers: the Smart Sensor
system. One solution to the problem is to use an independent & Actuator layer, the Home Automation Network Transfer layer,
platform to establish a bridge which can connect different home the Data Processing layer and the User Interface layer. The remote
appliances and convert their status into a standard format for the system consists of two layers: the Public Network Transfer layer and
further processing. Figure 2 shows the principle of this platform. the User Interface layer. The communication between these two
systems is implemented through a “Virtual Home” [4]. Figure 3 shows
the architecture design.

Smart Sensor & Actuator


As the part of the bottom layer, a smart sensor is the most direct
information resource for the home automation system. Modern
MEMS (micro-electromechanical system) technology has accelerated
the emergence of low-cost, high reliable and easy programmable
sensors. The benefits offered by such smart sensors are correct per-
ception to the environmental changes and convenient home status
Figure 2: Principle of the independent platform monitoring. The selection of sensors depends on the purpose of the
application. In the home environment, temperature, humidity, light
The independent platform consists of two parts: transfer and signal level, pressure and gas sensors are the most commonly encountered
conversion. The transfer part is responsible for the communication types. Current sensor technology is able to support the operations
between appliance and platform. The signal conversion part is used to of many regular sensors working with the voltages from 5-3.3v,
convert data into a standard format which can be understood by the which are vital for the home use because of the cost consideration.
home appliances and the module for information processing. Then Normal consumers would not purchase high energy cost products.
the home automation system will be capable of dealing with several Figure 4 is the basic model of a smart sensor. Under the control of
home appliances. the controller, the signal generated by the sensor element will be
Through the analysis, we have an understanding that the home conditioned and amplified. In most cases, the processed signal is an
automation design is a process of system integration. Then the home analog signal and can be converted into the format of digital signal
appliances can share information on an independent platform and by an ADC (analogue-digital-converter). The digital signal converted
also be managed. from the sensory data can be easily recognized by the MCU through
the bidirectional sensor bus.
Actuators are the main mechanical parts in a home automation
Home Automation System Architecture system. Figure 5 is the principle design of actuator. As well as
the smart sensor, actuator implements its function by receiving
Based on the analysis in the previous section, we design a home instructions from a connected MCU. Normally any actuator can be
automation system with two main parts: a local system and a remote categorized into two main groups: mechanical driver and electronic

Figure 3: Home automation system architecture

www.instmc.org.uk Measurement + Control Vol 41/10 December 2008 • 311


Feature: A Zigbee Based Home Automation: System Design and Implementation
11 channels (868/915 MHz)
Channel 16 channels (2.4GHz)
Addressing 16-bit short address or 64-bit IEEE address

Range 10-20m

Channel access CSMA-CA and slotted CSMA-CA


Figure 4. Principle model of the smart sensor [3] 20 kb/s (868MHz); 40 kb/s (915MHz);
Data rate 250 kb/s (2.4GHz)
driver. If the appliance to be controlled is a mechanical device,
the actuator needs to generate or cause physical power in order Table 1: Features of IEEE 802.15.4 standard
to execute. Typical devices controller can be valve controller and
automatic door controller. If the target device is an electronic device, As Zigbee standard is exclusively designed for the purpose of
the actuator should be an electronic driver. This kind of devices control, the low data rate would not be a problem since the required
controller can be microwave oven, air condition, security monitor amount of communication would not be huge. For instance, a typical
system and so on. Figure 5 shows the principle model of the actuator. instruction of “Turn on” a device only requires 1 byte data capacity. It
Both mechanical and electronic driver can communicate with the is uncommon to use a control system to transmit information which is
MCU through the bidirectional actuator bus. over several kilobytes data. Therefore the data rate is sufficient for use.
The network layer and application layer are defined by the Zigbee
alliance [7]. The main features of the network layer and application
layer are mesh topology, end point addressing and application
profiles.
Zigbee network supports star, tree and mesh topologies [8]. Due to
the irregular distribution of most applications, mesh topology would
be the most suitable as no specific requirement are needed. The star
and tree topologies have limitation on communication range and
deployment.
As Figure 6 shows, in a mesh topology, Zigbee routers comprise
the mesh network. A special Zigbee node called “coordinator” is
in charge of setting up and maintaining the Zigbee network. Other
nodes called “EndDevice” are basic network devices which connect
Figure 5: Principle model of the actuator to the Zigbee network through one of the nearby routers. Those
routers are designed to be on all the time for transferring message.
Home Automation Network Transfer End devices only work at the specified time interval (1s, 2s, etc) and
The second layer defined in the system architecture is the home they do not have routing function. When they finish working, they
automation network transfer. The operation of the home network is will enter into a very low power mode to save energy consumption
for connecting individual component within the home environment. until the next time they are woken. Each home appliance in the
The approaches to achieve this purpose can be divided into two system will be connected to an end device. By connecting a router
main groups: wired and wireless networks [5]. nearby, home appliances can easily become members of a Zigbee
The deployment of home appliances is normally random and network with a small demand of power. Routers are the backbone
unpredictable.The main drivers of wired network are telephone lines, of the Zigbee network. They are responsible for relaying network
power lines, coaxial cable, and optical fibre.The advantages of using messages. Dynamic AODV (Ad hoc On-Demand Distance Vector
wired carrier are reliable communication, less interference, guaranteed
bandwidth and high security. However, the disadvantages are obvious. It
is not practical to require people to place their appliances in particular
locations i.e. close to power sockets.Therefore, if such interconnection
is proposed, a huge cost for installation and maintenance is unavoidable.
Increasingly, wireless technology is becoming popular and tends to
take the place of wired communication. Without the need to rely on
cable as the communication carrier, wireless network can reduce the
installation price and maintenance cost significantly. More importantly
physical location is no longer a restriction.
Zigbee is a complete radio frequency technology specifically
designed for control purpose with low cost and low data rate. Its
extreme low power consumption requirements (typically requires
2.7-3.6 voltage, 1mw transmit power, 37mA for transmitter/receiver
and 2.6μA in sleep mode) makes it more suitable than WiFi and
Bluetooth for the home automation use.
The Zigbee stack consists of four layers: physical layer, medium
access control layer, network layer and application layer. The physical
and medium access control layer is defined by the IEEE 802.15.4
standard [6]. Table 1 shows the features of IEEE 802.15.4. Figure 6: Zigbee mesh network

312 • Measurement + Control Vol 41/10 December 2008 www.instmc.org.uk


Feature: A Zigbee Based Home Automation: System Design and Implementation

actions that enable applications residing on separate devices to send


commands, requests data and process commands/requests to create
an interoperable, distributed application. For instance, a power meter
reading application profile contains two commands: “read voltage”
and “read current”. By agreeing upon a common profiles for certain
applications, a power meter reader produced by Manufacturer A can
read out the power meter produced by Manufacturer B easily. In fact,
the introduction of the application profile is not complex. However
the agreement upon common profiles may need wide range discus-
sions within the industry.

Data Processing and User Interface


The data processing layer is responsible for converting the format
of data collected between the upper and lower layers. In general, the
commands sent from the user interface are a combination of user
choices. Before being delivered to the smart sensor/actuator through
the home automation network (Zigbee), they must be formatted
correctly into the corresponding instructions. Conversely, smart sen-
Figure 7: Zigbee device addressing sor data and actuator feedback sent from the bottom layer must be
reorganized before being displayed to users, or else they are merely
Routing) routing protocol will ensure the network connectivity even meaningless data. Figure 8 shows a sample conversion. When user
if some of routers fail. The mesh topology provides several potential wants to turn on the light suited in the lounge, the instruction will
paths for router recovery. be decomposed into 4 parts: execution code, zone code, appliance/
Each Zigbee device will be allocated a 16-bit short address when sensor code and instruction/parameter code. Through the network
it joins the network. Therefore, a single Zigbee network can contain transfer, the microcontroller connected to the light in the lounge
more than 65,000 Zigbee devices, which is much more than most will receive the instruction and know what to do after analyzing the
normal requirements. The concept of “endpoint-address” is a more instruction with the same format. Conversely, when the light in the
dedicated design. Zigbee defines 240 endpoints on its application bedroom wants to report users that it is on, the information will be
layer which exist logically. Then each individual Zigbee device formatted into the same 4 parts. Then the controller at the user side
allows 240 different applications running on it without management can assemble the received message which means “the light in the
confusion. For example, there is more than one socket on a Zigbee bedroom is on” and display it to the user via the interface.
enabled power extension. If other devices want to communicate with
a certain power socket, its message will reach the Zigbee device via Virtual Home and Public Network Transfer
a 16-bit address and then use an endpoint number to locate the par- Support for remote access is another feature of the modern
ticular socket which is required. Figure 7 shows this process. Zigbee intelligent house which benefited from recent development in
protocol provides a flexible addressing mode. The application profiles network technology. People can connect to their home through the
are the agreement on messages, message formats and processing Internet or phone network. Access from anywhere at anytime means

Appliance

Temperature
sensor

Figure 8: Sample conversion in the data processing and user interface layer

www.instmc.org.uk Measurement + Control Vol 41/10 December 2008 • 313


Feature: A Zigbee Based Home Automation: System Design and Implementation

that anybody can be a potential “home intruder”. The virtual home


is to defend against this risk. Two procedures must be completed
before the user commands can be accepted and executed: these are
a security check and a safety check. The security check is to validate
the identification of the incoming user to ensure that whether his/
her authorization is legal. The safety check is to let the incoming
commands in a predefined virtual scenario to ensure the eventual
outcome would not damage the real house appliance. More detail
about the security and safety check can be found in [4].

System Implementation
In the system implementation, the Zigbee network is built using
the Jennic JN5139/5121 module with a Jennic Zigbee stack [9]. The
JN5139/5121 module is a SOC (System-On-Chip) solution which
integrates the microcontroller, memory, and transceiver on one chip.
A temperature sensor and a light controller are used to construct Figure 9: Components connection during the system implementation
the layer of smart sensor and actuator. Each of them is connected
to a JN5139/5121 module. Therefore, the sensor and actuator are chip, it is possible for the Zigbee signal to be interfered with when
capable of transferring data within the Zigbee network, and mean- WiFi switches to a close frequency.
while the intelligent control on the device can be done through the The third is the application profile. The application profile we used
integrated microcontroller. The category of the actuator to which in the system implementation was only prepared for the test. In
the light controller belongs is electrical driver. other words, it is a private profile. If the system is to be developed
The execution of the data processing layer was divided into two further, the establishment of a public profile is essential.
areas. In the local area, it is done by the JN5139/5121 module with
a screen display. In the remote area, it is done by a Java application
running on a laptop. Conclusions
The public network transfer is implemented through combining
a Zigbee module called a Zigbee adapter and a WiFi module. The In this paper, we analyze the requirements of a home automation
incoming instructions from the remote will be delivered to the system and proposed the system architecture which organizes
WiFi module whose address is allocated by a normal home router. all aspects into four layers. Zigbee is a key factor as an innovative
The standard RS232 port enables the communication between the wireless technology providing a convenient platform for the
Zigbee adapter and the WiFi module. The virtual home works on connection of different layers. The issues of power consumption,
this adapter. Then the incoming message can be checked before wireless interference and application profile identified in the system
entering into the real home automation system. Figure 9 shows the implementation should be properly addressed in the development of
components connection during the implementation. The Zigbee any practical application.
network works smoothly with the smart sensors and actuators. The
low packet error rate (<1%) defined by the IEEE 802.15.4 standard Reference
ensures the instruction delivery and feedback collection are accurate. 1 C
 .S.Skrzypczak, “The Intelligent Home of 2010”, IEEE Communications Magazine
The WiFi module and Zigbee adapter work well because the RS232 December 1987, Vol. 25, No. 12, pp.81-84
connection is based on a hardware circuit. 2 C
 .Douligeris, “Intelligent Home Systems”, IEEE Communication Magazine, October 1993,
During the test of the implementation, some problems were Vol. 31, No. 10, pp.52-61
identified. The first was the Zigbee network response time. To save 3 R.Frank, Understanding Smart Sensors, 2nd Edition, Boston,Mass: London: Artech House, 2000
the power of the battery, Zigbee device will regularly enter into a 4 K
 . Gill, F. Yao and S. H. Yang, “Transparent Heterogeneous Networks for Remote Control of
low power mode—sleep. When the end device is sleeping, it won’t Home Environments”, IEEE International Conference on Network Sensing and Control
response any request from the Zigbee network until it wakes up 2008, pp.1419-1424
again. Although the interval of sleep is programmable, the shorter the 5 E .Callaway, P.Gorday, L.Hester, J.A.Gutierrez, M.Naeve, B.Heile, and V.Bahl, “Home
interval is, the faster the power consumption will be since the radio Networking with IEEE802.15.4: A Developing Standard for low-Rate Wireless Personal Area
receiver is on (37mA on JN5139 or 50mA on JN5121). Network”, IEEE Communications Magazine August 2002, Vol. 40, No. 8, pp.70-77
The second was interference between Zigbee and WiFi. The speci- 6 IEEE Std.802.15.4, “Part15.4: Wireless Medium Access Control (MAC) and Physical Layer
fied working radio frequency for both Zigbee and WiFi is 2.4GHz. (PHY) Specifications for Low –Rate Wireless Personal Area Networks (LR-WPANs)”
Therefore some channels are overlapped. To avoid interference, WiFi 7 Zigbee Alliance: www.zigbee.org.
will change its frequency if similar WiFi signal or serious interference 8 Zigbee Std, “Zigbee Specification”, Zigbee Document 053474r06,Version 1.0, December. 2004
is detected. Because the bandwidth of each Zigbee channel (2MHz) 9 Jennic Company: www.jennic.com
is smaller than WiFi (22MHz) and may not be detected by the WiFi

314 • Measurement + Control Vol 41/10 December 2008 www.instmc.org.uk

You might also like