0% found this document useful (0 votes)
565 views61 pages

Iot Based Switching of Microgrids For Ups Report

This document is a project report submitted by four students for their Bachelor of Engineering degree in Electrical and Electronics Engineering. The report details their project on developing an IoT based system for switching between microgrids to provide uninterrupted power supply. The project was carried out under the guidance of their professor at Bapuji Institute of Engineering and Technology in Davangere, Karnataka, India.
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)
565 views61 pages

Iot Based Switching of Microgrids For Ups Report

This document is a project report submitted by four students for their Bachelor of Engineering degree in Electrical and Electronics Engineering. The report details their project on developing an IoT based system for switching between microgrids to provide uninterrupted power supply. The project was carried out under the guidance of their professor at Bapuji Institute of Engineering and Technology in Davangere, Karnataka, India.
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
You are on page 1/ 61

VISVESVARAYA TECHNOLOGICAL UNIVERSITY

BELAGAVI – 590 018, KARNATAKA

A PROJECT REPORT
on
IoT BASED SWITCHING OF MICROGRID FOR UNINTERRUPTED
POWER SUPPLY

Submitted in partial fulfilment of the requirements for the award of degree of

BACHELOR OF ENGINEERING
in
ELECTRICAL & ELECTRONICS ENGINEERING

PROJECT ASSOCIATES
Mr. S P Sannidhi 4BD17EE039
Mr. S P Srinidhi 4BD17EE052
Mr. Abhishek G R 4BD18EE400
Mr. Krishna B R 4BD18EE403

Under the Guidance of


Prof . Vijayalakshmi Hallikeri

HEAD OF THE DEPARTMENT


Dr. M.S. NAGARAJ

DEPARMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING


BAPUJI INSTITUTE OF ENGINEERING AND TECHNOLOGY,
(Affiliated to Visvesvaraya Technological university, Belgavi)
Shamanur Road, Davangere – 577004
Year 2020 - 2021
BAPUJI INSTITUTE OF ENGINEERING & TECHNOLOGY
DAVANGERE 577 004, KARNATAKA

DEPARTMENT OF ELECTRICAL & ELECTRONICS


ENGINEERING

CERTIFICATE

Certified that the project work entitled “IoT BASED SWITCHING OF MICROGRIDS
FOR UNINTERRUPTED POWERSUPPLY ” carried out by Mr. S P SANNIDHI USN
4BD17EE039, Mr. S P SRINIDHI USN 4BD17EE052, Mr. ABHISHEK G R USN
4BD18EE400, Mr. KRISHNA B R USN 4BD18EE403 are bonafide students, of BAPUJI
INSTITUTE OF ENGINEERING AND TECHNOLOGY in partial fulfillment for the
award of Bachelor of Engineering in ELECTRICAL & ELECTRONICS ENGINEERING
of the Visvesvaraya Technological University, Belagavi during the academic year 2020-
21. It is certified that all corrections/suggestions indicated for internal assessment have
been incorporated in the report deposited in the departmental library. The project report
has been approved as it satisfies the academic requirements in respect of project work
prescribed for the said degree.

Prof. Vijayalakshmi Hallikeri Dr. M S Nagaraj


Project Guide Head of the Department

Principal
External Viva:
Name of the Examiners: Signature of Examiner & Date

1…………………………………… …………………………..

2…………………………………… …………………………..
Bapuji Educational Association (Regd.)
Bapuji Institute of Engineering and Technology
Post Box No: 325, Davangere – 577 004 Karnataka
(Affiliated to Visvesvaraya Technological University and Approved by AICTE)

Vision and Mission of the Institute


Vision
“To be a centre of excellence recognized nationally and internationally, in distinctive areas
of engineering education and research, based on a culture of innovation and invention”

Mission
“BIET contributes to the growth and development of its students by imparting a broad
based engineering education and empowering them to be successful in their chosen field by
inculcating in them positive approach, leadership qualities and ethical values”

Department of Electrical and Electronics Engineering Vision and


Mission of the Department

Vision
“To train globally competent quality students in Electrical Engineering through excellent
academic inputs, innovative ideas and team work”.
Key words: Innovative ideas, Global, Team work

Mission
1. To enhance the quality of life of students through continuous learning and state of- the-
art technical education.

2. To meet the long term needs of the industry & society.

3. To inculcate leadership qualities & ethical values.

4. To serve the Community for the social economic development.


Key words: Continuous learning, Ethical values, Leadership
Program Educational Objectives (PEOs)

The Program Educational Objectives (PEOs) of the UG Program in Electrical and


Electronics Engineering are prepared through consultation process among stake holders.

1. To be successful in identifying, understanding, formulating, analyzing and solving


variety of problems in the field of Electrical and Electronics Engineering

2. To apply acquired knowledge in solving technological Challenges of the Industry and


Society with Professional Ethics and Accountability.

3. Able to channelize their knowledge base to pursue a continual path of professional


development, along with advanced education and continuing enhancement programs,
relevant to their specific career goals.

4. Adapt to emerging technologies, to provide adequate training and opportunities to work


as team on multidisciplinary projects with effective communication skills and leadership
qualities.

Program Specific Outcomes [PSOs]

Following are the Program Specific Outcomes for Electrical Engineering:

PSO1: Ability to analysis of power systems that efficiently generate, transmit, distribute
and utilize electric power.
PSO2: Able to design, develop and analysis of Modern Electric & Electronics systems
and allied interdisciplinary areas using Conventional methods & Modern tools.
PSO3: Aware of the impact of professional engineering solutions in societal,
environmental context, professional ethics and be able to communicate
effectively.
Bapuji Educational Association (Regd.)
Bapuji Institute of Engineering and Technology
Post Box No: 325, Davangere – 577 004 Karnataka
(Affiliated to Visvesvaraya Technological University and Approved by AICTE)

Department of Electrical and Electronics Engineering

Dr. M.S NAGARAJ : 091 – 08192-221461 (O)


Professor& Head Fax: 091 – 08192-223261 (O)

Department of Electrical and Electronics Engineering, Mobile: +919844484767

B.I.E.T. Davangere – 577004 E-Mail: [email protected]

Subject name: Project Work Phase -II


Subject Code: 17EEP85
Semester: 8th semester, Even 2020-2021

COURSE OUTCOMES

At the end of Project Work Phase-II, students will be able to:

CO1: Present the project and be able to defend it.


CO2: Make links across different areas of knowledge and to generate, develop and
evaluate ideas and information so as to apply these skills to the project task.
CO3: Habituated to critical thinking and use problem solving skills.
CO4: Communicate effectively and to present ideas clearly and coherently in both the
written and oral forms.
CO5: Work in a team to achieve common goal.
CO6: Learn on their own, reflect on their learning and take appropriate actions to
improve it.

Dr. M S NAGARAJ
Ph.D., M.I.E, M.I.S.T.E
Professor of Head
Acknowledgement
We would like to acknowledge the help and encouragement given by various people during
the course of this project work. We are deeply indebted and very grateful to the invaluable
guidance given by our project guide VIJAYALAKSHMI HALLIKERI Assistant Professor
during this project work. We would like to express our sincere gratitude to Dr. M S Nagaraj
Professor and Head, Department of Electrical and Electronics Engineering, BIET,
Davangere, for his kind support, guidance and encouragement throughout the course of this
work. We are thankful to our beloved Principal Dr. Aravinda H B for providing excellent
academic environment. We are also grateful to our beloved Director Dr. Y V
Vrushabhendrappa for providing needed support.

We would like to thank all the teaching and non-teaching staff of Dept. of EEE for their
kind co-operation during the course of the work. The support provided by the college and
departmental library is greatly acknowledged.

Finally, we are thankful to our parents and friends, who helped us in one way or the other
throughout our project work.

Project Associates,

S P SANNIDHI USN 4BD17EE039

S P SRINIDHI USN 4BD17EE052

ABHISHEK G R USN 4BD18EE400

KRISHNA B R USN 4BD18EE403


DECLARATION

We, the student of Bachelor of Electrical & Electronics Engineering at Bapuji Institute of
Engineering and Technology, Davangere, hereby declare that, this Project on “IoT BASED
SWITCHING OF MICROGRIDS FOR UNINTERRUPTED POWER SUPPLY” is an
original and bonafide work carried out by us in partial fulfillment for the award of the
degree of Bachelor of Engineering of the Visvesvaraya Technological University,
Belagavi-590018, during the year 2020-21.

