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

Home Automation and Power

Monitoring System

Submitted by:
Kanwal Saif 2013-EE-057
Abdul Ahad 2013-EE-061
Wajeeha Sadaf 2013-EE-155
Saad Aleem 2013-EE-186

Supervised by: Dr.Muhammad Asghar Saqib

Department of Electrical Engineering


University of Engineering and Technology Lahore
Home Automation and Power
Monitoring System

Submitted to the faculty of the Electrical Engineering Department


of the University of Engineering and Technology Lahore
in partial fulfillment of the requirements for the Degree of

Bachelor of Science
in
Electrical Engineering.

Internal Examiner External Examiner

Director
Undergraduate Studies

Department of Electrical Engineering

University of Engineering and Technology Lahore

i
Declaration
We declare that the work contained in this thesis is our own, except where explicitly
stated otherwise. In addition this work has not been submitted to obtain another degree
or professional qualification.

Kanwal Saif
Signature:
Date:

Abdul Ahad
Signature:
Date:

Wajeeha Sadaf
Signature:
Date:

Saad Aleem
Signature:
Date:

ii
Acknowledgments
In the Name of Allah, the Most Merciful, the Most Compassionate all praise to Allah,
the Lord of the worlds. First and foremost, we must acknowledge our limitless thanks to
Allah, the Ever-Magnificent; the Ever-Lasting, for His help and bless. This work would
have never become truth, without His guidance.
Terminate this thesis also means a decisive and clearly stated finalizing step to a number
of activities that have been occupied our personal bandwidth for a long time. We
also want to thank those who have encouraged, assisted, and supported us during the
preparation and assembling our assignment for our B.Sc. Electrical Engineering task to
be done in a sophisticated way. Our project has been an enterprise for us throughout
our work and it remains a challenging and informative experience which allow us to
explore more knowledge about modern technology, throughout our journey we learned a
lot from it and this assignment opens a new door of intrusiveness in different dimensions,
this remarkable achievement and great advancement in our project would not have been
possible to do without the support and guidance that we received from many people.
We would like to say a very big thank you to our academic supervisor Dr. Muhammad
Asghar Saqib for all the support, appreciation and encouragement, he gave us, during
the whole duration of our work we spent on my project undertaking our field work.
Without his guidance and continuous support and feedback this project would not have
been achievable for us. During our tenure, he contributed to a rewarding experience in
our assignment activity by giving us intellectual freedom in our project, engaging us in
new ideas, and demanding a high quality of work in all my endeavours. Furthermore, he
shows a full interest in our project and remains active throughout the working session
and influence us to work on challenging topics regarding this project and shared insights.

iii
We dedicate this project to our families and friends. We are
specially grateful to our parents who encouraged us all the way and
built our confidence that we can complete this project in time.

iv
Contents

Acknowledgments iii

List of Figures ix

Abbreviations x

Abstract xi

1 Introduction 1
1.1 Project Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.1.1 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.1.2 Aims . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.1.3 Challenges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.1.4 Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.1.5 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

2 Literature Review 3
2.1 Automation System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2.2 History . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2.3 GSM Based Home Automation System . . . . . . . . . . . . . . . . . . . . 4
2.4 Bluetooth Based Home Automation System . . . . . . . . . . . . . . . . . 4
2.5 ZigBee Based Home Automation System . . . . . . . . . . . . . . . . . . . 5
2.6 Wi-Fi Based Home Automation System . . . . . . . . . . . . . . . . . . . 6
2.7 Power Monitoring System . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.8 Parts of the Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.8.1 CT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.8.1.1 Primary Characteristics of CT . . . . . . . . . . . . . . . 7
2.8.1.2 CTs Secondary Rating . . . . . . . . . . . . . . . . . . . 7
2.8.1.3 Primary Rating of CTs . . . . . . . . . . . . . . . . . . . 7
2.8.1.4 Types of CTs . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.8.1.5 Toroidal CTs . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.8.1.6 Bushing CTs . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.8.1.7 Bar Type CTs . . . . . . . . . . . . . . . . . . . . . . . . 8
2.8.2 VT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.8.2.1 Construction of VTs . . . . . . . . . . . . . . . . . . . . . 9
2.8.2.2 Types of VTs . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.8.3 Relay Board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.8.4 Ethernet Shield . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

v
Contents vi

2.8.5 Micro-controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
2.8.6 Router . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
2.9 Induction Machine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
2.9.1 3-phase Induction Motor . . . . . . . . . . . . . . . . . . . . . . . . 10
2.9.1.1 Types of Three Phase Induction Motor . . . . . . . . . . 10
2.9.1.2 Working Principle . . . . . . . . . . . . . . . . . . . . . . 11
2.9.2 Induction Generator . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2.9.2.1 Principle of Operation . . . . . . . . . . . . . . . . . . . . 11
2.9.2.2 Induction Generator Applications . . . . . . . . . . . . . 11

3 Motivation and Problem Statement 12


3.1 Motivation behind Home Automation and Power Monitoring System Us-
ing Wi-Fi Technology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
3.2 Impact of Home Automation and Power Monitoring System in Residential
Areas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
3.3 Home Automation and Power Monitoring System Now a Days . . . . . . 12
3.4 Problem Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

4 Implementation and Experimentation 14


4.1 Hardware Requirement for Home Automation System . . . . . . . . . . . 14
4.1.1 Ethernet Shield Connection . . . . . . . . . . . . . . . . . . . . . . 14
4.1.2 Internet Connection . . . . . . . . . . . . . . . . . . . . . . . . . . 15
4.1.3 Connection Wires . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
4.1.4 Android Based Application . . . . . . . . . . . . . . . . . . . . . . 15
4.1.5 Methodology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
4.1.5.1 Interfacing Ethernet Shield with Arduino Board . . . . . 16
4.1.6 MQTT Protocol . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
4.1.7 Interfacing Relay with Board and Load . . . . . . . . . . . . . . . 17
4.1.8 Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
4.1.9 Arduino Uno Pin Detail . . . . . . . . . . . . . . . . . . . . . . . . 18
4.2 Hardware Requirement for Power Monitoring System . . . . . . . . . . . . 18
4.2.1 CT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
4.2.2 PT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
4.2.3 Amplifier . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
4.2.4 Additional Circuitry . . . . . . . . . . . . . . . . . . . . . . . . . . 19
4.2.5 Zero Detection Circuit . . . . . . . . . . . . . . . . . . . . . . . . . 19
4.2.6 12 V DC Battery . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
4.2.7 Methodology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
4.3 Hardware Requirement for Induction Machine Control . . . . . . . . . . . 20
4.3.1 Methodology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
4.3.1.1 Switching . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
4.3.1.2 Monitoring . . . . . . . . . . . . . . . . . . . . . . . . . . 20

5 Main Techniques Used in the Project 22


5.1 MQTT Protocol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
5.1.1 What is MQTT? . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
5.1.2 Who Invented MQTT? . . . . . . . . . . . . . . . . . . . . . . . . 22
5.2 How does MQTT Relate to SCADA Protocol and MQIsdp? . . . . . . . . 22
Contents vii

5.2.1 SCADA Protocol . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22


5.2.2 MQIsdp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
5.2.3 What is WebSphere MQ Telemetry? . . . . . . . . . . . . . . . . . 23
5.2.4 Does MQTT Support Security? . . . . . . . . . . . . . . . . . . . . 24
5.3 Interfacing of CT and PT with Arduino Uno . . . . . . . . . . . . . . . . 24
5.3.1 CT and PT signals . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
5.3.2 Requirement of Arduino Uno . . . . . . . . . . . . . . . . . . . . . 26
5.3.3 Procedure to Interface CT and VT . . . . . . . . . . . . . . . . . . 26
5.4 Power Factor Measurement . . . . . . . . . . . . . . . . . . . . . . . . . . 27
5.4.1 What is Power Factor? . . . . . . . . . . . . . . . . . . . . . . . . . 27
5.4.2 Why Measuring them? . . . . . . . . . . . . . . . . . . . . . . . . . 27
5.4.3 Adjustments to Measure Power Factor with Current and Voltage
Waveform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
5.4.3.1 Explanation . . . . . . . . . . . . . . . . . . . . . . . . . 27
5.4.3.2 Interfacing with Arduino Uno . . . . . . . . . . . . . . . 29
5.5 Use of Relays for Switching High Power Induction Motor . . . . . . . . . 29
5.6 MIT App Inventor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
5.6.1 Introduction to MIT App Inventor . . . . . . . . . . . . . . . . . . 30
5.6.1.1 History . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
5.6.1.2 Goals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
5.6.2 Main Components Used in our App . . . . . . . . . . . . . . . . . 31
5.6.2.1 TinyWebDB . . . . . . . . . . . . . . . . . . . . . . . . . 31
5.6.2.2 Key Focuses about TinyWebDB . . . . . . . . . . . . . . 32
5.6.3 Activity Starter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
5.6.4 Notifier . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

