You are on page 1of 39

See

discussions, stats, and author profiles for this publication at: https://www.researchgate.net/publication/303013637

Hybrid Home Area Network for home automation

Thesis · May 2016


DOI: 10.13140/RG.2.1.2175.0642

CITATION READS

1 194

1 author:

Nursultan Asetuly Karimov


Nazarbayev University
1 PUBLICATION 1 CITATION

SEE PROFILE

Some of the authors of this publication are also working on these related projects:

Hybrid Home area network for home automation View project

All content following this page was uploaded by Nursultan Asetuly Karimov on 13 May 2016.

The user has requested enhancement of the downloaded file.


Hybrid Home Area Network
for Automation System

Bachelor of Engineering
(Electrical and Electronic)

NURSULTAN KARIMOV
201101639

Spring 2016
Abstract
In the recent years, the demand for the home automation system is increasing. Therefore, in
this paper, the design and operation of the hybrid Home Area Network (HAN) for home
automation system will be described. The system will be accessed through the Web based
interface, and the commands to the electronic devices and home appliances will be sent via
the hybrid network system consisting of power line and ZigBee communications. The
electronic devices will be controlled remotely; or with the gestures by using the Microsoft
Kinect device. The importance of the project to the society is huge as it will help the
disabled people (and not only) to control their home appliances; and monitor the
temperature, light and humidity status of their house. Moreover, the project is economically
beneficial since it does not require the implementation of the new cables to the facility.

2
Declaration form

DECLARATION
I hereby declare that this report entitled “Hybrid Home Area Network for Automation
System” is the result of my own project work except for quotations and citations which
have been duly acknowledged. I also declare that it has not been previously or concurrently
submitted for any other degree at Nazarbayev University.

---------------------------------
Name: Nursultan Karimov
Date: 19/04/2016

3
Table of contents

1. Introduction 8
2. Literature review 9
3. Concept and Methodology of the Project 10
3.1. Design and Main Components of the Project 10
3.2. Applications of the Project and various Sensors and Actuators types 13
4. ZigBee Communication System 18
4.1. Characteristics and structure of ZigBee 18
4.2. Advantages and Disadvantages of Network 24
4.3. Implementation in Project 25
5. Results and Discussion 30
5.1. Strengths and Weaknesses of the System 30
5.2. Economic and Cost Analysis 31
6. Conclusion 32
7. References 33
A Appendix 35

4
List of tables

Table 1.1 Job Distribution among group members 9


Table 3.1 Applications of the system 14
Table 4.1 Features of the ZigBee network 18
Table 4.2 Beacon mode characteristics 23
Table 4.3 The comparison of the several wireless technologies 24
Table 5.1 Strengths and weaknesses of the project 31
Table 5.2 Costs of the equipments and Arduino supplementary products 31

5
List of figures
Figure 3.1 The conceptual scheme of the system 10
Figure 3.2 Arduino microcontroller board 11
Figure 3.3 Power line communication kit 13
Figure 3.4 DHT11 sensor 14
Figure 3.5 Kinect device 15
Figure 3.6 Power relay sensor 16
Figure 3.7 Electrical door strike 16
Figure 3.8 IR remote control sensor 17
Figure 3.9 DC motor 17
Figure 4.1 ZigBee architecture 20
Figure 4.2 Star topology 21
Figure 4.3 Mesh topology 22
Figure 4.4 Tree topology 23
Figure 4.5 Web page outlook 25
Figure 4.6 Arduino music player shield 26
Figure 4.7 Diagram of the music player operation through ZigBee 26
Figure 4.8 ZigBee transmitter code to play the music #7 27
Figure 4.9 ZigBee transmitter code for volume adjustment 27
Figure 4.10 Diagram for the curtain control 28
Figure 4.11 ZigBee transmitter code for the curtain control 28
Figure 4.12 Diagram for the air conditioner control 29
Figure 4.13 ZigBee transmitter code for the air conditioner control 29

6
List of Abbreviations/Symbols/Specialized Nomenclature

Systems

HAN Home Area Network

PLC Power line communication

OS Operating system

MAC Medium Access Control

FFD Full Function Device

RFD Reduced Function Device

ZED ZigBee End device

APS Application Support

ZC ZigBee coordinator

ZDO ZigBee device object

APO Application object

Measurement units

kHz kilohertz

m meter

kb/s kilobit/second

% percentage

o
C degree Celsius

7
1. Introduction

The technology industry is developing very fast in the recent decades. Therefore,
more and more facilities in the world including factories, industrial sites and urban area
buildings are becoming fully automated [1]. However, the automation of the residential
houses are moving slowly, as the cost of the smart house system implementation is high.
Thus, our project will present the design of the new hybrid home area network (HAN) for
home automation system. The novelty and difference of our system from those existing in
the industry are the application of the hybrid network system and web based interface
access. The hybrid network is the system which uses the best features of the power line
communication (PLC) and ZigBee network in remote control of home appliances such as
kettle, air conditioner; and in monitoring the dynamic status of the house. The vast majority
of the smart house projects are accessed through the smartphone application. Nevertheless,
the various companies use the different operating systems (OS). For instances, the Apple
and Samsung Company applications operate on the bases of iOS and Android OS systems
respectively. The consumers will enter to our system via the Web based interface in order
to improve this situation.
In the beginning of the last century the concept of the smart house was the feature
of the science-fiction literatures. Despite that, with the development of the microcontrollers
and widespread electrification of the residential buildings, the idea of the automated house
become real. The first "wired homes" was created by the American hobbyists in the 60s of
the 20th century. Although, the term "smart house" was coined by the American
Association of Housebuilders in 1984 [2]. In spite of the interest in home automation, the
truly smart house projects were designed after the global use of the Internet. Nowadays, the
consumers can remotely control their home appliances, and monitor their house
temperature, security statuses. In other words, the home automation systems makes the life
of the individuals easy and more comfortable. Consequently, the demand for such projects
is rising. For instances, according to ABI Research in 2012 approximately 1.5 million
residential facilities in the USA were automated, and this figure is expecting to growth over
8 million by 2017 [3].
As it was mentioned earlier, the implementation of the smart houses are increasing
very fast. In order to satisfy the demand of the consumers we decided to choose this project.