We also declare that, to the best of our knowledge and belief, the work reported here in
does not form part of any other thesis or dissertation on the basis of which a degree or award
was conferred on an earlier occasion by any student.

S P SANNIDHI (4BD17EE039)
S P SRINIDHI (4BD17EE052)
ABHISHEK G R (4BD18EE400)
KRISHNA B R (4BD18EE403)

Date: 12/07/2021
Place: Davangere
ABSTRACT

Uninterrupted power supply plays a major role in health, testing, manufacturing sectors
and individual’s dependent on life saving equipment’s. This Project explains how we can
have a continuous power supply by using a new technology. Two ways: An automatic or
IoT based switching of Microgrid can provide uninterrupted power supply that prevents
energy outage or power failure due to various and different problems of the Microgrid.
Therefore, the aim of this project is to provide a continuous power supply to the consumers
in the most economical way, within less time, flexible.
TABLE OF CONTENTS
Vision and Mission
Program Educational Objectives
Program Specific Outcomes
Course Outcomes
Acknowledgement
Declaration
Abstract

SL NO. DESCRIPTION PAGE NO


Chapter 1. INTRODUCTION.................................................................................. 1
1.1 Overview .................................................................................................. 1
1.2 Problem statement .................................................................................... 1
1.3 Objective .................................................................................................. 2
1.4 Existing system ........................................................................................ 2
1.5 Proposed system....................................................................................... 3
1.6 Scope of the project ................................................................................. 4
Chapter 2. LITERATURE SURVEY ...................................................................... 5
Chapter 3. SYSTEM REQUIREMENT SPECIFICATION ................................. 7
3.1 Hardware Requirement Specification ...................................................... 7
3.1.1 Arduino UNO........................................................................................... 7
3.1.2 Voltage sensor ........................................................................................ 10
3.1.3 Current sensor ........................................................................................ 11
3.1.4 Bluetooth module ................................................................................... 12
3.1.5 Transformer............................................................................................ 13
3.1.6 Rectifier.................................................................................................. 14
3.1.7 Solar panel ............................................................................................. 15
3.1.8 Battery .................................................................................................... 16
3.1.9 Inverter ................................................................................................... 17
3.1.10 Relay ...................................................................................................... 18
3.1.11 Voltage regulator ................................................................................... 20
3.1.12 LCD display ........................................................................................... 21
3.1.13 Lighting load .......................................................................................... 22
3.2 Software Requirement Specification ..................................................... 23
3.2.1 Arduino IDE........................................................................................... 23
3.2.2 C++ programming.................................................................................. 25
3.2.3 Bluetooth Electronics Application ......................................................... 27
Chapter 4. METHODOLOGY .............................................................................. 30
4.1 Block Diagram ....................................................................................... 30
4.2 Flow Chart ............................................................................................. 31
4.3 Circuit Diagram ..................................................................................... 32
4.4 Working ................................................................................................. 32
4.5 Code Snippets ........................................................................................ 33
4.6 Cost Estimation ...................................................................................... 35
Chapter 5. RESULT AND DISCUSSION ............................................................ 36
Chapter 6. ADVANTAGES AND DISADVANTAGES ...................................... 39
CONCLUSION AND FUTURE SCOPE ........................................... 40
BIBLIOGRAPHY ................................................................................ 41
APPENDIX ........................................................................................... 42
Appendix A ........................................................................................... 42
Appendix B ........................................................................................... 48
CONTACT DETAILS ......................................................................... 51
IoT Based Switching of Microgrid for Uninterrupted Power Supply

Chapter 1
INTRODUCTION

1.1 Overview
In this rapidly growing world of today all the fields like usage of domestic appliances,
technology, services…etc. are completely dependent upon the supply of electric power,
through which the accomplishments of work and services are done. So, a continuous
uninterrupted supply of electricity is a great need and demand.
On a contrast, according to the study of Worst Power Outages Report, in the year 2012,
the largest electrical outrage in history, the July 31st blackout of India affected an area
about 670 million people, which is around 9 % of the World’s population, experiencing a
long-lasting time of power outrage i.e. 10 hours. Far till today, the answer to this problem
are traditional or precautionary solutions only, which does not prevent complete blackout.
Hence, in this project we have aimed at providing a continuous power supply to the
consumers in the most economical way, with less time, more flexibility by integrating new
technology called Internet of Things.
Our project mainly aims at switching automatically. When power grid one’s demand
increases or fails, it automatically switches over to the other, thus preventing energy
outage or power failure due to various problems of the Microgrid. Microgrid is capable of
storing energy and can be used in case of power interruption or failure. Therefore,
Microgrid can work independently in case of power disruption of any other energy grid and
can meet local electrical needs.

1.2 Problem statement


In the present-day scenario, a number of networks of an area is completely connected to a
nearby receiving substation and henceforth getting the supply of electric power. If
unknowingly or accidently a fault occurs in receiving station then there will be interruption
of electric power which intern leads to great loss in many governments, business,
domestic, household sectors in terms of money, time, data, etc. We have heard the operation
of parallel working generators or alternators but not of power grids. So, the problems
caused can be transient or major faults, the time required in troubleshooting would be
more and till that time no supply of power can be given to the network of consumers

Dept. of EEE, BIET, Davangere Page 1


IoT Based Switching of Microgrid for Uninterrupted Power Supply

connected to the substation. We can also think of the expenditure required suddenly in
correcting and making the substation work right. In any of the case there will be
interruption of electricity, power outage, time for analysis of faults and data, hold on
electrified transportations, information interchange, damage of electrical appliances.

1.3 Objective
Uninterrupted Power Supplies are designed to automatically provide emergency power,
without delay or transients, to critical applications in case of an interruption to, or
unacceptable condition of the mains/utility supply. Some UPSs also filter and/or regulate
mains/utility power.
While the electricity utilities try to supply clean, stable electrical power to their customers,
there are times when the network may be overloaded or subject to accidents or emergencies
which could give rise to the following fault conditions:
Mainly we focus on:
 To provide emergency power automatically, hence ensuring the continuous
services like house lighting, powering industries etc.
 To detect overload, on increasing the load and switch on to Microgrid 2.
 Switching on from grid 1 to 2 on operating the switch IoT application.
 To ensure clean, stable electric power to the customers and demand balance with
high penetration of renewable energy, Preventing block out and outage time
reduction.

1.4 Existing system


Electricity generation, transmission and distribution is a complex engineering process. The
process requires huge investment and skilled manpower. The basics of generating
electricity remains the same in all forms of electricity such as hydroelectricity, electricity
generated using coal, nuclear electricity, renewable energy sources etc. After electricity is
generated in power plant, it is time for transmission. This is done by using high-voltage
transmission lines that can transmit electricity over long distances. Electricity is distributed
via electric distribution substation. Then the electricity is transmitted to network of local
electric distribution lines and the electricity is supplied to the consumers.

If in any case, fault or interruption occurs in a power system leading to an electric outage,
we don’t have an alternative until the power system is completely tested and checked for

Dept. of EEE, BIET, Davangere Page 2


IoT Based Switching of Microgrid for Uninterrupted Power Supply

the error, and corrected. Until this time there will be complete blackout and no activities
related to electricity is carried out and that may lead to any kind of losses minor or major
in term of money, time, service, data, etc. all work will be lag and might further cause
higher degree of problems.

1.5 Proposed system


Power outage can happen for several reasons and definitely, it affects the many people .

Modern day’s human needs a continuous power supply for their day-to-day activity and
24/7 for industrial utilization. Energy saving techniques cannot solve this problem always
because of their limitations. The IoT and Automatic mode technique helps to overcome the
drawbacks of saving energy. The proposed system is designed with two Microgrid (M1
and M2) when Microgrid M1 is working and the other Microgrid M2 is used as standby. If
Microgrid (M1) fails or if the power drops due to increase of load, this is sensed by
hardware circuit, which helps in automatic switching of the Microgrid from M1 to M2 and
vice versa with the use of Arduino as the controller.

