0% found this document useful (0 votes)
135 views74 pages

Uninterrupted Power Supply Using Four Different Sources: December 2020

This document describes a project to provide uninterrupted power supply from four different sources using an IoT system. The project will switch the power supply from one source to another if the primary source faces issues, to ensure continuous power. Sensors will monitor the voltage and current from each source, and a microcontroller will connect the supply to the most efficient available source. Data from the sensors will be sent to the cloud using Firebase for remote monitoring of the power sources. This project aims to improve power reliability in locations that depend on single sources that may fluctuate.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
135 views74 pages

Uninterrupted Power Supply Using Four Different Sources: December 2020

This document describes a project to provide uninterrupted power supply from four different sources using an IoT system. The project will switch the power supply from one source to another if the primary source faces issues, to ensure continuous power. Sensors will monitor the voltage and current from each source, and a microcontroller will connect the supply to the most efficient available source. Data from the sensors will be sent to the cloud using Firebase for remote monitoring of the power sources. This project aims to improve power reliability in locations that depend on single sources that may fluctuate.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

See discussions, stats, and author profiles for this publication at: [Link]

net/publication/361415472

UNINTERRUPTED POWER SUPPLY USING FOUR DIFFERENT SOURCES

Thesis · December 2020


DOI: 10.13140/RG.2.2.35471.05281

CITATIONS READS
0 13

2 authors:

Grizan Mariyanayagam Lakmini Malasinghe


Sri Lanka Institute of Information Technology Sri Lanka Institute of Information Technology
1 PUBLICATION   0 CITATIONS    5 PUBLICATIONS   225 CITATIONS   

SEE PROFILE SEE PROFILE

All content following this page was uploaded by Grizan Mariyanayagam on 20 June 2022.

The user has requested enhancement of the downloaded file.


SRI LANKA INSTITUTE OF INFORMATION TECHNOLOGY
Faculty of Engineering

UNINTERRUPTED POWER SUPPLY USING FOUR DIFFERENT SOURCES


WITH IOT SYSTEM

By

Grizan. M (EN17407144)

A project final report submitted to the


Fulfillment of the requirements for the
Degree of Bachelor of Science of Engineering Honors in
Electrical and Electronic Engineering

December 9, 2020
DECLARATION

I hereby declare that this thesis submitted to the Department of Electrical and Electronic
Engineering, Faculty of Engineering, Sri Lanka Institute of Information Technology in partial
fulfillment of the requirements for the award of the degree of Science of Engineering Honors in
Electrical and Electronic Engineering is based on work done by me. The contents of this thesis
have not been submitted by me to any other university or institute for the award of any other degree
or diploma.

Signature: …………………………………...

Name in Full: …Grizan Mariyanayagam……….

Registration No: …EN17407144………………….

Date: …2020/12/09….…………………

i
ABSTRACT
The uninterrupted power supply using four different power sources is essential to our country. In
our century we need the electricity for all our needs. So we face many power issues. In our country
different locations get the power supply from different power plants. If the power plants break
down in the specific location of our country that area faces a power cut problem.

Some power plants depend on weather. Example; the solar power plant is based on sun light, wind
power plant on wind and hydropower plant based on rain. In our country if the weather changes
suddenly power plant works with low efficiency. Some kind of power plants based on raw
materials. An Example is the coal plants based on coal. Sometimes the plant is affected by the high
cost in purchasing or importing coal. If the coal import goes low, the power slows down. The
specific locations of base by the specific power plants create same problems.

Our project is the solution to these problems. Our uninterrupted power supply switches the supply
from one source to another source. If the specific location gets a power cut at a specific time, the
uninterrupted power supply connects another highly efficient power source with supply line of that
location. After that, it disconnects the connection from the power source and connects it to the
specific power source. Then the specific power plant becomes high efficiency. We believe our
project and introduce technology for electrical supply will improve the services in our country.

ii
ACKNOWLEDGEMENT

First and foremost, I would like to express my sincere gratitude to [Link] Nilendra Hettiwatte
Senior lecturer (Higher Grade), Department of Electrical and Electronic Engineering SLIIT for
accepting our project. Next I would like to thank my project coordinator [Link]
Kulasekara for allowing us to select this project title. Next I would like to express my sincere
gratitude to my supervisor [Link] Malasinghe for continuous support to complete this project,
for her patience, immense knowledge and motivation. Her good guidance helped me all the time
in my research and design of the project. Next I would like thank my third reader [Link]
Guruwita for her support and help.

Next my thanks go to Mr. Chandika Rathnayaka (Plant Engineer of Seguwantivu and Vidatamunai
Wind Power Plant) for giving necessary information for my research work from the Power Plant.
And I would also like to thank my English teacher [Link] Sabar for helping me to check the
grammar and spelling mistakes in my Report.

My heartfelt thanks go to my father and mother for giving me every supports to do the research
and for monitoring me to become an engineer after my school studies. I thank them for
unconditional love and taking care of me, even in their old age and encouraging me to do well.

Last but not least I thank my group members, my other friends and senior sisters and brothers for
their support to do my project. I like to thank for my group members for working together with me
and for the pleasant experience during my final year project and the research. Finally, I thank God
for making everything a success.

iii
LIST OF FIGURES

Figure 2.1 Data Acquisition of IOT ................................................................................................ 8


Figure 2.2 Various Protocols of Ethernet ..................................................................................... 10
Figure 2.3 Device Connection of USB ......................................................................................... 10
Figure 3.1 Work Tree .................................................................................................................... 14
Figure 3.2 Overall diagram of my part ......................................................................................... 15
Figure 3.3 AC voltage sensor and AC current sensor Circuit....................................................... 15
Figure 3.4 Current sensor ACS712 ............................................................................................... 16
Figure 3.5 AC Voltage Sensor zmpt101b ..................................................................................... 17
Figure 3.6 NodeMCU ESP8266 ................................................................................................... 18
Figure 3.7 zmpt101b transformer circuit ...................................................................................... 19
Figure 3.8 Circuit Diagram of ACS712 ........................................................................................ 22
Figure 3.9 Firebase Host URL ...................................................................................................... 24
Figure 3.10 Firebase Secret Code ................................................................................................. 24
Figure 3.11 Research location....................................................................................................... 29
Figure 3.12 Current Transformer Operation ................................................................................. 30
Figure 3.13 Current Transformer of Wind force .......................................................................... 31
Figure 3.14 Potential Transformer Operation ............................................................................... 32
Figure 3.15 Potential Transformer of Wind force ........................................................................ 33
Figure 3.16 Calibration Software .................................................................................................. 34
Figure 3.17 Simulation Diagram................................................................................................... 35
Figure 3.18 PT Circuit .................................................................................................................. 35
Figure 3.19 CT circuit ................................................................................................................... 35
Figure 3.20 PT Configuration ....................................................................................................... 35
Figure 3.21 CT Configuration....................................................................................................... 35
Figure 3.22 Full Wave Rectifier with smoothing Capacitor ......................................................... 36
Figure 3.23 Wave Form 5μF ......................................................................................................... 37
Figure 3.24 Wave Form 50μF ....................................................................................................... 37
Figure 3.25 Voltage Divider Circuit ............................................................................................. 38

iv
Figure 3.26 Potentiometer ............................................................................................................. 39
Figure 4.1 Firebase Reading in OFF condition ............................................................................. 40
Figure 4.2 Firebase Reading in ON condition .............................................................................. 41
Figure 4.3 Google Sheet Reading in OFF condition.................................................................... 41
Figure 4.4 Google Sheet Reading in ON condition ..................................................................... 42
Figure 4.5 IOT Monitoring in Wind Power .................................................................................. 43
Figure 4.6 Simulation Monitoring ................................................................................................ 44
Figure 4.7 Practical Condition ...................................................................................................... 47
Figure 4.8 Ideal Condition ............................................................................................................ 47

v
LIST OF TABLES

Table 3.1 Optimal Range with Rating .......................................................................................... 16


Table 3.2 Resolution Table of 10bits ............................................................................................ 20
Table 3.3Purpose Data of Variables ............................................................................................. 27
Table 4.1 Reading observation in Simulation ............................................................................... 44
Table 4.2 Comparing Table .......................................................................................................... 45

vi
CONTENTS

DECLARATION............................................................................................................................ i

ABSTRACT ................................................................................................................................... ii

ACKNOWLEDGEMENT ........................................................................................................... iii

LIST OF FIGURES ..................................................................................................................... iv

LIST OF TABLES ....................................................................................................................... vi

1. INTRODUCTION ................................................................................................................. 1

1.1 Background ..................................................................................................................... 1

1.2 Problem Statement ......................................................................................................... 1