8
Moreover, the realization of our system will be helpful for the disabled persons (and not
only for them) [4]. Since they will able to remotely control the electronic devices at home;
for examples, the individuals may turn on/off the air conditioner, and adjust the volume of
the audio/video players. In addition, the humidity, light and temperature status of the house
or any rooms can be monitored from a distance.
The project consists of 4 parts; they are the Web based interface design, sensors and
actuators, power line communication and ZigBee system. Those works were divided among
our group members based on the skills and preferences of each person (Table 1.1). My
responsibilities and contribution to the project include the ZigBee communication system
testing and implementation.
Table 1.1. Job Distribution among group members
Group Members Responsibilities
Kuatbek Mukabak Web based interface
Nursultan Karimov ZigBee system
Serikbolsyn Duisembay PLC communication
Yerden Kypshakpayev Sensors and Actuators

2. Literature Review
There are many suitable sources written on the topic of home automation system. For
instances, Okan Bingol and Kubilay Tasdelen's "Web-based Smart Home Automation:
PLC-controlled Implementation" is the good research paper on the power line network
system implementation in the smart houses. The "Low cost Arduino/Android-based
Energy-Efficient Home Automation System with Smart Task Scheduling" describes the
conceptual design and advantages of the home automation project operating on the Arduino
microcontroller board. The Akshay Kanwar's and Thoraya Obaid's research reports deeply
explain the ZigBee technology and its applications in the home automation. Finally, the
work of Shayma Wail Nourildean helps to understand the difference between the various
types of ZigBee connection topologies. Additionally, the market costs of the sensors,
actuators and other required electronic devices can be found in the official web page of the
Trossen Robotics company.

9
3. Concept and Methodology of the Project
First of all, this section of the report will describe the overall concept of the home
automation system and its main components (including Arduino and PLC properties) in
detail. Secondly, the applications (such as remote control of home devices) of our project
and various sensor and actuator types will be explained.
3.1. Design and Main Components of the Project
The overall structure of the hybrid home automation system is depicted on the Figure
3.1. Initially, the user will enter the system through the web based interface (web address is
webhouse.kz) via any of the electronic devices, such as mobile phone, laptop or a electronic
tablet. The main gateway Arduino microcontroller board will receive the commands from
clients through the internet. Then, the main microcontroller will communicate with the
other supplementary end nodes, equipped with Arduino boards, via the hybrid network
system which includes ZigBee and PLC communication protocols. Finally, at the end nodes
the sensors and actuators on the board will control the home appliances and monitor the
ambience of the rooms.

Figure 3.1 The conceptual scheme of the system

10
The Arduino board (Figure 3.2) is the 8-bit, 16-bit, or 32-bit AVR microcontroller
with the standard connector pins which are used in attaching the external shields or
equipments. The vast majority of the microcontroller device have the 5V regulator, 16MHz
crystal oscillator, and the boot loader. The boot loader helps the Arduino to use the ordinary
personal computers as the programming devices. The control of Arduino can be achieved
by using the Integrated Development Environment software which is user-friendly program
written in Java language (it can support the C or C++ languages as well). It includes code
editor mode and the one-click mechanism which is required in order to synchronize and run
the commands [5].

Figure 3.2. Arduino microcontroller board

The Arduino board was decided to be used as the main controller for home
automation system as a result of the its several positive properties. Firstly, this
microcontroller board is manufactured with all the necessary auxiliary accessories, which
are 5V regulator, burner, an oscillator, LED, serial communication interface and the
headers for the connections. Secondly, the price of this microcontroller is inexpensive in
comparison with other types of controlling equipments. Lastly, the Arduino commands may
be written using the "C" programs; and the software of the this main gateway consists
several useful libraries of the examples. Those library contents are very helpful for the
amateur consumers in order to begin to work on this gateway board [5]. The prime Arduino
board should be attached to the personal computer in order to operate the system, and this
controller will transmit the commands; and the received signals are dispatched to the other
11
supplementary microcontrollers called end nodes. Those end nodes will control and
monitor states of the household equipments such as light, curtain and door operations.
The system requires approximately three Arduino boards in order to send and
receive data from home electronic devices and Web based interface. The prime board is the
main controller gateway, while the remaining boards are access nodes responsible for the
transfer of information through PLC or ZigBee network systems. The Power line
communication is the network which transmits data and information through the usage of
the electrical wires of the residential house. It operates by modulating the carrier signal of
20-200 kHz frequency into household wiring at the transmitter. Each of the consumers'
houses have their own unique "home addresses", which are required in order to avoid the
propagation of the carrier signals to nearby constructions. On the other hand, the ZigBee is
the wireless network technology with low power consumption which is usually used in low
data rate applications.
As it was discussed above, the power line communication (Figure 3.3) transmits the
records and data via the usage of the residential or industrial sites' electrical cables. The
electrical cables are transformed into the data carrying lines by superposition of the low
energy data signals to the power waves. The transmitted data signal frequency range should
have to be at minimum level of 3kHz in order to not interfere with the power waves [6].
The PLC is classified as the narrowband and broadband types. The narrowband
PLC operates at low frequency range between 3kHz and 500kHz, and at low data rate with
maximum value of 100kb/s. This type of PLC are implemented in the energy generation
sector and in home automation systems. On the contrary, the broadband PLC system has
opposite characteristics to the narrowband type: with high data rate (up to 1Mb/s), and high
frequency value of 1.8-250MHz. Despite its high data rate, the broadband type of PLC can
be implemented only in short range applications [6].