IoT is used as another method to switch between Microgrid by using Arduino.


Microcontroller is used to read the voltage continuously from the hardware sensing circuit
and send it to the Arduino. The microcontroller is in turn connected to the Bluetooth
Electronics application.

Bluetooth Electronics application can be configured as local server or as cloud. Bluetooth


Electronics can be used to switch OFF the Microgrid that has low power and turn ON the
second Microgrid. In IoT approach the data sent to the cloud. Then, the data of the cloud
is linked to the control system which consist of Arduino as controller which senses the
value and signals failure of Microgrid.
At this instant the IoT along with the control system switches ON the second Microgrid
M2 and while Microgrid M1 is switched OFF, when its OFF the other turn ON. Microgrid
starts from the main generator that generates 240V. Thus, voltage is stepped up to 230KV
by using step up transformer. After transmission the voltage undergoes step-down.
Microgrid starts with rectifier, which converts AC to DC, which can be stored. After that,
an inverter stage converts DC to AC. Which consists of four IGBTs (insulated-gate bipolar
transistor) to facilitate the switching.

Dept. of EEE, BIET, Davangere Page 3


IoT Based Switching of Microgrid for Uninterrupted Power Supply

1.6 Scope of the project


 Continuous supply of electric power without any interruption.
 Scope of IoT in energy and power sector in remote maintenances of grid.
 Avoids typical voltage spikes and fluctuations.
 Stability, reliability and security of system for effective work increases
 Intelligent monitoring of the system during failure or at sudden peak loads.
 Microgrid results in eco-friendly produced energy costs.
 Need for electrification in remote location.
 Reduced transmission losses and to fulfil energy crises.

Dept. of EEE, BIET, Davangere Page 4


IoT Based Switching of Microgrid for Uninterrupted Power Supply

Chapter 2
LITERATURE SURVEY
Johannes Schiffera , Daniele Zonettib and Romeo Ortegab “A survey on modeling of
Microgrids” This statement is given by a team of research authors. Microgrid have been
identified as key components of modern electrical systems to facilitate the integration of
renewable distributed generation units. Their analysis and controller design requires the
development of advanced (typically model-based) techniques naturally posing an
interesting challenge to the control community. Although there are widely accepted reduced
order models to describe the dynamic behaviour of microgrids, they are typically presented
without details about the reduction procedure—hampering the understanding of the
physical phenomena behind them. Preceded by an introduction to basic notions and
definitions in power systems, the present survey reviews key characteristics and main
components of a microgrid. We introduce the reader to the basic functionality of DC/AC
inverters, as well as to standard operating modes and control schemes of inverter-interfaced
power sources in microgrid applications. [1]

ABB’s Bob Fesmire “A Microgrid Future” This statements are given by in his research
paper titled. Radical decentralization may not be upon us yet. But microgrids are most
certainly advancing. Regulatory, market and technical changes needed to bring about a
microgrid future. Next to distributed energy resources (and also because of them),
microgrids have to be one of the hottest topics in the power industry at the moment. Their
potential to increase reliability and facilitate the integration of more renewables. Then there
is the challenge of making microgrids responsive to conditions taking place at the
transmission level, which implies some degree of coordination with a balancing authority
like an ISO or RTO. The speed with which we can realize the distributed energy future that
so much of the industry has in mind will depend in large part, then, on the coordinated
development of market and regulatory structures with the technical systems that must
operate within them. [2]

Kroposki, B., Basso, T., & DeBlasio “Microgrid technologies and standards” In this paper
discusses current that are being developed to address implementation of microgrids.
Microgrids that operate both electrical generation and loads in a coordinated manner can

Dept. of EEE, BIET, Davangere Page 5


IoT Based Switching of Microgrid for Uninterrupted Power Supply

offer benefits to the customer and the local utility. The loads and energy sources in a
Microgrid can be disconnected from and reconnected to the utility system with minimal
disruption, thereby improving reliability. Any time a Microgrid is implemented in an
electrical distribution system, it must be well planned to avoid problems. [3]

Anay Majee & Gnana Swathika O.V “IoT based Reconfiguration of Microgrids through an
Automated Central Protection Centre” In this paper about their research on Microgrids are
a collections of loads, small sources and storage systems which are present as single,
flexible and independently controllable entities. The inclusion of Distributed Generation
(DGs) systems into a microgrid makes the current flow in a Microgrid bidirectional. The
detection of faults and the connection and disconnection of the DGs to and from the
microgrid is carried out by the Central Protection Centre (CPC). To develop an automated
CPC based on the concept of Internet of Things (IoT) which would constantly monitor the
grid for the detection of faults and rectify them. The rectification of fault is either done by
isolating the faulted bus or shortest path from the faulted bus to the main grid. [4]

Kaisar R Khan, atiqur Rahman., Adnan Nadeem, Muhammad Shoaib Siddiqui and Rafi
Ahmad Khan “Remote Monitoring and Control of Microgrid using Smart Sensor Network
and Internet of Thing” according to A Microgrid is a viable and scalable approach to
integrate distributed sources, ensure reliable and secure energy supply to the remote and
the mission critical grid. Smarter monitoring, control and energy management is required
to ensure economical and reliable operation of the Microgrid. To deployed smart sensors
and internet of things (IoT) for condition monitoring which is integrated with the DCS.
Besides grid, automated operation, this state of the art distributed control system also
provides data acquisition, accesses to the user friendly. [5]

Dept. of EEE, BIET, Davangere Page 6


IoT Based Switching of Microgrid for Uninterrupted Power Supply

Chapter 3

SYSTEM REQUIREMENT SPECIFICATION

3.1 Hardware Requirement Specification


In our project we using the hardware components are mentioned below:

1. Arduino UNO
2. Voltage sensor
3. Current sensor
4. Bluetooth module
5. Transformer
6. Rectifier
7. Solar panel
8. Battery
9. Inverter
10. Relays
11. Voltage regulator
12. LCD display
13. Lighting load

3.1.1 Arduino UNO


Arduino is an open-source prototyping platform based on easy-to-use hardware and
software. Arduino boards are able to read inputs - light on a sensor, a finger on a button, or
a Twitter message - and turn it into an output - activating a motor, turning on an LED,
publishing something online. You can tell your board what to do by sending a set of
instructions to the microcontroller on the board. To do so you use the Arduino programming
language (based on Wiring), and the Arduino Software (IDE), based on Processing.

The Arduino Uno is one kind of microcontroller board based on ATmega328, and Uno is
an Italian term which means one. Arduino Uno is named for marking the upcoming release
of microcontroller board namely Arduino Uno Board 1.0. This board includes digital I/O
pins-14, a power jack, analog I/ps-6, ceramic resonator-A16 MHz, a USB connection, an
RST button, and an ICSP header. All these can support the microcontroller for further

Dept. of EEE, BIET, Davangere Page 7


IoT Based Switching of Microgrid for Uninterrupted Power Supply

operation by connecting this board to the computer. The power supply of this board can be
done with the help of an AC to DC adapter, a USB cable, otherwise a battery.

The ATmega328 is one kind of single-chip microcontroller formed with Atmel within
the mega AVR family. The architecture of this Arduino Uno is a customized Harvard
architecture with 8 bit RISC processor core. Other boards of Arduino Uno include Arduino
Pro Mini, Arduino Nano, Arduino Due, Arduino Mega, and Arduino Leonardo.

Fig 3.1.1(a): Arduino UNO

Features
 The operating voltage is 5V
 The recommended input voltage will range from 7v to 12V
 The input voltage ranges from 6v to 20V
 Digital input/output pins are 14
 Analog i/p pins are 6
 DC Current for each input/output pin is 40 mA
 DC Current for 3.3V Pin is 50 mA
 Flash Memory is 32 KB
 SRAM is 2 KB
 EEPROM is 1 KB
 CLK Speed is 16 MHz

Dept. of EEE, BIET, Davangere Page 8


IoT Based Switching of Microgrid for Uninterrupted Power Supply

Fig 3.1.1(b): Pin Diagram of Arduino UNO

Table 3.1.1 Pin Configuration

Pin Category Pin Name Details