1.3 Objectives ........................................................................................................................ 2

1.4 Organization of Thesis ................................................................................................... 2

2 LITERATURE REVIEW ..................................................................................................... 3

2.1 Methods and Components ............................................................................................. 3

2.1.1 Power Switching Hub Technology ........................................................................ 3

2.1.2 Inverter with Rectifier Technology ....................................................................... 6

2.1.3 IOT base server and Monitoring Technology ...................................................... 8

3 METHODOLOGY .............................................................................................................. 14

3.1 Work Tree ..................................................................................................................... 14

3.2 Project Base work......................................................................................................... 14

3.2.1 Hardware based Simulation................................................................................. 14

3.2.2 Chosen Devices and Modules ............................................................................... 16

3.2.3 Measurement and Firebase uploading ................................................................ 18

3.3 Research ........................................................................................................................ 28

3.3.1 Field Visit ............................................................................................................... 28


3.3.2 Measurements and IOT Monitoring technical in research place ..................... 29

3.3.3 Simulation .............................................................................................................. 34

4 RESULTS & DISCUSSION ............................................................................................... 40

4.1 Results ........................................................................................................................... 40

4.1.1 Implementation Results ........................................................................................ 40

4.1.2 Research Outcomes ............................................................................................... 42

4.2 Discussion ...................................................................................................................... 45

4.2.1 Comparing IOT Monitoring Between My Project and Wind Power Plant .... 45

4.2.2 Issues ...................................................................................................................... 45

5 CONCLUSION .................................................................................................................... 50

REFERENCES ............................................................................................................................ [1]

APPENDIX A: Transmission Map............................................................................................... I

A.1: Power Plant Transmission Map of Sri Lanka ................................................................. I

APPENDIX B: Data Sheets .......................................................................................................... II

B.1: Datasheet_1 ACS712 ......................................................................................................... II

B.2: ACS712 Data sheet_2 ..................................................................................................... III

B.3: ZMPT101B Datasheet ..................................................................................................... III

B.4: NodeMCU ESP8266 Datasheet ...................................................................................... IV

APPENDIX C: Request Letters .................................................................................................. V

C.1: Request Letter to Lakvijaya............................................................................................ V

C.2: Request Letter to Puttalam Grid Sub Station ............................................................... V

APPENDIX D: Transformer Circuit and Equations .............................................................. VI

D.1: Transformer Circuit Diagram ....................................................................................... VI

D.2: Transformer Equations ................................................................................................. VII

APPENDIX E: Communication Diagrams of Wind Force .................................................. VIII


E.1: Communication of Wind Force ................................................................................... VIII

E.2: Network of Wind Force .................................................................................................. IX

APPENDIX F: IOT Monitoring of Wind Force........................................................................ X

F.1 IOT Monitoring of Wind Force ....................................................................................... X

PROJECT REPORT CERTIFICATION ................................................................................ XI


1. INTRODUCTION

1.1 Background
Today we need electrical power supply for our regular activities. The electricity comes from
electricity generating sources. Now we use many sources for preparing electricity. The power
sources make and transfer the electricity with generation and distribution power system.
Automatic operation is needed for electrical distribution power system. It works like an UPS
(Uninterrupted Power Supply). The power generation system gets reliable goals of system and
facilities from this method [1]. Because in the system the generator change one power source to
another power source during system working [1]. This conversion is based mainly on the power
value of distribution. The climate and weather also affect the operation. There is temperature in
the solar, wind speed in wind power and similar suitable environmental effects of another power
sources. The design of this transfer system is very important in overall of the power system design.

1.2 Problem Statement


The regular activities of people may get postponed or cancelled when the electrical power is
dropped electrical Power Supply. In the daily usage, voltage is 240V AC voltage. In our country
demand for electrical power is very high. Now in our country the specific areas get electricity from
separate power sources (Appendix A.1). The electricity does not go from all power plants to one
specific area. Therefore, if the specific power plant breaks down the specific place also faces
electricity problem. If we consider the whole country, similarly, these electricity issues affect all
areas in the country. Because the specific power plants supply the electricity for specific areas[2].
They do not supply current for all areas of the country. But we cannot connect all power plants. It
creates different problems in the distribution side. Because the distance is a problem and if we
provide the supply is controlled from one power plant; the efficiency of the source comes down.
In this case our automatic power system helps to solve these problems. We connect the all power
plants with one automatic control unit and supply from that unit [1]. This automatic system
switches the power sources base on the current, voltage and power differences. Not only these
differences but also the climate differences make this automation an uninterrupted power supply
(UPS).

1
1.3 Objectives
 Automation control unit with switch hub to switch power sources.
 Inverter and Rectifier prepares the current for supply, transfer and distribution.
 IOT system measures the required parameters from the system and update the server any
time.

1.4 Organization of Thesis

 Chapter 1 – Introduction – Introduction of the Project.


 Chapter 2 – Literature Review – The available technology of our project.
 Chapter 3 – Methodology- Work carried out by me.
 Chapter 4 – Results and Discussion – Results and Discussion of the project.
 Chapter 5- Conclusion – Outcomes and suggestions.

2
2 LITERATURE REVIEW

2.1 Methods and Components


In this section we discuss about the basic theory of components and available technical aspects of
our work. We focused this section on the main components of our system and relevant electronic
components. Such as microcontrollers.

Design is implemented using circuit design. After programming, we implement each unit of the
circuit. After that, the system is controlled through the programs and algorithms with improved
performance and functionality. This implementation works through three main parts.

1. Power Switching Hub


2. Invertor and Rectifier
3. IOT base server and Monitoring

2.1.1 Power Switching Hub Technology


In the essential case, this work is done in a lot of industries and home equipment. This works on
excessive grant voltage and low cost. Some of the electrical devices work ordinarily, using-
uninterrupted and continuously with electrical power supply for longer existence span. One-minute
interruption of the power line can affect the more electrical system. Many interruption and those
take place at any time like strength fail/cut off, faults etc. We can avoid these by our project. We
take four different power sources and create alteration to those using the microcontroller[3].

[Link] Four Different Power Sources:


The switch hub is needed to work this part. These four different power sources change their supply
with the microcontroller. Because in our project mainly we work on this part. In this part, these
power sources work like uninterrupted power supply. These sources are switched base on the
power, voltage and current values and other situations like weather, climate, etc. We can put any
power sources like these sources[3]. Example: Wind. Solar, Hydro and Coal.

[Link] Transformer:
In this system we should use step down transformer. The transformer need low power loss. This
transformer converts the high AC voltage 230V to low voltage AC voltage 12V. In the input size

3
the AC voltage 230V come from section varies 160V AC voltage from 270V AC voltage[4][5]. In
the transformer ratio if we use the following formula we assume the input primary side voltage as
VP and Secondary side voltage as VS. The given formula is,

𝑉𝑃 𝑁𝑃
= 1
𝑉𝑆 𝑁𝑆

The transformer delivers the voltage from 220V to 12V. In this scenario the number of coils are
NP and NS (220 and 12) respectively If we use the equation we should find the VS value. We
assumed the VP = 160V. Then voltage is changed from 160V to 270V (AC voltages).

From Equation 1;

160 220
=
𝑉𝑆 12

12
𝑉𝑆 = × 160 (𝑉)
220

𝑉𝑆 = 8.72𝑉

If assumed VS = 270V,

270 220
=
𝑉𝑆 12

𝑉𝑆 = 14.72𝑉

Therefore, it was the voltage regulator handles the current limitation since the stepdown
transformer stepdown the voltage is between 8V to 15V [4][5].

[Link] Voltage Regulator:


In this case we use Voltage Regulator LM7805 IC. This regulator filters the unregulated DC
voltage. It has three pins. They are, PIN1-Vin, PIN2-Ground (GND), PIN3- Vout. In our simulator
process we put the 5V to PIN3. The input DC is varying from 8V to 15V. The output voltage of
this regulator is 5V. This output voltage is a constant voltage. We can get the output voltage from
PIN3. In this regulator circuit we should put 10μF electrolytic capacitor. Because, this system
filters the noise generated from the circuit [4][5]. “STANDARD CONNECTIONS CONNECT
WITH TO THE MICROCONTROLLER” [4]. The terminal at all times have output constant

4
voltage from rectified power or battery terminal. Because the microcontroller controls the whole
circuit and must be powered. The regulator is constructed from two diodes 1N4001. It prevents
flow the current from alternating sources to the voltage regulator[6].

[Link] Relay Driver:


This family has eight NPN Darlington connected transformers. Arrays of this family are ideally
suited. It is interfacing between the digital circuitry of low level logic (Example: TTL, CMOS
and PMOS/NMOS) and high voltage and high current requirement of the printer hammers, relays
and lamps or other board range similar loads like industrial, computer and consumer applications.
In our work we use IC ULN2803 to work like a relay drive. This IC is designed to be compatible
with standard TTL families while the IC ULN2804 is optimized from 6V to 15V high level PMOS
or CMOS [6].

[Link] Relays:
These devices are electromechanical or solid state[6]. It works by responding to the signal. Such
as current, voltage, temperature, etc. The electromagnetic relays are working through the magnetic
field. This type of relays has two ways of operations. They are,
1. Operating Coil
2. Magnetic Switch
If the input pulse goes through the coil at that time the magnetic field makes electromagnet [6]. In
this situation the relays switches on [6]. Relays have output ports like normally open (NO) and
normally close (NC). The AC or DC excitations are available in the relays and voltage range of
the coil is from 5V to 230V [6].

[Link] Microcontrollers:
This is a computer on a single chip or an Integrated Circuit. It enables the user to write the program
into this. Generally, it is used to control the devices. We can store the program into the
microcontroller or store into the external chip. This type of chips is called Erasable Programmable
Read Only Memory (EPROM). The microprocessors are not the same as the microcontrollers.
The microcontrollers have small amount of power in computing, the memory is less and
attachment accessories are very little. The circuit designers are desirable. Because these are small
size. It has internal comparators and those comparators like OP-AMP comparator. These has a

5
crystal clock and running frequency of this crystal is 12MHz. This frequency is triggered faster of
the microcontroller. These take sending pules for the charge. Those pules enable the charging
circuit of battery. The interface of software application and the safe level of battery operational
level also tracking [6].

[Link] Sensors:
In the industrial the sensors play a vital part of making products intellectual and increase
exceptionally the automation system. This work detects, analyze, measure and process actives[7].
In our project mainly we do measure the values and operate the systems through those values. In
our project we want three main type of sensors. There are,

1. Voltage
2. Current
3. Temperature (If we want: Solar Source)
4. Speed (If we want: Wind Source)

2.1.2 Inverter with Rectifier Technology


This part of our project is in between the generation and the transmission. Because this converts
the current AC to DC and DC to AC. This helps to transmit the smooth current and voltage.
Therefore, from generation side the current and voltage not smooth. Because they have noise and
many more disturbing problems.

1. Bridge Rectifier
2. Filter Capacitor

[Link] Bridge Rectifier:


The part of AC to DC conversion we should do invert the negative cycle of the AC input. In this
process we are using the full wave rectifier diode bridge and this specific rectifier bridge is able to
handle peak voltage 20A and peak current 2A. In this simulation we are using 2W04G model[4][5].

In 220V case,

𝑉𝑆 = 12𝑉 (𝐼𝑛𝑝𝑢𝑡 𝑉𝑜𝑙𝑡𝑎𝑔𝑒)

𝑂𝑢𝑡𝑝𝑢𝑡 𝐷𝐶 𝑣𝑜𝑙𝑡𝑎𝑔𝑒 = 0.9𝑉𝑆 2

6
From Equation 2;

𝑂𝑢𝑡𝑝𝑢𝑡 𝐷𝐶 𝑣𝑜𝑙𝑡𝑎𝑔𝑒 = (0.9 × 12) = 1.8𝑉

This bridge rectifier delivers pulsating DC,

𝑉𝑟𝑚𝑠 2 3
𝑅𝑖𝑝𝑝𝑙𝑒 𝐹𝑎𝑐𝑡𝑜𝑟 = √( ) −1
𝑉𝐷𝐶

𝑃𝐷𝐶
𝐸𝑓𝑓𝑖𝑐𝑖𝑒𝑛𝑐𝑦 = × 100% 4
𝑃𝑟𝑚𝑠

From Equation 4;

10.8
𝐸𝑓𝑓𝑖𝑐𝑖𝑒𝑛𝑐𝑦 = × 100% = 90%
12

[Link] Filter Capacitor:


We need the capacitor because the capacitor value reduces the ripple of the voltage[4][5]. The
output voltage of the transformer is 12V with our general frequency 50Hz. We can calculate the
minimum value of capacitor for this formula,

𝐼𝑜𝑢𝑡 5
𝐶=
(2 × 𝑓 × 𝑅𝐹 × 𝑉𝑖𝑛 )

We assume the Iout = Imax = 1A. It is the maximum output current of the voltage regulator LM7805
IC [4][5].

From Equation 5;

1
𝐶= ≅ 1000𝜇𝐹
(2 × 50 × 0.66 × 12)

Therefore, the electrolytic capacitor values from 470μF to 1000μF for filter the output voltage
from the bridge rectifier [4][5].

7
2.1.3 IOT base server and Monitoring Technology
[Link] IOT
The IOT means “Internet of things”. Some people say the IOT is in the electronic project we are
making the internet facilities and monitor and control the data. But this explanation is not fully
correct. Because we do not need give internet for the devices. We can do in OFF line or ON line.
Therefore, we don’t need internet connection. In this system we are using the word “things”/”
Nodes”. This is in our laptop or PC or mobile phone or microcontroller. This needs three
capabilities Technologies are available[8]. Those are,

1. Data Acquisition:
We can send the data to the laptop or PC or mobile phone or microcontroller through the
any protocols. Those devices acquire the data. We can send the data using wire or wireless
or sensors but those devices know how to acquire the data. Below figure (Figure 2.1 Data
Acquisition of IOT) This system is called Data Acquisition System. They need not only
acquisition but also storing facility too [8].

Figure 2.1 Data Acquisition of IOT (Source: [Link] Ponnuswamy,


Basics of Internet of Things in Tamil - YouTube, 2018)

2. Data Processing:
This is the second main capability of these. The data processing mean we need to convert
the data to meaningful information which we have already finished acquisition and store.
We call theses as meaning less raw like data. The information is meaning full data. [8].

8
3. Data Communication System
This is our third main capability. This means after the meaningful data conversion how
can we take out those values and transmit. We can take out those value through wired or
wireless [8]. Some kind of IOT protocols technologies available which need our project
and research. They are,

 Ethernet
In this system we can connect a number of computer systems from local area
network with controlling the protocol to pass the information and avoid the
transmission of simultaneous by two system or more than two systems. The first
widely technology used LAN technology. This is cheaper and simpler than
token of ATM and LANs. The Ethernet interface card (NIC) is used to reduce
the duplication. This unique identifier is called MAC address. This MAC
address is 48-bit number comprises. In the 48-bit number the first 24-bits are
used to identify the manufacture and it’s called manufacture ID or
Organizational Unique Identifier (OUI). And this is assigned by registration
authority[9].

If we use Ethernet we can take out through many varies protocols. Below figure (Figure
2.2 Various Protocols of Ethernet) There are, [8]

 TCP/IP
 UDP
 POP 2
 HTTP

9
Figure 2.2 Various Protocols of Ethernet (Source: [Link]
Ponnuswamy, Basics of Internet of Things in Tamil -
YouTube, 2018)

 USB
This interface is representative of peripheral interface. The standard for the
Universal Serial Bus. This Serial Bus standard provides for connection of the
devices. But just as the set-top boxes this also use on other devices. Below figure
(Figure 2.3 Device Connection of USB) PDAs and game consoles[9].

Figure 2.3 Device Connection of USB (Source: Communication(Wired)


Protocols in IOT , Hardik Munjal Medium,2017 )

 Wi-Fi
It allows the internet while on the move. The computer sends and receives the data indoor
and outdoor when the Wi-Fi enabled in that computer. It has fast cable modem connection
too. Reference of IEEE802.11 communication standards is usually established in Local
Area Network (LAN). The wireless LAN uses for high frequency radio waves. Rather than
transmit and communicate the data. In the access point it connects wireless and wired

10
networks and enable sending and receiving between the wireless clients and wired network.
Wireless SSID also known as “Network Name” is service set of the identification controls
access to the given network. In the OSI Model we can see in the below image. The Wi-Fi
belongs to both Layer1 (Physical Layer) and Layer2 (Data Link layer) [10].

[Link] IOT Cloud Server Technology


In our project IOT needs two function in the IOT. In the IOT these functions are developed by the
cloud[11]. Those functions are,

i. Sensor networks
The clouds are providing a new opportunity for collecting the data from the sensors.
Because we the privacy and security issues. The benefits of the IOT are amplified by the
sensor networks. This allow the users to measure, infer and understand delicate indicators
in the environment. In timely processing of the large amount of sensor data has major
challenges[11].

ii. Communication and network protocols


The IOT and cloud allow the machine to machine communications with many different
types of the devices that have various protocols. Managing the variation is tough since
majority of the application areas don’t involve the mobility. Now the Bluetooth and Wi-Fi
are using for the stop-gap solution to facilitate mobility for the certain extent[11].

