You are on page 1of 37

JOMO KENYATTA UNIVERSITY OF AGRICULTURE AND TECHNOLOGY

DEPARTMENT OF ELECTRICAL AND ELECTRONIC ENGINEERING

BSc. ELECTRONIC AND COMPUTER ENGINEERING

FINAL PROJECT REPORT

HOME AUTOMATION USING CLOUD NETWORK AND MOBILE DEVICES

NAME: SIMIYU PIUS REMMY

REG.NO: EN272-1939/2012

SUPERVISOR: MS KIIO

This project report is submitted to the department of Electrical and Electronic Engineering,
Jomo Kenyatta University of Agriculture and Technology, in partial fulfilment of the
requirement for the award of Bachelor of Science degree in Electronic and Computer
Engineering.

NOVEMBER 2020
DECLARATION

This project is my original work, except where due acknowledgement is made in the text, and to
the best of my knowledge has not been previously submitted to Jomo Kenyatta University of
Agriculture and technology or any other institution for the award of a degree or diploma.

Name: SIMIYU PIUS REMMY Reg. No. EN272-1939/2012

Signature Date:

SUPERVISOR CONFIRMATION

This project report has been submitted to the department of Electrical and Electronic
Engineering, Jomo Kenyatta University of Agriculture and Technology, with my approval as the
supervisor.

Name: MS. KIIO

Signature: Date:

i
ACKNOWLEDGEMENT

I’d like to thank the Almighty for his grace. I extend my gratitude to my parents who have
provided overwhelming support through the course of this project. Special thanks to my
supervisor Ms.Kiio who has always been available and provided guidance on various aspects of
the project. I thank my lectures for their immense contribution through my years in school. I also
acknowledge the support of my friends and classmates in accomplishment of this project.

ii
TABLE OF CONTENTS

HOME AUTOMATION USING CLOUD NETWORK AND MOBILE DEVICES

ABSTRACT VII

CHAPTER ONE 1

1.0 INTRODUCTION 1
1.1 BACKGROUND 1
1.2 PROBLEM STATEMENT 3
1.3 PROBLEM JUSTIFICATION 4
1.4 OBJECTIVES 5

CHAPTER TWO 6

2.0 LITERATURE REVIEW 6


2.1 A RIVIEW OF HOME AUTOMATION 6
2.2 EXISTING HOME AUTOMATION TECHNOLOGIES 7
2.3 ANALYSIS OF EXISTING HOME AUTOMATION TECHNOLOGIES 9
2.4 CLOUD NETWORK AND DATA INFRASTRUCTURE 10
2.5 DESIGNED HOME AUTOMATION SYSTEM 12
2.6 PROJECT COMPONENTS 13

CHAPTER THREE 16

3.0 METHODOLOGY 16
3.1 SYSTEM ARCHITECTURE 16
3.2 SYSTEM COMPONENTS 18
3.3 THE HOME AUTOMATION CONTROL ALGORITHM 20

CHAPTER FOUR 22

4.0 RESULTS 22
4.1 MONITORING OF ENERGY CONSUMPTION 22
4.2 CONTROLLING OF ENERGY CONSUMPTION 24
4.3 USER INTERFACE 24

iii
5.0 CHAPTER FIVE 26

5.0 5.1 CONCLUSION 26


5.2 CHALLENGES 26
5.3 RECOMMENDATION 26

APPENDICES 27

APPENDIX A: PROJECT TIME PLAN 27

APPENDIX B: BUDGET 28

REFERENCES 30

iv
LIST OF FIGURES

Figure3.1: System architecture and components 16

Figure 3.2 System wiring diagram 17

Figure 3.3: Flowchart diagram of the home automation system 20

Figure 4.1 prototype of the system 22

Figure 4.2 No load 23

Figure 4.3 When light bulb is connected 23

Figure 4.4 User interface web page 24

v
ABBREVIATIONS

API APPLICATION PROGRAMMING INTERFACE.

PLC POWER LINE COMMUNICATION.

PCB PRINTED CIRCUIT BOARD

PA POWER APPLICATIONS

LNA LOCAL NETWORK AREA