Vin: Input voltage to Arduino when using an external
power source.
5V: Regulated power supply used to power
Vin, 3.3V, 5V,
Power microcontroller and other components on the board.
GND
3.3V: 3.3V supply generated by on-board voltage
regulator. Maximum current draw is 50mA.
GND: ground pins.

Reset Reset Resets the microcontroller.


Analog Pins A0 – A5 Used to provide analog input in the range of 0-5V
Input/output Digital Pins 0 -
Can be used as input or output pins.
Pins 13
Serial 0(Rx), 1(Tx) Used to receive and transmit TTL serial data.
External
2, 3 To trigger an interrupt.
Interrupts
PWM 3, 5, 6, 9, 11 Provides 8-bit PWM output.
10 (SS), 11
(MOSI), 12
SPI Used for SPI communication.
(MISO) and 13
(SCK)
Inbuilt LED 13 To turn on the inbuilt LED.
A4 (SDA), A5
TWI Used for TWI communication.
(SCA)
AREF AREF To provide reference voltage for input voltage.

Dept. of EEE, BIET, Davangere Page 9


IoT Based Switching of Microgrid for Uninterrupted Power Supply

3.1.2 Voltage sensor


A voltage sensor is a sensor used to calculate and monitor the amount of voltage in an
object. Voltage sensors can determine the AC voltage or DC voltage level. The input of this
sensor is the voltage, whereas the output is the switches, analog voltage signal, a current
signal, or an audible signal.

Voltage Detection Sensor Module is a simple and very useful module that uses a potential
divider to reduce any input voltage by a factor of 5. This allows us to use the Analog input
pin of a microcontroller to monitor voltages higher than it capable of sensing. For example,
with a 0V - 5V Analog input range, you are able to measure a voltage up to 25V. This
module also includes convenient screw terminals for easy and secure connections of a wire.

Interfacing a voltage sensor with Arduino or any other microcontroller is pretty straight
forward. Connect the VCC and GND of voltage source whose voltage to be measured to the
screw terminals of the voltage sensor. Connect the S and – (GND) pins of voltage sensor to
Analog pin and GND of Arduino respectively.

Fig 3.1.2: Voltage Sensor

Features
 Input Voltage: 0 to 25V
 Voltage Detection Range: 0.02445 to 25
 Analog Voltage Resolution: 0.00489V
 Needs no external components
 Easy to use with Microcontrollers
 Small, cheap and easily available
 Dimensions: 4 × 3 × 2 cm

Dept. of EEE, BIET, Davangere Page 10


IoT Based Switching of Microgrid for Uninterrupted Power Supply

Table 3.1.2 Pin Configuration


Pin Name Description
VCC Positive terminal of the External voltage source (0-25V)
GND Negative terminal of the External voltage source
S Analog pin connected to Analog pin of Arduino
+ Not Connected
_ Ground Pin connected to GND of Arduino

3.1.3 Current sensor


A current sensor is a device that detects electric current in a wire and generates a signal
proportional to that current. The generated signal could be analog voltage or current or a
digital output. The generated signal can be then used to display the measured current in an
ammeter, or can be stored for further analysis in a data acquisition system, or can be used
for the purpose of control. ACS712 Current Sensor is the sensor that can be used to measure
and calculate the amount of current applied to the conductor without affecting the
performance of the system.

Fig 3.1.3: Current sensor

Features

 Measures both AC and DC current

 Available as 5A, 20A and 30A module

 66 to 185 mV/A output sensitivity.

 Provides isolation from the load

 Easy to integrate with MCU, since it outputs analog voltage

 Stable output offset voltage.

Dept. of EEE, BIET, Davangere Page 11


IoT Based Switching of Microgrid for Uninterrupted Power Supply

Table 3.1.3 Pin Configuration

Pin No Pin Name Description


1 Vcc Input voltage is +5V for typical applications
2 Output Outputs Analog voltage proportional to current
3 Ground Connected to ground of circuit
T1 Wire In The wire through current has to be measured is connected
T2 Wire Out here

3.1.4 Bluetooth module

HC-05 is a Bluetooth module which is designed for wireless communication. This module
can be used in a master or slave configuration. HC-05 module is an easy to use Bluetooth SPP
(Serial Port Protocol) module, designed for transparent wireless serial connection setup. Serial port
Bluetooth module is fully qualified Bluetooth V2.0+EDR (Enhanced Data Rate) 3Mbps Modulation
with complete 2.4GHz radio transceiver and baseband. It uses CSR Blue core 04-External single chip
Bluetooth system with CMOS technology and with AFH (Adaptive Frequency Hopping Feature).

HC-05 has red LED which indicates connection status, whether the Bluetooth is connected
or not. Before connecting to HC-05 module this red LED blinks continuously in a periodic
manner. When it gets connected to any other Bluetooth device, its blinking slows down to
two seconds. This module works on 3.3 V. We can connect 5V supply voltage as well since
the module has on board 5 to 3.3 V regulator. As HC-05 Bluetooth module has 3.3 V level
for RX/TX and microcontroller can detect 3.3 V level, so, no need to shift transmit level of
HC-05 module. But we need to shift the transmit voltage level from microcontroller to RX
of HC-05 module.

Fig 3.1.4: HC-05 Bluetooth module

Dept. of EEE, BIET, Davangere Page 12


IoT Based Switching of Microgrid for Uninterrupted Power Supply

Table 3.1.4 Pin Configuration


Pin No Pin Name Pin Description
This pin is used to toggle between Data Mode (set low) and AT
1 Enable/Key
command mode (set high). By default it is in Data mode
2 VCC Powers the module. Connect to +5V Supply voltage
3 Ground Ground pin of module, connect to system ground.
TX- Transmits Serial Data. Everything received via Bluetooth will be
4
Transmitter given out by this pin as serial data.
RX- Receive Serial Data. Every serial data given to this pin will be
5
Receiver broadcasted via Bluetooth
The state pin is connected to on board LED, it can be used as a
6 State
feedback to check if Bluetooth is working properly.

3.1.5 Transformer
The transformer is a static electrical device that transfers energy by inductive coupling
between its winding circuits. A varying current in the primary winding creates a varying
magnetic flux in the transformer's core and thus a varying magnetic flux through the
secondary winding. This varying magnetic flux induces a varying electromotive force
(E.M.F) or voltage in the secondary winding. The transformer has cores made of high
permeability silicon steel. The steel has a permeability many times that of free space and
the core thus serves to greatly reduce the magnetizing current and confine the flux to a path
which closely couples the winding.

The Transformer act as step down transformer reducing AC - 230V to AC - 12V. 12-0-12
5Amp Center Tapped Step Down Transformer is a general purpose chassis mounting mains
transformer. Transformer has 230V primary winding and center tapped secondary winding.

Fig 3.1.5: Transformer

Dept. of EEE, BIET, Davangere Page 13


IoT Based Switching of Microgrid for Uninterrupted Power Supply

Feature

 Soft Iron Core.

 1 Amp Current Drain.

Specifications

 Input Voltage 230V AC

 Output Voltage 12V or 0V

 Output Current 1 Amp

 Mounting Vertical mount type

Application

 DIY projects Requiring In-Application High current drain.

 On chassis AC/AC converter.

 Designing a battery Charger.

3.1.6 Rectifier
The output from the transformer is fed to the rectifier. It converts A.C. into pulsating D.C.
The rectifier may be a half wave or a full wave rectifier. In this project, a bridge rectifier is
used because of its merits like good stability and full wave rectification. The Bridge rectifier
is a circuit, which converts an ac voltage to dc voltage using both half cycles of the input
ac voltage. The Bridge rectifier circuit is shown in the figure. The circuit has four diodes
connected to form a bridge. The ac input voltage is applied to the diagonally opposite ends
of the bridge. The load resistance is connected between the other two ends of the bridge.

Fig 3.1.6: Rectifier Circuit

Dept. of EEE, BIET, Davangere Page 14


IoT Based Switching of Microgrid for Uninterrupted Power Supply

For the positive half cycle of the input ac voltage, diodes D1 and D3 conduct, whereas
diodes D2 and D4 remain in the OFF state. The conducting diodes will be in series with the
load resistance RL and hence the load current flows through RL.