[Link] IOT Cloud server data base available Technology


In the IOT cloud server data base. We should do the real time database. In the real time database,
the data is updated every time. The IOT system has many types of readymade free cloud severs
available in the market. In the industries the company makes the tailor made special purpose cloud
severs. In our normal purpose we use the main two type of cloud servers. Those are,

i. Firebase
ii. Adafruit IO

11
[Link] Firebase
The firebase is a frame work. It is useful for building the web applications in the business or
industrial fields. This requires the real time database updating. When the user updates the values
or the sensors get the new updated values from the analog side. The updates should have conveyed
for every single user in the industry. This give the unified and basic platform for many applications
with host of other google features packed with the service. It handles most of service side work
when the firebase data comes to development of applications. The numerous elements make the
firebase an essential tool in the development from point of view if the developer. This way it helps
to maintain the state of harmony between developer and client causing a maximum delay of work.
In this case development of the communication or application of the chat the more essential
components and services are offered by the firebase[12]. The work done through the firebase two
types in my project.

i. Real-time Database
This is a database of cloud hosted. Data store in the JSON and continuously synchronized
for each associated client. The cross plat from application develop with the IOS, Android
and JavaScript SDKs. The greater part of the user is demand. The demand is based on
instant of the real time database. This instant updates each new data. These features allow
the developers to skip step of the database. And this handles mostly backend of the
applications. It gives adaptable, expression based rules of languages to define the data
which should organized and when the information can peruse from or composed[12].

ii. Storage
The storage of the firebase is designed by the application developers. They need to store
and serve the user generate content. Example: Photos or other files. This gives the secure
document download and transfer for the applications in the firebase, network quality is
regardless. The storage of the firebase is upheld by the Google cloud storage. The capable,
basic and cost effective object of the storage service[12].

[Link] Adafruit IO
This is the system of making the data for useful and easy to use for allowing the connections of
data with the programming. Which is required for our work. IO include the libraries of the client

12
are warped our MQTT APIs and REST. In this system we should use requirement module
ESP8266 NodeMCU. This platform is an open source platform. This control module include the
firmware runs with the ESP8266 Wi-Fi. The module has wireless interface GPIO hardware
functionality. This Adafruit IO is the website of providing the cloud server[13]. It can,

a) Collect the data.


b) Display the data in the real time, online.
c) We can get access to any data stored anywhere across the globe.
d) Make our project connected with internet.
e) Connect our project with other devices which enable the internet.

Go to the [Link] we can access the cloud service. If we get this server, we can
create the account and use that. We can create the account click on the Get start for the free tab
[14].

13
3 METHODOLOGY
I wish to explain the work load of my work in this methodology section. This is my firsthand
experience. Here I have used to ways. Figure 3.1 shows Work Tree.
1. Project Base
2. Research Base

3.1 Work Tree

My Work

Research
Project Base
Base

Hardware based Technical


simulation Simulation Simulation
Research

Get from
Field Visit
Sources

Figure 3.1 Work Tree

3.2 Project Base work


In the project I did two parts. Those parts are,
1. Hard ware based simulation
2. Simulation

3.2.1 Hardware based Simulation


In this hardware based simulation I made the small IOT system monitoring simulation using the
hardware and software. In this part I got the measurements of current, voltage from the source
through the sensors using the microcontroller and uploaded those to the real time database of the
cloud server and sent those values to the monitoring device (Laptop/PC). Figure 3.2 shows Overall
diagram of my part). In the monitoring device I created the google sheet and updated the real time
values in the google sheet. Here I calculated the power using the current value and voltage value
through the power equation.

14
Figure 3.2 Overall diagram of my part

In the input sides I used the AC current sensor ACS712 (50A) and AC voltage sensor zmpt101b
(250V). The processing part I put the microcontroller like NodeMCU ESP8266. The output came
to cloud server through the internet Wi-Fi router protocol. The microcontroller has ESP8266 Wi-
Fi module. Therefore, the Wi-Fi module connects with the Wi-Fi router and sends the output to
the cloud server through the Wi-Fi router. After the cloud has sent the update values of the real
time data base to the google sheet we can monitor that in our laptop or PC. The cloud server part
I used in the firebase cloud server. In the circuit I connected the current sensor series with the
circuit and I connected the voltage sensor connected parallel with the circuit. Figure 3.3 shows AC
voltage sensor and AC current sensor Circuit.

Figure 3.3 AC voltage sensor and AC current sensor Circuit (Source: Khalid Mohsin,
AC- Voltage & Current Sensors with Arduino Power Circuit, 2018)

15
3.2.2 Chosen Devices and Modules
[Link] Current sensor ACS712 Module
In the current measuring part, I used the current sensor ACS712. Figure 3.4 shows Current sensor
ACS712. I used this sensor module ACS712ELCTR-05B-T. Because in this case I used the house
using load. On that scenario the load has small current value. Example the normal house using
bulb has 30mA. In the ACS712 has three type based by the limited current range. Table 3.1 shows
Optimal Range with Rating.

Figure 3.4 Current sensor ACS712 (Source: Thesolaruniverse, Measuring


Grid Power Consumption with an ACS712 Hall effect sensor connected
to an Arduino, 2019)

Table 3.1 Optimal Range with Rating (Source: ALLEGRO Microsystems, ACS712-DS, Rev. 19
MCO-0000197, 2020)

Part Number Optimize Range (A)


ACS712ELCTR-05B-T ±5
ACS712ELCTR-20A-T ±20
ACS712ELCTR-30A-T ±30

It has some Features and Benefits. They are,


 Analog signal path has low noise.
 Bandwidth of device set via as new filter pin.
 The rise time of response to step the input current is 5μs.
 Bandwidth is 80kHz.
 In T=250C room temperature.
 Low profile SOIC8 package and footprint is small.
 Resistance of internal resistance is 1.2mΩ.

16
 Pin 1-4 and Pin 5-8 minimum isolation voltage is Vrms = 12kV.
 Single supply operation is 5V.
 Output sensitivity 66mV/A to 185mV/A.
 Factory trimmed for the accuracy.
 Output offset voltage is stable.
 Magnetic hysteresis is 0.
 Ratio metric output from supply voltage.

All data referred from Appendix B.1 and Appendix B.2

[Link] Voltage sensor Module


In the voltage measuring part I used voltage measuring AC voltage sensor zmpt101b. Figure 3.5
shows AC Voltage Sensor zmpt101b. It has most of the specifications. This sensor has on board
micro precision voltage transformer inside the module. Therefore, the high voltage is reduced by
the step down transformer. The operating current of this module is 2mA. Therefore, we can operate
this module in small value of the current because in our house hold the current value is mA value.

Figure 3.5 AC Voltage Sensor zmpt101b (Source: A to Z


[Link], AC voltage sensor module zmpt101b 250V voltage
transformer module Arduino, 2018)

Features of the voltage zmpt101b sensor are,

 Analog signal of output is 0-5V.


 Operating voltage is 5-30V DC.
 Measure with in 250V AC.
 We can adjust the analog corresponding quality.

17
 It is a good consistency for the voltage and power measurement.
 Active output is single phase AC voltage.

All data referred from Appendix B.3

[Link] NodeMCU-ESP8266

Figure 3.6 NodeMCU ESP8266 (Source: Electrstore, NodeMCU


microcontroller board with ESP8266 and Lua, 2018)

In this project part I used this microcontroller. Figure 3.6 shows NodeMCU ESP8266. This
microcontroller has many features those are,

 It has onboard Wi-Fi module ESP8266.


 80MHz clock speed.
 Input voltage is 7-12 V.
 SRAM is 64kB.
 Operating voltage is 3.3V.
 Flash Memory 4 MB.
 USB-TTL based on CP2102 is included onboard, Enabling Plug n Play.
 Can do the coding in the Arduino IDE.

All data referred from Appendix B.4

3.2.3 Measurement and Firebase uploading


[Link] Voltage measuring
The zmpt101b I measured the voltage using the transformer logic. I downloaded the filter library
first therefore coding of our logic inside this library. In this time, I am explaining the mathematical

18
logic. First I measured the voltage of load using multi meter and took the input voltage value (Vin).
Figure 3.7 shows zmpt101b transformer circuit.

Figure 3.7 zmpt101b transformer circuit

R1 – Limiting Resistor, R2 – Sampling Resister

I calculated the value of R1 and R2 the NodeMCU is a unipolar ADC range is (0-3.3V)
therefore,

𝑃𝑒𝑎𝑘 𝑉𝑜𝑙𝑡𝑎𝑔𝑒
𝑉𝑜𝑢𝑡_𝑚𝑎𝑥 = 6
2√2