EEPROM ELECTRICALLY ERASABLE PROGRAMMABLE READ ONLY MEMORY

HTML HYPERTEXT MARK UP LANGUAGE

CSS CASCADED SYTLE SHEET

PDA PERSONAL DIGITAL ASSISTANT

vi
ABSTRACT

In recent years, the home environment has seen a rapid introduction of network enabled digital
technology which has brought about the increase in the connectivity of devices within the home
for the purpose of home automation.
A house is typically one of the places where many electronic devices are left on standby and
continue to draw power when not in use. Most users are not aware that electrical appliances are
still consuming energy in a standby state.
The purpose of this project is to develop a home automation system that enables the user to
monitor and control energy consumption in electrical appliances at home. It aims to lower the
total energy usage of the electrical appliances. It employs the integration of mobile devices,
cloud networking, wireless communication, and electromagnetic relays to provide the user with
remote monitoring and control of various lights and appliances within their home. The home
automation system differs from other systems by allowing the user to monitor and control the
energy consumption of each appliance without the dependency of a mobile carrier or Internet
connection via the in-home wireless local control and it is designed to be expandable allowing a
variety of devices to be connected.

vii
CHAPTER ONE

1.0 INTRODUCTION
1.1 BACKGROUND

Advances in electronics and technology have led to the miniaturization and improvement of the
performance of computers, sensors and networking devices. These changes have given rise to the
development of several home automation technologies and systems [1,2] Home automation
system can be useful when one needs to access home appliances when away from home and can
incredibly improve the lives of the disabled.

Other than the positive benefits, technologies are also having their own drawbacks. Electrical
energy wasted is one of them. According to the web survey targeted to casual users in 2015,
about 29% of respondent still not aware that appliances are still consuming energy in standby
state, and 80% of respondent still connects their appliances to the power source when not in use.
According to [3] an 80w television with a standby power of 15w if left on standby mode for 21
hours a day will consume 315wh.

There has been a significant research into the field of home automation. The X10 industry
standard was developed for the purpose of communication between electronic devices. The
standard provides only limited control over house hold devices, so the user never knows about
the appliance power consumption.

[4] defined a home gateway as the point of ingress between a personal area network and a public
access network. They developed a web server-based home gateway to interconnect IEEE1394,
with a power line-based home automation system, and the Internet. To make the system more
attractive to home owners, a real time AV transcoding capability was included. The system
offers an insightful look into the development of a home gateway; however, there is no provision
for the monitoring and control of power consumption in the appliances.

These systems have made a significant contribution to the development of the home automation
domain. However, monitoring and control of energy consumption in house hold devices has not
been taken into consideration when designing home automation systems. Moreover, the existing
research has focused on the provision of remote connectivity and has largely neglected local area
control and investigating power conservation in a home environment.

1
In order to demonstrate the achievements of the stated aim, a system will be designed that has
both local and remote control and implemented to monitor and control the power consumption of
electronic appliances. The system will be able to cut off the power supply completely to house
hold devices during standby. A timer will be introduced which can be set to automatically switch
on/off appliances.

2
1.2 PROBLEM STATEMENT

With the increase in dependency on electrical appliances, the consumer doesn’t know why his
electricity bill is too high than expected. The consumer prefers to spend less on electricity and
other utilities to increase their savings. Hence knowing how much electricity has been consumed
and what is it going to cost addresses a huge portion of the consumers’ problem. Some electrical
appliances may malfunction such that they draw more power than they are rated. The consumer
also, will not be in a position to realize this on his own i.e. lack of diagnosing.

The provider of electricity must manually go to every home for checking the final bill. This
means that the provider has to make a lot of movement from house to house using transport that
may be added to the consumer’s bill. Moreover, in some cases there are discrepancies between
the consumer and provider of electricity because of inconsistency in the bills.

Some home automation systems are designed such that they cannot be expanded to introduce
more devices according to Piyare and Tazil [5] Some are not scalable to new technology and so
devices using the new technology cannot be integrated into the system, Others are designed such
that they can only operate loads of limited power for example a maximum of 5A at 220V is used
by most house hold devices.