For the negative half cycle of the input ac voltage, diodes D2 and D4 conduct whereas, D1
and D3 remain OFF. The conducting diodes D2 and D4 will be in series with the load
resistance RL and hence the current flows through RL in the same direction as in the
previous half cycle. Thus a bi-directional wave is converted into a unidirectional wave.

3.1.7 Solar panel


Photovoltaic (PV) cells are the one which are made from special materials called
semiconductors like Silicon. They are used for conversion of light into electricity using
semiconductor materials that exhibit the photovoltaic effect. When the light strikes the cell,
certain amount of light gets absorbed into the semiconductor material which triggers the
flow of electrons that causes current to flow. We can place metal contacts on top and bottom
of the cell, from which we can draw current externally.

Fig 3.1.7: Solar panel

Dept. of EEE, BIET, Davangere Page 15


IoT Based Switching of Microgrid for Uninterrupted Power Supply

Specification

 Max Power at STC: 10W

 Open Circuit Voltage: 21.6V

 Short Circuit Current: 0.62A

 Optimum Operating Voltage: 17.5V

 Optimum Operating Current: 0.57A

 Operating Temperature: -40°C to 90°C

 Dimensions: 10.6x13.4x1.0 in

 Weight: 2.65 lbs (1.2kg)

3.1.8 Battery
Battery (electricity), an array of electrochemical cells for electricity storage, either
individually linked or individually linked and housed in a single unit. An electrical battery
is a combination of one or more electrochemical cells, used to convert stored chemical
energy into electrical energy. Batteries may be used once and discarded, or recharged for
years as in standby power applications. Miniature cells are used to power devices such as
hearing aids and wristwatches; larger batteries provide standby power for telephone
exchanges or computer data centers.

Fig 3.1.8: Lead-Acid Battery

Dept. of EEE, BIET, Davangere Page 16


IoT Based Switching of Microgrid for Uninterrupted Power Supply

Lead-acid batteries are the most common in PV systems because their initial cost is lower
and because they are readily available nearly everywhere in the world. There are many
different sizes and designs of lead-acid batteries, but the most important designation is that
they are deep cycle batteries. Lead-acid batteries are available in both wet-cell (requires
maintenance) and sealed no-maintenance versions.

Lead acid batteries are reliable and cost effective with an exceptionally long life. The Lead
acid batteries have high reliability because of their ability to withstand overcharge, over
discharge vibration and shock. The use of special sealing techniques ensures that our
batteries are leak proof and non-spoilable. The batteries have exceptional charge
acceptance, large electrolyte volume and low self-discharge, which make them ideal as
zero- maintenance batteries lead acid batteries.

Specification

 Voltage: 12V
 Capacity: 1.2Ah
 Size: 98mm x 43mm x 52 mm
 Weight: 0.450kg

Feature
 12 Volts 1.3 AH Power
 There will be no loss in power output over the battery life
 Low self-discharge of about 2-3% per month compared with 20-30% for more
common battery systems
 Quality construction with no compromise on materials to ensure a long service life
 Low internal resistance means a high discharge rate
 Wide operating temperature range operating between -15° C to +50 ° C when fully
charged

3.1.9 Inverter
An inverter is an electrical device that converts direct current (DC) to alternating current
(AC), the converted AC can be at any required voltage and frequency with the use of
appropriate transformers, switching, and control circuits.

Dept. of EEE, BIET, Davangere Page 17


IoT Based Switching of Microgrid for Uninterrupted Power Supply

Solid-state inverters have no moving parts and are used in a wide range of applications,
from small switching power supplies in computers, to large electric utility high-voltage
direct current applications that transport bulk power. Inverters are commonly used to supply
AC power from DC sources such as solar panels or batteries. The inverter performs the
opposite function of a rectifier. The power efficient inverter which is small in size which
can convert 12V DC 220V AC.

Fig 3.1.9: Inverter module

3.1.10 Relay
The relay module is an electrically operated switch that allows you to turn on or off a circuit
using voltage and/or current much higher than a microcontroller could handle. There is no
connection between the low voltage circuit operated by the microcontroller and the high
power circuit. The relay protects each circuit from each other. Each channel in the module
has three connections named NC, COM, and NO. Depending on the input signal trigger
mode, the jumper cap can be placed at high level effective mode which ‘closes’ the
normally open (NO) switch at high level input and at low level effective mode which
operates the same but at low level input. The dual-channel relay module is more or less the
same as a single-channel relay module, but with some extra features like optical isolation.
The dual-channel relay module can be used to switch mains powered loads from the pins
of a microcontroller.

Dept. of EEE, BIET, Davangere Page 18


IoT Based Switching of Microgrid for Uninterrupted Power Supply

Fig 3.1.10: 5v Dual channel relay module


Specifications

 On-board EL817 photoelectric coupler with photoelectric isolating anti interference ability
strong
 On-board 5V, 10A / 250VAC, 10A / 30VDC relays
 Relay long life can absorb 100000 times in a row
 Module can be directly and MCU I/O link, with the output signal indicator
 Module with diode current protection, short response time
 PCB Size: 45.8mm x 32.4mm

Table 3.1.10 Pin Configuration


Pin No Pin Name Description
1 JD-VCC Input for isolated power supply for relay coils
2 VCC Input for directly powering the relay coils

3 GND Input ground reference


4 GND Input ground reference
5 IN1 Input to activate the first relay
6 IN2 Input to activate the second relay

7 VCC VCC to power the opt couplers, coil drivers, and associated circuitry

Dept. of EEE, BIET, Davangere Page 19


IoT Based Switching of Microgrid for Uninterrupted Power Supply

3.1.11 Voltage regulator


7805 is a voltage regulator integrated circuit. It is a member of 78xx series of fixed linear
voltage regulator ICs. The voltage regulator IC maintains the output voltage at a constant
value that is Regulated power supply is a device that mechanized on DC voltages and
also it can uphold its output accurately at a fixed voltage all the time although if there is a
significant alteration in the DC input voltage.

The AC power supply gets converted into constant DC by the power supply circuit. The
circuit is made up of linear voltage regulator 7805 along with capacitors and resistors with
bridge rectifier made up from diodes. By the help of a voltage regulator DC, unregulated
output will be fixed to a constant voltage. From giving an unchanging voltage supply to
building confident that output reaches uninterrupted to the appliance.

Fig 3.1.11: Pin Diagram of 7805 Voltage Regulator

Table 3.1.11 Pin Configuration

Pin No Pin Name Description

Pin 1 is the INPUT Pin. A positive unregulated voltage is


1 INPUT
given as input to this pin.

Pin 1 is the INPUT Pin. A positive unregulated voltage is


2 GROUND
given as input to this pin.

Pin 3 is the OUTPUT Pin. The output regulated 5V is taken


3 OUTPUT
at this pin of the IC.

Dept. of EEE, BIET, Davangere Page 20


IoT Based Switching of Microgrid for Uninterrupted Power Supply

Features

 It can deliver up to 1.5 A of current (with heat sink).


 Has both internal current limiting and thermal shutdown features.
 Requires very minimum external components to fully function.

3.1.12 LCD display


An LCD is an electronic display module that uses liquid crystal to produce a visible image.
The 16×2 LCD display is a very basic module commonly used in DIYs and circuits. The
16×2 translates o a display 16 characters per line in 2 such lines. In this LCD each character
is displayed in a 5×7-pixel matrix.

Fig 3.1.12: LCD Display

Features

 Operating Voltage is 4.7V to 5.3V


 Current consumption is 1mA without backlight
 Alphanumeric LCD display module, meaning can display alphabets and numbers
 Consists of two rows and each row can print 16 characters.
 Each character is build by a 5×8 pixel box
 Can work on both 8-bit and 4-bit mode
 It can also display any custom generated characters
 Available in Green and Blue Backlight

Dept. of EEE, BIET, Davangere Page 21


IoT Based Switching of Microgrid for Uninterrupted Power Supply

Table 3.1.12 Pin Configuration

Pin No Pin Name Description