12
Figure 3.3. Power line communication kit
After the implementation of the communication links between main gateway and
end nodes had been accomplished, the sensors and actuators should be installed in order to
control and monitor the processes and equipments within a home area network. The sensors
will transfer the data in backward and forward directions and actuators will perform
specific tasks based on the user's orders. For example, air conditioner is remotely controlled
by sending the infrared signals from the infrared receiver sensors. The operations related to
the light, kettle and door will be controlled via the power line communication, while the
control of the air conditioner, music player and curtain will be implemented through
ZigBee network.
3.2. Applications of the Project and various Sensors and Actuators Types

The system has many applications in home automation process (Table 3.1). Firstly,
it will help to remotely control the household electronic devices. For instances, the air
conditioner, audio/music players, curtain and kitchen appliances. The commands to those
equipments will be transferred through PLC or ZigBee networks. The clients can turn
on/off the device, and adjust of the volume/illumination intensity of it. Secondly, the
individuals may check the dynamic status of the house in any time they want. For example,
the surveillance of the temperature, humidity and light conditions could be achievable.
Furthermore, the system is useful to transmit the data or records using the hybrid network
method. Finally, the Microsoft Kinect device can be applied in order to control the curtain
or doors of the house by gesture commands. The different types of the sensors and actuators
will be used in order to achieve all those objectives and aims of the project.

13
Table 3.1. Applications of the system

Remote control Status surveillance

Air conditioner Light

Kettle Temperature

Audio/music player Humidity

Curtain/door

In the hybrid system, the DHT11 temperature and humidity sensor (Figure 3.4),
compatible to Arduino board, will be used. This sensor consists of 2 equipments: thermistor
and capacitive humidity sensor. The thermistor part of the sensor is responsible for the
measurement of the temperature in the room. When the temperature in the room changes its
value, the resistance meaning of thermistor will vary as well. As the result the thermistor
will be informed about the temperature variation in the house. The capacitive humidity
sensor has the 2 electrodes between which the polymer, sensitive to the dampness in a
room, is situated. The dielectric permittivity of the sensor changes its value as a result of
the absorption of the moisture by polymer. When this process occurs the capacitance
between 2 plates will be formed, and any variation in capacitance value will indicate the
humidity level change [7]. The DHT11 sensor has temperature measurement range of 0-
60oC and 20-90% of humidity level.

Figure 3.4. DHT11 sensor

14
The Kinect electronic device (Figure 3.5) is the controller developed by Microsoft
company for the gamers around the world as the alternative device to the keyboards or
joysticks. The main difference of this controller is the control of the game without any
physical contact with the device; instead the gesture or voice commands will be used. The
Kinect device has several parts: IR emitter, RGB and IR cameras, and microphones. The
RGB camera type is useful in capturing the 3-channel pictures, while the IR camera and
emitter are efficient at captured objects distance recognition process. The microphones are
responsible in transmission of sound signals necessary in voice commands recognition
stage. The unique properties of device make it useful tool in curtain or door controlling
steps of the home automation system.

Figure 3.5.Kinect device

The home electrical appliance such as light and kettle can be controlled by usage of
the power relay sensor (Figure 3.6). The power relay sensor controls the power supply
switchers of the household devices. The light bulb consumes more energy amount than
LEDs. Therefore, the terminals of bulb will not be attached to the main controller gateway
directly; instead they will be connected to the microcontroller board by using power relay
sensors to prevent the damage to Arduino board. The same principle of operation will be
applied in kettle control. After the power relay sensor switches on, the kettle will begin the
boiling process, and when the boiling temperature reaches the specified value (around
100oC), the relay will be automatically shut down [8].

15
Figure 3.6. Power relay sensor

Nowadays, the majority of the door remote controller systems use the electronic
door lockers. They are easy to use and has simple structure; however, the price of
replacement of old door lockers or the purchase of a new locker is very expensive. Thus,
the electrical strike device (Figure 3.7) was suggested as the alternative to the
aforementioned method in our project. The electric strikes can be implemented to the
existing door locks and has cheaper price.

Figure 3.7.Electrical door strike

The remote control of the household appliances are achievable by applying infrared
signal transmitting sensors. The IR remote control sensor (Figure 3.8) are widely used in air
conditioner controlling process. Initially, the IR sensor will send the command signals to
the device via infrared transmitter. After that, the same type of sensor situated on the air
conditioner will receive the signal and proceed it further to its actuators. Lastly, the
actuators will execute the will of the costumers.
16
Figure 3.8. IR remote control sensor