The existing systems offer varying approaches for users to control and monitor the connected
devices. However, this is normally limited to a single method of control, which offers users
limited flexibility. Home automation systems with a non-friendly user interface on the host side
also makes it difficult for users to set up, monitor and control their devices, some user interfaces
used in home automation systems are slow or are non-responsive and makes it difficult for the
user to monitor and control the connected devices.

Lastly, there is also the problem of lack of network interoperability. Home networks and the
home automation systems which utilize them have been developed and adopted in an unplanned
and ad-hoc manner. This has led to a home environment consisting of a complex maze of
heterogeneous networks. These networks and the systems that utilize them normally offer little
interoperability; leading to duplication of monitored devices and the potential for two
simultaneous, autonomous actions on co-existing networks, interacting and resulting in an
undesirable outcome.

3
1.3 PROBLEM JUSTIFICATION

To monitor, and control electrical appliances, a system that can read and record the appliances
power consumption as well as control the current flow to the connected appliances needs to be
designed. This system uses a microcontroller that can read analog data because the system will
be dealing with analog data from AC current readings, in this case Arduino uno and current
sensor are used for obtaining power data. The available power monitoring library for Arduino
called emonlib is used for making the process easier. This library will take care all of the
calculation that need to be performed to get usable power data from the raw data of the current
sensor.

The controlling part uses a two-channel relay board, it is rated 10 A at 220 V. Because the
current sensors are limited only to 5 A, the single appliance power consumption that can be
monitored cannot be more than 5 A (1100 W at 220 V). The relay is connected directly to the
Arduino Uno digital output to minimize the cable clutter on the system because the relay board
will be placed directly below the

This system operation principle, the current from connected electrical appliance is measured
using current sensor. After that, the analog current data are sent to Arduino microcontroller to be
converted become digital data. Next, the converted data are sent to the cloud. If the state is
changed from on to off or vice versa, the on/off command is sent to relay board and the process
will be repeated from the beginning. Finally, at the same time, the web interface will be
delivered to client devices through local network or internet.

cloud [6] is the networking cloud used in this design. Each data stream is classified by a feed
identification number and secured by a forty-seven-character password. cloud treats each unit in
the house as a data point. These data points are manipulated to control the unit inside the home
automation system. When a unit is turned on, a value of one is given to that action, and zero for
turning off action. When a unit is brightened or dimmed a value between the range of zero and
nine is given to that action. After each unit is set to its desired action, the values are placed in a
networking package and sent to the cloud. cloud has an API (Application Programming
Interface) editor that allows the user to create and design user interfaces and graphs for the user’s
need. The graphical interface can be designed and created through cloud’s API

4
1.4 OBJECTIVES
1.4.1 Main Objective

Design and implement a home automation system that enables users to monitor and control
energy usage in their home appliances.

1.4.2 Specific Objectives

a) To design and implement a sensor circuit that collects data from home appliances using
cloud data infrastructure

b) To design and implement power-line communication to provide the user with remote
monitoring and control of various lights and appliances within their homes

c) To design and implement in-home wireless local control.

d) To program microcontrollers to receive instructions from mobile devices and send


controls to output devices.

5
CHAPTER TWO

2.0 LITERATURE REVIEW


2.1 LITERATURE REVIEW
2.2.1 A REVIEW OF HOME AUTOMATION

There are many definitions of home automation available in the literature. [7] describes home
automation as the introduction of technology within the home to enhance the quality of life of its
occupants, through the provision of different services such as telehealth, multimedia
entertainment and energy conservation. There has been significant research into the field of
home automation.

Historical background

The X10 industry standard, developed in 1975 for communication between electronic devices, is
the oldest standard identified from the author’s review, providing limited control over household
devices through the home’s power lines X10 has been used in home automation for years and it
is still being used today. Recently, research into the field of home automation in the past decade
has seen significant advancement in the field of consumer electronics. Various ‘intelligent’
appliances such as cellular phones, air-conditioners, home security devices, home theatres, etc.
are set to realize the concept of home automation. They have given rise to a Personal Area
Network in home environment, where all these appliances can be interconnected and monitored
using a single controller.

6
2.2 EXISTING HOME AUTOMATION TECHNOLOGIES