From Equation 6;

3.3𝑉
𝑉𝑜𝑢𝑡_𝑚𝑎𝑥 = = 1.17𝑉
2√2

The current limiting resister R1,

𝑉𝑖𝑛
𝑅1 = 7
𝐼

The rated current if the ZMPT101b is 1mA to 2mA. If we get rated value of input voltage ≤100V
the operating current usually choosing 2mA. But input voltage ≥ 220V reducing the power of
resister usually choose the operating current 1mA ≤ I ≤ 2mA. My input voltage of the load voltage
is 220V. This is the maximum voltage across the load. Therefore, I choose I = 1.1mA.

19
From Equation 7;

220
𝑅1 = = 20𝑘
0.011

Reason to select the current limiting factor is to improve the reliability usually it is greater than
the 4 times rated power and high temperature coefficient metal film resistor. Next I calculated the
Sampling resister R2. The general equation of this transformer is follow as,

𝑅2
𝑉𝑜𝑢𝑡 = 𝑉𝑖𝑛 × 8
𝑅1

Therefore, from equation 8;

𝑉𝑜𝑢𝑡_𝑚𝑎𝑥 1.17𝑉
𝑅2 = × 𝑅1 = × 20𝑘 = 0.106𝑘
𝑉𝑖𝑛 220𝑉

Next the measurement part of the NodeMCU microcontroller. In this case the NodeMCU has 10bit
ADC resolution. The maximum resolution value of 10 bit is 1023. Table 3.2 shows Resolution
Table of 10bits.

Table 3.2 Resolution Table of 10bits

Bit Number (N) Bit Value (0/1) All bits Decimal value (2N)
Activated
0 1 1
1 1 2
2 1 4
3 1 8
4 1 16
5 1 32
6 1 64
7 1 128
8 1 256
9 1 512
Total Maximum Resolution 1023

20
𝑅𝑒𝑠𝑜𝑙𝑢𝑡𝑖𝑜𝑛 𝑜𝑓 𝑉𝑜𝑙𝑡𝑎𝑔𝑒 𝐴𝐷𝐶 𝑅𝑒𝑎𝑑𝑖𝑛𝑔
= 9
𝑅𝑒𝑓𝑒𝑟𝑒𝑛𝑐𝑒 𝑉𝑜𝑙𝑡𝑎𝑔𝑒 𝑉𝑜𝑙𝑡𝑎𝑔𝑒 𝑀𝑒𝑎𝑠𝑢𝑟𝑒𝑑

From Equation 9;

1023 𝐴𝐷𝐶 𝑅𝑒𝑎𝑑𝑖𝑛𝑔


=
3.3𝑉 𝑉𝑜𝑙𝑡𝑎𝑔𝑒 𝑀𝑒𝑎𝑠𝑢𝑟𝑒𝑑

In this case I got the ADC reading using the coding.

𝑅
After using the above equation we can find the measured voltage after 𝑉𝑜𝑢𝑡 = 𝑉𝑖𝑛 × 𝑅2 in this
1

equation (equation 8) I knew the values of the R1 , R2 and Vout (Vout = Voltage Measured)
therefore I can calculate the Vin (Input Voltage).

In the coding the “sigma ()” function is calling the calculation from the library. Here, I adjusted
the potentiometer and set the calibration with control the signal amplification. And set the
monitoring value equal for the multi meter measured value.

These are the important part of the calibration in the coding. I used the window length = (100/test
Frequency). If I measured the multi meter value 220V. At that time the slope = (220/calibrated
value). If I put the new slope to the code the I can discard the non-calibrated value.

21
[Link] Current Measuring
In the current measuring part, I didn’t use the library. I did my main coding using the main
equation. The current sensor has sensitivity the sensitivity is units of (mV/A).

Figure 3.8 Circuit Diagram of ACS712 (Source: ALLEGRO


Microsystems, ACS712-DS, Rev. 19 MCO-0000197, 2020)

In this diagram R1 + R2 = sensitivity (mV/A) Figure 3.8 shows Circuit Diagram of ACS712. I
measured the current by dividing the Vrms voltage by the sensitivity. I got the Vrms going through
the equation. This is a unipolar. Therefore,

𝑃𝑒𝑎𝑘 𝑉𝑜𝑙𝑡𝑎𝑔𝑒
𝑉𝑟𝑚𝑠 = 10
2√2

𝑉𝑟𝑚𝑠
𝐼𝑟𝑚𝑠 =
𝑠𝑒𝑛𝑠𝑖𝑡𝑖𝑣𝑖𝑡𝑦 (𝑚𝑉 × 𝐴) 11

In the diagram the Peak Voltage is Vout. That value is sine wave therefore, I got the maximum
value and minimum value.

22
After calculating the value between minimum value and maximum value, I used resolution
equation (Equation 2). And found the Peak value.

After going through the above last equations Vrms and Irms and Found the Current value Irms.

[Link] Uploading the values to Firebase


First I created my own database account in the firebase. I went to the firebase site therefore, click
on the [Link] link and

 1st I clicked in the Get started button. And next clicked the Add project. After gave the
project name and clicked continue.
 After creating my project clicked the Real-time Database and set the output values.
 Next I went to the project setting and clicked in the Service Account. After that I clicked
Database secret and copied secret code. Figure 3.10 shows Firebase Secret Code.

23
 Then I copied and came back to the Real-Time database and copied the URL of the project
host. Figure 3.9 shows Firebase Host URL.

Figure 3.9 Firebase Host URL


Figure 3.10 Firebase Secret Code

Above images show the steps of the account settings of the firebase. Next I uploaded the current
value and the voltage value to the firebase server. In this part I used the coding and created the
Firebase function in the coding and I uploaded the real time values to the firebase. The firebase
gets only string value. Therefore, I converted my output reading values to string values using the
function in my coding.

I need to connect to the NodeMCU ESP8266 with the firebase through the internet of the Wi-Fi
router. Therefore, I defined the details of the Wi-Fi router and firebase server in the coding. Earlier
I included the firebase library and ESP8266 library in my coding. The important details which I
need are,

 URL of the firebase host


 Secret code of the firebase database
 SSID of the Wi-Fi Router

24
 Password of the Wi-Fi Router

This coding includes the libraries and define the details of the firebase and Wi-Fi router. This
coding is the basic begging part of the firebase. I should put correct details in this part of the code.
Else we can’t connect with the firebase. The URL also should be as mentioned early.

This coding is important to the firebase uploading function of the coding. Send the details of the
firebase because I should identify the correct firebase server in the web. After I set the correct path
of the output. This code is in the current measurement. In the voltage measurement same coding
technical is used.

[Link] Google Sheet Monitoring


I uploaded the Real-Time database to the google sheet using the java script coding. I made that
coding in the terminal of the google sheet. This work is not long. This is made by a few short steps.

 First I crated the google sheet.


 Next I opened the terminal in the google sheet.
 Then I typed the coding in the terminal and run.
 Finally, I saw the monitoring value in google sheet.

In the coding I took the values from the firebase real time database and put the values in the
suitable cells and calculate the power value using the current and voltage. The calculation is also
done in the coding.

25
This is coding get the values from the firebase to google sheet. In this part of the coding only
voltage value is seen. The set value of the voltage is fact.

The current value also was taken similar to this way but the last part of the cell addressing is only
different from the voltage part. Then I calculated the power value using the current value and
voltage value. The set value of the current is fact1.

The power measured the equation is Power = Current × Voltage. Therefore, in the coding I used
power = fact × fact1. The power value is set as power. In the equation I used the variable “var

26
power”. Then I put the power value in the C2 cell in the google sheet. Table 3.3 shows Purpose
Data of Variables.

At this time the old value should be deleted when the updating new values. This part I did in the
coding. And in between deleting and updating time I put small sleeping time delay. I put 5 seconds

for the sleeping time. On that sleeping time is useful for us. Because we can see the change in the
google sheet monitoring clearly. Else we can’t see the changing without the sleeping time delay.
Because I should show the output updates time to time. The values are updated each 3 seconds
and sleep 5seconds delay.

Table 3.3Purpose Data of Variables

Variables Purpose of Data


fact Set value which is the result of Current
fact 1 Set value which is the result of Voltage
power Set value which is the result of Power
sheet Set value address of the google sheet location

27
3.3 Research
I got some information and went on the field visit and collected the technical details from the
sources. I have explained is shortly in my work tree. After that I did small prototype simulation
about my research.

3.3.1 Field Visit


In the field visit I decided to go to three locations in our district. The three locations are,

1. Seguwantivu and Vidatamunai Wind Power Plant


2. Lakvijaya Power station (Coal Power Plant Nuraicholai)
3. Puttalam Grid substation Kaladiya