Finally, the dc motors (Figure 3.9) are used as the actuators in curtain control
application. The implementation of dc motor depends on the window curtain types. For our
system, the jalousie type curtains will be very efficient. The actuating arm of the dc motor
has to be connected to the blind ropes of the jalousie. When the arm of actuator will begin
to rotate the ropes, the blinds of the curtain starts to open.

Figure 3.9. DC motor

17
4. ZigBee Communication
In this part of report, general information about the characteristics the ZigBee
Communication system and its architectural structure, strengths and weaknesses will be
discussed. Firstly, the ZigBee was conceived in 1998, by 2003 it was standardized, and was
lastly updated in 2007 [10]. The name of the technology originates from the waggle dance
of the honey bees.

4.1. Characteristics and structure of ZigBee

The ZigBee is the wireless network technology with the simple structure and cheap
cost in comparison with other wireless communication networks in industry such as Wi-Fi
or Bluetooth. It is constructed on the physical and Medium Access Control (MAC) layers
defined in IEEE standard as 802.15.4 protocol [9]. The system is implemented for the
applications requiring low data rate (approximately from 20-250kb/s) and it has low power
consumption. Nevertheless, the last characteristics shortens its transmission distances to
around of 10 to 100m (Table 4.1). In spite of that factor, ZigBee can transmit records over
long distances by passing the data via mesh network of intermediate devices. The frequency
band of the network varies depending on the countries; for examples, this figure for
European states is 868MHz, while for Northern America it is 915MHz [9].
Table 4.1. Features of the ZigBee network [9]

Parameter Value
Data Rate 250kb/s, 40kb/s and 20kb/s
Topology Star or Peer-to-Peer
Addressing 16-bit (short) or 64-bit (extend)
Multiple Access Technique Carrier Sense Multiple Access with
Collision Avoidance (CSMA/CA)
Frequency 868 MHz (Europe)
915 MHz (North America)
2.4GHz (Worldwide)
Range 10-100 meters
Channels 11 channels (868/915MHz)
16 channels (2.4GHz)
18
As it was mentioned above, the ZigBee was manufactured on top of the IEEE
802.15.4 standard protocol. Generally, this IEEE standard defines the MAC and physical
layers characteristics of the wireless network technologies. The ZigBee technology
comprises of the several main components, called devices. Those components had been
divided into two main types: physical and logical types. In the further, the physical type
devices are classified as Full Function Device (FFD) and Reduced Function Device (RFD).
Depending on the location in the network system, the FFD type of device may be allowed
to have from one to more supplementary (child) devices; however, the FFD can be used in
only rudimentary operations. On the other hand, the RFD performs more complex and
complicated operations; therefore, it cannot own any child (auxiliary) equipments [9].
The logical type devices has divided into coordinator, router and end device types.
The coordinator is the most capable device in comparison to other types and it creates the
root of the network tree. At least one quantity of ZigBee coordinator should be presented in
the network system in order to form the network tree. The ZigBee router device connects
the main network with the neighboring networks and is useful in transmission of the data
between the network lines. The ZigBee end device (ZED) has the restricted characteristics,
which include the communication with only the coordinator or router. As a result of this
property, the end device may be dormant for the long period of time leading to the
enhancement of its battery life [9].
The architecture of the ZigBee protocol has the 4 main layers; they are: physical,
MAC, network and application layers (Figure 4.1). The physical layer is situated in close
distance to the hardware, and it is able to control and communicate with radio transceivers
directly. Furthermore, the physical layer is responsible for the channel selection, link
quality estimation, hardware initialization processes. The MAC layer is the intermediate
layer located between physical and network layers. This layer are necessary in creating the
access modes and in synchronization of the equipments to this modes signals. The network
layer is architecture layer placed above the MAC layer. The functions of the network layer
includes network formation and routing [11].
The final layer is the application layer, which is the highest protocol layer. The
application layer consists of three various sub-layers: Application Support (APS), ZigBee
Device Objects (ZDO) and application objects (APO) [11]. The main aim of the APS sub-
19
layer is to store the useful tables which contain the information about how to establish and
operate the communication between several ZigBee components. Moreover, devices use the
aforementioned tables to find their maintaining counterparts in the specific operating area
during the discovery stage [9]. The ZDO sub-layer is required in order to perform service
discovery, security and binding processes. The final sub-layer component controls and
manages the protocol layers in ZigBee network. This means that the APO is the software
which controls the hardware part of the system [11].

Figure 4.1.ZigBee architecture [11]


The network layer of the ZigBee can be designed in either star or tree or the mesh
connection formations. Each of those network types should have one ZigBee coordinator
device which will monitor the maintenance of the system and connects it with the other
networks. In the star topology (Figure 4.2), the centralized communication and
management scheme is implemented, where the ZigBee coordinator is located on the center
of the system. The terminal nodes are not able to send or receive the information from each
other directly, and in order to communicate they should transmit the data to the central
coordinator device where they will be dispatched to its destination. Despite its simple and
centralized structure this topology network has various disadvantages. Firstly, the
maintenance of the system depends on the ZigBee coordinator, and since the all data
packages should be transmitted through it, the coordinator may be bottlenecked. Secondly,
20
the battery of the coordinator device might be exhausted as all transmissions go through it
[12].

Figure 4.2. Star topology [9]