1 Vss (Ground) Ground pin connected to system ground
2 Vdd (+5 Volt) Powers the LCD with +5V (4.7V – 5.3V)
Decides the contrast level of display. Grounded to get
3 VE (Contrast V)
maximum contrast.
Connected to Microcontroller to shift between
4 Register Select
command/data register
Used to read or write data. Normally grounded to write
5 Read/Write
data to LCD
Connected to Microcontroller Pin and toggled between 1
6 Enable
and 0 for data acknowledgement
7 Data Pin 0
8 Data Pin 1 Data pins 0 to 7 forms a 8-bit data line. They can be
9 Data Pin 2
10 Data Pin 3 connected to Microcontroller to send 8-bit data. These
11 Data Pin 4 LCD’s can also operate on 4-bit mode in such case Data
12 Data Pin 5 pin 4,5,6 and 7 will be left free.
13 Data Pin 6
14 Data Pin 7
15 LED Positive Backlight LED pin positive terminal
16 LED Negative Backlight LED pin negative terminal

3.1.13 Lighting load

Lighting loads are the energy used to power electric lights. We are using load side 9W LED
light.

Fig 3.1.13: LED Light

Dept. of EEE, BIET, Davangere Page 22


IoT Based Switching of Microgrid for Uninterrupted Power Supply

3.2 Software Requirement Specification


Some of the software components used in “IoT Based Switching of Micro grid for
uninterruptible power supply” is listed below

3.2.1 Arduino IDE


IDE stands for “Integrated Development Environment” it is an official software
introduced by Arduino.cc, that is mainly used for editing, compiling and uploading the
code in the Arduino Device. Almost all Arduino modules are compatible with this
software that is an open source and is readily available to install and start compiling the
code on the go.
 Arduino IDE is an open source software that is mainly used for writing and
compiling the code into the Arduino Module.
 It is an official Arduino software, making code compilation too easy that even
a common person with no prior technical knowledge can get their feet wet with
the learning process.
 It is easily available for operating systems like MAC, Windows, Linux and runs
on the Java Platform that comes with inbuilt functions and commands that play
a vital role for debugging, editing and compiling the code in the environment.
 A range of Arduino modules available including Arduino Uno, Arduino Mega,
Arduino Leonardo, Arduino Micro and many more.
 Each of them contains a microcontroller on the board that is actually
programmed and accepts the information in the form of code.
 The main code, also known as a sketch, created on the IDE platform will
ultimately generate a Hex File which is then transferred and uploaded in the
controller on the board.
 The IDE environment mainly contains two basic parts: Editor and Compiler
where former is used for writing the required code and later is used for
compiling and uploading the code into the given Arduino Module.
 This environment supports both C and C++ languages.

The IDE environment is mainly distributed into three sections:

1. Main bar
2. Text editor
3. Output pane

Dept. of EEE, BIET, Davangere Page 23


IoT Based Switching of Microgrid for Uninterrupted Power Supply

Fig 3.2.1(a): Arduino IDE Tools Description

The bar appearing on the top is called Menu Bar that comes with five different options
as follow:

File – You can open a new window for writing the code or open an existing one.
Following table shows the number of further subdivisions the file option is
categorized into.

Edit – Used for copying and pasting the code with further modification for font

Sketch – For compiling and programming

Tools – Mainly used for testing projects. The Programmer section in this panel
is used for burning a bootloader to the new microcontroller.
Help – In case you are feeling skeptical about software, complete help is available
from getting started to troubleshooting.

Dept. of EEE, BIET, Davangere Page 24


IoT Based Switching of Microgrid for Uninterrupted Power Supply

The Six Buttons appearing under the Menu tab are connected with the running
program as follow:

Fig 3.2.1(b): Arduino Menu Bar


 The check mark appearing in the circular button is used to verify the code.
Click this once you have written your code.
 The arrow key will upload and transfer the required code to the Arduino
board.
 The dotted paper is used for creating a new file.
 The upward arrow is reserved for opening an existing Arduino project.
 The downward arrow is used to save the current running code.
 The button appearing on the top right corner is a Serial Monitor – A separate
pop- up window that acts as an independent terminal and plays a vital role for
sending and receiving the Serial Data. You can also go to the Tools panel and
select Serial Monitor pressing Ctrl+Shift+M all at once will open the Serial
Monitor. The Serial Monitor will actually help to debug the written Sketches
where you can get a hold of how your program is operating. Your Arduino
Module should be connected to your computer by USB cable in order to
activate the Serial Monitor.

3.2.2 C++ programming
C++ is an upgraded version of C programming. The main idea behind creating C++
programming was to add object orientation to the C programming language. The major
upgradations are object-oriented programming methodology, namespace feature, operator
overloading, error & exception handling. The motivation behind object-oriented programming is to
try to see the whole world in the form of classes & objects.

Feature of C++
 Object Oriented

Dept. of EEE, BIET, Davangere Page 25


IoT Based Switching of Microgrid for Uninterrupted Power Supply

 Simple
 Platform Dependent
 Mid-level programming language
 Structured programming language
 Rich Library
 Memory Management
 Powerful & Fast
 Pointers
 Compiler based
 Syntax based language

Let’s discuss each one of them one by one.


Object Oriented Programming language
The main upgradation from C to C++ is object-oriented programming. It follows concept
of oops like polymorphism, inheritance, encapsulation, abstraction. This makes
development and maintenance easier.
Features of C++: Simple
C++ provides a structured approach wherein you can break the problem into parts and
design the solution modularly. It provides you a rich set of library functions that you can
use while implementing the solution.
If you have worked with C language, then moving to C++ would be a very smooth
transitioning. The syntax is almost similar with minute changes.
Platform Dependent
Platform dependent language means the language in which programs can be executed only
on that operating system where it is developed & compiled. It cannot run or execute it on
any other operating system.
C++ is a platform-dependent language. Having said that, C++ programs can be executed in
many machines with little bit or no change.
Mid-level programming language
C++ has the ability to do both low-level & high-level programming. This is the reason why
C++ is known as a mid-level programming language. When we talk about low-level
programming, C++ is used to develop system applications such as the kernel, driver, etc.

Dept. of EEE, BIET, Davangere Page 26


IoT Based Switching of Microgrid for Uninterrupted Power Supply

Structured programming language


In C++ programming, the code is modular with the help of functions, classes & objects,
and the modules are loosely coupled. Modular code is easy to understand & modify. This
makes C++ a structured programming language.
Rich Library
Developers have access to lots of in-built functions provided by C++ language. This saves
time & makes development fast. Let’s look at some of the C++ header files &
functionalities provided by it.
Memory Management
C++ supports dynamic memory allocation. You can free the allocated memory at any time.
Not only this C++ also provides dynamic memory management techniques.
Powerful & Fast
C++ is a fast language as compilation and execution time is less. Also, it has a wide variety
of data types, functions & operators.
Pointers
Pointers are variables that store the address of another variable. Pointer points to the
memory location of a variable. C++ supports pointer and provides solutions to lots of
problems that demand access to memory location.
Compiler based
C++ is a compiler-based programming language. Without compilation, no C++ program
can be executed. The compiler first compiles the C++ program and then it is executed.
C++ Features: Syntax based language
C++ is a language that complies strongly with syntax. Language following rules and
regulations very strictly is known as tight syntax-based language. C, C++, Java, .net are
some of the examples.

3.2.3 Bluetooth Electronics Application


To Control our project with an Android device. This Bluetooth electronics app
communicates using Bluetooth to an HC-05 Bluetooth module in our project. This app
comes with a library containing 11 Bluetooth examples for Arduino. It can also be used
with Raspberry Pi or any other rapid prototyping system in which you have included a
suitable Bluetooth module in project.

Dept. of EEE, BIET, Davangere Page 27


IoT Based Switching of Microgrid for Uninterrupted Power Supply

Some electronics skills required. Requires an Android device with Bluetooth capability
enabled. Version 1.1 only works with Bluetooth Classic. Version 1.2 supports Bluetooth
Low Energy and USB connectivity in addition to Bluetooth Classic.

Large selection of controls available including buttons, switches, sliders, pads, lights,
gauges, terminals, accelerometers and graphs. Drag and drop them onto the panel grid. Then
edit their properties.

Fig 3.2.3(a): Main Screen

Fig 3.2.3(b): Edit Screen

Dept. of EEE, BIET, Davangere Page 28


IoT Based Switching of Microgrid for Uninterrupted Power Supply

Fig 3.2.3(c): Connected to Bluetooth module HC-05

Fig 3.2.3(d): Bluetooth mode selection