The rapid improvement of technology offers an exciting opportunity for the development of
various home automation technologies. The research into the field of home automation continues
recently

i. Bluetooth based home automation technology

According to [3] a Bluetooth based home automation system, consisting of a primary controller
and a number of Bluetooth sub-controllers. Each home device is physically connected to a local
Bluetooth sub-controller. The home devices communicate with their respective sub-controller
using wired communications. From the sub-controller all communications are sent to the primary
controller using wireless communications. It is desirable for each home device to have a
dedicated Bluetooth module. However, due to the fiscal expense of Bluetooth technology, a
single module is shared amongst several devices. This architecture reduces the amount of
physical wiring required and hence the intrusiveness of the installation, through the use of
wireless technology. However, the architecture does not completely alleviate the intrusiveness of
the installation due to the incorporation of some wired communications. Moreover, the sharing
of a single Bluetooth module between numerous devices has the disadvantage of incurring an
access delay.

ii. GSM based home automation technology

Here the user can control the electrical appliance via SMS commands. The microcontroller is
connected to GSM Modem which is first initialized using AT commands via RS 232 Protocol.
After that the SMS that is sent by user is received By GSM Modem. The microprocessor will
receive the SMS and store the SMS in internal RAM and display the frame on LCD. Depending
on frame the microprocessor can turn on and off the home appliances

iii. ZigBee based home automation technology

ZigBee is a low-cost, low-power, wireless networking proprietary standard. The ZigBee Alliance
is a group of companies that maintain and publish the ZigBee standard. The low cost allows the
technology to be widely deployed in wireless control and monitoring applications, the low
power-usage allows longer life with smaller batteries, and the protocol supports mesh

7
networking which provides high reliability and larger range. The Zig-Bee specification is based
on the IEEE 802.15.4-2003 standard for wireless personal area networks [8]. ZigBee protocols
are intended for use in embedded applications requiring low data rates and low power
consumption. individual devices must have a battery life of at least two years to pass ZigBee
certification. The ZigBee stack includes a Stack Profile which can be used to specify the market
the protocol will be used in to make better interoperability e.g. the Home Automation profile is a
standard for products enabling smart homes that can control lighting, environment, energy
management and security.

iv. X10 based home automation

By using the existing electrical lines within the house to transmit a binary signal that is
embedded in the zero-crossing point of the sinusoidal AC power supply, power line
communication can send commands throughout a house to control various electronic devices [9].
This method is widely known as X10 transmission and has been used to control devices for many
years and is still commonly used in home automation systems. Examining X10 transmission it is
evident that components are widely available and very affordable, but there can be reliability
issues related to using this method in certain settings

8
2.3 ANALYSIS OF EXISTING HOME AUTOMATION TECHNOLOGIES

Despite the new and exciting developments realized in home automation, the adoption of home
automation by user’s has been limited, in this section the challenges facing the widespread
adoption of home automation systems is discussed.

i. security

The existing approaches have not focused on the security problems that may arise as from
within the implementation. Some systems only offer a limited security which can easily be
compromised by an attacker.

ii. Interface inflexibility

Some systems offer only one single method for users to monitor and control their connected
devices. This denies user’s flexibility. The systems that offer multiple methods for users to
monitor and control their devices on the other hand, risks confusing users.

iii. Network interoperability

Both home networks and the home automation systems which utilize them have been developed
and adopted in an unplanned and ad-hoc manner. This has led to a home environment consisting
of a complex maze of heterogeneous networks. These networks and the systems that utilize them
normally offer little interoperability; leading to three potential problems

• duplication of monitoring activities, due to lack of interoperability;

• the possibility of interference, between co-existing networks.

• the potential for two simultaneous, autonomous actions on co-existing networks,


interacting and resulting in an undesirable outcome

iv. intrusive installation

The majority of systems require varying levels of physical wiring in their architectures. This, in
some cases, is due to the expense of the alternative wireless technologies. Hence, these systems
require intrusive and expensive installations.

9
v. Complex and expensive architecture

The existing systems architectures generally incorporate a personal computer for the purposes of
network management and provision of remote access. This adds additional complexity to the
system, hence increasing the overall fiscal expense.