The mesh topology (Figure 4.3) also has the ZigBee coordinator (ZC) that controls
the whole network system. In comparison with the aforementioned network topology this
system is more decentralized, which means that the terminal nodes can able to transmit the
records directly to other nodes within their radio range. The mesh topology has many
advantages. Firstly, the operational range of the network may be enhanced by attaching the
additional devices to the network. Secondly, if the one of the paths stops to work in the
system, the node will send the command to its destination through the other link. Thirdly,
the mesh topology consumes less power than the star topology-designed networks, since
the distance between the nodes can be reduced and the communication process does not
operate via one specified node. On the contrary, the mesh topology has more cumbersome
structure than its star counterpart and its overhead cost is very high [12].

21
Figure 4.3. Mesh topology [9]
Finally, in the tree topology (Figure 4.4) the system consists of central node called
root tree (coordinator), several routers and end nodes. The main objective the connection of
the routers is to extend the coverage area of the transmission. The end nodes connected
either to root tree or routers are called children nodes. Those children devices may only
communicate with their parental (coordinator or router) nodes. This tree system has its
drawbacks as well; for instances, the geographically close but not parent-children nodes are
not able to send or receive the records directly. In addition, if one of the parent-nodes stops
its operation, the children devices will be restricted from transmitting the messages [13]. By
analyzing all topology types we decided to choose the star topology as our network
connection system for ZigBee communication.

22
Figure 4.4.Tree Topology [9]
The ZigBee uses two access modes of the communication; they are beacon and non-
beacon modes. The beacon mode is preferable in case of saving the power and is applied by
the battery operated ZigBee coordinators. In this mode, the device will wait for the
periodically transferred "beacons" directed to it by the coordinator; the beacon interval
depends on the data rate (Table 4.2). When the transmission of the message is completed,
the timetable for the next beacon to this specific device will be set by the coordinator. Then,
the device can go to "sleep" and wait for the next scheduled transmission of a data [9]. On
the contrary, the non-beacon based system is used by the mains-powered coordinator and
each nodes in the network are able to transmit the information when the channels are free
[11]. This system is efficient in the smoke detection and security alarming applications [9].

Table 4.2. Beacon mode characteristics.

rate minimum maximum


(kb/s) time(ms) time(ms)
20 48 786.4
40 24 393
250 15.36 251.7

23
4.2. Advantages and Disadvantages of the Network
In this subsection the strengths and weaknesses of the ZigBee network will be
analyzed. The ZigBee system has several positive characteristics. Initially, the installation
and maintenance cost is very cheap in comparison with other wireless network systems as
Bluetooth or Wi-Fi. Secondly, as it was stated above, its power consumption is very low
(Table 4.3). Therefore, the technology has very long battery life [10].
Table 4.3.The comparison of the several wireless technologies [9]
Technology Z-Wave Insteon Waveins Bluetooth Wi-Fi ZigBee
Frequency 868MHz 904MHz 433MHz 2.4GHz 2.4- 868MHz
908MHz 868MHz 5GHz 915MHz
2.4GHz 915MHz 2.4GHz
Modulation FSK/GFSK FSK GFSK/PSK FHSS QPSK BPSK
COFDM O-QPSK
QAM
Error Control CRC(8 bit) CHECKSUM BCH CRC(16) CRC(32) CRC(16)

Range 30-100m 45m 200-1000m 10m 100m 10-100m

Network Size 232 256 unknown 8 2007 64000

Power consumption Low NA Ultra-low Medium High Very low

Moreover, ZigBee can be easily installed and has flexible network architecture.
Lastly, this network can be implemented for the systems requiring low data rate transfer
and support large number of nodes [9]. On the contrary, the communication network has
negative effects as well. In detail, its low power consumption factor limits its transmission
distance. Fortunately, this problem can be solved by using the mesh network of
intermediate devices or by applying PLC protocol. Furthermore, the application of ZigBee
for transmission of official private data is highly risky [10].

24
4.3. Implementation in Project
The ZigBee network has many applications in the home automation system. As it
was mentioned above, the applications of the project, such as control of the curtain,
audio/music player and air conditioner, will be maintained by the usage of the ZigBee
network communication. Thus, this subsection of the report in detail will explain the
implementation of the ZigBee system in our project.
Initially, the users of the home area network system should visit the website
(webhouse.kz), where they can access to their home cabinet (Figure 4.5) via the registration
process. After that, consumers will able to choose the corresponding household appliances
and processes which they want to implement. Those application processes will be managed
by the actuators and sensors.

Figure 4.5.Web page outlook

As it was stated earlier, the Arduino boards will be main gateway microcontrollers
which will connect and transmits the data between the transmitter and receiver points. The
music/audio player control may be achievable with the help of the mp3 player shield
(Figure 4.6) which will be attached to the Arduino receiver end node. On the contrary, the
25
operation of the air conditioner and curtain control will be managed by the IR remote
control sensor and DC motor respectively.

Figure 4.6.Arduino music player shield