6 Conclusion and Future Direction 35


6.1 Future Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
6.2 Centralized Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
6.3 Security Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
6.4 Smart Homes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
6.5 Commercial Buildings and Hospitals . . . . . . . . . . . . . . . . . . . . . 36
6.6 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36

A Wi-Fi Technology 37
A.1 Evolution of Wi-Fi Technology . . . . . . . . . . . . . . . . . . . . . . . . 37
A.2 What is Wi-Fi? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
A.3 How Wi-Fi Works? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
A.4 Available Wi-Fi Standards . . . . . . . . . . . . . . . . . . . . . . . . . . 38
A.5 How to Connect Wi-Fi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38

B Hardware Board and Schematics 39


B.1 Arduino Uno . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
B.2 PCB layout of Arduino Uno Board . . . . . . . . . . . . . . . . . . . . . . 40
B.3 Ethernet Shield . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
B.4 Totolink . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Contents viii

References 43
List of Figures

2.1 GSM based home automation system. . . . . . . . . . . . . . . . . . . . . 4


2.2 Bluetooth based home automation system. . . . . . . . . . . . . . . . . . . 5
2.3 ZigBee based home automation system. . . . . . . . . . . . . . . . . . . . 5
2.4 Wi-Fi based home automation system. . . . . . . . . . . . . . . . . . . . . 6
2.5 Toroidal type CT. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.6 Bushing type CT. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.7 Bar type CT. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.8 Relay board. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

5.1 Smart electricity metering. . . . . . . . . . . . . . . . . . . . . . . . . . . . 23


5.2 Smart health monitoring. . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
5.3 VT signal with any load connected. . . . . . . . . . . . . . . . . . . . . . . 25
5.4 CT signal with 2 bulbs connected. . . . . . . . . . . . . . . . . . . . . . . 25
5.5 CT signal with two bulbs and a fan connected. . . . . . . . . . . . . . . . 26
5.6 Circuitry to operate CT and PT signal. . . . . . . . . . . . . . . . . . . . 26
5.7 Code for calculating rms value of current and voltage. . . . . . . . . . . . 27
5.8 Zero detection circuit. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
5.9 Amplified I/P and O/P signal from CT. . . . . . . . . . . . . . . . . . . . 28
5.10 Arduino Uno digital pin signal. . . . . . . . . . . . . . . . . . . . . . . . 29
5.11 Name plate of induction machine. . . . . . . . . . . . . . . . . . . . . . . 29
5.12 Relay. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
5.13 Application page. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

A.1 Wi-Fi technology. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

B.1 Arduino uno micro-controller. . . . . . . . . . . . . . . . . . . . . . . . . . 39


B.2 PCB layout of arduino uno board. . . . . . . . . . . . . . . . . . . . . . . 40
B.3 Ethernet shield and its PCB layout. . . . . . . . . . . . . . . . . . . . . . 41

ix
Abbreviations

HAS Home Automation System


IP Internet Protocol
PC Personal Computer
OS Operating System
AS Automation System
PCB Printed Circuit Board
IOT Internet Of Things

x
Abstract
Home automation is concerned with the wireless control of different types of load re-
motely. The main control system implements wireless technology to provide remote
access from smart phone using an android application with user friendly GUI. Host
of communication method between the user and main control system is Wi-Fi. Power
monitoring of different types of load is also performed which allow the user to calculate
power consumption of each load and this is the key parameter which differentiate this
project from other home automation projects. Thus, the system intended to control and
provide power monitoring for electrical appliances and devices in house with relatively
low cost design, user-friendly interface, high efficiency and ease of installation.
Chapter 1

Introduction

With an immense increase in crime rate, enforce us to implement such a security system
that protect us against these situations. Home Automation system came up with this
idea to allow us to live a peaceful and easy life with complete comfort in a protective
zone. This is not only the advantage of this technology it also saves electricity. So we are
convinced to implement this technology in our house in-order to improve our lifestyle.
Home automation system is cheap, energy-saving technology both for the user and elec-
tricity.
Power monitoring with HASs further increases the reliability and security of the system
because power monitoring system completely allow the user to know about their electri-
cal load energy demand and how to lower their energy consumption with full facilities
means, Power monitoring system provides better understanding for how to control and
monitor each load electrical demand. What we can summarize about HAS and Power
monitoring system technology is that it is completely reliable, highly secure, easy to use
and economical which is the main target of our project.

1.1 Project Specifications


1.1.1 Objectives
The purpose of this project is to develop an economical home automation system that
can be controlled by the user worldwide using internet technology by just connecting
their smart phone, computer system, laptop or any other device with internet and for
this user friendly android application is developed which allows the users to control their
home appliances remotely. Furthermore power monitoring of each load is achieved for
measuring energy consumption.

1.1.2 Aims
IP and Bluetooth based home automation technologies have many limitations in them.
Using Bluetooth technology user can only control its home appliances within a narrow

1
Chapter 1. Introduction 2

range of communication which is not good at all because this technology is not applica-
ble for all situations.
IP based home automation system technology involves extra complexities in software
development and it is also expensive for the user. This project aims to fulfil user re-
quirements at a very low cost with user friendly android application.

1.1.3 Challenges
Home automation systems experience small problems in its proper implementation,
which involves, inflexibility, trouble in acquiring security and poor capability to con-
trol the operation. The purpose of our project is to design and implement a home
automation system using IoT that is capable of handling and automating most of the
house appliances over a simple web interface. By using Wi-Fi technology to interconnect
its scatter sensors to home automation server the recommended system has a significant
versatility. This will diminish the disposal price and gradually enhance the efficiency of
system, and system rearrangement.

1.1.4 Requirements
The control of device should be fully based on software. In this way users will have an
easy approach to their loads. This will allow user to access their electrical loads from a
standard user friendly platform like web portal or mobile devices.

1.1.5 Overview
Chapter 1 discusses the introduction of the project, its motivations, objectives, aims and
challenges. Chapter 2 gives the literature review of the project. In chapter 3, the problem
statement is explained and motivations behind the project are expressed. Chapter 4
gives the architecture and complete implementation of the solution. Both hardware and
software parts are explained in detail. Chapter 5 presents the main techniques of the
project. Chapter 6 gives the concluding remarks and future directions of the project.
Chapter 2

Literature Review

This section provides different technologies used for the establishment of Home Automa-
tion Systems with their specifications, advantages and limitations involved.

2.1 Automation System


Automation means the capability of a making a system operates own its own with
less manpower involvement. Android application is used to remotely control the home
appliances by the user.

2.2 History
With a great enhancement in electronics and telecommunication technologies intensely
enlarge the utilization of these field sciences. These engineering sciences allow us to
design extremely useful Home Automation System technology for the betterment of life.
Home automation is not a newly invented technology for the first time automation sys-
tem technology was formulated by Nikola Tesla in 1785. He designed a remote-controlled
boat which can be controlled with the help of wireless networking system, radio waves
signals transmitted to the boat in order to establish a communication channel between
the remote control systems and boat wirelessly. In 1892 automated telephone switch-
board was developed with some improvement in wireless communication technology to
communicate over large distances. After six years further advancement was performed
in AS to implement this technology in large scale and first wireless-controlled floor mill
factory was established in 1898. These achievements was not the end of AS technology
that was just the beginning of this technology in wireless communication system because
the invention of computers in 1940 by George Stibitz proved that AS technology has
completely established its strong roots in the race of modern technology. He developed
Complex Number Calculator. In 1958 computer chip was developed by Robert Noyce
and Jack Kilby. They both use different semiconductor material for the device to be in-
tegrated on a single crystal chip. Mouse was another invention developed in 1964 which

3
Chapter 2. Literature Review 4