Dept. of EEE, BIET, Davangere Page 29


IoT Based Switching of Microgrid for Uninterrupted Power Supply

Chapter 4

METHODOLOGY
4.1 Block Diagram

Fig 4.1: Block Diagram

This is a project mainly focuses on switching of Micro grids for Uninterrupted Power
Supply, which uses a renewable energy source as a standby grid. The voltage and current
sensors are to be used to sense the electrical parameters at the load side. Whenever the
voltage and current drops or at the time of failure of the first power grid, IoT technology
employed in the proposed system uses the data sensed by the sensors along with Arduino
micro controller, which helps in automatic switching of Micro grids. This can be monitored
in real time on Bluetooth Electronics app through IFTT servers. Hence, ensuring alternate
and continuous power supply without any much time lag.

Dept. of EEE, BIET, Davangere Page 30


IoT Based Switching of Microgrid for Uninterrupted Power Supply

4.2 Flow Chart

Start

Read voltage from


M1 and M2

Calculate load

Check limit

If If
voltage voltage
> set < set
limit

Trip relay

Again read
Switch ON
voltage and
M2
current

If
vtg/load
End Switch off within
limit of
M1
Fig 4.2: Flow Chart

Dept. of EEE, BIET, Davangere Page 31


IoT Based Switching of Microgrid for Uninterrupted Power Supply

4.3 Circuit Diagram

Fig 4.3: Overall Schematic Diagram of Our Project

4.4 Working
Microgrid 1 uses raw supply from the mains and Microgrid 2 uses solar power from which
the battery is getting charged. The voltage parameters of the supply from Microgrid 1 is
monitored continuously from the voltage sensor. And when the voltage regulator in the
circuit board is turned down in order to decrease the voltage. The voltage dropped is sensed
by the Microcontroller programmed to switch from Microgrid 1 to Microgrid 2 if below
190v or near to 0v.

In the other sequence, the load is increased in the load section adding an additional bulb, as
the current sensor used in the project is unable to sense the very minute current variation in
the load. There is another triggering switch which sends pulse to the Microcontroller, as
overload. This sequence is also written in the program, hence giving a signal to switch over
to Microgrid 2(Renewable energy).

In one more sequence an IOT application, Bluetooth electronics is used to read the data of
various parameters like voltage of Microgrid 1, Microgrid 2 and current. Using a Bluetooth
module, the circuit reading is connected to the cloud network, wherein which there is a
switch configured and parallel using the switch(programmed) the switching application is
carried out. Hence, supplying continuous uninterrupted power.

Dept. of EEE, BIET, Davangere Page 32


IoT Based Switching of Microgrid for Uninterrupted Power Supply

4.5 Code Snippets

Code for initializing Liquid Crystal Display.

Code for updating panel with delay of 100ms.

Dept. of EEE, BIET, Davangere Page 33


IoT Based Switching of Microgrid for Uninterrupted Power Supply

Code for build panel in application.

Code for converting DC voltage into AC using ADC.

Dept. of EEE, BIET, Davangere Page 34


IoT Based Switching of Microgrid for Uninterrupted Power Supply

Code for sending data to Android device.

4.6 Cost Estimation


Table 4.6 Cost Estimation
SL No Component Name Cost
1 Solar Panel 1560
2 Arduino UNO 820
3 Battery 480
4 Inverter Circuit 490
5 Voltage & Current Sensor 390
6 Voltage Regulator 200
7 Transformer 120
8 Bluetooth Module 360
9 Relays 200
10 LCD Display 180
11 Rectifier Circuit 200
12 Miscellaneous 1500
Total Cost 6500

Dept. of EEE, BIET, Davangere Page 35


IoT Based Switching of Microgrid for Uninterrupted Power Supply

Chapter 5

RESULT AND DISCUSSION


Table 5.1 Data Samples

M1 VOLTAGE M2 VOLTAGE LOAD CURRENT


(IN VOLTS) (IN VOLTS) (IN mA)

226 210 255


0 210 254
228 210 255
225 210 258

Fig 5.1: Graphical Representation of Data

Calculation of Load Power:


For example: For Microgrid 1
1) P=V*I = 226 V*(255 mA*156 mA) = 8.99 W
2) P=V*I = 223 V*(254 mA*156 mA) = 8.83 W
For example: For Microgrid 2
1) P=V*I = 210 V*(225 mA*156 mA) = 8.35 W
2) P=V*I = 210 V*(254 mA*156 mA) = 8.32 W

Dept. of EEE, BIET, Davangere Page 36


IoT Based Switching of Microgrid for Uninterrupted Power Supply

Fig 5.2: LCD Display at Normal Condition

Fig 5.3: LCD Display During Microgrid 1 Failure

Fig 5.4: View of Data Displayed on Bluetooth Electronics App

Dept. of EEE, BIET, Davangere Page 37


IoT Based Switching of Microgrid for Uninterrupted Power Supply

After analysis and verifying the reading on LCD and the graph. We get to know that, in the
first sequence when the primary voltage is dropped to zero from normal operation, then the
power is fed from backup, though the bulb remains glowing.

In the second sequence, after detection of overload the system switches over to standby
supply through which we can calculate power consumption from the load(bulbs). We also
got an promising result of IoT switching application, from which we remotely switched the
system from primary to standby power supply through operating a toggle switch in
Bluetooth electronics application. Even here the data was verified and result was accepted.

Dept. of EEE, BIET, Davangere Page 38


IoT Based Switching of Microgrid for Uninterrupted Power Supply

Chapter 6
ADVANTAGES AND DISADVANTAGES
Advantages

 Continuous uninterrupted power supply.

 Uncertain data loss can be prevented.

 Emergency power supply.

 Protects voltage sensitive devices from bad electricity.

 Provides surge protection.

 Power industries.

Disadvantages

 We should always keep track on primary supply.

Dept. of EEE, BIET, Davangere Page 39


IoT Based Switching of Microgrid for Uninterrupted Power Supply

CONCLUSION AND FUTURE SCOPE

From this project, we would like to conclude that we can have a backup system for whole
area from the renewable energy source and in case of any interruption, it can be switched
over to backup grid. For switching purpose, we can have two methods i.e. Automatic and
Manual. Automatic switching over can be done by programming and pre-determining the
parameters on other hand switching can be done using IoT technology remotely. Hence,
Supplying continuous uninterrupted power.

The future work can be on data processing at the IoT site and adding additional sensors,
relays at the input side to capture various signals, carryout signal conditioning and monitor
them. Need for electrification in remote locations and development countries. Reliable and
secure power supply worldwide.

Dept. of EEE, BIET, Davangere Page 40


BIBLIOGRAPHY

Text Books:
[1] “Exploring Arduino” of 1st Edition, written by Jeremy Blum.
[2] “IoT for Smart Grids” explains fundamentals of control theory for IoT and
Smart grids by Prof. Kostas Siozios and Dimitrios Anagnostos.

Publications:
[3] “A survey on modeling of Microgrid"—from fundamental physics to phasors
and voltage sources by a team of research authors Johannes Schiffera, Daniele
Zonettib, Romeo Ortegab, Aleksandar Stankovi´cc, Tevfik Sezid, J¨org
Raische.
[4] “A Microgrid Future” We Can See it from here on website
[5] “Micro grid Standards and Technologies” by Kroposki, B., Basso, T., &
DeBlasio, R. (2008, August)
[6] “IoT based Reconfiguration of Microgrids through an Automated Central
Protection Centre” by Anay Majee.,& Gnana Swathika O.V (IEEE Xplore: 26
October 2017)
[7] “Remote Monitoring and Control of Microgrid using Smart Sensor Network
and Internet of Thing” Kaisar R. Khan., Atiqur Rahman., Adnan Nadeem.,
Muhammad shoaib Siddiqui., Rafi Ahmad Khan (IEEE Xplore: 23 August
2018)
[8] “Nano grids, Microgrid and the Internet of Things” that was published in
Energies, authored by Antonio Moreno-Munoz.

Web Links:
[9] https://core.ac.uk/download/pdf/42625988.pdf .
[10] https://microgridknowledge.com/microgrid-future/.
[11] https://www.researchgate.net/publication/224325606.
[12] https://ieeexplore.ieee.org/document/8081066.
[13] https://ieeexplore.ieee.org/document/8441994.
IoT Based Switching of Microgrid for Uninterrupted Power Supply