The schematic diagram of the music player application is depicted in Figure 4.7.
First of all, the users will choose the specific music (for example, music #7), which has to
be played, from the list of pre-uploaded tunes. Then, web site will send this data to the main
server, while the software called Processing will search for the commands of the consumers
at the main server. When the Processing program finds the information related to the
interest of the clients, it will send the message to the Arduino main gateway to play the
chosen music in residential sites through the serial port.

Figure 4.7.Diagram of the music player operation through ZigBee


26
The ZigBee shields will be attached to both transmitter and receiver Arduino
boards. The transmitter main gateway with the help of the ZigBee network will send the
records to the receiver end. At the receiver, another ZigBee shield will receive the
command of the users and will dispatch this information to the Arduino end node
microcontroller. Lastly, the Arduino supplied with the 9V battery source and connected
with the mp3 shield will play the selected music (in this case music #7) through the external
speakers or headphones.

Figure 4.8.ZigBee transmitter code to play the music #7


The aforementioned method can be applied to the adjustment of the volume level of
the music. However instead of the incoming byte '7', the incoming signals '+' or '-', for
volume increase and decrease, will be dispatched (Figure 4.9).

Figure 4.9.ZigBee transmitter code for volume adjustment

27
The schematic diagram of the curtain control process is illustrated in Figure 4.10.
Initially, the consumers will click on the curtain icon in the main Web interface and choose
open or close options. The web interface will dispatch this information to the main server,
where the Processing will receive this message. Then, the software will transmit command
to the main gateway to open or close the jalousies of the curtain via the serial port.

Figure 4.10.Diagram for the curtain control


Arduino microcontroller located at the transmitter side sends the data to the receiver
end node by using the ZigBee network. At the receiver, the end node microcontroller
supplied with the battery and connected with a dc motor will perform the curtain control
operation. The ZigBee system will use the incoming byte signals 'H' and 'L' for opening and
closing the curtain of the room (Figure 4.11).

Figure 4.11.ZigBee transmitter code for the curtain control

28
The similar steps of the data transmission stage will be implemented in air
conditioner control application. The schematic diagram of the air conditioner management
process is represented in Figure 4.12. The clients will choose to turn on or off the air
conditioner in the corresponding mode of the main Web interface. The web interface will
send this records to the main server, where the Processing will receive this message. Then,
this program will dispatch the information to the main gateway to turn on or off the air
conditioner in the room through the USB port.

Figure 4.12. Diagram for the air conditioner control


The main gateway board will transmit the data to the receiver end node via the
ZigBee communication. At the receiver end, Arduino microcontroller will be supplied by
battery and be connected with a IR remote control sensor. This sensor will send the signal
to air conditioner in order to adjust it. The ZigBee system will use the incoming byte
signals 'H' and 'L' for turning on and off the air conditioner state (Figure 4.13).

Figure 4.13.ZigBee transmitter code for the air conditioner control


29
5. Results and Discussion
The performance of the overall system was analyzed considering the several
important factors which include reliability, energy consumption and transmission distance.
The system's reliability factor had satisfying results, after the all required devices were
tested. Unfortunately, we had some challenges with the implementation of our project.
Firstly, Arduino boards and ZigBee shields can be energized by 9V battery source; on the
other hand, various of the sensors and motors needed more battery supply to operate than
aforementioned equipments, nearly of 12V. Secondly, ZigBee network was able to transfer
the data around of 10 m with significant delay of 2s. Therefore, the transmission distance
was decided to be 2m since at that distance there would not be any time delay. Finally, the
transmission distance of the university power line communication was restricted, since the
minority of the electrical sockets were interconnected with each other. Generally, the
applications of the hybrid system did not show any error in their operation and we were
able to achieve all our goals and aims.

5.1. Strengths and Weaknesses of the System


This section considers the advantages and disadvantages of the hybrid home area
network for home automation (Table 5.1). Firstly, the implementation of the new cables are
not required. As we transfer the data through the wireless ZigBee and PLC communication
(uses existing cables) networks. Thus, our system is more costly efficient than those found
in this area. Secondly, as the transmission distance of the ZigBee is restricted by 10-100m,
we use the power line communication protocol in order to enlarge the coverage area of the
system [1]. Lastly, as it was mentioned earlier, the majority of the home automation
systems are accessed by using the mobile phone applications. Consequently, the consumers
of iOS system are not able use the Google Android products or vice versa. Therefore, the
HAN system offers the alternative solution: to enter the system through Web based
interface. On the contrary, the system suffers data attenuation, which occurs through PLC
network as a result of the numerous elements on the power lines [14]; and some time delay.
However this time delay effect may be neglected.

30
Table 5.1. Strengths and weaknesses of the project
Advantages Disadvantages
No new cables implementation Attenuation
Coverage area extension Time delay (negligible)
ZigBee's restricted
Web-compatible
transmission distance
Energy efficient
Cost efficient

5.2. Economic and Cost Analysis


This home automation system does not need the installation of the new cables, as the
data will be transmitted through PLC and wireless ZigBee communications. Consequently,
our project is more cost efficient than those systems which can be found in industry. Table
5.2 illustrates the budget/cost analysis for the whole system.
Table 5.2. Costs of the equipments and Arduino supplementary products [15]
Equipment Quantity Cost per unit (USD) Total cost (USD)
Arduino mega 7 20 140
Ethernet shield 3 5 15
Xbee and its shield 4 4+12 64
Mp3 Shield 1 10 10
Sensors (T/H) 1 5 5
Electric strike 1 14 14
IR module 1 5 5
Wires, breadboard 1 4 4
Relay 5V 2 4 4
12 V adapter 3 3 9
PLC adapters 3 30 90
DC motors, drivers 2 9 18
Kinect 1 30 30
Web domain 1 11 11
Hosting 1 19 19
Overall cost 428 USD

The cost of the Arduino board per unit was 20USD; consequently the price of
microcontrollers of 7 quantity was 140USD in total. The price of the supplementary
shields: Ethernet, Xbee and mp3 shields were 15USD, 64USD and 10USD respectively.
The sensors total costs varied depending on the type of the sensors. This figure for the
31
temperature and humidity sensor was 5USD, while for the IR remote module was 14USD.
The total cost of the actuators fluctuated relying on the actuators types. Those quantities for
the electrical strike and dc motors were 14USD and 18USD. Moreover, the expenses on the
wires, breadboard and 5V relay was 8USD. We spent approximately 100USD on adapters:
PLC and 12V types. The expenditure on the Web domain and hosting was calculated as
30USD, the same amount of money was spent on the Kinect device. Finally, the total cost
of the project was estimated as 428USD.

6. Conclusion
To sum up, the report described the hybrid home area network for home automation
system. In the first part, treatise focused on the explanation of the design and main
components of the project, such as Arduino microcontroller board and power line
communication. Moreover, this section classified different types of the sensors and
actuators and listed the applications of the HAN system. The second part of the project
report analyzed the characteristics and importance of the ZigBee communication network
and its structure. Furthermore, the implementation of ZigBee system in home automation
process was discussed in detail. Finally, the cost and budget analysis, the strengths and
weaknesses of the hybrid home automation system were considered.
In conclusion, the increase in demand for the home automation system is one the
reasons for implementation of this hybrid HAN automation system. The system will be
controlled through the Web based interface and the commands to the household electronic
devices will be dispatched via the PLC and ZigBee hybrid network. Additionally, the
project will have a huge impact on the disabled persons; since it will help them to control
their home appliances with comfort.

32
References

[1] K.Baraka, M.Ghobril, S.Malek, R.Kanj and A.Kayssi. “Low cost Arduino/Android-
based Energy-Efficient Home Automation System with Smart Task Scheduling”, Fifth
International Conference on Computational Intelligence, Communication Systems and
Networks, 2013

[2] Wikipedia, (2015). "Home Automation". Available from: en.wikipedia.org/wiki/


Home_automation

[3] ABI Research, (2012). "Research on the home automation systems installed in USA".
Available from: https://www.abiresearch.com/press/15-million-home-automation-systems-
installed

[4] O.Bingol, K.Tasdelen, (2014). "Web-based Smart Home Automation: PLC-controlled


Implementation", Acta Polytechnica Hungarica, Volume 11, Issue 3

[5] Wikipedia, (2016). "Arduino". Available from: https://en.wikipedia.org/wiki/Arduino

[6] Wikipedia, (2016). "Power line communication". Available from: https://


en.wikipedia.org/wiki/PLC

[7] D-Robotics UK, (2010). "DHT11 Humidity & Temperature Sensor". Available from:
http://www.micropik.com/PDF/dht11.pdf

[8] Maxim Integrated, (2008). "DS18B20 Programmable Resolution 1-Wire Digital


Thermometer". Available from: http://www.espruino.com/datasheets/DS18B20.pdf

[9] T.Obaid, A.Abou-Elnour, et al, (2014). "ZigBee Technology and its application in
wireless home automation systems: a survey", International Journal of Computer Networks
& Communications (IJCNC), Volume 6, No.4

[10] A.Kanwar, A.Khazanchi, (2012). "ZigBee: new Bluetooth technology", International


Journal of Engineering and Computer Science, Volume 1, Issue 2, pp. 67-74

[11] N. Somani and Y.Patel, (2012). "ZigBee: A Low Power Wireless Technology for
Industrial Applications", International Journal of Control Theory and Computer Modeling,
Volume 2, No.3

33
[12] S.W.Nourildean, (2012). "A Study of ZigBee Network Topologies for Wireless Sensor
Network with One Coordinator and Multiple Coordinators", Tikrit Journal of Engineering
Sciences, Volume 19, No. 4, pp. 65-81

[13] A.Elahi, A.Gschwender, (2009). "ZigBee topologies". Available from:


http://www.informit.com

[14] A.Mannan, D.K.Saxena and M.Banday, (2014). “A Study on Power Line


Communication”, International Journal of Scientific and Research Publications, Volume 4,
Issue 7

[15] Trossen Robotics, (2016). "Arduino sensors and equipments costs". Available from:
www.trossenrobotics.com/c/arduino-sensors.aspx

34
APPENDIX

1) MP3 player control code for ZigBee transmitter


int incomingByte; // a variable to read incoming serial data
into
void setup() {
// initialize serial communication:
Serial.begin(9600);
}
void loop() {
// see if there's incoming serial data:
if (Serial.available() > 0) {
// read the oldest byte in the serial buffer:
incomingByte = Serial.read();
// if it's a capital H (ASCII 72), turn on the LED:
if (incomingByte == '1') {
Serial.print("1");
}
// if it's an L (ASCII 76) turn off the LED:
if (incomingByte == '2') {
Serial.print("2");
}
if (incomingByte == '3') {
Serial.print("3");
}
if (incomingByte == '4') {
Serial.print("4");
}
if (incomingByte == '5') {
Serial.print("5");
}
if (incomingByte == '6') {
Serial.print("6");
}
if (incomingByte == '7') {
Serial.print("7");
}
if (incomingByte == '8') {
Serial.print("8");
}
if (incomingByte == '9') {
Serial.print("9");
}
if (incomingByte == 's') {
Serial.print("s");
}
if (incomingByte == '+') {
Serial.print("+");
}
if (incomingByte == '-') {
Serial.print("-");

35
}

}
}

2) Curtain control code for ZigBee transmitter