acts like a wireless sensor device. In earlies 1970 for the very first time Home automation
system technology idea was presented and conceived to be implemented to control the
household appliances remotely. That was the beginning of HAS technology.[1]

2.3 GSM Based Home Automation System


Global System of Mobile (GSM) provides worldwide communication and user can easily
control its home appliances using this technology. Smart phone acts like a transmitter
as well as the receiver and signal is being send to the micro-controller to control the
load status and SMS application is installed in it. GSM based home automation is
highly sensitive, easily accessible by the user irrespective of the geographical location,
cheap and can easily handle the load status. In this scenario SMS application is used
to provide load status to the user and user can remotely control its load using android
mobile phone.[2]

Figure 2.1: GSM based home automation system.

2.4 Bluetooth Based Home Automation System


In this case remote controlling in achieved by connecting the PC, laptop or mobile
phone with Bluetooth technology in-order to control the home appliances wirelessly.
This controlling mechanism has certain limitations in it and user can access to the loads
within a certain boundary range. However it is cheap, easy to accessible and can be
installed easily.[2]
Chapter 2. Literature Review 5

Figure 2.2: Bluetooth based home automation system.

2.5 ZigBee Based Home Automation System


Using ZigBee technology one can easily control its home appliance with low power con-
sumption and using low data flow rate. Zigbee uses only one controlling network channel
for wireless communication. But using ZigBee technology user has to follow some cer-
tain limitations like it has small range for communication as compared to the internet
technology, however it is economical. [2]

Figure 2.3: ZigBee based home automation system.


Chapter 2. Literature Review 6

2.6 Wi-Fi Based Home Automation System


Home automation using internet technology provides wide range of communication with
the loads and its broader range of bandwidth for wireless communication allows the user
to communication and control their loads worldwide. [2]

Figure 2.4: Wi-Fi based home automation system.

2.7 Power Monitoring System


Using Power Monitoring system we measure the current, voltage, power factor and power
of any particular load with the help of instrument transformers (CTs and VTs).
Power Monitoring is done in three steps which provides better energy management.
Step1: Measuring or Monitoring.
Step2: Analysing.
Step3: Decision or reacting to monitoring data.
Traditionally we care about how much costly the device will be and just forget about
how much energy it requires to operate and this increase our electricity bill. So Power
monitoring system will allow us to better understand which load should be installed to
facilitates us and fulfil our requirements.[3]

2.8 Parts of the Project


2.8.1 CT
CT (Current transformer) is a transducer which converts physical signals into electrical
signals. The function of current transformer is to take a current from wire or a cable
and step it down to a magnitude that a protective relay can measure.
Chapter 2. Literature Review 7

2.8.1.1 Primary Characteristics of CT

Primary characteristics of a CT is Conversion Ratio and there are different standard


values for CT conversion ratio in general if the conversion ratio of a CT is X:Y means
that if X amperes of current is flowing through the primary phase wire the CT will
scaled it down to Y amperes and directed to the relay via the secondary winding and
these Y amperes current is known as Secondary Nominal Current.

2.8.1.2 CTs Secondary Rating

CT has two types of secondary rating according to IEEE and IEC standards.
1. 5A (IEEE Standard)
2. 1A (IEC Standard)

2.8.1.3 Primary Rating of CTs

Primary ratings of CTs depends upon the design requirement and available in wide
range for example 100A, 150A, 200A etc.

2.8.1.4 Types of CTs

There are different types of CTs 1. Toroidal CTs.


2. Busing CTs.
3. Bar type CTs.

2.8.1.5 Toroidal CTs

A common current transformer construction is one in which the power system phase
wire passed through the hole in the center of a ring which is called a window this forms
a primary winding. A second insulated wire is then wound around the core and then
brought around the relay for measurement this is called the secondary winding.

Figure 2.5: Toroidal type CT.


Chapter 2. Literature Review 8

2.8.1.6 Bushing CTs

A busing type CT is referred to as that is built into another power system device such
as the circuit breaker. Terminals are provided on these devices to permit connecting the
CT to a relay.

Figure 2.6: Bushing type CT.

2.8.1.7 Bar Type CTs

A Bar type CT has a solid bar that passes through the annular core to form the primary
winding of the CT. The primary phase wires of the power system are then connected
directly to these bars to complete the connections.

Figure 2.7: Bar type CT.

2.8.2 VT
Voltage transformer or Potential transformers are those instrument transformer which
converts the physical signal into electrical signal in terms of voltage.
Chapter 2. Literature Review 9

2.8.2.1 Construction of VTs

Potential transformer or Voltage transformers are of same construction as that of current


transformer except that its secondary wire terminal are not short circuited but instead
it is usually open. So it does not provide galvanic isolation. Primary winding are wound
around the wire through which potential has to be measure and secondary winding
reduces that volts to a value of 10s. Its construction is same as that of CT and power
transformers. It is connected in parallel with the circuit. PT is usually a step down
transformer.

2.8.2.2 Types of VTs

Potential transformer is classified into two types:


1) The conventional wound types (electromagnetic types).
2) the capacitor voltage potential transformers.

2.8.3 Relay Board


Relays are protective devices which prevent faulty conditions in our power system.
In our case Relay board is interfaced with Arduino Uno micro controller. Micro-
controller controls the relay board. Relay board energized itself on the basis of elec-
tromagnetism when it gets energized it acts like a magnet. With the help of a relay
board which is connected with the micro-controller allow us to switch on and off the
loads in a protective way.

Figure 2.8: Relay board.

2.8.4 Ethernet Shield


Ethernet shield is used to provide Wi-Fi connectivity to the micro-controller (Arduino
Uno). Using this internet connection micro-controller can easily control the home ap-
pliance wirelessly over internet. [4]
Chapter 2. Literature Review 10

2.8.5 Micro-controller
There are many micro controllers available in the market with different architecture and
different specifications. Arduino Uno is the most used micro controller in the world
since it’s cheap and easy to program. Arduino has further various variants depending
on the internal hardware and software specifications. For our project, we decided to use
Arduino UNO. Arduino UNO is open source micro controller. It allows to upload any
program in supportive language, which then can interact with real world applications.
Common usage of Arduino includes reading sensors values and control things like motors,
lights, switches, in accordance with the incoming sensed values. Arduino is providing
users infinite possibilities. Arduino is based on ATmega328. It is provided with digital
and analog pins in which digital pins can be programmed to be ab output or input.
14 digital pins are provided out of which, 6 pins can be used for generating PWM as
output. Analog input pins are 6 in number. Arduino is built in with 16 MHz crystal
oscillator, USB connection, power jack, ICSP header and a reset button. Arduino Uno
distinguishes itself from other in a specific manner which is, it does not use the FTD
USB-to-serial driver chip but it engages Atmega8U2 programmed as a USB-to-serial
converter, instead. DC current per pin is usually rated at 40mA. 5 Volts and 3.3 Volts
pin is also provided, as a built in voltage source. For 3.3 volts pin, currents is 50mA. 32
kilobytes Flash memory is present in Arduino Uno.[5]

2.8.6 Router
Ethernet shield is connected with the router and it enables the user to enhance the data
flow rate. In this way user will have a faster communication channel with the home
appliance and can control them within few seconds.

2.9 Induction Machine


Induction machine, depending on the power, behaves differently from other machines.
As the name suggests, induction machine behaves like an inductor. Starting currents is
pretty higher for the machine with capacity greater than 5kW and the machine with no
starter capacitor, current is usually higher in the start. After some time, the current
stabilize itself to lower and almost linear values. Due to this reason, the selection of
relay is greatly affected.
Induction machine requires externally supplied armature current,it can’t starts on its
own as a generator . Because the rotor field always lags behind the stator field.
Induction machine is consist of a three phase induction motor and a series generator.

2.9.1 3-phase Induction Motor


Induction motor is the one which converts the mechanical energy into electrical power.

2.9.1.1 Types of Three Phase Induction Motor

1. Squirrel cage induction motor.


2. Slip ring induction motor.
Chapter 2. Literature Review 11

2.9.1.2 Working Principle

Induction Motor operates on the principle of Faradays law of electromagnetic induction.


When we apply a three phase A.C across the stator of the machine rotating magnetic field
produced in the stator winding due to which current starts to flow and flux produced due
to the flow of current further this rotating flux links with the rotor of the machine rotor
winding is designed in such a way that it is short circuited and when the stator flux links
with the rotor flow of current also established into due to the induction phenomenon
and rotor starts to rotate. The speed of rotor is less than the synchronous speed that is
why it is also named as asynchronous motor.