In the Wind Power Plant, they gave the information of technical part of my research part. Because
that is my training place and that’s a private place. But in the Lakvijaya coal power plant and
Puttalam grid substation. They asked for letter of my project coordinator. Those letters are in
Appendix C.1 and Appendix C.2. I got two request letters from my project coordinator and sent
them through the fax. But they didn’t send information. When I asked about this problem they said
in this situation the out siders are not allowed into the plant. Therefore, they couldn’t give the
information. They stickily told according to the government rules and regulations they can’t share
the information through the emails or other communication medias. Because they have lot of
formalities in the information sharing. They couldn’t allow the field visit. Therefore, they didn’t
give the information to me.

[Link] Works at Research location


The location of my research is Seguwantivu and Vidatamunai Wind Power Plant. Figure 3.11
shows Research location. First I visited the plant and told about my research details to the plant
engineer and plant manager. They asked why I needed the details. I told my part of the IOT base
monitoring and measurement technical. They gave the pdf documents about the measurement part
and the IOT part in the power plant. They explained that information. They gave some kind of the
books from “Gamesha” private limited. They gave a lot of information in this source. They
allowed me to take the photos of the parts which I need. Finally, I got information through study
the documents they gave and searched for some information through the internet and research
papers.

28
Figure 3.11 Research location (Source: Google Maps,
Seguwantivu & Vidathamunai Wind power Plant Wind force,
2018)

3.3.2 Measurements and IOT Monitoring technical in research place


In the location of my research they have the different measurement technical. In my project part I
used the current sensor and voltage sensor for measuring the current value and voltage value across
the load. But in this industrial they are using transformer system. They are using the current
transformer (CT) for measuring the current value and use the voltage transformer (VT) or Potential
transformer (PT) for measuring the voltage.

[Link] Current Measurement


In this measurement they are using the current transformer (CT). Figure 3.12 shows Current
Transformer Operation. This current transformer is reducing the high value of the current and
isolating the high value of the voltage between the conductors of the electrical power system in
the output side of each wind turbine towers.

29
Figure 3.12 Current Transformer Operation (Control Automation,
Electrical Power Measurement and Control Systems, 2015)

In this transformer they are using conductor like a primary circuit and the measuring circuit like a
secondary circuit. This transformer work through the calculation. The calculation of the working
principle of the current transformer is,

𝑁𝑃 𝐼𝑆
= 12
𝑁𝑆 𝐼𝑃

Is – Primary current (Current of conductor)


Ip – Secondary current (Current of measuring side)
Np – Number of turns in primary side
Ns – Number of turns in secondary side

30
Figure 3.13 Current Transformer of Wind force (Source: Aerogenerador AE-5X,
Convertidor de Potencia, 2009)

In this circuit diagram the current transformer is shown as the 6T1. Figure 3.13 shows Current
Transformer of Wind force). The mutual inductance (M) = 1.3mH. and the rating current is 462A.
Therefore, the current value of the Ip = 462A. Above figure (Figure 3.13 Current Transformer of
Wind force). The mutual induction came from (Equation 12) the Ls and the Lp are secondary
inductance and primary inductance.

𝑀 = √𝐿𝑆 × 𝐿𝑃 12

Therefore, we can write the equation from the transformer equations

𝑉𝑃 𝐼𝑆 𝑁𝑃 𝐿𝑃
= = = √ = 𝑇𝑢𝑟𝑛𝑠 𝑅𝑎𝑡𝑖𝑜 13
𝑉𝑆 𝐼𝑃 𝑁𝑆 𝐿𝑆

Equations referred from Appendix D.1 and Appendix D.2

𝐼𝑆 𝑁𝑃 𝐿𝑃
𝑀 = √𝐿𝑆 × 𝐿𝑃 and = =√ After we can make the equations and Ls (From
𝐼𝑃 𝑁𝑆 𝐿𝑆
Equations 12 and 13).
𝐼 2 𝐿𝑃
(𝐼 𝑠 ) = 𝑀2 = 𝐿𝑆 × 𝐿𝑃 = 1.3𝑚𝐻 × 1.3𝑚𝐻 = 1.69𝑀𝐻 2 .
𝑃 𝐿𝑆

31
[Link] Voltage Measurements
This measurement they are using the voltage transformer or potential transformer. These
transformers reduce the voltages from high phase voltages and high voltages to low voltages. The
voltage of output side of each turbine is measuring using this kind of technology. Figure 3.14
shows Potential Transformer Operation.

Figure 3.14 Potential Transformer Operation (Control Automation,


Electrical Power Measurement and Control Systems, 2015)

The primary side is connecting the conductor to the ground and the primary winding is connecting
series with that line. The primary side winding is greater than the secondary side winding.
Therefore, the transformer is reducing the bigger voltage and sending the measurement side of the
system. Basically this transformer is working like,

𝑉𝑃 𝑁𝑃
= (𝑁𝑃 ≥ 𝑁𝑆 ) 14
𝑉𝑆 𝑁𝑆
Vs – Primary voltage (voltage of conductor to earth)
Vp – Secondary voltage (voltage of measuring side)
Np – Number of turns in primary side
Ns – Number of turns in secondary side

32
Figure 3.15 Potential Transformer of Wind force (Source: Aerogenerador AE-5X, Convertidor
de Potencia, 2009)
In this diagram the 7T1 is a voltage transformer which is used in the Wind Power Plant. Figure
3.15 shows Potential Transformer of Wind force. This image shows the full module of the voltage
measuring part. SEUENCIA DE FASES processing module used for getting the signal. This
module powered by TARJETA CPU to supply the power to the module. In this transformer
converts the 1000V to (400V – 230V). Figure 3.15 shows Potential Transformer of Wind force.
Because the output voltage of each turbine 1000V after they are step up using the step up
transformer. The rating power of the transformer is 4kVA. Therefore, the rating current of the
transformer is,

𝑃𝑅𝑎𝑡𝑒
𝐼𝑅𝑎𝑡𝑒 = 15
𝑉𝑅𝑎𝑡𝑒

From Equation 15;

4𝑘𝑉𝐴
𝐼𝑅𝑎𝑡𝑒 = = 4𝐴
1000𝑉

[Link] IOT base Monitoring


In this plant they are using the Ethernet protocol to create the IOT network. In the Ethernet they
are using the optical fiber cable. They are using this technology to measure the values from each
wind turbine tower. The communication network topology of using in this plat like RING
topology. They have 13 turbines in each two sides. All machines have point to point connection
between each rings and the controlling center. Below image shows the ring connection of the

33
power plant. RING 1 and RING 2 are each sides of Seguwantivu and Vidatamunai (Appendix
E.2). The SET/CDC is a control unit of the plant. In the monitoring side they are using the
readymade cloud server (Appendix E.1). The server made by Gamesha Private limited.

The PLC microcontroller is used in all technologies. In this plant they told that we can’t see the
PLC programming. Because in the readymade control system we can’t change the program and
we can’t see the programming part in the PLC SCADA system. But basically I told them they are
getting the analog reading from the signal and convert it to the digital and monitor the value with
some kind if calculations. But they can calibrate the signal using the special purpose software. But
we cannot change the program. Figure 3.16 shows Calibration Software.

Figure 3.16 Calibration Software

3.3.3 Simulation
I did the small simulation in the Proteus software. This is not an actual correct reading. This is like
a prototype example of my research. I am explaining my research work through the simulation.
Mainly I am explaining the working principle of the transformers CT and PT with circuits. In the
industrial power plant, they are using the PLC module. But I didn’t have the original simulator or
hardware module of the PLC. My simulation software also didn’t have the PLC module. Therefore,
I used the Arduino UNO. Figure 3.17 shows Simulation Diagram. Because I can make the
simulation through an easy way.

34
Figure 3.17 Simulation Diagram

I connected the CT transformer series with the load. Figure 3.19 shows CT circuit. I connected the
PT parallel with the load circuit. Figure 3.18 shows PT Circuit. I connected that load line and
ground.

Figure 3.18 PT Circuit


Figure 3.19 CT circuit

Figure 3.21 CT Configuration Figure 3.20 PT Configuration

35
If we go through the transformer equations, we can see the difference between the Lp – Primary
inductions and Ls – secondary inductance. In the CT 𝐿𝑃 ≤ 𝐿𝑆 Figure 3.21 shows CT
Configuration. In in the PT 𝐿𝑆 ≤ 𝐿𝑃 . Figure 3.20 shows PT Configuration.

Figure 3.22 Full Wave Rectifier with smoothing


Capacitor (Electronic Tutorial, Full Wave Rectifier,
2020)