APPENDIX
Appendix A
Source code for our project:

#include <LiquidCrystal.h>

LiquidCrystal lcd(9,8,7,6,5,4);

const int Svolt = A0;


const int Pvolt = A1;
const int Mamp = A2;
const int load_sw = 12;

const int MVN = 17;


const int MVL = 18;
const int SVN = 10;
const int SVL = 11;

int tempS,tempP,tempA;
int pinValue = 0, F1 = 0, F2 = 0;
char t;

int update_interval=100; // time interval in ms for updating panel indicators


unsigned long last_time=0; // time of last update
char data_in; // data received from serial link
int red,green,blue; // RGB color
float trace1,trace2,trace3; // Roll Graph trace values
void setup() {
lcd.begin(16, 2);
lcd.setCursor(0,0);
Serial.begin(9600); //Change baud rate as required!

Dept. of EEE, BIET, Davangere Page 42


IoT Based Switching of Microgrid for Uninterrupted Power Supply

pinMode(MVN, OUTPUT);
pinMode(MVL, OUTPUT);
pinMode(SVN, OUTPUT);
pinMode(SVL, OUTPUT); // load_sw
pinMode(load_sw, INPUT_PULLUP);
digitalWrite(MVN, LOW);
digitalWrite(MVL, LOW);
digitalWrite(SVN, LOW);
digitalWrite(SVL, LOW);

///////////// Build panel in app

Serial.println("*.kwl");
Serial.println("clear_panel()");
Serial.println("set_grid_size(16,8)");
Serial.println("add_button(0,1,27,R,r)");
Serial.println("add_led(0,4,2,L,0,0,0)");
Serial.println("add_led(3,4,2,L,0,0,0)");
Serial.println("add_roll_graph(6,1,10,0.0,100.0,100,G,Graph Title,X-Axis,Y-
Axis,1,0,1,0,1,1,medium,none,3,1,42,97,222,2,237,115,7,3,51,215,155)");
Serial.println("set_panel_notes(-,,,)");
Serial.println("run()");
Serial.println("*");
}

void loop () {
// put your main code here, to run repeatedly:
tempS = analogRead(Svolt);
tempS = ((tempS / 1023.0)*5.0)*93;
//Serial.print("Solar volt:")
tempP = analogRead(Pvolt);

Dept. of EEE, BIET, Davangere Page 43


IoT Based Switching of Microgrid for Uninterrupted Power Supply

//Serial.print("mains volt:");Serial.println(tempP);
tempP = (analogRead(Pvolt)/1023.0)*5.0*63.0;
//Serial.print("tempP:");Serial.println(tempP);

tempA = analogRead(Mamp);
tempA = tempA/2;
//tempA = ((tempA / 1023.0)*5.0);
//Serial.print("load Amp:");Serial.println(tempA);

lcd.setCursor(0,0);
lcd.print("S/P ");lcd.print(tempS);lcd.print("/");lcd.print(tempP);
lcd.setCursor(13,1);
lcd.print(tempA);
delay(500);
///////////// Receive and Process Data

if (Serial.available()){
data_in=Serial.read(); //Get next character

if(data_in=='R'){ //Button Pressed


//<--- Insert button pressed code here
}
if(data_in=='r'){ // Button Released
//<--- Insert button released code here
}
}
if((digitalRead(load_sw) == LOW) || (data_in) == 'R')
{
lcd.setCursor(0,1);
lcd.print("over/manual ");

Dept. of EEE, BIET, Davangere Page 44


IoT Based Switching of Microgrid for Uninterrupted Power Supply

Serial.println("over/manual ");
digitalWrite(MVN, LOW);
digitalWrite(MVL, LOW);
delay(2000);
digitalWrite(SVN, HIGH);
digitalWrite(SVL, HIGH);
F2 = 1;
F1 = 0;
delay(1000);
}
else if((tempP >= 190))
{
red=0; green=200; blue=0; // <--- Set RGB color here
Serial.print("*LR"+String(red)+"G"+String(green)+"B"+String(blue)+"*");
red=200; green=0; blue=0; // <--- Set RGB color here
Serial.print("*XR"+String(red)+"G"+String(green)+"B"+String(blue)+"*");
lcd.setCursor(0,1);
lcd.print("gird1 Power");
// Serial.println("Mains Power");
F2 = 1;
F1 = 0;
digitalWrite(SVN, LOW);
digitalWrite(SVL, LOW);
delay(1000);
digitalWrite(MVN, HIGH);
digitalWrite(MVL, HIGH);
delay(2000);
}
else if((tempP <= 190))
{

Dept. of EEE, BIET, Davangere Page 45


IoT Based Switching of Microgrid for Uninterrupted Power Supply

red=0; green=200; blue=0; // <--- Set RGB color here


Serial.print("*XR"+String(red)+"G"+String(green)+"B"+String(blue)+"*");
red=200; green=0; blue=0; // <--- Set RGB color here
Serial.print("*LR"+String(red)+"G"+String(green)+"B"+String(blue)+"*");
lcd.setCursor(0,1);
lcd.print("gird2 Power");
// Serial.println("Solar Power");
F2 = 1;
F1 = 0;
digitalWrite(MVN, LOW);
digitalWrite(MVL, LOW);
delay(2000);
digitalWrite(SVN, HIGH);
digitalWrite(SVL, HIGH);
delay(1000);
}
else
{
lcd.setCursor(0,1);
lcd.print("line dwon");
// Serial.println("line dwon");
digitalWrite(MVN, LOW);
digitalWrite(MVL, LOW);
digitalWrite(SVN, LOW);
digitalWrite(SVL, LOW);
}

///////////// Send Data to Android device

unsigned long t=millis();

Dept. of EEE, BIET, Davangere Page 46


IoT Based Switching of Microgrid for Uninterrupted Power Supply

if ((t-last_time)>update_interval){
last_time=t;

// Update LED Color


red=50; green=100; blue=150; // <--- Set RGB color here
Serial.print("*LR"+String(red)+"G"+String(green)+"B"+String(blue)+"*");

// Update LED Color


red=50; green=100; blue=150; // <--- Set RGB color here
Serial.print("*LR"+String(red)+"G"+String(green)+"B"+String(blue)+"*");

// Update Roll Graph


trace1=10.0; // <--- Set trace 1 Y value here
trace2=20.0;
trace3=30.0;
Serial.print("*G"+String(tempS)+","+String(tempP)+","+String(tempA)+"*");
}
}

Dept. of EEE, BIET, Davangere Page 47


IoT Based Switching of Microgrid for Uninterrupted Power Supply

Appendix B
Project Model

Fig 1: Distribution Section

Fig 2: Control Section

Fig 3: Load Section

Dept. of EEE, BIET, Davangere Page 48


IoT Based Switching of Microgrid for Uninterrupted Power Supply

Fig 4: When Power Supply is from Microgrid 1

Fig 5: LCD Showing Microgrid 1 Parameter

Fig 6: When Power Supply is from Microgrid 2

Dept. of EEE, BIET, Davangere Page 49


IoT Based Switching of Microgrid for Uninterrupted Power Supply

Fig 7: LCD Showing Microgrid 2 Parameter

Fig 8: Switching Through IoT Application

Fig 9: Graph obtained on IoT Application (Bluetooth Electronics)

Dept. of EEE, BIET, Davangere Page 50


CONTACT DETAILS

SL.
USN NAME PHONE NO. EMAIL ID ADDRESS PHOTO
NO

1. 4BD17EE039 S P SANNIDHI 8792341226 sannidhi.ss21 A11, Labour


@gmail.com colony ,
Harihar

2. 4BD17EE052 S P SRINIDHI 7975082719 srinidhi.ss24 A11 , Labour


@gmail.com colony ,
Harihar

3. 4BD18EE400 ABHISHEK G R 7019439936 grabhishek1 Gowrammana


@gmail.com halli ,
Jagalur,
Davanagere

4. 4BD18EE403 KRISHNA B R 9164167707 krishnakittybr Kalidas


@gmail.com nagar,
Harihar

You might also like