int incomingByte; // a variable to read incoming serial data
into
void setup() {
// initialize serial communication:
Serial.begin(9600);
}
void loop() {
// see if there's incoming serial data:
if (Serial.available() > 0) {
// read the oldest byte in the serial buffer:
incomingByte = Serial.read();
// if it's a capital H (ASCII 72), turn on the LED:
if (incomingByte == 'H') {
Serial.print("H");
}
// if it's an L (ASCII 76) turn off the LED:
if (incomingByte == 'L') {
Serial.print("L");
}
}
}

3) Curtain control code for ZigBee receiver


const int ledPin8 = 8;
const int ledPin9 = 9;
int incomingByte; // a variable to read incoming serial data
into
void setup() {
// initialize serial communication:
Serial.begin(9600);
// initialize the LED pin as an output:
pinMode(ledPin8, OUTPUT);
pinMode(ledPin9, OUTPUT);
}
void loop() {
// see if there's incoming serial data:

// read the oldest byte in the serial buffer:


incomingByte = Serial.read();
// if it's a capital H (ASCII 72), turn on the LED:
if (incomingByte == 'H') {
digitalWrite(ledPin8, HIGH);
digitalWrite(ledPin9, LOW);
delay(4000);
digitalWrite(ledPin8, LOW);
36
digitalWrite(ledPin9, LOW);
}
// if it's an L (ASCII 76) turn off the LED:
else if (incomingByte == 'L') {
digitalWrite(ledPin8, LOW);
digitalWrite(ledPin9, HIGH);
delay(4000);
digitalWrite(ledPin8, LOW);
digitalWrite(ledPin9, LOW);
}
}