2.9.2 Induction Generator


An induction generator or a asynchronous generator is a type of alternating current
electrical generator that uses the principle of induction motors to produce electrical
power. Induction generator operates by mechanically turning their rotor faster than
the synchronous speed. A regular AC asynchronous motor usually can be used as a
generator without any internal modification.

2.9.2.1 Principle of Operation

An induction generator produces electrical power when its rotor is turn faster than the
synchronous speed. In generator operation the prime mover drives the rotor above the
synchronous speed. The stator flux induces current in the rotor, but since the opposing
rotor flux is cutting stator coil, an active current is produced in the stator.

2.9.2.2 Induction Generator Applications

Induction generators are useful in many applications such as


1. Mini hydro power plant.
2.Wind turbines.
3.Reducing high pressure gas stream to lower pressure.
because they can recover energy with relatively simple control.
An induction generator usually draws its excitation power from an electrical grid, some-
times however, they are self-excited by using phase-correcting capacitor. Because of this
induction generators can’t usually black start a de-energized distribution system.
Chapter 3

Motivation and Problem


Statement

3.1 Motivation behind Home Automation and Power Mon-


itoring System Using Wi-Fi Technology
With the introduction of Wi-Fi technology, the applications of this technology in different
domains have become more and more extensive. Home Automation System using Wi-Fi
technology has overtaken the industry’s hot spot. Home Automation System with Power
monitoring system provides more flexibility and reliability for the operation. User expect
that Home Automation System interfaced with Power Monitoring provides high accuracy
of operation and performance using Wi-Fi technology. This thesis mainly describes the
Wi-Fi based Home Automation and Power Monitoring System and its research work.
Home Automation and Power Monitoring System of home appliances offers an approach
for the extraction of purposeful information such as load on off condition and how much
power consumption is required for a particular load.

3.2 Impact of Home Automation and Power Monitoring


System in Residential Areas
The greatest influence of Wi-Fi based Home Automation and Power Monitoring System
has drastically increase the growth rate of this technology which helps the user to have
low cost and reliable smart home with full-fledged facilities. As it is economical and can
be easy installed and used it is highly demand-able in target industries now a days.

3.3 Home Automation and Power Monitoring System Now


a Days
Modern technologies of this era cant be totally avoided due to many reasons. Similarly
Home Automation and Power Monitoring System has its own importance in our society
where we face many serious problems like security issues, lack of electrical power and

12
Chapter 3. Motivation and Problem Statement 13

time management so there is need of present situation to monitor our houses. This
can be only achieved with the help of Home Automation and Power monitoring system
technology.

3.4 Problem Statement


Ip based Home Automation system is complex and expensive and using other tech-
nologies like Bluetooth, ZigBee and GSM user has to follow some certain limitations in
wireless communication due to their narrow range of connectivity. There is a growing
interest in Wi-Fi based Home Automation System. So it is feasible and practical solution
to use Wi-Fi technology for Home Automation system.
Chapter 4

Implementation and
Experimentation

4.1 Hardware Requirement for Home Automation System


As the hardware is concerned, the project is divided in two parts. First is Home au-
tomation system and second is Power monitoring system. Since home automation system
(HAS) is controlling the load wirelessly, it usually includes simply switching the device
in use, on or off. Switching is done by soft switches. User will use their smart-phone
for the purpose of switching the equipment on and off. Basic hardware required for this
purpose are:
1) Micro-controller.
2) Ethernet Shield( Wi-Fi Module ).
3) Internet Connection(Router).
4) Relay.
5) Connection Wires.
6) Android based application.

4.1.1 Ethernet Shield Connection


Since the project is based on controlling the load wirelessly so internet was necessary for
this purpose. Hence micro-controller should be provided internet. Two methods were
available to provide internet connectivity to micro-controller. First was to connect or
interface the Wi-Fi module with the board and second was to interface Ethernet shield.
We used Arduino Ethernet shield 2 and interfaced it with Arduino. Selection of this
specific Ethernet shield was preferred since its connection with the help of RJ45 cable
is more reliable. Moreover presence of internet connection in the household will also
facilitate its easy interfacing with the board and user would not have to do redundant
programming in the board for interfacing Wi-Fi module connection, every time he/she
changes the password of router or router itself.

14
Chapter 4. Implementation and Experimentation 15

Arduino Ethernet Shield 2 enables Arduino board to connect with the internet. Ethernet
shield connects to Arduino board uses wire headers which extend through the shield.
This arrangement keeps the pin layout intact and enables another shield to be stacked
on top. Ethernet shield is built in with standard RJ45 Ethernet jack. Reset button on
the shield resets both connections, W5500 and the Arduino board. Shield contains a
number of LEDs which provides user with different information. [4]

4.1.2 Internet Connection


Internet connection is heart of providing flexibility and mobility to handle the switching
and monitoring of loads. For providing user the ease of using this project, we used a
simple extension router for providing the internet to Arduino board. Since extension
router is already present in most of houses and commercial, industrial and educational
buildings for the purpose of providing wireless connection of internet, user would not
have to install any other device for automation of required loads. Arduino board can be
interfaced with already present router with RJ45 cable. Internet will provide user easy
to use arrangement for controlling loads without even being present in the same house,
city or a country. There is no bound to the diameter of using the application. Router
will assign local IP to Ethernet shield which is in connection with Arduino board, hence
connecting the board with the user smartphone in a pretty simple interfaced application.

4.1.3 Connection Wires


Connection wires, used for the connection of external circuit with Arduino are the simple
jumper wires. For connecting Ethernet shield with the extension router by RJ45 cable.

4.1.4 Android Based Application


Controlling the load and monitoring the power usage can be achieved using any micro-
controller but this method is pretty complex and a common person with no basic knowl-
edge of micro-controller’s architecture and integrated software application. For the ease
of everyone and for achieving the automation purpose for any intellectual level, basic
android application with very simple interface is developed as a part of this project.
Application can run on any device which uses android platform as its OS, either it’s
a tab or smart TV or smart-phone. The only thing needed is the internet connection
but that part is only needed if the user requires the flexible and mobile usage. Android
application will provide a very efficient and quite user friendly interface, an application
with the simple icons. On every icon, there is a small description about the type of
load it is going to turn on or off for example light, fan, TV etc. If the user is using a
device which supports a touch panel, he/she will just have to touch the icon mentioning
a specific load. For the monitoring purpose, each load which is in application or which is
live, its current, voltage and power factor will be displayed in rectangular shaped icon.
Chapter 4. Implementation and Experimentation 16

4.1.5 Methodology
Home automation system is concerned with switching the required devices ON/OFF,
without using the mechanical switches. Switching is being controlled by software de-
signed switches or simply by the help of android application. This process will provide
user with the freedom that being anywhere in the world, he/she can operate the device
without physically approaching to the devices location. For this purpose, Arduino board
is used with integration of other few devices.
Arduino board is first programmed with the simple sketch which enables it to connect it
with the internet. For this purpose, an Ethernet shield is interfaced with Arduino and
shield itself is connected to Wi-Fi router with the help of RJ45 cable.

4.1.5.1 Interfacing Ethernet Shield with Arduino Board

First step is to connect Ethernet shield with the Arduino board. First user will have
to get a shield that is compatible with the micro-controller. As the board used in this
project is Arduino UNO, Arduino Ethernet shield 2 is compatible with the respective
board. Connecting the Ethernet shield is as quite simple as connecting header pins.
Make sure that you are holding the both boards facing in the same direction. Then
just insert the header pins connected with the Ethernet shield into the ports available
in Arduino board. Arduino communicates with the Arduino Ethernet shield (both the
W5500 and SD card) using the SPI port. Digital pins used for the connections with
the Arduino Uno board are 10, 11, 12, and 13 on the Uno. Out of these pins, pin 10 is
used to select the W550. These pins cannot be used for general I/O. Connection can be
achieved either by using SD card or W5500. Both connection are made with the help of
SPI cable but at same time only one can be active. In order to do this with the SD card,
we have to set pin 4 as an output and write a digital HIGH to it and for the W5500, we
have to set digital pin 10 as a HIGH output. In our project we used the later method.
Next step is connecting the Ethernet shield with the router with internet connectivity.
Finally you have to upload a sketch on Arduino board. The sketch can decide whether
Ethernet shield is used as a web server to load an HTML page or functions as a chat
server. We use the Ethernet shield as a chat server and protocol we followed is MQTT.