10
2.4 CLOUD NETWORKING AND DATA INFRASTRUCTURE

This section gives an introduction to Cloud computing. "Cloud computing is a model for
enabling convenient, on demand network access to a shared pool of configurable Computing
resources (e.g., networks, servers, storage, applications, and services) that can be rapidly
provisioned and released with minimal management effort or service provider Interaction [10].
Cloud computing has emerged as a popular solution to provide cheap and easy access to
externalized IT (Information Technology) resources. An increasing number of organizations
(e.g., research centers, enterprises) benefit from Cloud computing to host their applications.
Through virtualization, Cloud computing is able to address with the same physical infrastructure
a large client base with different computational needs. In contrast to previous paradigms
(Clusters and Grid computing), Cloud computing is not application-oriented but service-oriented;
it offers on demand virtualized resources as measurable and billable utilities [11], [12].

2.4.1 ESSENTIAL CHARACTERISTICS

In this section we take a look at the essential characteristics that a cloud must possess. Any cloud
is expected to have these five characteristics that are being described below.

a On-demand self-service

A consumer can unilaterally provision computing capabilities, such as server time and network
storage, as needed automatically without requiring human interaction with each service’s
provider.

b. Broad network access

Capabilities are available over the network and accessed through standard mechanisms that
promote use by heterogeneous thin or thick client platforms (e.g., mobile phones, laptops, and
personal digital assistants (PDAs)).

11
c. Resource pooling

The provider’s computing resources are pooled to serve multiple consumers using a multi-tenant
model, with different physical and virtual resources dynamically assigned and reassigned
according to consumer demand. There is a sense of location independence in that the subscriber
generally has no control or knowledge over the exact location of the provided resources but may
be able to specify location at a higher level of abstraction (e.g., country, state, or data centre).
Examples of resources include storage, processing, memory, network bandwidth, and virtual
machines

d. Rapid elasticity

Capabilities can be rapidly and elastically provisioned, in some cases automatically, to quickly
scale out and rapidly released to quickly scale in. To the consumer, the capabilities available for
provisioning often appear to be unlimited and can be purchased in any quantity at any time.

e. Measured Service

Cloud systems automatically control and optimize resource use by leveraging a metering
capability at some level of abstraction appropriate to the type of service (e.g., storage,
processing, bandwidth, and active user accounts). Resource usage can be monitored, controlled,
and reported providing transparency for both the provider and consumer of the utilized service.

2.5 DESIGNED HOME AUTOMATION SYSTEM

This project, in light of the existing technologies, develops a home automation system that
integrates local control and remote control, the system employs the use of relays to switch on/off
the appliances and a current sensor to monitor the current of each connected device. The system
is also intelligent in that it calculates the value of power from the current reading and sends the
information to the cloud. A user interface is developed using the cloud’s API that enables the
user to monitor and control the energy consumption of each connected appliance. Users can
then make a decision using this information.

12
2.6 PROJECT COMPONENTS
 Microcontroller

The Arduino platform is used for the main communication between several components, i.e.
internet connection, wireless and power line communication. Arduino is an open-source single
board microcontroller which is designed to make the process of using electronics in
multidisciplinary projects more accessible. The main hardware consists of a simple open
hardware design for the Arduino board with an Atmel AVR processor and on-board I/O support,
while the software side of the Arduino consists of a standard programming language and a boot-
loader which runs on the board. Arduino hardware is programmed using a language similar to C+
+ with some modifications, and a Processing-based IDE [13].

The microcontroller is suitable for this project because it can read analog values and convert to
digital values also it provides ample interfacing with ESP module, current sensor and relays It
has 16 analog inputs, 4 hardware serial ports a 16 MHz crystal oscillator, the board is easily
powered by connecting it to a computer’s USB port or by using a battery. It has memory
components that include 256KB flash, 8KB SRAM and 4KB EEPROM the microprocessor
operates on Arduino integrated development environment (IDE) Program codes can be easily
written on this IDE and uploaded to the board. The IDE is lauded for its numerous associated
libraries that simplify programming tasks. Another prominent feature of the Arduino is its
compatibility with many shields that gives the board incredible capabilities.

 ESP 8266 module