I used the two diode full wave bridge rectifier circuits with the two transformers. Because I should
convert the AC voltage to DC voltage in each transformer. Our microcontroller need only DC
voltage. In here, I used the smoothing capacitor. Because the smoothing capacitor is reducing the
voltage drop of the wave form and increase the output level of the DC voltage. In this case I used
the 1000μF capacitor. Because the large value capacitor is reducing the voltage drop perfectly and
at that time we can get the value of low error. But we can’t see the sudden changes in the reading.
If we use the small value of the capacitor we can see the sudden changes of the reading but we
can’t get the error less value. Example If we use the capacitors 5μF and 50μF.

36
In the 5μF the wave is as follows. Figure 3.23 shows Wave Form 5μF.

Figure 3.23 Wave Form 5μF (Electronic Tutorial, Full Wave Rectifier,
2020)

In the 50μF case the wave is as follows. Figure 3.24 shows Wave Form 50μF.

Figure 3.24 Wave Form 50μF (Electronic Tutorial, Full Wave Rectifier, 2020)

37
Therefore, I used the 1000μF capacitor in the circuit. In the current transformer if I reduce the
current value at that time voltage value is going to increase because, in the transformer theory is
𝑉𝑆 𝛼 𝐼𝑆 . Therefore, in this case I used the voltage divider method and took the voltage value
between (0V to 5V). First I measured the output voltage value using the DC voltage meter in the
Proteus and used the voltage divider equation. Figure 3.25 shows Voltage Divider Circuit.

Figure 3.25 Voltage Divider


Circuit

𝑅2
𝑉𝑜𝑢𝑡 = × 𝑉𝑖𝑛 16
𝑅1 + 𝑅2
I assumed 𝑅3 = 1𝑘 and the measured voltage 𝑉𝑖𝑛 = 603𝑉 and need voltage 𝑉𝑖𝑛 = 5𝑉 therefore,
from the calculations the value of the 𝑅2 = 8.4𝛺 but the resistor value of the marketing near value
of the 8.4Ω is 8.1Ω. Therefore, I used the value of the R2 is 8.1Ω. and took the current value used
V=I×R equation. I knew the R value and the V value therefore, I can calculate the current value
“I” using the coding.

38
Figure 3.26 Potentiometer

Similarly, in the voltage transformer PT I used the small potentiometer with various resistor values
and I can adjust and change the calibration with the voltage values and the current values. Figure
3.26 shows Potentiometer. In the coding side I set the analog reading and convert the digital
reading. I used the Equation 9.

This is a coding of changing the Analog reading and change the digital reading. In the ARDUINO
board the maximum reference voltage of the input is 5V. and the ARDUINO board has 10bit
resolution. Therefore, the resolution voltage is 1023. In the output side of the voltage transformer
I put the only this equation because we don’t need the current value. This is the example simulation
Therefore; I did this code simply.

39
4 RESULTS & DISCUSSION
4.1 Results
In the result part I am explaining the result of my project part and research parts. After in the
discussion I am explaining the compartments, technical, issues and failures.

4.1.1 Implementation Results


In this part I am showing the result values of the hardware part. The output values of the hardware
part come in the firebase server and the google sheet. The google sheet has current, voltage and
power. But the firebase server has only voltage value and the power value. The below images show
the results from the firebase and google sheet When the load and the source of the hardware part
ON and OFF conditions. Figure 4.1 shows Firebase Reading in OFF condition, Figure 4.2 shows
Firebase Reading in ON condition, Figure 4.3 shows Google Sheet Reading in OFF condition and
Figure 4.4 shows Google Sheet Reading in ON condition. The current, voltage and power values
change with the ON and OFF conditions of the hardware part.

Figure 4.1 Firebase Reading in OFF condition

40
Figure 4.2 Firebase Reading in ON condition

Figure 4.3 Google Sheet Reading in OFF condition

41
Figure 4.4 Google Sheet Reading in ON condition

4.1.2 Research Outcomes


[Link] Field Work
In this part I am showing the result of the IOT monitoring in the field visit and My simulation part
of the research. In the wind power they are using same kind of monitoring which is the above
google sheet images. But they are monitoring only active power values of the electrical part.
Another reading is not related to my research. Figure 4.5 shows Monitoring in Wind Power.

42
Figure 4.5 IOT Monitoring in Wind Power

Clear Image of IOT of wind force in Appendix F.1

The readings are,

 Active Power (kW)


 Pitch Angle (Ɵ0)
 Wind Speed (m/s)
 Generator Speed (r.p.m)
 Error
 Alarm
 PLC

43
[Link] Simulation
I did this simulation to show and explain my research work in the field visit. This simulation shows
the technique of the current measurement and the voltage measurement. In this simulation I got a
small output value with the various input values. I got some ADC values with the different three
voltage values. And I calculated the ratio between the input values and ADC values. Figure 4.6
shows Simulation Monitoring and Table 4.1 shows Reading observation in Simulation.

Figure 4.6 Simulation Monitoring

Table 4.1 Reading observation in Simulation

Input Voltages ADC Voltage Ratio (y/x) Input Current ADC current Ratio (y/x)
(y) (x) (y) (x)
100V 1.97V 50.76 3.20 A 0.27A 11.85
200V 4.96V 40.32 6.37A 0.54A 11.796
240V 5.0V 48 7.65A 0.61A 12.54

44
After some time, the ADC voltage came 5.0V because in the ARDUINO board can’t measure the
DC voltage value larger than 5V. At that time, I adjusted the potential meter and change the input
AC voltage value of the ARDUINO.

4.2 Discussion
4.2.1 Comparing IOT Monitoring Between My Project and Wind Power Plant
The Table 4.2 shows Comparing Table

Table 4.2 Comparing Table

Technical works My Project Wind Power Plant


Microcontroller Nodemcu ESP8266 PLC (SCADA)
IOT Protocol Wi-Fi (Wireless) Ethernet Fiber Optical (Wired)
Power calculation P = V × I (Single Phase ) P = √3 ×V×I×cos Ɵ (3 phase)
Electrical Reading in Current, Voltage and Power Active power only
Monitor
Voltage measurement AC voltage sensor zmpt101b Potential Transformer
Current Measurement AC current sensor ACS712 Current Transformer

Note: In the power calculation of the wind power plant the power factor (PF) = cos Ɵ = 0.9 but
they are assuming the PF value cos Ɵ ≈ 1.

4.2.2 Issues
[Link] Issues in voltage measurement
In the method of using the voltage sensor zmpt101b, it plots the peak value of the sine wave of the
AC voltage. It should plot the Maximum value of the AC voltage sine wave for each and every
time. At that time the voltage value became stable value. In this project I am using the firebase
function in the coding. Then the firebase function is delayed to upload the value and convert the
string value. Therefore, the program was delayed to plot the correct maximum point each time.
Therefore, in my voltage measurement with the firebase function the voltages not stable. The
values are changing with in a small range. In this case the values are changing time to time and
does not come stable.

45
In this coding the firebase is making 50 second delay. Therefore, the voltage value is not stable it
is undergoing a small range of change. I can’t remove the delay because that delay is very
important to connect for the firebase to connect to the Nodemcu ESP8266 through the Wi-Fi router.
The delay is like a preoperational delay of stop and wait method.

[Link] Issues of the current measurement


In the current measurement side, the current sensor ACS712 is in the current range is 5A. Because
some time if I put some loads which has small mA current value can’t see the changes of the
current value.

[Link] Microcontroller Issue


In the NodeMCU has only one analog pin in that case I can’t give the voltage and current inputs
in the same NodeMCU microcontroller. Therefore, I used two separate NodeMCU
microcontrollers for each measurement.

[Link] Simulation Issue


In my simulation part of my research I got the input AC value in the LCD display I am using the
small calculation with the ratio of the Inputs and ADC readings. In this method I used the
mathematical theory of the coordinating geometry. I used the ideal situation of an equation is
46
y = mx. The y is the input value and x is the ADC reading value and the m is a ratio. Therefore, I
multiplied the ADC reading with ratio and got the previous input AC values on the LCD display.

This coding shows the converting of the ADC value to AC value use the ratio. But in the practical
situation we can’t use the y = mx equation. Figure 4.8 shows Ideal Condition. because in my
simulation circuit the voltage is dropping across the diode bridge. Therefore, the equation becomes
y = mx + c. Figure 4.7 shows Practical Condition. In the practical case the voltage drops of the
diode bridge like 0.7V. This is a small value to compare the voltage values. Therefore, I avoided
the voltage drop. If we consider the voltage drop, we should take the three equations of y = mx +
c. We should take y1, y2and y3 AC voltages and x1, x2 and x3 ADC readings.

Figure 4.8 Ideal Condition Figure 4.7 Practical Condition