4.1.6 MQTT Protocol


MQTT is a short form of Message Queue Telemetry Transport. It is a publish/subscribe
platform, quite simple messaging protocol. It is designed for constrained devices and
low-bandwidth, high-latency or unreliable networks. MQTT is usually based on Host
server and client. Host server provide the IP to Ethernet shield and enable the machine
to machine chat service. Client has to link the host cable with the board and upload
the updated status or sensed values. With the help of Host Server, user can integrate
or read/write the values on specific pins of board.
Chapter 4. Implementation and Experimentation 17

4.1.7 Interfacing Relay with Board and Load


Once the sketch is uploaded on Arduino board you are ready to go. Final step is
connecting the relay. Relay is basically used because Arduino can operate with 5V. Hence
in order to let happen the switching with 5V, relay board is used. Relay connections
are in NC (normally closed) state, while it is not energized. Input of relay is provided
with the 5V or 0V which appear as output in the boards digital pins. Output of relay is
connected with the AC or DC appliance in use. In order to connect the Relay board to
an Arduino board, first connect the ground and VCC pin. VCC pin is to be connected
to the Arduino +5V pin and the boards ground pin to the GND pin on relay board.
Then connect output pins of Arduino board to the input pins of relay board labeled
IN1, IN2, IN3 and IN4 for 4 relay board unit. When relay board is not energized the
default state can be set to NC (Normally closed) or NO (Normally open). When it is
used as NC State, the HIGH input will energize the circuit or appliance connected with
the relay output and LOW input will break the connection. When relay is set to be NO
state when not energized, now the HIGH input will break the output circuit and LOW
input will energize the circuit. We used the NO state and 4 relay board unit.

4.1.8 Operation
Arduino IDE is used as a basic software to upload the sketches to Arduino UNO board.
The sketch enables the Arduino to connect to the internet using Ethernet shield. Once
it is connected to the internet, the Ethernet shield as set as a chat server, it will serve as
a message transmission carrier to the host server and from the host server to the board.
The host server we used is Teleduino. Teleduino makes your Ethernet enabled Arduino
or internet enabled Arduino board into a powerful and versatile tool for interacting
with load devices over the internet .Once your Teleduino is configured, it automatically
connects itself to the Teleduino server when powered on. The Teleduino server translates
instructions received from the internet into actions on the Teleduino device. This host
server allow user to sign in and for every board the user uses, they assign a specific key.
This key goes to the Arduino sketch and Ethernet shield and android application use
this key to communicate with the host server.
The android application will send the signal using internet connection to host server,
hence uploading the values to host server. Host server which is interfaced with the
Arduino board using MQTT protocol send the commands to Arduino board, which
is similar to uploading a sketch on Arduino. For example if the icon is pressed on
application, it will define the pin mode as output on the board and make it HIGH or
low depending upon the un energized state of relay connections. In our project it will
define the respective pin mode as output and set it as LOW. LOW signal will close the
output circuit and thus energizing the appliance. The respective icon in the application
would now be appeared as dark and would show is status as ON or live. When the load
has to be turned OFF, pressing the icon again will now set the output pin as HIGH and
this HIGH signal will make the output circuitry of relay open or breaks the current.
Chapter 4. Implementation and Experimentation 18

4.1.9 Arduino Uno Pin Detail


Arduino pins detail is as follow in this case Digital pins (pinMode=output) used are
3,4,5,6 for 4 relay board unit, providing input to the relay.

4.2 Hardware Requirement for Power Monitoring System


Power monitoring system is also integrated along with the automation system in this
project. Power monitoring system is usually concerned with the continuous measure-
ment of associated current, voltage and power. In this way you can keep the track of
your usage of electricity and make improvements. For the mobile power monitoring
system many hardware used in home automation suffice the need of conveying these
quantities once they have reached at the analogue input of Arduino board. Hence fol-
lowing hardware is required to transmit the data once it reaches to Arduino board:
1) Microcontroller.
2) Ethernet Shield (Wi-Fi Module).
3) Internet Connection (Router).
As these topics are already covered, lets see on the other hardware requirement that
plays its roll to convey the signal to Arduino board:
1) Current transformer.
2) Potential Transformer.
3) Amplifier circuit.
4) Zero detection circuit.
5) 12V DC supply.
6) Additional circuitry.

4.2.1 CT
CT we used is, YHDC SCT-013-000. CT ratio is 1:1800 . This current sensor has split
core construction. It has a clip type shaped which can be hanged to any wire and thus
can measure its corresponding current. It measure the original currents reduced by 1800
times and send that signal to Arduino board. It is connected in series with the circuit.

4.2.2 PT
We use the former type potential transformer. The rating of PT we used is 220/9 V.

4.2.3 Amplifier
Since the current transformer lowers the currents value by the factor of 1800, the current
which has been sensed, is very low. Hence in order for it to work with the Arduino board
with no ambiguity, an external amplifier circuit has been used to amplify the output of
CT with the gain of 100. For this purpose, 741 IC is used which is op-amp. For the
working of op-amp, 12 V battery is required to be supplied to +VCC and VCC. The
CT signal is applied to amplifier and after the amplifier, the voltage is applied to divider
Chapter 4. Implementation and Experimentation 19

circuit for offsetting it. Only CT signal requires the amplification to get the output of
about 1 V peak.

4.2.4 Additional Circuitry


Since Arduino cannot deal with the negative signal and signal above 5 V, hence some
additional circuitry is required. The output from CT is about 1-2 V peak to peak and
PT is about 9-12 V peak to peak. Hence to deal with the output of PT, voltage divider
circuit is used to bring the voltage down to 5 V peak to peak and then to deal with the
negative part of voltage, it is offset to about 2.5 volts above and peak to peak voltage
is adjusted to have the value of 0-5 V peak. And to deal with the CT signal, it is offset
to by 2.5 V. Hence both signal can be processed to Arduino

4.2.5 Zero Detection Circuit


The current and voltage signal after amplification and offsetting the voltage, the CT
and PT signal can be processed to Analog pins and hence measure the RMS voltage and
current. For getting the power factor, we need to measure the phase difference between
current and voltage signal, in real seconds and then we have to convert these seconds to
degrees and by applying the simple cos(x) function, we can calculate the power factor.
For the purpose of measuring the phase difference between two signals, the output from
the CT and PT is applied to zero detection circuit separately, which will produce the
square pulse at positive rising zero signal. These square pulses is then given to digital
pin of Arduino board, which will calculate the time between two zeros and thus calculate
the power factor.

4.2.6 12 V DC Battery
12 V DC is required in various steps during our project such as to provide the DC
voltage to op-amp circuit and then for additional circuitry such as providing offset to
the signals. Hence built in DC source is used and it is converting 220 AC into 12 volts
DC supply. It is integrated as a part of PCB board.

4.2.7 Methodology
CT is connected in series with the electrical device and PT is applied in parallel ar-
rangement. The signal from CT is then applied to amplification circuit with the gain of
100. The signal after amplification is then applied to voltage divider circuit to get the
signal in the limit of Arduino board and creating required offset. After that the signal
is processed through the zero detection circuit to create corresponding square wave for
the detection of zero and then it is supplied to Arduino analog pin to get the value of
current. Two pins are used for two signals, one is analog and other is digital. For mea-
suring the current value, analog pin is supplied with the signal and for the calculation
of power factor, the square wave signal is provided to digital pin whose pin mode is
defined as input. Similarly for the PT the signal is large enough to be recognized by the
Arduino so amplification is not needed. Signal from PT is supplied to divider circuit to
Chapter 4. Implementation and Experimentation 20

get the value with in ranged limit (5 V max peak) and the provided offset. Same as that
of CT, two pins are used, one for calculating the value of voltage and other for power
factor measurement. For the sake of power factor calculation, Arduino is sketched with
interruption based program. Interruption is made on rising edge of square wave for each
signal on separate pins an then time interval between the 2 interrupts are measured and
then converted into real time and then into degrees and finally the cosine function is
applied.

4.3 Hardware Requirement for Induction Machine Control


