Professional Documents
Culture Documents
Microcontroller Based Distribution Transformer Protection
Microcontroller Based Distribution Transformer Protection
DEDICATION
This project work may not get to its final destination without the strong
guidance of our advisor Mr. Vijay saradhi and Mr. Hayilemariam other willing
power engineering instructors mentioned in acknowledgement part and our
friends who motivate us to do our best. So, we would like to dedicate this work
for power engineering stream.
ACKNOWLEDGEMENT
First and foremost, we would like to thank the Almighty God for His guidance throughout our
studies in the Arbaminch University and the completion of this project. And also we would like
to express our gratitude to our advisor, Mr. Vijaysaradhi and Mr. Hayilemariam who gave us the
opportunity to have such a practical based knowledge related to software applications and our
field of study in terms of communication with other persons, ability to develop new skills and
cooperation with others so as to share experiences and knowledge.
ABSTRACT
Microcontroller based distribution transformer protection system is taken to mean the use of
advanced technologies in order to determine equipment condition, and potentially predict failure.
This project is essential to prevent faults that are costly to repair and result loss of service. It is
used to protect and ensure the integrity, reliability and functionality of distribution transformers.
It has a great advantage to improve durability of the distribution transformers which are installed
with a high cost and human effort.
This project consists of measuring the current consumed by the transformer using current
transformer (CT) and temperature of the transformer by temperature sensor. The measured
signals of each line currents will be conditioned using rectification and voltage regulation in
order to make suitable for microcontroller input. Then after the temperature conditioning current
signal of the transformer continuously detected at every moment by the microcontroller.
At the initial moment the microcontroller sends turn on signal to the relay meanwhile the relay
switch then power will flow from the source to the load through transformer. The
microcontroller will take some delay time for the sake of system stabilization and LCD displays
a normal condition code N. If the system operates at normal condition no action will be taken,
but if there is any fault happen the microcontroller take an action to disconnect the input side of
the transformer and display the status fault condition including system condition on the LCD at
the same time. Then after a few delay time it re-closes the input line again, if the fault is cleared
system continuous normally. But if the fault persists system will be stay disconnected and fault
status will be indicated again on the LCD display.
List of figure
Figure 1 Air Core Type Transformers ........................................................................................ 5
Figure 2 Iron Core Type Transformer ....................................................................................... 5
Figure 3 Allegro Microsystems ACCS712 Series ...................................................................... 7
Figure 4 Current sensor functional block diagram ................................................................... 9
Figure 5 Relay ............................................................................................................................... 9
Figure 6 Lcd................................................................................................................................. 12
Figure 7 over Current Flow ....................................................................................................... 13
Figure 8 Over current Protection Relay ................................................................................... 15
Figure 9 A block diagram representation of microcontroller Protection System for DF .... 18
Figure 10 Microcontroller-LCD interface as done in the simulation software ..................... 19
Figure 11 Microcontroller-LED connection3 ........................................................................... 20
Figure 12 Microcontroller-relay interface as done on the simulation software. ................... 22
Figure 13 Microcontroller-sensor interface as done on the simulation software.................. 22
Figure 14 Microcontroller-sensor interface as done on the simulation software.................. 23
Figure 16 LCD Display ............................................................................................................... 27
Figure 17 Led interface .............................................................................................................. 28
Table of Contents
CHAPTER ONE ........................................................................................................................................... 1
1. INTRODUCTION .................................................................................................................................... 1
1.1 BACKGROUND ................................................................................................................................ 1
1.2 Objective ............................................................................................................................................. 2
1.3 Problem of statement .......................................................................................................................... 3
1.4 Scope of project .................................................................................................................................. 3
CHAPTER TWO .......................................................................................................................................... 4
2 LITERATURE REVIEW .......................................................................................................................... 4
2.1 Definition of Transformer ................................................................................................................... 4
2.2 Principle of Transformer ..................................................................................................................... 4
2.3 Basic Theory of Transformer .............................................................................................................. 4
2.4 Main Constructional Parts of Transformer ......................................................................................... 6
2.5 Causes of fault in transformer ............................................................................................................. 7
2.6 Current sensor ..................................................................................................................................... 7
2.7 Relay ................................................................................................................................................... 9
2.8 Microcontroller ................................................................................................................................. 10
2.9 LCD (liquid crystal display) ............................................................................................................. 11
2.10 Overloading..................................................................................................................................... 12
2.11 Over Current ................................................................................................................................... 13
2.12 Over current protection ................................................................................................................... 14
2.13 Transformer over heating ................................................................................................................ 15
2.14 Temperature Sensor ........................................................................................................................ 15
CHAPTER THREE .................................................................................................................................... 17
METHODOLOGY AND DESIGN ............................................................................................................ 17
3.1 Methodologies................................................................................................................................... 17
3.2 Design ............................................................................................................................................... 18
3.4 Warning devices and relay control.................................................................................................... 19
3.5 SOFTWARE DESIGN ..................................................................................................................... 23
3.6 Analytical Method and Technique .................................................................................................... 24
CHAPTER FOUR....................................................................................................................................... 26
RESULTS AND DISCUSSION ................................................................................................................. 26
4.1 Simulated results ............................................................................................................................... 26
4.2 Analysis............................................................................................................................................. 27
4.3 Evaluation of accuracy ...................................................................................................................... 28
CHAPTER FIVE ........................................................................................................................................ 29
CONCLUSIONS AND RECOMMANDETION ........................................................................................ 29
5.1 Conclusions ....................................................................................................................................... 29
5.2 limitations and Future recommendations .......................................................................................... 30
References ................................................................................................................................................... 31
Appendix ..................................................................................................................................................... 32
CHAPTER ONE
1. INTRODUCTION
1.1 BACKGROUND
Different type of protections is installed to protect the equipment in an electric power system.
Their task is to disconnect failed or overloaded equipment or parts of the system to avoid
unnecessary damages on equipment and personnel. The purpose is also to limit the impact of
failures on the parts of the system that have not failed.
An intensive development of protections based on modern information technology is going on
both regarding hardware and software. On the hardware side microprocessors have been used
over a long time to implement different functions in the protections, and with the recent
developments more and more complicated functions can be implemented in a reliable way.
In general the functions which earlier were handled with separate relays are increasingly being
integrated with other functional units for control and supervision
The summary here is concentrated on general principles for protections. A protection for an
electric power system comprises the following parts:
Measurement device with current- and/or voltage transformers and other sensors
measuring the relevant quantities.
Relay which when certain conditions are fulfilled sends signals to a circuit breaker or
another switching device.
This relay was earlier a separate unit, but can in modern protections be a part of a larger
unit for protection, supervision and control.
Power supply systems which shall secure the power supply to the protection system, even
with faults in the system. The requirements on a protection system are that they should be
dependable, secure, selective, sensitive, and fast.
Dependability:- means that the protection should react and do its action when a fault
occurs for which it is designed to react for. To achieve desired dependability double or
even triple sets of certain parts of the protection of signal paths might be needed.
Malfunctions can be divided into”not occurring” operations (which are actions that were
supposed to happen but did not) and +”unwanted” operations (which are actions that
happened although they should not have). Normally not occurring operations are more
serious malfunctions than unwanted ones.
Security:-means that the protection should not react when no fault occurs or when a fault
for which it is not intended to react occurs.
Selectivity:- implies that not more than necessary pieces of equipment and apparatuses
are disconnected to isolate a fault.
Sensitivity:- is needed to detect failures which cause small fault currents, e.g. high
impedance faults. This implies that the risk for miss operations increases at “small”
disturbances, e.g. at energization of transformers, or at high load operation but normal
operation.
The protection should react fast to secure that damages on persons and equipment are
prevented or limited
1.2 Objective
The main objective of this project is to protect distribution transformer by using microcontroller
based protection system , to get fast response, better isolation and accurate detection of the fault,
to improve the reliability of the power system supply and to protect overloaded equipment or
parts of the system as well as to avoid unnecessary damages on equipment and personnel.
This system overcomes the other drawbacks in the existing systems such as maintenance and
response time. To achieve this following must be done.
a) Design and build overheating and over current relay using PIC microcontroller and a current
sensor
b) Development, analysis and calibration of the current sensor and temperature sensor.
c) Development of the ADC program to convert the analogue sensor output to equivalent digital
form within the PIC microcontroller.
e) Development of warning (audio and visual) and relay control system program.
CHAPTER TWO
2 LITERATURE REVIEW
Electrical transformer is a static device which transforms electrical energy from one circuit
to another without any direct electrical connection and with the help of mutual induction
between two windings. It transforms power from one circuit to another without changing its
frequency but may be in different voltage.
The working principle of transformer is very simple. It depends upon Faraday’s law of
electromagnetic induction. Actually, mutual induction between two or more winding is
responsible for transformation action in an electrical transformer.
According to these Faraday’s laws, "Rate of change of flux linkage with respect to time is
directly proportional to the induced EMF in a conductor or coil".
Say you have one winding which is supplied by an alternating electrical source. The alternating
current through the winding produces a continually changing flux or alternating flux that
surrounds the winding. If any other winding is brought nearer to the previous one, obviously
some portion of this flux will link with the second. As this flux is continually changing in its
amplitude and direction, there must be a change in flux linkage in the second winding or coil.
According to Faraday’s law of electromagnetic induction, there must be an EMF induced in the
second. If the circuit of the later winding is closed, there must be a current flowing through it.
This is the simplest form of electrical power transformer and this is the most basic of working
principle of transformer. The winding which takes electrical power from the source, is generally
known as primary winding of transformer
The winding which gives the desired output voltage due to mutual induction in the transformer,
is commonly known as secondary winding of transformer.
flows through the closed circuit of later, will be so small in amount that it will be difficult to
measure.
The rate of change of flux linkage depends upon the amount of linked flux with the second
winding. So, it is desired to be linked to almost all flux of primary winding to the secondary
winding. This is effectively and efficiently done by placing one low reluctance path common to
both of the winding. This low reluctance path is core of transformer, through which maximum
number of flux produced by the primary is passed through and linked with the secondary
winding.
𝐸=𝑁𝑑∕ɸ𝑑𝑡
𝐸=𝑁∗𝜔∗ɸ𝑚𝑎𝑥∗cos𝜔𝑡
𝐸𝑚𝑎𝑥=𝑁∗𝜔∗ɸ𝑚𝑎𝑥
𝐸𝑟𝑚𝑠=𝑁∗𝜔∗ɸmax√2=2𝜋∗𝑓∗𝑁∗ɸ𝑚𝑎𝑥/√2
𝐸𝑟𝑚𝑠=4.44∗𝑓∗𝑁∗ɸ𝑚𝑎𝑥
Where:
𝑓 - Is the flux frequency in Hertz, =𝜔/2𝜋
𝛮 - The number of coil windings.
ɸ - Is the flux density in Webber’s
2. Magnetic Core of transformer - the magnetic flux produced by the primary winding, that will
pass through this low reluctance path linked with secondary winding and create a closed
magnetic circuit.
3. Secondary Winding of transformer – the flux, produced by primary winding, passes through
the core, will link with the secondary winding. This winding also wounds on the same core and
gives the desired output of the transformer.
There are many faults that can occur in a transformer owing to a variety of reasons as follows
a) Winding and core fault is the most frequent type of fault in a transformer. This can be
attributed to weakening of conductor insulation. Phase faults rarely occur in the transformer, they
may however occur at the terminals of that are found within the transformer protection zone.
b) Most power transformers use oil for cooling and insulation, oil leakage can also be a cause of
fault in a transformer.
c) The inrush current that occurs momentarily when a transformer is energized can also be
treated as a fault unless conditions are set for its detection.
d) Inter-turn faults may occur and cause rise in hot spots within the transformer winding.
e) Transformer may experience over fluxing which may be as a result of transformer operating at
low frequency at rated voltage. Over fluxing may also be caused by overvoltage operation at
rated frequency.
The current sensor used in this project is Allegro ACS712ELCTR-30A-T. It is popularly used in
diverse applications in motor control, electric vehicles and in power distribution. It has the
following features :-
Low-noise analogue signal path
Device bandwidth is set via the new FILTER pin
5 μs output rise time in response to step input current
80 kHz bandwidth
Total output error 1.5% at TA= 25°C
Small footprint, low-profile SOIC8 package1.2 mΩ internal conductor resistance
2.1 kVRMS minimum isolation voltage from pins 1-4 to pins 5-8
5.0 V, single supply operation
66 mV/A output sensitivity
Output voltage proportional to AC or DC currents
Factory-trimmed for accuracy
Extremely stable output offset voltage
Nearly zero magnetic hysteresis
Ratiometric output from supply voltage
The Allegro ACS712ELCTR-30A-T has a low-offset linear Hall sensor circuit that has a
conduction path made of copper located next to the die. A magnetic field is caused by the current
flowing through the copper conductor. This magnetic field is detected by the integrated Hall IC
which converts it into a voltage proportional to the magnetic flux. A current of 1A flowing in a
conductor produces 66mV. The close proximity of the magnetic signal to the Hall transducer
optimizes the device accuracy. To attain precision, in terms of voltage produced, a low-offset
chopper-stabilized Bi-CMOS Hall IC is used. It is programmed for accuracy at the factory
The sensor measures a maximum of 30A from the load current. This serves as its primary
current. The sensor output voltage is fed into the microcontroller as the analogue input.
2.7 Relay
A relay is an electrically operated switch. It uses electromagnetic force to close or open contact.
The relay employed in this project can be operated as normally closed or normally open. For this
system, the normally closed mode was used. The relay circuit is illustrated in figure below . The
relay was used to de-energize the contactor coil in case of a fault thus isolating the transformer
from the system.
Figure 5 Relay
2.7.1 Contactor
When a relay is used to switch a large amount of electrical power through its contacts, it is
referred to as a contractor. Contactors basically have several contacts, and which are usually (but
not always) normally-open, so that power to the load is shut off when the coil is de-energized
In order for a protection relay to operate effectively, it must have the following qualities.
a) Reliability: power protection relays should remain inoperative always as long as a fault does
not occur. But when a fault occurs, they should respond as quickly as possible.
b) Selectivity: it must only operate on the section that has experienced a fault to avoid
unnecessary power outs due to wrong detections. It should also respond only when a fault
occurs.
c) Sensitivity: The relaying equipment should be highly sensitive so that it can be relied on to
provide the required detection.
d) Speed: the relaying equipment must operate at the required speed. It should not delay so as to
give time for system equipment to get destroyed. It should also not be too fast to cause undesired
operation.
2.8 Microcontroller
There are two branches in the ongoing evolution of the microprocessor. One branch supports
CPUs for the personal computer and workstation industry, where the main constraints are high
speed and large word size (32 and 64 bits). The other branch includes development of the
microcontroller, which is a single IC containing specialized circuits and functions that are
applicable to mechatronic system design. It contains a microprocessor, memory, I/O capabilities,
and other on-chip resources. It is basically a microcomputer on a single IC. Examples of
microcontrollers’ are Microchip’s PIC, Motorola’s 68HC11, and Intel’s 8096. Factors that have
driven development of the microcontroller are low cost, versatility, ease of programming, and
small size. Microcontrollers are attractive in mechatronic system design since their small size
and broad functionality allow them to be physically embedded in a system to perform all of the
necessary control functions. Microcontrollers are used in a wide array of applications including
home appliances, entertainment equipment, telecommunication equipment, automobiles, trucks,
airplanes, toys, and office equipment. All these products involve devices that require some sort
of intelligent control based on various inputs. For example, the microcontroller in a microwave
oven monitors the control panel for user input, updates the graphical displays when necessary,
and controls the timing and cooking functions. In an automobile, there are many microcontrollers
to control various sub systems, including cruise control, antilock braking, ignition control,
keyless entry, and environmental control, and air and fuel flow. An office fax machine controls
actuators to feed paper, uses photo sensors to scan a page, sends or receives data on a phone line,
and provides a user interface complete with menu-driven controls. A toy robot dog has various
sensors to detect inputs from its environment (e.g., bumping into obstacles, being patted on the
head, light and dark, voice commands), and a non board microcontroller actuates motors to
mimic actual dog behavior (e.g., bark ,sit, and walk) based on this input. All of these powerful
and interesting devices are controlled by microcontrollers and the software running on them.
LCDs are used in a wide range of applications including computer monitors, televisions,
instrument panels, aircraft cockpit displays, and signage. They are common in consumer devices
such as video players, gaming devices, clocks, watches, calculators, and telephones, and have
replaced cathode ray tube (CRT) displays in most applications. They are available in a wider
range of screen sizes than CRT and plasma displays, and since they do not use phosphors, they
do not suffer image burn-in. LCD sari, however, susceptible to image persistence.
The LCD screen is more energy efficient and can be disposed of more safely than a CRT. Its low
electrical power consumption enables it to be used in battery-powered electronic equipment. It is
an electronically modulated optical device made up of any number of segments filled with liquid
crystals and arrayed in front of a light source (backlight) or reflector to produce images in color
or monochrome. The LCD can be operated either in 4-bit or 8-bit interface. 8bit interface makes
use of all the pins while 4-bit mode uses only 4 data lines plus the other remaining pins. In this
project, 8-bit mode is used.
Figure 6 Lcd
2.10 Overloading
A transformer is normally rated to operate continuously at a maximum temperature based on an
assumed ambient. No sustained overload is usually permissible for this condition. At lower
ambient it is often possible to allow short periods of overload but no hard and fast rules apply,
regarding the magnitude and duration of the overload .The only certain factor is that the winding
must not overheat to the extent that the insulation is cooked, thereby accelerating ageing. A
winding temperature of 95 °C is considered to be the normal maximum working value Systems
Protection.
designed to keep the flow of current in a circuit at a safe level to prevent the circuit conductors
from overheating
In electric power system, over current refers to a situation where more than current intended
flows through a conductor. This leads to excessive heat generation and thus the risk of causing
fire or causing destruction to electrical equipment. Over current is caused by short circuit,
overloading or wrong design.
Over current protection protects the transformers against currents that rise beyond its rated value.
Over current relay isolates the transformer in case of a fault in the system. This relay is the focus
of this project. It can be implemented using analogue circuitry or digitally using
microcontrollers. This project seeks to apply microcontroller and appropriate software program
to design an over current relay. The diagram below illustrates an over current relay scheme.
The only certain statement is that the winding must not overheat; a temperature of about 95°C is
considered to be the normal maximum working value beyond which a further rise of 8°C-10°C,
if sustained, will halve the insulation life of the unit. Protection against overload is therefore
based on winding temperature, which is usually measured by a thermal image technique.
Protection is arranged to trip the transformer if excessive temperature is reached. The trip signal
is usually routed via a digital input of a protection relay on one side of the transformer, with both
alarm and trip facilities made available through programmable logic in the relay. Inter tripping
between the relays on the primary side of the transformer is usually applied to ensure total
disconnection transformer.
conduction, and radiation. Temperature sensing can be done either through direct contact with
the heating source, or remotely, without direct contact with the source using radiated energy
instead.
Accurate temperature measurements are required in many other measurements systems such as
process control and instrumentation applications. In most cases, because of low level non-linear
outputs, the sensor output must be properly conditioned and amplified before further processing
can occur.
Except for IC sensors, all temperature sensors have nonlinear transfer functions. In the past,
complex analog conditioning circuits were designed to correct for the sensor nonlinearity. These
circuits often required manual calibration and precision resistors to achieve the desired accuracy.
Today these sensor outputs may be digitized directly by high resolution ADCs. Linearization and
calibration is then performed digitally, thereby reducing cost and complexity.
The LM35 series are precision integrated-circuit temperature sensors, whose output voltage is
linearly proportional to the Celsius (Centigrade) temperature. The LM35 thus has an advantage
over linear temperature sensors calibrated in
Kelvin, as the user is not required to subtract a large constant voltage from its output to obtain
convenient Centigrade scaling. The LM35 does not require any external calibration or trimming
to provide typical accuracies of ±1∕4°C at room temperature and ±3∕4°C over a full −55 to
+150°C temperature range. Low cost is assured by trimming and calibration at the wafer level.
The LM35’s low output impedance, linear output, and precise inherent calibration make
interfacing to readout or control circuitry especially easy. It can be used with single power
supplies, or with plus and minus supplies. As it draws only 60 μA from its supply, it has very
low self-heating, less than 0.1°C in still air. The LM35 is rated to operate over a −55° to +150°C
temperature range, while the LM35C is rated for a −40° to +110°C range (−10° with improved
accuracy). The LM35 series is available packaged in hermetic TO-46 transistor packages, while
the LM35C, LM35CA, and LM35D are also available in the plastic TO-92 transistor package.
The LM35D is also available in an 8-lead surface mount small outline package and a plastic TO-
220 package
CHAPTER THREE
3.1 Methodologies
Transformers are typically the most common application where proper over current, over load
and overheating protections are required and utilized to provide the necessary protection to
facilities, electrical systems, equipment, and most importantly electrical workers and other
involved personnel. As a result, it is vitally important that there is at least a basic understanding
of how transformers and their related electrical systems can be properly protected.
The methodology of this project consists of measuring the current consumed by the transformer
using current sensor (CS) and temperature of the transformer by temperature sensor.At the initial
moment the microcontroller sends turn on signal to the relay meanwhile the relay connect the
power for turning on the switch then power will flow from the source to the load through
transformer. The microcontroller will take some delay time for the sake of system stabilization
and LCD displays a normal condition codes. If the system operates at normal condition no action
will be taken, but if there is any fault happen the microcontroller take an action to disconnect the
output side of the transformer and display the status fault condition including system condition
on the LCD at the same time.if the fault persists system will be stay disconnected and fault status
will be indicated again on the LCD display.
Before looking the details of designing this project, it is best to start with brief review of the
system design. Figure 9 shows the complete system design. The whole idea of this project is to
isolate the faulty conditions from over load Current and overheating by controlling the SSR
using microcontroller
3.2 Design
The ultimate objective of this project is to design an automatic over current relay that uses
microcontroller to read transformer currents and automatically isolate the transformer from the
power system in case of a fault. This design is therefore based on the programmable Interrupt
Controller (PIC microcontroller) as the main control element in the system. The design of this
system has been divided into the following sections;
Hardware design
Software design
3.3 Hardware Design
The PIC16F877A microcontroller has been used as the main device in the development of this
system. Based on the number of input/output pins and the other functional features it was
selected for use in this project. The 20 pins of the microcontroller have been distributed for use
as follows
3.3.1 Interfacing LCD to the microcontroller
The LM016L LCD display device has been employed in the system implementation. The LCD
operates as a medium for communicating the amount of current flowing in the electric conductor
at any given time. The logical process that avails the readings takes place within the
microcontroller using a program and displayed on the LCD. The LCD operates in 8-bit mode, so
8 pins from the microcontroller have been connected to the 8 data pins on the LCD. Since
PORTC of the PIC16F877A is 8-bit wide, it is used for this purpose. So, RB2- RB5 pins of PIC
microcontroller have been connected to D4-D7 of the LCD as illustrated in the following:-
LCD1
LCD2
LM041L
RV1
RV4
VDD
VSS
VEE
RW
RS
D0
D1
D2
D3
D4
D5
D6
D7
50%
E
1
2
3
4
5
6
7
8
9
10
11
12
13
14
1k
U1
U4
13 33
OSC1/CLKIN RB0/INT
14 34
OSC2/CLKOUT RB1
35
RB2
2 36
RA0/AN0 RB3/PGM
3 37
RA1/AN1 RB4
4 38
RA2/AN2/VREF-/CVREF RB5
5 39
RA3/AN3/VREF+ RB6/PGC
6 40
RA4/T0CKI/C1OUT RB7/PGD
7
RA5/AN4/SS/C2OUT
15
RC0/T1OSO/T1CKI
8 16
RE0/AN5/RD RC1/T1OSI/CCP2
9 17
RE1/AN6/W R RC2/CCP1
10 18
RE2/AN7/CS RC3/SCK/SCL
23
RC4/SDI/SDA
1 24
MCLR/Vpp/THV RC5/SDO
25
RC6/TX/CK
26
RC7/RX/DT
19
RD0/PSP0
20
RD1/PSP1
21
RD2/PSP2
22
RD3/PSP3
27
RD4/PSP4
28
RD5/PSP5
29
RD6/PSP6
30
RD7/PSP7
PIC16F877A
In order to indicate the state of the power line, two Light emitting diodes have been used. One
LED emits red light and the other one green light. The green LED is set to blink when the current
flowing through the power system is at a normal level. The red LED should blink at an interval
of half a second whenever the current build up approaches the overload level through to the point
when the relay gets energized. This acts as a visual warning when a fault occurs. The green LED
has been connected to the pin RD7 (pin 30) via a current limiting resistor (220Ω) to ground. The
Red LED has been connected to pin RD6 (pin 29) also through a current limiting resistor (220Ω)
to ground. The microcontroller pins can give a maximum of 5.3V. LEDs typically have a
forward voltage drop ranging between 1.8V and 3.3V subject to the LED color. The value for red
LED is about 1.8V. The forward voltage drop is a function of the LED color frequency.
For the LED to light, it needs around 20mA of current. The calculation below justifies the
resistor values chosen for the design of this system.
According to Ohms law, resistance is a function of voltage and current, as shown below.
𝑅 = 𝑉𝑠−𝑉𝑓
𝐼𝑠
𝑅 = (5.3−1.8) ∗ 1000
20
=175Ω
𝑉𝑠=𝑠𝑢𝑝𝑝𝑙𝑦 𝑣𝑜𝑙𝑡𝑎𝑔𝑒 𝑓𝑟𝑜𝑚 𝑡𝑒 𝑝𝑖𝑛 𝑡𝑜 𝑡𝑒 𝐿𝐸𝐷,
𝑉𝑓=𝑓𝑜𝑟𝑤𝑎𝑟𝑑 𝑣𝑜𝑙𝑡𝑎𝑔𝑒 𝑑𝑟𝑜𝑝,
𝐼𝑠=𝐿𝐸𝐷𝑐𝑢𝑟𝑟𝑒𝑛𝑡
175Ω is not a standard resistor value, so a value close to it can be chosen. In order to ensure that
the current sourced is as little as possible, the 220Ω resistor has been chosen such that the
maximum current sourced becomes; 5.3−1.8220=16𝑚𝐴
U1
U4
13 33
OSC1/CLKIN RB0/INT
14 34
OSC2/CLKOUT RB1
35
RB2
2 36
RA0/AN0 RB3/PGM
3 37
RA1/AN1 RB4
4 38
RA2/AN2/VREF-/CVREF RB5
5 39
RA3/AN3/VREF+ RB6/PGC
6 40
RA4/T0CKI/C1OUT RB7/PGD
7
RA5/AN4/SS/C2OUT
15
RC0/T1OSO/T1CKI
8 16
RE0/AN5/RD RC1/T1OSI/CCP2
9 17
RE1/AN6/WR RC2/CCP1
10 18
RE2/AN7/CS RC3/SCK/SCL
23
RC4/SDI/SDA
1 24
MCLR/Vpp/THV RC5/SDO
25
RC6/TX/CK
26
RC7/RX/DT
19
RD0/PSP0
20
RD1/PSP1
21 D2
D1
RD2/PSP2
22
R1
R4
RD3/PSP3
27 220
RD4/PSP4
28 LED-RED
RD5/PSP5
29 D3
D5
RD6/PSP6
30
R2
R6
RD7/PSP7
220
PIC16F877A LED-GREEN
An electromagnetic relay has been employed as a switch to isolate the transformer from the
power system in case a fault occurs. The rating of the relay used is in the model system is 12V.
Due to the fact that the relay might draw a current of higher value than what the microcontroller
can sink or source, a Darlington transistor is used as a switch to run it. It is connected between
the transistor VDD and the Darlington transistor collector. When fault current is detected, the
RB6 pin of the microcontroller is set high. This produces current that drives the Darlington
transistor. The transistor in turn completes the relay coil circuit. The relay is energized through
the principle of electromagnetic induction. It in turn de-energizes the contactor to isolate the
transformer from the system. The relay is used alongside a contactor because; a power
transformer uses high currents that the 5V relay cannot sustain. The relay sends signals to the
contactor which in turn disconnects the circuit and isolates the transformer from the power
system.
RL1
RL2
TR1
TR2 12V
+88.8
AC Amps
+88.8
1k
61%
AC Volts
RV3
RV5
TRAN-2P2S
R5
R8 D10
D7 B1
B2
100k +88.8 12V
DIODE Volts
4
U3
U6
GND IP-
VCC IP+
ACS755XCB-100
VIOUT
Q3
Q5
1
2N1711
U1
U4
13 33
OSC1/CLKIN RB0/INT
14 34
OSC2/CLKOUT RB1
35
RB2
2 36
RA0/AN0 RB3/PGM
3 37
RA1/AN1 RB4
4 38
RA2/AN2/VREF-/CVREF RB5
5 39
RA3/AN3/VREF+ RB6/PGC
6 40
RA4/T0CKI/C1OUT RB7/PGD
7
RA5/AN4/SS/C2OUT
15
RC0/T1OSO/T1CKI
8 16
RE0/AN5/RD RC1/T1OSI/CCP2
9 17
RE1/AN6/WR RC2/CCP1
10 18
RE2/AN7/CS RC3/SCK/SCL
23
RC4/SDI/SDA
1 24
MCLR/Vpp/THV RC5/SDO
25
RC6/TX/CK
26
RC7/RX/DT
19
RD0/PSP0
20
RD1/PSP1
21
RD2/PSP2
22
RD3/PSP3
27
RD4/PSP4
28
RD5/PSP5
29
RD6/PSP6
30
RD7/PSP7
PIC16F877A
Since the microcontroller can take a maximum of 5.3V DC input, it cannot be connected directly
to an AC line with high voltages. A current transformer and anACS75x series sensor has been
used. The current transformer stepped down the line current to measurable level some Ampère.
The current sensor converts the current to a maximum of 5V. The current transformer is
connected to the current sensor.The sensor output is connected to the microcontroller. The figure
4.4 illustrates this process
RL1
TR1 12V
+88.8
AC Amps
+88.8
1k
61%
AC Volts
RV3
TRAN-2P2S
R5 D10 B1
100k +88.8 12V
DIODE Volts
5
U3
GND IP-
VCC IP+
ACS755XCB-100
VIOUT
Q3
2
2N1711
U1
13 33
OSC1/CLKIN RB0/INT
14 34
OSC2/CLKOUT RB1
35
RB2
2 36
RA0/AN0 RB3/PGM
3 37
RA1/AN1 RB4
4 38
RA2/AN2/VREF-/CVREF RB5
5 39
RA3/AN3/VREF+ RB6/PGC
6 40
RA4/T0CKI/C1OUT RB7/PGD
7
RA5/AN4/SS/C2OUT
15
RC0/T1OSO/T1CKI
8 16
RE0/AN5/RD RC1/T1OSI/CCP2
9 17
RE1/AN6/W R RC2/CCP1
10 18
RE2/AN7/CS RC3/SCK/SCL
23
RC4/SDI/SDA
1 24
MCLR/Vpp/THV RC5/SDO
25
RC6/TX/CK
26
RC7/RX/DT
19
RD0/PSP0
20
RD1/PSP1
21
RD2/PSP2
22
RD3/PSP3
27
RD4/PSP4
28
RD5/PSP5
29
RD6/PSP6
30
RD7/PSP7
PIC16F877A
LCD Program
Analogue to Digital conversion
Protection program
The main program guide
The flow chart below illustrates the way the program worked. It was used as a guide while
writing the code for the microcontroller..
The purpose of our project is to protect the distribution transformer for our design we use available in
the machine lab, which can represent an actual distribution transformer in smaller size. From the
name plate of transformer we got the rated value of the transformer that help us to select other system
components of the project.
𝑭𝒓𝒐𝒎𝒏𝒂𝒎𝒆𝒑𝒍𝒂𝒕𝒆𝒓𝒂𝒕𝒊𝒏𝒈
𝑆=2.5𝑘𝑉𝐴
𝑃𝑟𝑖𝑚𝑎𝑟𝑦𝑣𝑜𝑙𝑡𝑎𝑔𝑒 v1=220𝑉𝐷𝑒𝑙𝑡𝑎𝑐𝑜𝑛𝑛𝑒𝑐𝑡𝑖𝑜𝑛
𝑃𝑟𝑖𝑚𝑎𝑟𝑦𝑐𝑢𝑟𝑟𝑒𝑛𝑡I1=6.5𝐴
𝑒𝑐𝑜𝑛𝑑𝑎𝑟𝑦𝑣𝑜𝑙𝑡𝑎𝑔𝑒V2=190𝑉𝑆𝑡𝑎𝑟𝑐𝑜𝑛𝑛𝑒𝑐𝑡𝑖𝑜𝑛
𝑆𝑒𝑐𝑜𝑛𝑑𝑎𝑟𝑦𝑐𝑢𝑟𝑟𝑒𝑛𝑡I2=7.5𝐴
Where - a is transformation ratios we can calculate from the given rated value of both the
primary and secondary current values are:-
CHAPTER FOUR
+154
1k
61%
AC Volts
RV3
RV5
LCD1
LCD2
LM041L
TRAN-2P2S
R5
R8 D10
D7 B1
B2
100k +12.0 12V
DIODE Volts
RV1
RV4
VDD
VSS
VEE
RW
RS
D0
D1
D2
D3
D4
D5
D6
D7
50%
E
5
1
2
3
4
5
6
7
8
9
10
11
12
13
14
U3
U6 1k
GND IP-
VCC IP+
ACS755XCB-100
VIOUT
Q3
Q5
2
2N1711
U1
U4
13 33
RV2
RV6 OSC1/CLKIN RB0/INT
14 34
OSC2/CLKOUT RB1
35
RB2
2 36
RA0/AN0 RB3/PGM
3 37
58%
RA1/AN1 RB4
4 38
RA2/AN2/VREF-/CVREF RB5
5 39
RA3/AN3/VREF+ RB6/PGC
6
RA4/T0CKI/C1OUT RB7/PGD
40 R3
R7 BUZ2
BUZ1
1k 7
RA5/AN4/SS/C2OUT D4
D6 560
220
+2.90 15 DIODE
U2
U5 RC0/T1OSO/T1CKI
Volts 1 8 16
RE0/AN5/RD RC1/T1OSI/CCP2
9 17
RE1/AN6/WR RC2/CCP1 BUZZER
10 18
RE2/AN7/CS RC3/SCK/SCL
23
93.0
94.0 RC4/SDI/SDA
1 24
MCLR/Vpp/THV RC5/SDO
25
RC6/TX/CK
2 26
VOUT RC7/RX/DT
19
RD0/PSP0
RD1/PSP1
20
D2
D1 Q1
Q2
Q4
Q6
3 LM35 21
+0.93
+0.94 RD2/PSP2
22
R1
R4 2N1711
BU806
Volts RD3/PSP3
27 220
RD4/PSP4
28 LED-RED
RD5/PSP5
29 D3
D5
RD6/PSP6
30
R2
R6
RD7/PSP7
220
PIC16F877A LED-GREEN
+154
1k
61%
AC Volts
RV3
RV5
LCD1
LCD2
LM041L
TRAN-2P2S
R5
R8 D10
D7 B1
B2
100k +12.0 12V
DIODE Volts
RV1
RV4
VDD
VSS
VEE
RW
RS
D0
D1
D2
D3
D4
D5
D6
D7
50%
E
5
1
2
3
4
5
6
7
8
9
10
11
12
13
U3
U6 1k
14
IP-
VCC IP+
ACS755XCB-100
VIOUT
GND
Q3
Q5
2
2N1711
U1
U4
13 33
RV2
RV6 OSC1/CLKIN RB0/INT
14 34
OSC2/CLKOUT RB1
35
RB2
2 36
RA0/AN0 RB3/PGM
3 37
58%
61%
RA1/AN1 RB4
4 38
RA2/AN2/VREF-/CVREF RB5
5 39
RA3/AN3/VREF+ RB6/PGC
6
RA4/T0CKI/C1OUT RB7/PGD
40 R3
R7 BUZ2
BUZ1
1k 7
RA5/AN4/SS/C2OUT D4
D6 560
220
+2.90
+3.05 15 DIODE
U2
U5 RC0/T1OSO/T1CKI
Volts 1 8 16
RE0/AN5/RD RC1/T1OSI/CCP2
9 17
RE1/AN6/WR RC2/CCP1 BUZZER
10 18
RE2/AN7/CS RC3/SCK/SCL
23
93.0
96.0 RC4/SDI/SDA
1 24
MCLR/Vpp/THV RC5/SDO
25
RC6/TX/CK
2 26
VOUT RC7/RX/DT
19
RD0/PSP0
RD1/PSP1
20
D2
D1 Q1
Q2
Q4
Q6
3 LM35 21
+0.93
+0.96 RD2/PSP2
22
R1
R4 2N1711
BU806
Volts RD3/PSP3
27 220
RD4/PSP4
28 LED-RED
RD5/PSP5
29 D3
D5
RD6/PSP6
30
R2
R6
RD7/PSP7
220
PIC16F877A LED-GREEN
4.2 Analysis
The state of the relay,LED and buzzer as current increases. A decrease in load resistance makes
current circulating in the primary side of the transformer to increase.
It Is observed that as the current circulating in the transformer increases, the sensor output also
increases. This is illustrated in the Little resistance means that the load has increased thus more
current is drawn from the transformer.
More resistance limits current flow, signifying reduced load. So as resistance is reduced by
varying the rheostat, current increases up to a point where the relay trips the circuit. This
confirms that the system has been designed well and thus it is able to read and record the current
as it changes, and operate the switches at optimum current levels.
The ADC gave satisfactory results as expected. The input value from the sensor matches well
with the displayed value on the LCD. For example “fault current” displayed on the LCD
corresponds to (<= 3V) from the sensor.
1k
61%
RV3
LCD1
LM041L
RV1
VDD
VSS
VEE
RW
RS
D0
D1
D2
D3
D4
D5
D6
D7
50%
E
1
2
3
4
5
6
7
8
9
10
11
12
13
14
1k
33
RB0/INT
34
RB1
35
RB2
36
RB3/PGM
37
RB4
38
RB5
39
RB6/PGC
RB7/PGD
40 R3 BUZ2
D4 560
15 DIODE
OSO/T1CKI
16
1OSI/CCP2
17
RC2/CCP1 BUZZER
18
3/SCK/SCL
23
C4/SDI/SDA
24
RC5/SDO
25
RC6/TX/CK
26
RC7/RX/DT
19
RD0/PSP0
RD1/PSP1
20
D2 Q1
Q2
21 R1 2N1711
BU806
RD2/PSP2
22
RD3/PSP3
27 220
RD4/PSP4
28 LED-RED
RD5/PSP5
29 D3
RD6/PSP6
30
R2
RD7/PSP7
220
LED-GREEN
CHAPTER FIVE
5.1 Conclusions
The main objective if this project has been to design and implement a system that uses a
microcontroller to protect a power transformer. This objective was achieved as the system works
effectively. As the current circulating in the transformer coil varies, the LCD displays the
readings. The relay is able to operate and isolate the transformer in case of an over current fault.
The relay is the main switching element in the system. When energized, it opens its contacts and
de-energizes the contactor thus isolating the transformer to safety in case of adverse current
conditions. The other peripheral devices act as means of sending warning messages in case a
fault occurs.
This system if put to use in distribution transformer protection can serve the purpose with greater
advantages than the analogue over current relay. The admirable fact about it is the accuracy with
which it closes and recloses during either normal operation or fault occurrence. It also has the
possible to improve the reliability of the existing power system in our country. This project can
reduce the economic loss incurred due to burnt transformers. It can reduce the time required for
maintaining and replacing of the distribution transformer.
b) Instead of using the relay as a switch, a semiconductor switching device such as a thyristor
should be used.
c) Another limitation is that whereas the relay automatically recloses its contacts, the contactor
used has to be restarted physically by an operator. Using a circuit that automatically recloses the
system would be a great solution.
d) The Utility Company has to better focus on improving the control system of distribution
transformer and replace the manual HRC fuses protection by the microcontroller based
protection system.
e) Lastly, the method of relaying the information to an operator in a control room far from the
sub-station has not been explored in this project due to time constraint. An area for future study
is how the system can automatically send a message to a control center and notify the engineers
of the exact location of a faulted transformer.
References
2. El-Hawary, M. E. Electrical Power Systems: Design and Analysis. s.l. : John Wiley & Sons,
1995.
3. Yeshwant G. Paithankar, S. R. Bhide. Fundamentals of Power System Protection. s.l. :
2010, 2010. 3.
5. Billings, Keith H., Switchmode Power Supply Handbook – 2nd ed., McGraw-Hill, New York,
1999.
6. McLyman, Colonel Wm. T., Transformer and Inductor Design Handbook, Marcel Dekker,
New York, 1978.
Appendix
Programing code
//.............................
//..........................
int adc_value = 0;
int tempreture = 0;
void adcFcn()
LCD_Chr(1, 8, Display[0]);
LCD_Chr(1, 9, Display[1]);
void main() {
//....................................
PORTB = 0;
TRISB = 0;
LCD_Init();
Lcd_Out(2,1,"G5-ELEC PROJECT");
Lcd_Out(3,4,"0N");
lcd_cmd(_lcd_cursor_off);
Delay_ms(2000);
lcd_cmd(_lcd_cursor_off);
Lcd_Out(2,2," TRANSFORMER");
delay_ms(2000);
lcd_cmd(_lcd_clear);
lcd_cmd(_lcd_cursor_off);
lcd_cmd(_lcd_cursor_off);
Lcd_Out(2,2," PROTECTION");
Delay_ms(2000);
lcd_cmd(_lcd_cursor_off);
delay_ms(2000);
LCD_Cmd(_LCD_CURSOR_OFF);
//LCD_Cmd(_LCD_CURSOR_OFF);
//LCD_Cmd(_LCD_CLEAR);
//LCD_Out(1, 1, "Temp:");
while (1)
adc_value = ADC_read(0);
if(tempreture <=95)
delay_ms(3000);
//LCD_Cmd(_LCD_CURSOR_OFF);
//LCD_Cmd(_LCD_CLEAR);
else{
delay_ms(3000);
//LCD_Cmd(_LCD_CURSOR_OFF);
//LCD_Cmd(_LCD_CLEAR);
//................................
TRISD.F0 =0;
TRISD.F6=0;
PORTD.F3=0X00;
PORTD.F0;0X00;
adc_rd = ADC_Read(1);
voltage= adc_rd;
lcd_out(2,1,"NORMAL CURRENT");
delay_ms(3000);
else{
delay_ms(5000);
lcd_cmd(_lcd_cursor_off);
lcd_cmd(_lcd_clear);
lcd_out(3,1,"OVER CURRENT");
delay_ms(500);
lcd_out(4,1,"LOAD DISCONNECT");
delay_ms(2000);
lcd_cmd(_lcd_cursor_off);
lcd_cmd(_lcd_clear);
TRISD.F0 =0;
TRISD.F6=0;
PORTD.F3=0X00;
PORTD.F0;0X00;