47
𝑦1 = 𝑚𝑥1 + 𝑐 1

𝑦2 = 𝑚𝑥2 + 𝑐 2
1
𝑦3 = 𝑚𝑥3 + 𝑐 3
2

3
From Equation 1 and 2 we can take 𝑦2 − 𝑦1 = 𝑚(𝑥1 − 𝑥2 )

(𝑦2 − 𝑦1 )
𝑚= (𝑚 𝑓𝑜𝑢𝑛𝑑)
(𝑥1 − 𝑥2 )

Put the m in to the equation 3 and find the c

𝑐 = 𝑦3 − 𝑚𝑥3 (𝑐 𝑓𝑜𝑢𝑛𝑑)

Than we can put the c value and m value in the above coding. Similarly, we should use this
calculation in current and voltage. If we get the values y1, y2, y2, x1, x2 and x3 of the voltage and
the current from the result part in table.

1. Voltage

y1 = 100V, y2 = 200V, y3 = 240V and x1 = 1.97V, x2 = 4.96V, x3 = 5V if we used above equations


1, 2 and 3 the values of the m = 0.0299 and c = 239.850

2. Current

y1 = 3.2A, y2 = 6.37A, y3 = 7.65A and x1 = 0.27A, x2 = 0.54A, x3 = 0.61A if we used above


equations 1, 2 and 3 the values of the m = 11.74 and c = 0.4886

After I changed the values and calculations in the coding.

48
3. Solution

In the same input value 222.73V the readings of the ideal situation of y = mx the Voltage =
223.55V, Current = 7.13A in the practical situation y = mx+c Voltage = 240V, 7.51A. Therefore,
if I find the error value of the Voltage = (240V – 223.55V) = 16.45V and error value of the current
= (7.51A- 7.13A) = 0.38A.

49
5 CONCLUSION

In this conclusion I mention only my part of the project. My part of the project was tested and
simulated success fully. In my part I used the c program and java script program. In my hardware
simulation of the project part I used the Nodemcu microcontroller and in the simulation part of the
research I used the Arduino UNO microcontroller. The reason why I did the hardware simulation
in the Proteus simulation software is we can’t do the IOT. Therefore, I did the IOT part like a
hardware simulation. Our coordinator had told us that we can’t use the Arduino base boards. In
that situation I tried to use the PIC16F877A microcontroller but the microcontroller did not work
properly. I did some research in the industry. In the industry they are using the PLC. We can’t buy
the PLC because it is high cost and we didn’t have the original PLC simulation software. Therefore,
In the hardware part I used the NodeMCU and in the simulation part I used the Arduino UNO.
These are the sample prototype simulations based on my research.

Future Improvements

In future I want to do this my part through the PLC or other microcontrollers which are used in the
industry. And I want to design the wireless IOT networks with wireless communication protocols.
Because in my research industries they used the wired protocols. And in the wind power station
they are monitoring the power values of the electrical part. But I want to recommend to them to
monitor the current value and voltage value with the power value in the monitoring system.

50
REFERENCES

[1] R. S. Thilagavathy, Y. S. Spoorthi, and [Link] Nalina H, “AUTOMATIC POWER SUPPLY


CONTROLLER BY FOUR DIFFERENT SOURCES,” 2nd Int. Conf. "Innovative Trends
Sci. Eng. Manag., pp. 276–281, 2016.

[2] “Electricity sector in Sri Lanka - Wikipedia,” Sep. 08, 2020.


[Link]
8%5Cn[Link]
(accessed Nov. 02, 2020).

[3] D. Rahmawati, B. S. Aprillia, W. Priharti, D. K. Silalahi, and K. Kumillayla, “Design of


Automatic Switch System of Solar Panel and Power Plant for Residential Load using
Artificial Neural Network,” IOP Conf. Ser. Mater. Sci. Eng., vol. 771, no. 1, 2020, doi:
10.1088/1757-899X/771/1/012008.

[4] A. S. Hassan, I. Adabara, and A. Ronald, “Design and Implementation of an Automatic


Power Supply from Four Different Source Using Microcontroller,” Adv. Mater. Sci. Eng.,
vol. 2, no. 1, pp. 40–46, 2018, doi: 10.33140/amse/02/01/07.

[5] A. Ronald, K. Muteba, A. S. Hassan, and I. Adabara, “Design and Implementation of an


Automatic Power Supply from Four Different Source Using Microcontroller,” Adv. Mater.
Sci. Eng., vol. 2, no. 1, pp. 123–131, 2018, doi: 10.33140/amse/02/01/07.

[6] S. Dudhate, A. Attargekar, D. Desai, and A. Patil, “Power Supply Control from Different
Sources,” Int. J. Sci. Eng. Res., vol. 7, no. 1, pp. 484–487, 2016.

[7] “Types of Sensors Used in Industrial Automation | Industrial Automation,” Plant


Automation Technology, 2020. [Link]
[Link]/articles/types-of-sensors-used-in-industrial-automation (accessed Nov. 02,
2020).

[8] [Link] Ponnuswamy, “Basics of Internet of Things in Tamil - YouTube,” Aug. 19,
2018. [Link] (accessed Nov. 18, 2020).

[1]
[9] [Link] Munjal, “Communication(Wired) Protocols in IOT | by Hardik Munjal |
Medium,” Nov. 30, 2017. [Link]
protocols-in-iot-ae263675f542 (accessed Nov. 18, 2020).

[10] Mr. Hardik Munjal, “Communication(Wireless) Protocols in IOT | by Hardik Munjal |


Medium,” Nov. 28, 2017. [Link]
protocols-in-iot-7da097ebbe96 (accessed Dec. 01, 2020).

[11] C. Kaur, “The Cloud Computing and Internet of Things (IoT),” Int. J. Sci. Res. Sci. Eng.
Technol., vol. 7, no. 1, pp. 19–22, 2020, doi: 10.32628/ijsrset196657.

[12] N. Chatterjee, S. Chakraborty, A. Decosta, and A. Nath, “Real-time Communication


Application Based on Android Using Google Firebase,” Int. J. Adv. Res. Comput. Sci.
Manag. Stud., vol. 6, no. 4, pp. 74–79, 2018.

[13] D. Choudhury, “Real Time and Low Cost Smart Home Automation System Using Internet
of Things Environment,” Int. J. Comput. Sci. Eng., vol. 7, no. 4, pp. 225–229, 2019, doi:
10.26438/ijcse/v7i4.225229.

[14] “What is IoT? How does IoT work? How to Get Started with IoT Using Adafruit IO and
PictoBlox?,” STEMpedia, Jan. 18, 2020. [Link]
getting-started-with-iot-using-adafruit-io-and-pictoblox/ (accessed Dec. 02, 2020).

[2]
APPENDIX A: Transmission Map

A.1: Power Plant Transmission Map of Sri Lanka

Appendix I A.1

I
APPENDIX B: Data Sheets
B.1: Datasheet_1 ACS712

Appendix II B.1

II
B.2: ACS712 Data sheet_2

Appendix III B.2

B.3: ZMPT101B Datasheet

Appendix IV B.3

III
B.4: NodeMCU ESP8266 Datasheet

Appendix V B.4

IV
APPENDIX C: Request Letters

C.1: Request Letter to Lakvijaya

Appendix VI C.1

C.2: Request Letter to Puttalam Grid Sub Station

Appendix VII C.2

V
APPENDIX D: Transformer Circuit and Equations

D.1: Transformer Circuit Diagram

Appendix VIII D.1

VI
D.2: Transformer Equations

Appendix IX D.2

VII
APPENDIX E: Communication Diagrams of Wind Force

E.1: Communication of Wind Force

Appendix X E.1

VIII
E.2: Network of Wind Force

Appendix XI E.2

IX
APPENDIX F: IOT Monitoring of Wind Force

F.1 IOT Monitoring of Wind Force

Appendix XII F.1

X
PROJECT REPORT CERTIFICATION
Name: Grizan.M Student ID
EN17407144

Project Title: Uninterrupted Power Supply Controller Using Four Different Project ID
Sources with IOT System (UPS)
20-18

Certification of Supervisor
I am satisfied that the final year project report submitted by the above student is acceptable
according to the report writing guidelines published by the department. I certify that the work was
carried out by the student.

Supervisor Name Date Signature


[Link] Malasinghe
28-02-2022

Certification of Coordinator
The student has completed all final year project requirements.
Coordinator Name Date Signature
Prof. Chulantha Kulasekara

Certification of Head of Department


The student project report has been signed and sealed, and is a true copy of the original retained
in the department.
Name of Head of Department Date Signature
[Link] Abhayasinghe

XI

View publication stats

You might also like