Hardware requirement is same as discussed above, just the rating of relay is affected.
Hence relay becomes more expensive and efficient. Moreover for 3 phase induction motor
the relay required are 3 in number. All the relays are given the same input from Arduino
Uno board so it switch the motors all phases simultaneously and the machine remains
in the balanced condition. For measuring purpose, only the single phase is used if the
machine is in balanced condition. The hardware requirement is same as that discussed
above:
1) Microcontroller.
2) Ethernet Shield (Wi-Fi Module) .
3) Internet Connection (Router).
4) Relay.
Only relay selected in present case would be of higher rating, so in case of starting
impulse current, the relay would work properly.

4.3.1 Methodology
The control and monitoring of induction machine is divided into two arrangements. One
is for the switching of 3-phase induction machine and other is monitoring the power.

4.3.1.1 Switching

For the switching purpose, 3 relay unit board with higher rating is used such the rating
should be minimum of (100 A). The machine we are trying to automate is 3-phase
induction motor, with 5 hp (horse power) and 3.73 kW. Hence starting current would be
under 100 A. The basic problem in switching is to maintain the balanced condition in all
three phases. Hence all the three phases are connected to separate relay. But the input
signal coming from the digital pin of Arduino board is common. When the user requires
to operate the machine or turn it on, the single signal from Arduino Uno will make all
the relay board to complete the connection of all three phases, hence maintaining the
balanced condition.

4.3.1.2 Monitoring

For the monitoring purpose, we use the single phase only. As the induction machine will
operate under balanced condition only, and under unbalanced condition, the protection
system will cause the circuit breaker with main to trip. Hence under balanced condition,
Chapter 4. Implementation and Experimentation 21

the single phase measurement will be authentic. Current and voltage of other phases
can be calculated by using formulas and creating 120 phase shift between 3 phases.
CT signal is processed same as before, to the amplification circuit, then divider circuit
and creating offset and then carried it two the two separate pins on Arduino board. One
to the analog pin and other to the digital pin.
Chapter 5

Main Techniques Used in the


Project

5.1 MQTT Protocol


5.1.1 What is MQTT?
MQTT means Message Queue Telemetry Transport. It is a publish/subscribe, extremely
easy and light structured communication protocol, for use over the TCP/IP protocol,
constructed for contrived and small frequency width devices, high-latency networks and
un-sophisticated channels and networks. It is outlined for communications with distant
places where a code footprint is desired or the channel bandwidth is not that much
available. The communication structure needs a piece of information agent. That dealer
is required to distribute all the information to its receivers .This message receiving is
based on certain set of rules. These design rules are to decrease network bandwidth
and machine resource needs whilst also trying to make sure about dependability and to
some extent of assurance of conveyance. These things are so much substantial that it
make that technique most effective of all the rising ways of machine-to-machine (M2M)
or Internet of Things of joined devices, and for mobile applications where bandwidth
and energy are of an importance.

5.1.2 Who Invented MQTT?


Dr. Andy Stanford-Clark, and Arlen Nipper of Arcom in 1999 were the persons behind
the invention of this easy communication protocol which has given tough competition
to all transmission techniques and protocols.

5.2 How does MQTT Relate to SCADA Protocol and MQIsdp?


5.2.1 SCADA Protocol
Control system construct that uses computers, structured data networking and GUI
for complex process leading adjustment is Supervisory control and data acquisition

22
Chapter 5. Main Techniques Used in the Project 23

(SCADA) , but uses other connected devices such as PLC,s and different PID con-
trollers to link with the process plant or machinery. SCADA computer system controls
the different links of workers which facilitates us with the application of checking and
commanding the processes. However, field sensors and actuators are connected with
different types of complex modules and devices so that real-time control logic or con-
troller calculations can be performed. The SCADA concept was created as a global way
of distant reach to a different type of local control devices, which could be from diver-
sified producers who can facilitate us with access through globally known automation
technique. Actually, large SCADA systems have earned a great deal of importance in
networked control systems but is using way too many means for interfacing with plant.

5.2.2 MQIsdp
A protocol that is used to connect SCADA devices to broker by the application of Web-
Sphere MQ telemetry. Whereas wide variety of devices such as mobile phones, distant
sensors, actuators and other telemetry devices leveraging WebSphere MQ. Is real time
accessed by telemetry.
The SCADA protocol and the MQ Integrator SCADA Device Protocol (MQIsdp) are
combined for what is now known as the MQ Telemetry Transport (MQTT). And Stan-
dard ports reserved with IANA for MQTT use is TCP/IP port 1883. Also,TCP/IP port
8883 is standardized, for using MQTT over SSL.

5.2.3 What is WebSphere MQ Telemetry?


Basic functioning of WebSphere MQ Telemetry is to establish a connection between all
kinds of devices through the internet and to the related supervisor and is cost effective in
building applications. Due to this incredible feature of MQ telemetry, people, companies
mostly want enhance their communication to their subordinates or to other persons.
The following diagrams demonstrate some typical uses of WebSphere MQ Telemetry:

Figure 5.1: Smart electricity metering.

A message sent to WAPDA that contains the data of energy usage.


Now the function of telemetry is to implement all commands after the analysis of energy
Chapter 5. Main Techniques Used in the Project 24

usage data receiver from customer.

Figure 5.2: Smart health monitoring.

An application based on telemetry, on command from the user, send all data related to
your health to the related doctor.
After the brief overview of your data, telemetry alerts you about your physical condition.

5.2.4 Does MQTT Support Security?


Security encryption across the whole connections can be controlled over SSL. Extra
protection from foreign party can be implemented by the application built for commu-
nication between sender and receiver, although there is no built in protocol for security
purpose in order to keep MQTT less complicated.

5.3 Interfacing of CT and PT with Arduino Uno


5.3.1 CT and PT signals
Signals from CT and PT used by us are as follows with two bulbs and one fan connected
as load
Chapter 5. Main Techniques Used in the Project 25

Figure 5.3: VT signal with any load connected.

Figure 5.4: CT signal with 2 bulbs connected.


Chapter 5. Main Techniques Used in the Project 26

Figure 5.5: CT signal with two bulbs and a fan connected.

5.3.2 Requirement of Arduino Uno


As range of analog pin used as input can vary from 0 to 5 Volts with the accuracy of
10 bits .whereas our CT give the output depending upon the load which approximately
varies from 3 to -3 Volts which the Arduino Uno cant read. Similar is the case for PT
as they also gives the negative output which is unbearable for Arduino

5.3.3 Procedure to Interface CT and VT


To make the output of CT and PT suitable for Arduino Uno analog pin we have first
divided the both outputs using the voltage divider circuit such that its output remains
within the range of -2.5 to 2.5 Volts .and to make this within 0 to 5 volts, we have offsite
the output of voltage divider by 2.5 Volts as shown in diagram

Figure 5.6: Circuitry to operate CT and PT signal.


Chapter 5. Main Techniques Used in the Project 27

In the figure,R1 and R2 value is adjusted according to the load. Greater the load, greater
the signal hence to limit it to -2.5 from 2.5 Volts,R1 value is increased to make it suitable
for Arduino analog pin.
By using that portion of code we have calculated the RMS value of current and voltage
using emon library as it is clearly seen that code has nullify the effects of divider circuit
and offsetting

Figure 5.7: Code for calculating rms value of current and voltage.

5.4 Power Factor Measurement


5.4.1 What is Power Factor?
Cosine of phase difference between voltage and current waveform passing through load
is called as power factor of load whereas the angle is called power factor angle.

5.4.2 Why Measuring them?


Our main purpose is to measure active and reactive power consumption by load con-
trolled by our android application.so to measure them, we require rms current, rms
voltage and power factor.

5.4.3 Adjustments to Measure Power Factor with Current and Voltage


Waveform
5.4.3.1 Explanation

To measure power factor, first we have to detect the zero crossings of both the signals
coming from CT and PT .when these zero crossings are detected using the zero detection
circuit as shown in figure
Chapter 5. Main Techniques Used in the Project 28

Figure 5.8: Zero detection circuit.

Problem in this circuit is that it can only detect zeros of signals whose peak is 4V.whereas
our signal from CT when connected three loads has peak about 3V.Hence to eliminate
this problem an amplifier circuit is used with the gain of 10 using op-amp in non-inverting
configuration.
After the amplification, signal is given to zero detector circuit. Input of the whole circuit
from Ct and output is shown in figure as follows:

Figure 5.9: Amplified I/P and O/P signal from CT.


Chapter 5. Main Techniques Used in the Project 29

5.4.3.2 Interfacing with Arduino Uno

Both the signals from the above circuit is divided to set its level to 5V and the fed to
Arduino Uno digital pins. These signals are as follows

Figure 5.10: Arduino Uno digital pin signal.

5.5 Use of Relays for Switching High Power Induction Mo-


tor
In this experiment, we have switched the 5 horse power motor which is interfaced by
a synchronous generator through which different loads can be connected. Rating of
induction machine is as follows

Figure 5.11: Name plate of induction machine.


Chapter 5. Main Techniques Used in the Project 30

To increase the power consumption on the output side, more loads are connected. As
clear input power is also increased. So the current taken by the stator of motor also
increased.in order to switch on and off these three wires of three phase by soft switching,
high current rating relays are required. We have used 12 V and 100 A relays for switching
purposes as shown in figure

Figure 5.12: Relay.

Now as this relay is operated with 12 Volt signal, a simple electronic circuit using BJT
having 12 V DC at collector, digital pin from Arduino at base and ground at emitter
through a resistor of suitable value is interfaced between Arduino and a relay for switch-
ing of all three phases separately but controlled by a single digital pin.
When no load is connected through the generator, steady rms current taken is 0.5A
power consumed at no load is 92 watt.
When single bulb is connected, steady rms current taken is 2.7 A and power consumed
at that load is 182 watt.
When three bulbs and a fan is connected with the generator, steady rms current taken
is 2.419 A and power consumed is 461 Watt.

5.6 MIT App Inventor


5.6.1 Introduction to MIT App Inventor
MIT App Inventor is an imaginative first experience with programming and application
creation that changes the unpredictable dialect of content based coding into visual,
simplified building pieces. The basic graphical interface concedes even an unpracticed
Chapter 5. Main Techniques Used in the Project 31

tenderfoot the capacity to make an essential, completely useful application inside an


hour or less.

5.6.1.1 History

Google’s Mark Friedman and MIT Professor Hal Abelson co-drove the improvement of
App Inventor while Hal was on holiday at Google in 2009. Other early Google design
givers were Sharon Perl, Liz Looney, and Ellen Spertus. Application Inventor keeps
running as a web benefit regulated by staff at MIT’s Center for Mobile Learning - a
coordinated effort of MIT’s Computer Science and Artificial Intelligence Laboratory
(CSAIL) and the MIT Media Lab.

5.6.1.2 Goals

The MIT App Inventor group has five essential targets:


Building limit - App Inventor steadily endeavors to grow the compass of formal and
casual versatile figuring training for grown-ups and youth around the globe. We are ef-
fectively occupied with creating and scattering assets and preparing materials to bolster
instructors in making new applications through our program.
Advancing software engineering instruction - Through our squares based program-
ming dialect, we are focused on advancing an option entrance ramp to computational
intuition training. From an arrangement point of view, we effectively occupied with
neighborhood and national discussions about norms. From a mindfulness viewpoint,
we are anxious to take part in and bolster huge scale battles achieving new groups of
onlookers.
Managing and upgrading the instrument - We have made a long haul sense of
duty regarding supporting and improving MIT App Inventor as a bleeding edge free
administration to clients. To this end, we are consistently enhancing the device, trou-
bleshooting and improving its execution, and including new elements.
Building undertaking improvements - We work with open organizations and pri-
vate companies to bolster interesting applications by creating custom components of
MIT App Inventor because of accomplice needs.
Directing and supporting group look into - MIT students, graduate understudies and
teaming up foundations are effectively occupied with leading and distributing research
while creating, testing and assessing the utilization of MIT App Inventor around the
globe.

5.6.2 Main Components Used in our App


5.6.2.1 TinyWebDB

TinyWebDB is an App Inventor part that enables you to store information steadily in
a database on the web. Since the information is put away on the web rather than a
specific telephone, TinyWebDB can be utilized to encourage correspondence amongst
telephones and applications (e.g., multi-player amusements).
Chapter 5. Main Techniques Used in the Project 32

As a matter of course, the TinyWebDB segment stores information on a test benefit


given by App Inventor, http://appinvtinywebdb.appspot.com/. This administration is
useful for testing, yet it is shared by all App Inventor clients, and it has a breaking
point of 1000 sections. On the off chance that you utilize it, your information will be
overwritten in the long run.
TinyWebDB is the key part you’ll require. It is an App Inventor part that how about we
your application store steady information on the web and share information among tele-
phones and individuals. It has comparative squares as TinyDB, however the information
is put away on the web rather than secretly on the gadget.

5.6.2.2 Key Focuses about TinyWebDB

TinyWebDB is for conversing with exceptional App Inventor web benefits that store
information in an indistinguishable organization from TinyDB.
It is not the same as the Web part, which is for speaking with any sort of API and
doesn’t have the StoreValue/GetValue charges. In the TinyWebDB arrangement, Get-
Value is again called from inside Screen.Initialize, yet take note of that it gives back no
information. The Tiny WebDB. Get Value shut doesn’t have anything turning out the
left that can be connected to an opening. Rather, the Get Value just sends a demand
to the web. In the end, the information will arrive, and after that the Got Value oc-
casion handler is activated. When it is, the Tag from WebDB gives you the tag of the
demand and the value From WebDB is the information that was asked for (the rundown
of notes). As should be obvious, the information is prepared in a comparable way to the
TinyDB arrangement.
Web Application Inventor has a part called Web which gives you the usefulness to send
and bring information from a server or a site through GET and POST asks. This part
can unravel both JSON and HTML organized information. We will compose an applica-
tion called iRead that will request that a client sort in a full or halfway book name and
inquiry Google’s database of books utilizing Books API and recover the most significant
book information. We will parse the Title and Author of the book, we will get the
picture URL of the book cover, lastly the book URL which can be propelled through a
program.

5.6.3 Activity Starter


The Activity Starter segment gives you a chance to join applications by having one
application start up different applications. It’s a key approach to augment the capac-
ities of App Inventor by exploiting different applications, regardless of whether they
are applications made with App Inventor or whether they are ”outer applications” (i.e.,
applications that were not made with App Inventor). These can be App Inventor ap-
plications made by you or others. They can likewise be applications like Camera and
Maps that are pre-introduced on the gadget. Or, then again they be any application
whatsoever the length of you have the vital data to give to the action starter. You can
likewise pass qualities to applications when you begin them, and in addition get back
Chapter 5. Main Techniques Used in the Project 33

outcomes from applications to use in further handling. Furthermore, propelled design-


ers who work with the Android SDK can make unique applications that can begin App
Inventor applications, and be begun by them.

5.6.4 Notifier
The Notifier segment shows ready exchanges, messages, and brief alarms, and makes
Android log passages through the accompanying techniques:
Show Message Dialog: shows a message which the client must expel by squeezing a
catch.

Show Choose Dialog: shows a message two catches to give the client a chance to pick
one of two reactions, for instance, yes or no, after which the after choosing occasion is
raised.
Show Text Dialog: gives the client a chance to enter message in light of the message,
after which the After Text Input occasion is raised.
Show Alert: shows a transitory ready that leaves without anyone else’s input before
long.
Show Progress Dialog: shows a caution with a stacking spinner that can’t be expelled
by the client. It must be rejected by utilizing the Dismiss Progress Dialog piece.
Dismiss Progress Dialog: Dismisses the advance discourse shown by Show Progress
Dialog.
Log Error: logs a mistake message to the Android log.
Log Info: logs a data message to the Android log.
Log Warning: logs a notice message to the Android log.
You can likewise utilize the text style tag to indicate shading, for instance, ¡font color=”blue”¿.
A portion of the accessible shading names are water, dark, blue, fuchsia, green, dim,
lime, maroon, naval force, olive, purple, red, silver, greenish blue, white, and yellow Now
using above explained blocks, we implemented our application by which we can control
loads as well as monitor their power consumption. In this interface, as we click the
analog button, Label analog value change to show the power consumption of the loads.
Interface of app is as follow up till present.
Chapter 5. Main Techniques Used in the Project 34

Figure 5.13: Application page.


Chapter 6

Conclusion and Future Direction

6.1 Future Application