ESP8266 delivers highly integrated Wi-Fi solution to meet the continuous demands for efficient
power usage, compact design and reliable performance in the industry. With the complete and
self-contained Wi-Fi networking capabilities, it can perform as either a standalone application or
the slave to a host MCU this makes it suitable for this project. When ESP8266 hosts the
application, it promptly boots up from the external flash. The integrated high-speed cache helps
to increase the system performance and optimize the system memory. Also, ESP8266 can be
applied to any micro-controller design as a Wi-Fi adaptor. ESP8266 integrates antenna switches,
RF balun, power amplifier, low noise receives amplifier, filters and power management modules.
The compact design minimizes the PCB size and allows for minimal external circuitry.

13
ESP8266 has five analog pins for power supply. including pin1, pin3, pin4 which provides
internal power supply for internal PA and LNA respectively, and pin28, pin29 which supply
power for internal PLL. The operating voltage for analog power supply pins is 1.8 V ~ 3.3 V

 5V 2 channel relay module

A relay is an electrically operated device it has a control system and controlled system. To put it
simply a relay is an automatic switch to controlling a high-current circuit with a low current
signal. The advantages of the relay lie in its lower inertia of moving stability, long-term
reliability and small volume, it is widely adapted in devices of sports remote control automation
technology and remote control. In general, a relay has an induction part and an actuating part, the
induction part reflects the input while the actuating part reflects the output which can energize or
de-energize the connection of the controlled circuit, this makes the relay suitable for controlling
the power supply to the appliances. The relay is supplied by 5VDC and current of more than
100mA. The VCC is connected to the positive power supply system and the negative connected
to the ground.

 Current sensor

The ACS712 is the current sensor of choice, the sensor can measure current up to 30A. It
operates on 5V and outputs analog voltage proportional to the current measured on the sensing
terminals. A microcontroller is used to read the values. The microcontroller is highly sensitive
with a sensitivity of 10mV/A output sensitivity and its accurate to measure AC/DC

 9V Power supply

The Arduino board operates on an external supply of 9V batteries. The batteries are connected to
Arduino’s barrel jack that has a recommended input voltage of 7V to 12V

 SMJ white 20 Amp 4 terminal Junction box

Junction boxes are used to connect additional sockets to circuits add lighting points and extend
circuits. Electrical junction boxes come in a range of different types. There are two key
differences to look out for when purchasing junction box; rating and terminal. Junction boxes are
rated in amps to protect them and the circuit. The ratings of the junction box should reflect the
current of the circuit that it will be used on. It is possible to use a higher amp rated junction box

14
on a lower rated circuit but never the other way round. A ring main will need 30-amp junction
box, whereas a lighting circuit will need a 20-amp junction box.

 Circuit breaker

The circuit breaker is a protection device used in AC protection. It interrupts abnormal or fault
current. Circuit breaker essentially consists of fixed and moving contacts. These contacts are
touching each other and carrying the current under normal conditions when the circuit is closed.
When the circuit breaker is closed, the current carrying contacts, called the electrodes, engaged
each other under the pressure of a spring.

During the normal operating condition, the arms of the circuit breaker can be opened or closed
for a switching and maintenance of the system. To open the circuit breaker, only a pressure is
required to be applied to a trigger.

Whenever a fault occurs on any part of the system, the trip coil of the breaker gets energized and
the moving contacts are getting apart from each other by some mechanism, thus opening the
circuit.

15
CHAPTER THREE

3.0 METHODOLOGY

3.1 SYSTEM ARCHITECTURE

Figure3.1: System architecture and components

Figure 3.1 shows the connection between hardware such as Arduino microcontroller, relay,
current sensor, ESP module, electric socket, and mobile devices. First, the current from
connected electrical appliance is measured using current sensor. After that, the analog current
data are sent to Arduino microcontroller to be converted become digital data. Next, the converted
data are sent to ESP module. If the state is changed from on to off or vice versa, the on/off
command is sent to relay board and the process will be repeated from the beginning. Finally, at

16
the same time, the web interface will be delivered to mobile devices through local network or
internet.

3.1.2 SYSTEM HARDWARE DESIGN

fig 3.2 System wiring diagram