4) Air conditioner control code for ZigBee transmitter


int incomingByte; // a variable to read incoming serial data
into
void setup() {
// initialize serial communication:
Serial.begin(9600);
}
void loop() {
// see if there's incoming serial data:
if (Serial.available() > 0) {
// read the oldest byte in the serial buffer:
incomingByte = Serial.read();
// if it's a capital H (ASCII 72), turn on the LED:
if (incomingByte == 'H') {
Serial.print("H");
}
// if it's an L (ASCII 76) turn off the LED:
if (incomingByte == 'L') {
Serial.print("L");
}
}
}

5) Air conditioner control code for ZigBee receiver


/*
* IRremote: IRsendDemo - demonstrates sending IR codes with
IRsend
* An IR LED must be connected to Arduino PWM pin 9.
* Version 0.1 July, 2009
* Copyright 2009 Ken Shirriff
* http://arcfn.com
*/
#include <IRremote.h>
IRsend irsend;
unsigned int raw_on[228] =
{2950,1750,400,1150,400,1100,400,450,400,400,400,400,400,1150,400,
400,400,450,400,1150,400,1100,400,450,350,1150,400,400,400,400,450
,1100,400,1150,400,450,400,1100,400,1150,400,400,400,450,350,1150,
400,400,400,450,400,1150,400,400,400,400,400,450,400,400,400,400,4
37
00,450,400,400,400,450,350,450,400,400,400,450,350,400,450,400,400
,450,350,450,400,450,350,450,400,1100,400,400,450,400,400,1150,400
,400,400,400,450,1100,400,1150,400,400,400,450,350,450,400,400,400
,450,350,450,400,1150,400,400,400,400,400,1150,400,400,400,450,400
,400,400,450,350,400,450,1150,350,450,400,400,400,450,350,450,400,
1100,400,450,400,400,400,450,400,400,400,400,400,450,400,400,400,4
00,400,450,400,400,400,450,400,400,400,400,400,450,400,400,400,400
,400,400,450,400,400,450,350,450,400,400,400,450,350,450,400,400,4
00,400,450,400,400,450,350,450,400,400,400,450,350,450,400,400,400
,450,400,1100,400,1150,400,1100,400,450,400,400,400,450,350,450,40
0,1100,450,};
unsigned int raw[228] =
{2900,1800,400,1150,350,1150,400,450,350,450,350,500,350,1100,400,
450,400,450,350,1200,350,1150,400,450,350,1150,400,450,350,450,350
,1150,400,1150,400,450,350,1150,400,1100,400,500,350,450,350,1150,
350,500,350,450,350,1200,350,450,350,450,400,400,400,400,400,450,4
00,450,350,450,400,450,350,450,400,400,400,450,350,450,400,400,400
,450,350,500,350,450,350,450,400,400,400,400,400,450,400,1100,400,
450,400,400,400,1150,400,1150,350,450,400,400,400,450,350,450,400,
400,400,450,400,1150,350,450,350,1200,350,1150,400,400,400,450,400
,400,400,450,400,1100,400,450,350,1150,400,400,400,450,400,400,400
,1150,400,400,400,400,450,400,400,400,400,400,450,400,400,450,350,
450,400,450,350,450,400,400,400,400,400,450,400,450,350,400,400,40
0,450,450,350,450,350,500,350,400,400,450,350,450,400,400,400,450,
350,450,400,450,350,450,400,400,400,450,350,400,450,450,350,450,35
0,450,400,450,350,1150,400,400,400,1150,400,400,400,450,400,400,40
0,1150,400,};

void setup()
{
Serial.begin(9600);
}
void loop() {
if (Serial.read() == 'H') {
for (int i = 0; i < 1; i++) {
irsend.sendRaw(raw_on,228,38);
delay(500);
}
}
else if (Serial.read() == 'L') {
for (int i = 0; i < 1; i++) {
irsend.sendRaw(raw,228,38);
delay(500);
}
}
}

38

View publication stats

You might also like