The project can be further extended to involve the following:

6.2 Centralized Control


Since the project aims to provide automation for general public, it can be installed in
homes to control the lightening of the entire house through a single interface. All kinds
of electrical appliances installed in homes can be automated, controlled and monitored
through a basic android app after a few modifications. This allows user to easily monitor
the energy consumption from afar. Moreover, since the user can control the load from
outside the home, any unnecessary load can be easily turned off, hence preventing the
power wastage. HVAC (heating, ventilation and air conditioning) Control can also be
achieved through the home automation to control all the air quality devices and the
thermostat.

6.3 Security Systems


Nowadays security is a major issue. To ensure the safety of the people and their belong-
ings new and efficient security systems are required. The project code and hardware
can be improved to provide the extra features required for the efficient working of the
security systems. Equipments like flood lights and motion detectors can be installed
to trigger the system that raises alarms and alerts the owner immediately in case the
security is compromised.

6.4 Smart Homes


Smart homes based on features digital receptionist and scheduled tasks like watering
lawn, light control, motorized blinds, etc. are the main application of the project. Home
weather stations can be installed that help automate the appliances based on the weather
conditions. A little change in the code and some additional hardware can be used to

35
Chapter 6. Conclusion and Future Direction 36

automatically detect any leak, smoke or CO in the house. Thus providing a high quality
life style for general public, especially for the elderly and disabled.

6.5 Commercial Buildings and Hospitals


Since the basic purpose of the project is to control, automate and monitor the electrical
appliances, it can be extended for use on a large scale. Places such as commercial build-
ings and hospitals can be automated as well by including extra features by modifications
in code. Greater amount of hardware is required for such large scale automation. But
the automation system installment in the buildings presents huge benefits such as less
power consumption, convenient centralized control and easier monitoring of the loads
and their energy consumption.

6.6 Conclusion
The thesis has demonstrated the working and implementation of home automation. The
various advantages and its applications in the industry have been discussed. Automa-
tion and centralized control has been achieved in the project. Resistive and inductive
loads are controlled and monitored through the Arduino based hardware. The Wi-Fi
technology and android app used in the project makes it convenient and efficient for
the user to control all the loads from a long distance. The project enables the user to
monitor the energy consumption based on the readings obtained through the current
and potential transformers used in the hardware. Moreover the control of the induction
motor of 3MW has also been achieved.
Appendix A

Wi-Fi Technology

A.1 Evolution of Wi-Fi Technology


In 1985 US government started working on providing a wide range of wireless commu-
nication worldwide. In 21st century the idea was implemented practical on the basis
of IEEE 802.11.X standards and this how Wii-Fi came into existence. Before Wi-Fi
technology there are many more wireless networking channel already operating and pro-
viding wireless based communication but the bandwidth of Wi-Fi is much broader than
the previous technologies.

A.2 What is Wi-Fi?

Figure A.1: Wi-Fi technology.

A.3 How Wi-Fi Works?


Wi-Fi is a primary part of communication now a days for wireless data exchange. As
mentioned above Wi-Fi uses IEEE 802.11 standard every time the standard is upgraded

37
Appendix A. Wi-Fi Technology 38

a new letter is headed to the end of the designation this normally equate to an increase
in potential bandwidth and security protocols with the standards.
Wireless network use a radio frequency wave that are transmitted in 2.4 GHz to 5 GHz
spectrum that are very similar to television or cell phone signals when computers are
connected to a wireless network its adapter will encode information into a radio signal
and then transmit it using an antenna that is normally built into screen of new laptops.
Wireless signals can also be received via an external antenna plugged into the USB slot
of computer the Wi-Fi router for the network that receives this information decodes it
and send to the internet through a wired high speed connection.

A.4 Available Wi-Fi Standards


802.11 wireless standards have several implementations in use today the first is 802.11a
standard that operates in the five yard spectrum and is rated up-to 54 mbps (megabytes
per second) it also uses an orthogonal frequency division (OFDM) multiplexing system
that reduces interference but increases the complexity of the hardware requirement.
The least expensive standard to operate is 802.11B which originally made the most used
standard. 802.11B is rated up-to 11 mbps and works in 2.4 GHz RF band. The 802.11B
standard has become more popular in recent years handling 54 mbps of data at 2.4 GHz
spectrum it used the same OFDM encoding.
802.11n standard is one of the newer option in the market which is rated at speed of
140 mbps and has the latest security protocols.

A.5 How to Connect Wi-Fi


Now in-order to connect a Wi-Fi network on computer system it must have a wireless
adapter in it. Most computers have this built in if not present use USB port and once the
wireless adapter starts to operate it will be able to automatically connect the available
Wi-Fi network in the range of the computer.
Appendix B

Hardware Board and Schematics

This appendix provides the snapshots of complete design. The appendix contains Ar-
duino Uno board, Ethernet Shield and Router. It also contains the PCB layout of
Arduino Uno board.

B.1 Arduino Uno


Arduino Uno is a microcontroller board based on the ATmega328P (datasheet). It has
14 digital input/output pins (of which 6 can be used as PWM outputs), 6 analog inputs,
a 16 MHz quartz crystal, a USB connection, a power jack, an ICSP header and a reset
button. It connects to a computer with a USB cable or power it with a AC-to-DC
adapter or battery.[5] The figure below shows the Arduino UNO used:

Figure B.1: Arduino uno micro-controller.

39
Appendix B. Hardware Board and Schematics 40

B.2 PCB layout of Arduino Uno Board

Figure B.2: PCB layout of arduino uno board.


[5]

B.3 Ethernet Shield


The Arduino Ethernet Shield allows an Arduino Board to connect to the internet. It is
based on the (Wiznet W5100 Ethernet chip). The Wiznet W5100 provides a network
(IP) stack capable of both TCP and UDP. It supports up to four simultaneous socket
connections. It uses the Ethernet library to write sketches that connect to the Internet
using the Shield. The Ethernet Shield connects to an Arduino Board using long wire-
wrap headers extending through the Shield. This keeps the pin layout intact and allows
another Shield to be stacked on top of it. The Shield also includes a reset controller,
to ensure that the W5100 Ethernet module is properly reset on power-up. The reset
button on the shield resets both the W5100 and the Arduino board. The shield contains
a number of informational LEDs:
PWR : indicates that the board and shield are powered.
LINK: indicates the presence of a network link and flashes when the shield transmits
or receives data.
FULLD: indicates that the network connection is full duplex.
100M: indicates the presence of a 100 Mb/s network connection (as opposed to 10
Appendix B. Hardware Board and Schematics 41

Mb/s).
RX: flashes when the shield receives data.
TX: flashes when the shield sends data.
COLL: flashes when network collisions are detected.[4]

Figure B.3: Ethernet shield and its PCB layout.

B.4 Totolink
N100RE is a wireless router designed to enable the user to access the Internet by secured
Wi-Fi connection. The features of totolink N100RE are as follows:
Complies with IEEE 802.11n/g/b standards for 2.4 GHz Wireless LAN.
Up to 150 Mbps data rate for Wi-Fi network.
Supports DHCP/Static IP/PPPoE broadband functions.
Provides 64/128-bit WEP, WPA, WPA2 and WPA-Mixed security.
Connects to secure network easily and fast using WPS.
Supports IP, Port, MAC, URL filtering and Port Forwarding.
Multi-SSID allows user to create multiple SSIDs according to their needs.
Supports VLAN function for IPTV and other internet services.
Appendix B. Hardware Board and Schematics 42

Universal Repeater and WDS function for easy Wi-Fi extension.


References

[1] Mohid Rehan and M Salim Beg. EVOLUTION OF HOME AUTOMATION TECH-
NOLOGY, Uploaded Date: 1 September 2015.

[2] Rich Picking Armando Roy Delgado and Vic Grout. Remote-controlled home au-
tomation systems with different network technologies. URL https://www.glyndwr.
ac.uk/groutv/papers/p5.pdf.

[3] Wisam Nader. Real-time power monitoring, home automation and sustainability.
Technical report.

[4] Arduino Ethernet Shield, 2017. URL https://www.arduino.cc/en/Main/


ArduinoEthernetShield.

[5] Arduino Uno Manufactures. Arduino uno. URL http://digital.csic.es/


bitstream/10261/127788/7/D-c-%20Arduino%20uno.pdf.

43

You might also like