17
3.2 SYTEM COMPONENTS
 Microcontroller

In this project I used the Arduino uno microcontroller. The board is used to receive input data
from the current sensor the available power monitoring library for Arduino called emonlib is
used for making the process easier. This library will take care all of the calculation that need to
be performed to get usable power data from the raw data of the current sensor. The board is also
connected to the relay and it is used to drive the relay circuit as well.

 ESP module

The ESP 8266 module is used for wireless connection in this project

 Circuit breaker

The circuit breaker is a protection device used in AC circuits; I used the Adeli 230/400 V rated
circuit breaker in this project. The circuit breaker is connected to the main power supply. It
protects the home appliances from abnormal or fault current

 Current sensor

The ACS712 current sensor is used in this project to monitor the power consumption of each
appliance. The ACS712 is a fully integrated, hall effect-based linear current sensor with
2.1kVRMS voltage isolation and a integrated low-resistance current conductor, it’s simply put
forth as a current sensor that uses its conductor to calculate and measure the amount of current
applied. When it comes to how the current sensor works, it uses indirect sensing. Its
compatibility with Arduino makes it suitable for this project, other features that make it suitable
are; its high sensitivity of 66 to 185 mV/A output sensitivity, stable offset output voltage and
low-noise analog signal path. The current sensor reads analog current values from the connected
appliance and sends them to the Arduino uno through its analog

18
 Power supply

The system can be made stand alone and portable by using batteries to power the system. This
system can be powered by 9V battery connected to the Arduino uno.

 Junction box

To connect additional sockets to the circuit, add lighting points and extend circuits, a junction
box is used. Electrical junction boxes come in a range of different types. There are two key
differences to look out for when purchasing junction box; rating and terminal. Junction boxes are
rated in amps to protect them and the circuit.

19
3.3 THE HOME AUTOMATION CONTROL ALGORITHM

3.2.1 FLOW CHAT

fig 3.3 flow chart

20
3.2.2 A DISCUSSION OF THE PROGRAM

The I Home Automation system application design will be described on this section. First after
the system is powered on, the operating system will initialize. The operating also creates a
special file system called tmpfs file system and mounts it to the working directory to store
temporary data. The tmpfs file system is used because it will write the data to the memory
(RAM) instead of the flash memory (SD Card). This method will prolong the life of the SD Card
as the SD Card has a limited write cycle. After the operating system has initialized properly, the
data collection process will be started. The collected data will be read by the microprocessor and
stored into the database. The web server (chrome) will be started to provide user interface for the
user via a web page.

HTML and CSS is used for building a web page. The web page contains the monitoring and
controlling part. The monitor part will handle the user interface that will be shown to the user as
well as the calculated power and record the power used. The control part will enable the user to
manipulate power supply to each appliance.

21
CHAPTER FOUR

4.0 RESULTS

I carried out a test. The test appliances that I used on this test are based on the typical living
room home appliances. This test was conducted to show how much the reduction in power
consumption that can be made possible with the home automation system.

4.1 MONITORING OF ENERGY CONSUMPTION

Light bulb

A 40 watt rated incandescent light bulb is used in this test, The no load power and current is first
read for a period of 5 minutes. The appliance is then connected and the power and current
readings taken.

Figure 4.1 prototype of the system

22
Zero load Consumption

Figure 4.2 No load

The no load consumption is as shown in the figure above, the power reading as well as the
current reading is due to the power drawn by the system only. This shows that the system draws
energy even when no appliance is connected.

When light bulb is connected

23
Figure 4.3 When light bulb is connected

The consumption of the light bulb is as shown in the figure above, the is power reading as well
as current readings this means that the bulb has been turned on and therefore energy consuming
energy.

4.2 CONTROLLING THE ENERGY CONSUMPTION

The controlling part uses a 2 channel relay board. it is connected directly to the home appliance
to switch the appliance ON/OFF. The relay is controlled by the Arduino uno microcontroller. It
enables the user to easily switch ON/OFF the device via a user interface on a handhe

4.3 USER INTERFACE

Fig 4.4 User interface web page

A Dynamic Web page that is able to retrieve information as well as interact with users in real
time is developed. It is the platform used to display in retrieval of data in the cloud. Its design to

24
be intuitive and simple-to-use, Client –side scripting languages employed in creating the user
interface of the web page are HTML and CSS.

25
5.0 CHAPTER FIVE

5.1 CONCLUSION

A home automation system with the ability to monitor and control the power consumption of
each home appliance is developed successfully. From the results the home automation system is
able to save power when the home automation system is used to turn off each appliance
immediately after use, there is a 21% energy conservation, moreover, in appliances which are
always left on because of bad power button placement, this system can fix the problem by
making the power management easily accessible to the user. The System successfully makes
controlling and monitoring easy for its user with the intuitive web user interface based on the
user analysis

5 5.2 CHALLENGES FACED


 Achieving remote control using the cloud was a challenge.
 Components were not always available at the stores due to COVID 19. I therefore
had to wait for the stores to restock which affected my time plan.
5.3 RECOMMENDATION

A diagnosing function can be added to the system. The system will always monitor the power
consumption, and when a certain power condition is met, the system will warn the user about the
current status of the electrical appliance that is in use. With this diagnosing capability, the user
will always be informed and will have more confidence about the current status of the electrical
appliances that the user controls, especially if the user controls them from a remote location.

26
APPENDICES

APPENDIX A: BUDGET

Item Description Quantity Rate Amount


1 Arduino uno 1 1600 1600
2 ESP module 1 300 300
3 Current sensor 2 450 900
4 Resistors 4 50 200
5 Capacitors 4 20 80
6 Relays 2 600 1200
7 Circuit breaker 1 50 50
8 Junction box 1 150 150
9 Female jumper wires 1 100 100
10 Capacitors 10 50 500
11 PVC Cable 3 meters 210 210
TOTAL 5,140

APPENDIX B: PROJECT TIME PLAN

ACTIVITY TIME FRAME


SEM 1 SEM 2
SEP DEC JAN FEB MAR SEP OCT NOV

27
1. Project Research
2. Documentation
3. Abstract Submission & Approval
4. Proposal Writing
5. Mini Presentation
6. Board Programming
7. Application Development
8. Data Mining
8. Cloud Integration
8. Testing
9. Final Presentation

REFERENCES

[1] Chan, M., Campo, E., Esteve, D., Fourniols, J.Y., “Smart homes-current features and future
perspectives,” Maturitas, vol. 64, issue 2, pp. 90-97, 2009.

[2] Das, S.R., Chita, S., Peterson, N., Shirazi, B.A., Bhadkamkar, M., “Home automation and
security for mobile devices,” IEEE PERCOM Workshops, pp. 141-146, 2011.

[3] Laur, I., “Microcontroller based home automation system with security,” International
Journal of Advanced Computer Science and Applications, vol. 1, no. 6, pp. 60-65, 2010.

[4] H. Ardam and I. Coskun, "A remote controller for home and office

28
appliances by telephone", IEEE Transactions on Consumer Electronics,

vol. 44, no. 4, pp. 1291-1297, 1998.

[5] T. Baudel and M. Beaudouin-Lafon, "Charade: remote control of objects

using free-hand gestures", Communications of the ACM, vol. 36, no. 7,

pp. 28-35, 1993.

[6] "NIST Cloud Computing Definition", NIST SP 800- 145]

[7] K. Bromley, M. Perry, and G. Webb. "Trends in Smart Home Systems, Connectivity and
Services", www.nextwave.org.uk, 2003.
[8] ZigBee Alliance. ZigBee Specification. January 2008
[9] http://www.x10.com/support/technology1.htm
[10] "NIST Cloud Computing Definition", NIST SP 800- 145
[11] R. Buyya, C. S. Yeo, and S. Venugopal, “Market-oriented Cloud computing:Vision, hype,
and reality for delivering IT services as computing utilities,” inProc. IEEE/ACM Grid Conf.,
2008, pp. 50–57.
[12] [R. Aoun and M. Gagnaire, “Towards a fairer benefit distribution in Grid environments,”
inProc. IEEE/ACS AICCSA Conf., 2009,pp. 21–26.
[13] http://www.arduino.com

29

You might also like