Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Synopsis of Microcontroller Based Power Transformer Protection System

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

MIET JAMMU

FINAL YEAR MINOR PROJECT

DEPARTMENT OF ELECTRICAL ENGINEERING

MICROCONTROLLER BASED POWER TRANSFORMER PROTECTION


SYSTEM
PROJECT NAME: MICROCONTROLLER BASED POWER
TRANSFORMER PROTECTION SYSTEM By

SUPERVISOR: MR. BHANU PRATAP

DECLARATION OF ORIGINALITY FORM

Name of Students:

• RAEES AHMED RESHI


• ROMISA MANZOOR
• MUNEEB RASOOL
• AKIF RASHID MALIK
• MEHRAJ U DIN

College: MIET JAMMU

Faculty/School/Institute ENGINEERING

Department ELECTRICAL ENGINEERING

Course Name: BACHELOR OF ELECTRICAL ENGINEERING

Title of the work DESIGN OF A MICROCONTROLLER BASED POWER TRANSFORMER


PROTECTION

DECLARATION
1. We understand what Plagiarism is and I am aware of the University’s policy in this regard

2. We declare that this final year project is my original work and has not been submitted elsewhere
for examination, award of a degree or publication. Where other people’s work, or my own work
has been used, this has properly been acknowledged and referenced in accordance with the
college requirements.

3. We have not sought or used the services of any professional agencies to produce this work 4. I

have not allowed, and shall not allow anyone to copy my work with the intention of passing it

off as his/her own work

5. We understand that any false claim in respect of this work shall result in disciplinary action, in

accordance with University Plagiarism Policy.

Signature _______________________________________________

Date ___________________________________________________
Acknowledgement

First and foremost, we thank the Almighty God for His guidance throughout our studies in the
MIET college and the completion of this project.

We are very grateful to our supervisor Mr. BHANU PRATAP for his guidance throughout this
project. The sessions that we had with professor inspired me to work harder every time we met.

We also thank the Department of Electrical Engineering and our lecturers for instilling in the
knowledge that has brought us this far.

ii
ABSTRACT

The main intention of this project is to design a microcontroller based system that can be used in
power transformer protection. The system checks the operating parameters of the transformer i.e.
current and reports the quantity that is flowing through the transformer. The system is designed
such that it is able to detect currents above the normal operating level and isolate the power
transformer from the distribution line. This isolation process is to ensure that the transformer is
safe from any excess current levels that can make it to overheat thus get damaged. It gives a
solution to the need to reduce cost of maintenance and ensure that supply of electricity to
consumers is not interrupted for long periods taken while repairing or replacing destroyed
transformers.

A current sensor ACS712x series has been used in this project as the interfacing instrument
between the power transformer and the PIC16F690 microcontroller. The PIC16F690 controls all
operations that the device does. A relay and a contactor have been used as the switching gears to
isolate the transformer from the power system in case a fault occurs. A monochrome LCD has
been used to show system current readings and indicate cases of over-current fault. To warn an
operator of a fault occurrence, LEDs and a piezoelectric buzzer have been used. All these
peripheral devices depend on the microcontroller to make them operate or otherwise. Some of the
tools used in this project include MPLAB - programming software used to write the program for
the microcontroller used in this project. Proteus- simulation software has also been used to test
whether the design works appropriately before its implementation on hardware. Pickit3- has been
used to load program into the microcontroller using MPLAB.

iii
GOTO

INTRODUCTION conditions may include short circuit,


over current, overvoltage, high
temperatures among others.
1.1 BACKGROUND
In the design of electrical power It is clear that over time, there has
transmission and distribution system, been an increase in human
there are various factors that need to population, economic growth and
be considered in the quest to satisfy technological advancement. This has
the needs of electricity consumers. continuously made the demand for
Electrical power systems experience electrical power to go high because
faults at various times due to various as technology, human population and
reasons. These faults must be economy grows; there is an increase
foreseen and safety precautions in demand for power as many more
applied to the power system. The electrical loads are introduced into
power systems engineer must include the supply line. An increase in load
in his design, safety measures in leads to a lot of current drawn from
order to avert any destructive the power line. At times the demand
occurrences that the system may goes above what the power
undergo at any given time. Power distributor can supply. The
system protection is very essential consequence of this is that electrical
and necessary for a dependable power overload cases ᵠᵠbecome
electrical power supply. It ensures common thus posing danger to power
that the system is protected from system components. This therefore
itself and that the consumer is also throws in the need for devices that
safe as he benefits from the electrical can monitor the rate of power
power supply. An electrical power consumption in accordance with the
system consists of various level that a given system is designed
components such as generators, to sustain. Such a device must be
switches, transmission cables, designed to cut off consumption if
transformers, capacitor banks among the system oversteps its ability thus
other components. It cannot therefore being dangerous to users and the
operate without an effective components. In this project, we look
protective device to keep these at the protection of power
components safe and the system transformer from various faults that
stable. Faults in a power system refer may occur and may be destructive to
to the undesired conditions that occur the component if left undetected. The
in the electrical power system. These transformer is a very important

4
GOTO
component in an electrical power is a continuous supply of power to
system as distribution of electrical serve the needs of the ever growing
power to consumers is more economy. This project therefore
efficiently effected. Every seeks to design a microcontroller
transformer is designed to based system that will intelligently
comfortably supply a given load. monitor faults and prompt a safety
Cases of overload or short circuits measure to protect the power
can lead to transformer being transformer in case of power
damaged. To combat such overload.
occurrence, an elaborate system that
monitors these excesses in supply 1.3 OBJECTIVES
parameters needs to be built. Such a The main objective of this project is
device controls the flow of electrical to design and implement a system
power to the load so that the that uses microcontroller and other
transformer is not overworked. Over peripheral devices to protect power
current relays and overvoltage relays transformer. To achieve this the
have been used for a long period of following must be done.
time and have been
a) Design and build an over
electromechanically controlled. In
current relay using PIC
this system, a microcontroller is used
microcontroller and a current
to monitor cases of electrical faults
sensor
and communicate to a switch to
b) Development, analysis and
isolate the transformer from the
calibration of the current
system.
sensor.
1 c) Development of the ADC
program to convert the
analogue sensor output to
equivalent digital form
1.2 PROBLEM STATEMENT within the PIC
Power system protection is a very microcontroller.
important consideration in the design d) Development of the LCD
of an electrical power system. There program to display the sensed
is need to protect electrical power levels.
components from dangerous faults. e) Development of warning
This is warranted by the need to (audio and visual) and relay
increase the life of the components, control system program.
avoid unnecessary expenditure in
frequent replacement of obsolete
components and to ensure that there

5
GOTO
1.4 SCOPE WORK consumption depending on the
The investigation carried out in this purpose for which a consumer uses
project is limited to power electricity. Electrical power
transformer protection methods. The consumers may be industrial,
extent of the work is to build a device commercial or domestic. These
that detects current spikes/overload consumers require different levels of
in the primary and secondary sides of electric power supply. In order to
a single phase transformer and isolate meet their specific needs, certain
it from the power system. devices that adjust the voltage levels
accordingly have to be used. Some
of those components include: step up
and step down transformers,
capacitor banks, protective devices
etc.

CHAPTER 2: LITERATURE
REVIEW

2.1 Electric Power system


An electric Power system refers to a
network that constitutes electrical
components/machines used in the
supply, transmission and
consumption of electric power [1].
The diagram below illustrates a
complete electric power system. It
involves generation, transmission
and distribution of electric power to
various categories of consumers. The
generation plant is normally located
far from the load centre. There are
different levels of electric power

6
GOTO
Figure2.1 Generation, A circuit breaker closes
transmission and automatically as a result of trip
distribution of electrical signals it receives from the relay
power [2]. whenever a fault is detected. The
basic philosophy of a power
2.2 Power system protection protection system is that system
A branch of electrical power faults cannot be prevented from
engineering that deals with flowing in the system but can be
protection of Power system from stopped from spreading in the
faults is known as power system system.
protection. It does this by isolating
the faulted parts of the system from 2.2.1 Importance of power system
the rest of healthy electrical network protection
[3]. The diagram below shows a Occurrence of fault is hazardous to
model of a power protection system. both electric power user and the
electric system itself. To the user, life
is of most important concern. The
main concern of the system is to
ensure a stable supply of electric
power to consumer and to ensure that
the electrical components do not get
destroyed. In summary, power
protection is necessary to:

a) User/Personnel-
ensure safety i.e.
Prevent
injury/accident.
b) Electrical equipment
- to protect the
Figure2.2 power system protection [3]
equipment from cases
The main aim of power system of over current,
protection scheme is to switch off a overvoltage and
section that is faulty in the system frequency drift that
from the remaining live system. This can destroy the
ensures that the remaining portion is equipment.
able to function satisfactorily locking c) General Safety -
out chances of damage that may be Prevent secondary
caused by fault current. accidents that occur
as a result of system
fault like fire.

7
GOTO
d) Power Supply Non-Unit Protection
Stability- Ensures a
continuous and stable The Non-Unit protection protects a
supply of electrical system\zone and can overlap with
power. another protection zone in the
e) Operation Cost - system. This scheme ensures an
Ensure optimal isolation of the entire circuit (a larger
operating efficiency area) in case a fault occurs as
so as to reduce illustrated in figure 2-4
equipment
maintenance/replace
ment cost

2.2.2 Types of protection systems


Implementation of power system
protection can be done in two ways.
These are: the unit protection and
non-unit protection [1]. Figure2.4 Non-unit protection [4]

Unit Protection 2.2.3 Power Protection elements


There are 4 types of these elements,
The unit protection scheme protects a namely instrument transformers,
definite\discrete zone bounded by the switchgears, protective gears and
protection system. Differential relay station batteries.
protection is normally employed in
this scheme. This is illustrated in Instrument transformers:
Figure 23 these include current
transformers and voltage
transformers. Instrument
transformers step down
current and voltage from the
power line to level that can be
measured safely.
Switchgears: switchgears
basically include circuit
breakers. Circuit breakers are
the main part of a protection
system. They break contacts
of the system in case of a
fault. They include minimum
Figure2.3 Unit protection [4] oil, bulk oil, SF6 , vacuum

8
GOTO
and air blast circuit breakers. essential element in a power
Mechanisms of operation of protection system.
circuit breakers include:
hydraulic, solenoid, spring
and pneumatic [1].

Figure2.6 Station battery [1]

2.2.4 Functional
requirement of a protection relay
Figure2.5 circuit breaker [4] In order for a protection relay to
operate effectively, it must have the
Protective gear: consists of
following qualities[5].
protective relays like voltage,
current, impedance, a) Reliability: power
frequency and power relays, protection relays
based on operating should remain
parameter, definite time, inoperative always as
inverse time, and stepped long as a fault does
relays, classified according to not occur. But when a
operating characteristic, fault occurs, they
differential and over fluxing should respond as
relays classified according to quickly as possible.
logic. When a fault occurs, b) Selectivity: it must
relay sends signal to relay to only operate on the
the circuit breaker section that has
completing its circuit thus experienced a fault to
making it to trip [1]. avoid unnecessary
Station batteries: all circuit power outs due to
breakers in a power system wrong detections. It
operate using direct current. should also respond
The current is provided by only when a fault
battery banks that are occurs.
installed together with the c) Sensitivity: The
circuit breaker. It is thus an relaying equipment

9
GOTO
should be highly magnetic field in one coil causes
sensitive so that it can voltage induction into another coil.
be relied on to Sizes of transformers vary according
provide the required to their applications from the tiny
detection. ones used in microphones to the ones
d) Speed: the relaying weighing hundreds of tones used
equipment must system grid. Transformers are used
operate at the in electronic appliances and in
required speed. It electrical power networks.
should not delay so as Transformers are therefore very
to give time for important in transmission,
system equipment to distribution and consumption of
get destroyed. It electrical power[6].
should also not be too
fast to cause There are two basic principles that
undesired operation. explains the operation of a
transformer
2.3 Transformer protection
Magnetic field can be caused
Electrical power systems have
by electric current.
various devices that aid in the
A varying magnetic field
transmission and distribution of
linked to a coil induces
electrical power. One such
voltage across the ends of the
component is the power transformer.
coil by means of
A transformer can be described as an
electromagnetic induction.
electrical device used in electric
power system to transmit power
between different circuits, applying
the principle of electromagnetic
induction. The transfer of energy
from one circuit to another makes use
of basic magnetic fields. The flow of
electric current in a conductor
induces magnetic field around that
particular conductor. If another
conductor is brought within the effect
of the first conductor, such that they
are linked, voltage induction takes
place in the second conductor.
Figure2.7 Electro-magnetic induction
Transformer theory and application
[6]
is based on the principle where

10
GOTO

As shown in the diagram above, as


current passes through the primary
coil, it causes magnetic field. The
primary and the secondary windings
are woven around a core whose
magnetic permeability is very high.
This is to ensure that a large
percentage of the magnetic flux pass
through the primary windings and the
secondary windings.
Figure2.8 Photo of a power transformer
Power transformers are transformers [4]
used in transmission networks for
example in transmission substations. 2.3.1 Causes of fault in power
Their power rating is normally more transformer
than 200KVA [4]. Substation There are many faults that can occur
transformer is used to step down the in a transformer owing to a variety of
utility service voltage. Some of the reasons as follows[5]:
characteristics of power transformers a) Winding and core
include; fault is the most
33kv and above voltage frequent type of fault
rating in a power
High operating efficiency transformer. This can
close to 100% be attributed to
They are big in size compared weakening of
to distribution transformers conductor insulation.
Phase faults rarely
Low energy loss due to very
occur in the
little load fluctuations
transformer, they may
Operating temperature
however occur at the
dependent on the power
terminals of that are
output rating
found within the
Power rating- over 200KVA
transformer
protection zone.
b) Most power
transformers use oil
for cooling and
insulation, oil leakage

11
GOTO
can also be a cause of method to protect transformer
fault in a transformer. against internal faults. It may
c) The inrush current however not be effective in
that occurs protecting the transformer against
momentarily when a ground fault in case of ungrounded or
transformer is high impedance grounding. The
energized can also be following factors affect differential
treated as a fault current in a transformer and should
unless conditions are be taken into consideration while
set for its detection. using differential protection scheme
d) Inter-turn faults may to protect a transformer [5].
occur and cause rise
Magnetizing inrush
in hot spots within the
current: this is the maximum
transformer winding.
instantaneous current that a
e) Transformer may
transformer draws when it is
experience over
first switched on. Power
fluxing which may be
transformers can draw as
as a result of
high as 830 times its rated
transformer operating
current depending on its
at low frequency at
resistance. Inrush current if
rated voltage. Over
not taken care of can thus be
fluxing may also be
detected by the system as a
caused by
fault and thus cause
overvoltage operation
unwanted response. The
at rated frequency.
diagram below shows a
f) Sustained overload
typical waveform of inrush
can also be a cause of
current.
fault in a transformer

Transformer Protection Schemes


There are several schemes used in
transformer protection. A few are
presented below.

Percentage differential protection

This protection scheme is used to


protect transformers against internal
short circuits. It is an effective

12
GOTO
Figure2.9 its primary current as per the
Waveform of a transformation ratio. The
magnetizing main reason for this is the
inrush current property of the core to go into
[4] magnetic saturation due to
high currents or large burden
at the secondary side. His can
Over excitation: Over cause relay operating current
excitation when referring to a to flow as a result of
transformer means an distortion of the CT current [
increase in magnetic flux in 7].
the core above
allowable/normal levels.
This causes the magnetizing
current to increase. It can
lead to destruction of the
transformer if the situation is
not taken care of. Over
excitation in transformers is
caused by overvoltage I the
network.

Figure2.11 CT Saturation curve [7]

Different primary and


secondary voltage levels: that
is the secondary and voltage
CTs are of different ratios
Phase displacement in delta
wye transformers.

Transformer differential relay

Figure2.10 Over-excitation waveform In order to take care of the above


(4) variables, a differential transformer
relay that is less sensitive (in the
CT saturation: this is a range of 15%-60%) is applied.
phenomenon where a CT is
no longer able to produce an
output that is proportional to

13
GOTO
below. It is restricted to the
transformer winding; otherwise, it
may operate for any ground fault
anywhere in the system. It detects
faults with values below pick up of
differential relay.

Figure2.12 Differential protection


Scheme [7]

Figure2.13 Restricted Earth Fault


Harmonic restraint relay Protection [5]

Differential relay can fail due to Over current protection


magnetizing inrush current. The
magnetizing inrush current Over current protection scheme
waveform normally consists of ensures that the transformer is
several harmonics while the internal protected from momentary excess
fault current consists of the current caused by overload, power
fundamental component. To solve surge etc.
the problem of inrush current, a In electric power system, over
harmonic restraint relay is used. It is current refers to a situation where
only effective during inrush current more than current intended flows
and remains inactive the remaining through a conductor. This leads to
times. excessive heat generation and thus
the risk of causing fire or causing
destruction to electrical equipment.
Restricted Earth Fault Over current is caused by short
circuit, overloading or wrong design.
Restricted earth fault protection is
used in power transformer to detect
the transformer’s internal earth fault.
This scheme is connected as shown

14
GOTO

Figure2.14 Over current Phenomenon


[9]
Figure2.15 Over current Protection
This phenomenon can be prevented Relay [9]
using over current protection. This
scheme is normally used for large
transformers (over 5MV)

Over current protection protects the CHAPTER 3: REVIEW


transformers against currents that OF COMPONENTS USED
rise beyond its rated value. Over
current relay isolates the transformer
in case of a fault in the system. This 3.1 The PIC16f690 microcontroller
relay is the focus of this project. It
can be implemented using analogue
Microcontroller is basically a
circuitry or digitally using
computer on a chip. It is a compact
microcontrollers. This project seeks
microcomputer, designed to control
to apply microcontroller and
the operation of embedded electronic
appropriate software program to
systems in various applications such
design an over current relay. The
as motor vehicles, home appliances,
diagram below illustrates an over
office machines, robots, medical
current relay scheme [1].
devices, vending machines, mobile
radio transceivers, and other
electronic devices. Typically, a
microcontroller comprise of a
processor, timers, memory,
clock/oscillator, and other

15
GOTO
peripherals. The difference between instruction simultaneously [11]. This
a microcontroller and a relationship is depicted in figure 2-
microprocessor is that a 17.
microprocessor is an integrated
circuit that only has CPU but no
memory as in the microcontroller.
They are used in general purpose
applications.

Figure3.2
microcompu
ter memory
Figure3.1 microcontroller architecture organization
[5] [11]

As shown in figure 2-16, it can be The PIC16F690 is a 20 pin, 8-bit


noted that the microprocessor is microcontroller, with a modified
actually constituted inside the Harvard architecture. It is
microcontroller. manufactured by Microchip
Technology. PIC stands for
There are two architectures used to
programmable interrupt controller.
organize computers; Harvard
architecture and Von Neumann The PIC16F690 has a central
processing unit, working memory
architecture. Harvard architecture
(RAM), program memory (EPROM)
has the data memory separate from
and 20 input/output ports [13]. The
program memory while Von
work of the CPU is to execute
Neumann has both data and program
instructions stored in the program
in the same memory location. The
memory. It can also store and retrieve
advantage of Harvard architecture
data from the working memory. The
over Von Neumann architecture is
diagram below illustrates the pin
that the CPU can fetch both data and

16
GOTO
arrangement of the PIC16F690. The A/D converter 12 Ch
pins of PIC16F690 can be used for Analogue comparator 2 chan
multiple functions as indicated on the Wide operating voltage 2 to 5
pin diagram in figure 2-18. Pin 1 Auto shut down and restart option
(VDD) is used for positive power Programmable on chip voltage reference
supply while Pin 20 (VSS) is used as Temperature range of operation -40 to
a ground reference. Pins on PORTA Maximum output current sourced/sunk by 25mA
can be used for input/output purposes any I/O pin
except pin RA3 which is solely an Maximum current sourced/sunk in all the 200m
ports combined
input pin. All PORTB and PORTC
Pin count 20
pins can be used for either input or
output functions [14].
3.2 Liquid Crystal Display
Liquid crystal display is a type of
screen display often used in digital
watches, calculators and computers.
The LCD display makes use of two
layers of polarising material having
solution of liquid crystal between
them [15]. When an electric current
passes through the liquid crystal, it
causes them to align and cause light
not to pass through them. Each
crystal acts like a shutter to either
Figure3.3 PIC16F690 Pin diagram [6] allow or not allow light to pass
through. The principle is illustrated
This microcontroller has the in figure 2-19
following features that made it an
appropriate choice for carrying out
this project.

TABLE 3.1 Properties of PIC16F690


Property name Value/description
Program memory type Flash 4x14
Data memory EEPROM 256bytes
RAM 256bytes
Interrupts stack 13bit 8level
Internal oscillator-software selectable 8MHz-32KHz
3 input/output ports PORTA=6pins(6-bit wide)
PORTB=4pins(4-bit wide)
PORTC=8pins(8-bit wide)

17
GOTO
Figure3.4 The structure of an LCD
[15]

Monochrome LCDs produce either


dark or blue images while colour TABLE 3.2 LCD pins description
Pin number Symbol Function
LCDs use passive matrix or thin film
1 VSS Ground
transistor to display many colours. In
2 VCC Power sup
this project, a monochrome LCD is
3 VEE Adjusting
used because the aim of LCD usage
4 RS Register s
is basically to display numerical 5 R/W Read/Writ
figures and characters. LCDs 6 E Enable pin
consume little power thus they can be 7 DB0 Data line z
powered using battery. 8 DB1 Data line 1
9 DB2 Data line 2
This project makes use of HD44780
10 DB3 Data line 3
LCD. It is a 16x2 line LCD with 8-bit
11 DB4 Data line 4
wide data bus (D0D7). It has three 12 DB5 Data line 5
power pins (pins1-3), and three 13 DB6 Data line 6
control pins (pins 4-5). The LCD can 14 DB7 Data line 7
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
ENABLE PIN: This pin is key in the
remaining pins. In this project, 8-bit
operation of the LCD. Data can only
mode is used.
be latched into the LCD when high to
low signal is passed into this pin.
There should be at least 450ns delay
between clearing and setting this pin,
because of the higher frequency of
the microcontroller relative to the
LCD.

When: E = 0 LCD cannot be accessed

E = 1 LCD can be accessed

R/W: informs the LCD whether the


Figure3.5 LCD pin arrangement [5] information is supposed to be read or
written on the LCD.When:

R/W = 0 Data is written to LCD

18
GOTO
R/W = 1 Clear display 0 0 0 0
Data is read Cursor home 0 0 0 0
from LCD RS: Entry mode 0 0 0 0
helps the LCD Display ON/OFF & cursor 0 0 0 0
to identify Cursor/display shift 0 0 0 1
whether the Function set 0 0 1 DL
information is Set CGRAM address 0 1 A A
Set display address 1 A A A
data or
I/D: 1 = Increment, 0 = Decrement S: 1 = Display
command.
D: 1 = Display ON, 0 = OFF C: 1 = Cursor
When: RS = 0: command B: 1 = Cursor blink ON, 0 = OFF R/L: 1 = Righ
S/C: 1 = Display shift, 0 = Move cursor DL: 1 = 8-bit
RS = 1: data N: 1 = two lines, 0 = 1 line F: 1 = 5x10

D0-D7: these are the data pins,


information is sent/received via these Carrying out any operation on the
pins. LCD requires that instructions be
sent via the data lines. This means
TABLE 3.3 LCD Instructions [15] that the RS pin has to be set low. The
Code(hex) Command to LCD instructions
instruction register
in the tables above are
1 Clear display screen used to write information to the LCD.
2 Return home The LCD can be used in either of the
4 Shift cursor to left following configurations,
5 Shift display right
6 Shift cursor to right 8-bit configuration: all the
7 Shift display left eight data pins are used (D0 –
8 Display off, Cursor off D7)
A Display off, Cursor on 4-bit configuration: only four
C Display on, Cursor off of the data lines are used (D4
E Display on, Cursor blinking– D7)
F Display on, Cursor blinking
10 Shift Cursor position to left
There are two more pins (anode and
14 Shift Cursor position to right that enable data written
cathode)
18 Shift the entire display
whentoittheis left
dark to be seen.
1C Shift the entire display the right
80 3.3 of
Force cursor to beginning Current
first linesensor
C0 Force cursor to beginning
This is a second
of device line
that detects electric
38 2 lines and 5x7 matrix
AC or DC current flowing in a
conductor and gives out a
TABLE 3.4 HD44780 instruction set corresponding signal (analogue
Instruction Code voltage/current/digital pulse). The
DB7 DB6 DB5 detected
DB4 DB3 signal DB2
can beDB1usedDB0
for

19
GOTO
various purposes like measuring the t
amount of current in the conductor, h
controlling of another device etc. i
s
s
e
t
v
i
a
t
h
e
n
Figure3.6 Allegro Microsystems e
ACCS712 Series w
F
The current sensor used in this
I
project is Allegro ACS712ELCTR-
L
30A-T. It is popularly used in diverse
T
applications in motor control, electric
E
vehicles and in power distribution. It
R
has the following features [7];
p
i
n
Low-noise analogue signal 5
path μ
D s
e o
v u
i t
c p
e u
b t
a r
n i
d s
w e
i t
d i

20
GOTO
m 5.0 V, single supply
e operation
i 66 mV/A output sensitivity
n Output voltage proportional
r to AC or DC currents
e Factory-trimmed for
s accuracy
p Extremely stable output
o offset voltage
n Nearly zero magnetic
s hysteresis
e Ratiometric output from
t supply voltage [16]
o
s The Allegro ACS712ELCTR-30A-T
t has a low-offset linear Hall sensor
e circuit that has a conduction path
p made of copper located next to the
i die. A magnetic field is caused by the
n current flowing through the copper
p conductor. This magnetic field is
u detected by the integrated Hall IC
t which converts it into a voltage
c proportional to the magnetic flux. A
u current of 1A flowing in a conductor
r produces 66mV. The close proximity
r of the magnetic signal to the Hall
e transducer optimizes the device
n accuracy. To attain precision, in
t terms of voltage produced, a low-
80 kHz bandwidth offset, chopper-stabilized Bi-CMOS
Hall IC is used. It is programmed for
Total output error 1.5% at
accuracy at the factory[16].
TA= 25°C
Small footprint, low-profile
SOIC8 package1.2 mΩ The sensor measures a maximum of
internal conductor resistance 30A from the load current. This
2.1 kVRMS minimum serves as its primary current. The
isolation voltage from pins 1- sensor output voltage is fed into the
4 to pins 5-8 microcontroller as the analogue
input.

21
GOTO

Figure3.8 Relay circuit [17]


3.5 Contactor
When a relay is used to switch a large
amount of electrical power through
its contacts, it is referred to as a
contactor. Contactors basically have
several contacts, and which are
usually (but not always) normally-
Figure3.7 open, so that power to the load is shut
Current sensor off when the coil is de-energized
functional [18]
block diagram
[16]. CHAPTER 4: DESIGN
3.4 Relay
A relay is an electrically operated The ultimate objective of this project
switch. It uses electromagnetic force is to design an automatic over current
to close or open contact. The relay relay that uses microcontroller to
employed in this project can be read transformer currents and
operated as normally closed or automatically isolate the transformer
normally open. For this system, the from the power system in case of a
normally closed mode was used. The fault. This design is therefore based
relay circuit is illustrated in figure 2- on the programmable Interrupt
25. The relay was used to de-energize Controller (PIC microcontroller) as
the contactor coil in case of a fault the main control element in the
thus isolating the transformer from system. The design of this system has
the system. been divided into the following
sections;

Hardware design
Software design
PCB design

22
GOTO
4.1 HARDWARE DESIGN The logical process that avails the
The PIC16F690 microcontroller has readings takes place within the
been used as the main device in the microcontroller using a program and
development of this system. Based displayed on the LCD. The LCD
on the number of input/output pins operates in 8-bit mode, so 8 pins from
and the other functional features it the microcontroller have been
was selected for use in this project. connected to the 8 data pins on the
The 20 pins of the microcontroller LCD. Since PORTC of the
have been distributed for use as PIC16F690 is 8-bit wide, it is used
follows for this purpose. So, RC0- RC7 pins
of PIC microcontroller have been
TABLE 4.1 connected to D0-D7 of the LCD as
Microcontroller Pin Usage illustrated in figure 4-1.
Pin Number Pin
function of pins names
Power 1 RA3
pin(VDD)
Sensor 1 RA0
input pin
LEDS 2
control
Buzzer 1
control
Relay 1
control
LCD 3
control
LCD data 8 RC0RC7
lines
Reset pin 1

4.1.1 Interfacing LCD to the


microcontroller
The LM016L LCD display device Figure4.1
has been employed in the system
implementation. The LCD operates M
as a medium for communicating the i
amount of current flowing in the c
electric conductor at any given time. r

23
GOTO
o a
c t
o i
n o
t n
r s
o o
l f
l t
e w
r a
- r
L e
C
D
i The register select (RS) pin has been
n connected to pin 12 (RB5) on the
t microcontroller. Enable pin has been
e connected to RA1 (pin 12). At all
r times, the R/W line is connected to
f ground (kept low) since data in this
a case is always written into the LCD.
c A potentiometer of 10KΩ has been
e used to vary the brightness contrast
a of the LCD.
s
d 4.1.2 Warning devices and relay
o control
n
e a) LEDs
i In order to indicate the state of the
n power line, two Light emitting
t diodes have been used. One LED
h emits red light and the other one
e green light. The green LED is set to
s blink when the current flowing
i through the power system is at a
m normal level. The red LED should
u blink at an interval of half a second
l whenever the current build up

24
GOTO
approaches the overload level that the maximum current sourced
through to the point when the relay becomes;
gets energized. This acts as a visual
warning when a fault occurs.
5.
The green LED has been connected
to the pin RB4 (pin 13) via a current
limiting resistor (220Ω) to ground.
The figure 2-2 below illustrates the
The red LED has been connected to
connection of LEDs to the
pin RA5 (pin 2) also through a
microcontroller via current limiting
current limiting resistor (220Ω) to
resistors.
ground. The microcontroller pins VDD
can give a maximum of 5.3V. LEDs
typically have a forward voltage drop 19
RA0/AN
18
ranging between 1.8V and 3.3V 17
RA1/AN
RA2/ AN
4
RA3/MC
subject to the LED colour. The value 3
2
RA4/AN
D3 RA5/T1C
for red LED is about 1.8V. The R2 13
RB4/AN
220 12
RB5/AN
forward voltage drop is a function of LED-RED 11
10
RB6/SC
RB7/TX/
the LED colour frequency. D2 PIC16F69
R3
220
For the LED to light, it needs around LED-GREEN

20mA of current. The calculation


below justifies the resistor values
chosen for the design of this system. Figure4.2
Microcontroller-LED connection
According to Ohms law, resistance
is a function of voltage and current, b) Audio Alert
as shown in the equation below In order to provide an audio warning
in case of a transformer overload, a
piezoelectric buzzer has been used.
The buzzer rating is between 2V-5V
with a current rating of
approximately 9mA. In order to
achieve the 9mA rating, a resistor of
value R= 5V/9mA = 550Ω is
, required. A standard 560Ω resistor
has been used. In order to allow for
175Ω is not a standard resistor value, varied range of buzzers to be used, a
so a value close to it can be chosen. Darlington transistor is used as a
In order to ensure that the current switch. It is connected to pin RB6 of
sourced is as little as possible, the the microcontroller. The
220Ω resistor has been chosen such microcontroller produces 5V that
25
GOTO
drives the transistor thus allowing because; a power transformer uses
current flow in the transistor. The high currents that the 5V relay cannot
buzzer is connected between the sustain. The relay sends signals to the
transistor VDD and the collector. It contactor which in turn disconnects
goes on whenever the the circuit and isolates the
microcontroller pin controlling it is transformer from the power system.
set to high. This results due to an The process is illustrated in the figure
instance of a fault occurring in the 4.3 below.
system which is unsuitable for the
transformer. This piezoelectric
buzzer serves to give a warning to
users to cease overloading the
transformer or for a mitigation
process to be conducted.

c) Relay/contactor control
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 Figure4.3
is 5V. Due to the fact that the relay
might draw a current of higher value M
than what the microcontroller can i
sink or source, a Darlington c
transistor is used as a switch to run it. r
It is connected between the transistor o
VDD and the Darlington transistor c
collector. When fault current is o
detected, the RB6 pin of the n
microcontroller is set high. This t
produces current that drives the r
Darlington transistor. The transistor o
in turn completes the relay coil l
circuit. The relay is energized l
through the principle of e
electromagnetic induction. It in turn r
de-energizes the contactor to isolate -
the transformer from the system. The r
relay is used alongside a contactor e
l

26
GOTO
a 4.1.3 Sensor interfacing to the
y microcontroller
i Since the microcontroller can take a
n maximum of 5V DC input, it cannot
t be connected directly to an AC line
e with high voltages. A current
r transformer and anACS75x series
f sensor has been used. The current
a transformer stepped down the line
c current to measurable level of 25A.
e The current sensor converts the
a current to a maximum of 5V. The
s current transformer is connected to
d the pins 4 and 5 of the current sensor.
o The sensor output is connected to the
n pin RA0 of the microcontroller. A
e zener diode is used to protect the
o microcontroller from voltage spike.
n The figure 4.4 illustrates this process
t
h
e
s
i
m
u
l
a
t
i
o
n
s
o
f
t
w
a
r
e

27
GOTO
Figure4.4 n
t
M h
i e
c s
r i
o m
c u
o l
n a
t t
r i
o o
l n
l s
e o
r f
- t
s w
e a
n r
s e
o
r
i
n
t 4.1.4 The Oscillator
e The function of an oscillator in a
r microcontroller is to generate a clock
f signal. The clock signals are
a important because they help the parts
c of the microcontroller to function
e together. The clock makes it easier to
a know when the different parts of the
s microcontroller are going to change
d state. It is important to know how
o long a given operation takes to
n accomplish. An internal oscillator
e has been used in this design instead
o

28
GOTO
of an external crystal oscillator. It is The flow chart below illustrates the
selected in the program. way the program worked. It was used
as a guide while writing the code for
4.1.6 PCB design the microcontroller.
After the circuit is successfully tested
on the breadboard, it is transferred to
a PCB. The process for designing the
PCB is as follows

i. The circuit layout is drawn


using software. In this
project, proteus has been
used. The components are
confirmed to be well placed.
ii. The circuit design is printed
on a transparent film. This is
used to develop the circuit
on a PCB through etching
process.
iii. The needed holes are then
drilled and then the
components fitted into them.

4.2 SOFTWARE DESIGN


For the microcontroller to operate, it
must be programmed, and thus the
software design. Software design is
divided into four parts as follows;

LCD Program
Analogue to Digital
conversion
Protection program
The main program guide

29
GOTO
START a. Bank selection

The data memory is partitioned into


four banks which contain the General
Purpose Registers
INITIALIZATION
(GPR) and the Special Function
Registers (SFR). For a register to be
used, the right bank that contains it
has to be selected. The first register
used in the ADC program is
ADCON1 register. It is contained in
READ CURRENT
bank 1. For bank 1 to be selected, the
following instruction is used.

DISPLAYBSF
ON STATUS, RP0
The STATUS register is used to
select banks. Its arrangement is
shown in figure 3-1. Bits 5 (RP0)
and 6 (RP1) are used to select one of
the four banks as appropriate.

So in order to select bank1, the RP0


Does current
bit is set high (1) while RP1 remains
exceed rated
low (0).
value? NO

BCF
STATU
S, RP0
YES ; clear
bit 5 of
STATU
ENERGIZE RELAY
S
register
Figure4.5 F low chart
BSFof the program
STATU
4.2.1 ADC Program
S, RP1
The PIC16F690 has an internal
; set bit
analogue to digital converter module
6 of
that is 10 bit wide and has 12
STATU
channels. For this ADC to be used, it
S
has to be programmed.
30
GOTO
register 010 = FOSC/32
.
X11 = FRC (clock derived from a
dedicated internal oscillator = 500
IRP RP1=1 RP0=0 TO PD Z DC C
kHz max)
Bit 7 Bit 0
100 = FOSC/4
Figure4.6 101 = FOSC/16
the Status register
110 = FOSC/64
TABLE 4.2 Bank selection bits
RP1 RP0 Bit 3-0 Unimplemented: Read as ‘0’
SELECTION

0 0 Bank 0An internal clock (FOSC/16) of


selected
4MHz, is used, hence selection is
0 1 Bank 1ADCS2
selected = 1, ADCS1 = 0 and
ADCS0 = 1 the relevant code
1 0 Bank 2segment
selected is as follows.

Bank 3MOVLW
selected b'01010000'
1 1 ;
ADC clock at 4MHz/16(TAD=4.0us)
b. Clock setting MOVWF ADCON1
The ADCON1 register is used to The time taken to complete one bit
select the A/D Conversion clock. Its conversion is defined as TAD. The
selection bits are as illustrated in choice of FOSC/16, 4MHz gives a
figure 4-7 TAD of 4μs.

U-0 R/W-0 R/W-0 R/W-0 U-0 U-0 U-0 U-0


- ADCS2 ADCS1 ADCS0 - c. Input configuration
- - -
BIT-7 BIT-0
Figure4.7 The input pin is selected by setting
ADCON1 Register. the TRIS and ANSEL bits. First, the
right bank for TRIS is selected. In
Bit 7 Unimplemented: Read as ‘0’ this case we are still in bank-1 and
since the TRIS register is in bank-1,
Bit 6-4 ADCS<2:0>: A/D
there is no problem. The following
Conversion Clock Select bits
code segment is employed select pin
000 = FOSC/2 RA0 as the input pin.

001 = FOSC/8

31
GOTO
BSF TRISA, 0 ; Set RA0 to input Figure4.9
ADCON1 Register.

Bit 7 ADFM: A/D Conversion


To set the input pin as an analogue Result Format Select bit
input, we use the ANSEL register
which is in bank-2. The bank is first 1 = Right justified
selected as shown; 0 = Left justified
BCF STATUS, RP0 ; select Bank -2 Bit 6 VCFG: Voltage Reference bit
BSF STATUS, RP1 ; 1 = VREF pin

Since RA0 has been used as an input, 0 = VDD


ANS0 is configured to analogue
Bit 5-2 CHS<3:0>: Analog Channel
input using ANSEL.
Select bits
ANS7 ANS6 ANS5 ANS4 ANS3 ANS2 ANS1 ANS0
Bit 7 0000 = AN0 Bit 0

0001 = AN1
Figure4.8
0010 = AN2
The ANSEL register
0011 = AN3

0100 = AN4
BSF ANSEL, 0 ; Set RA0 to
analogue 0101 = AN5

d. Channel, reference voltage and result 0110 = AN6


format selection
0111 = AN7
The ADCON0 register controls the 1000 = AN8
microcontroller ADC operation such
as channel selection, power on the 1001 = AN9
ADC circuit, start converting, ADC 1010 = AN10
voltage reference selection and ADC
result format presentation selection. 1011 = AN11
1100 = CVREF
1101 = 0.6V Reference
RW/-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0Do notR/W-0
1110 = Reserved. use. R/W-0
ADFM VCFG CHS3 CHS2 CHS1 CHS0 GO/DONE ADON
BIT-7 1111 = Reserved. Do not use. BIT-0

32
GOTO
Bit 1 GO/DONE: A/D Conversion Since AN0 has been configured as
Status bit the analogue input, bits 5 to 2 are
kept low. The GO/DONE bit is kept
1 = A/D conversion cycle in progress.
low to show that the conversion is
Setting this bit starts an A/D
complete.
conversion cycle.
To enable ADC, BIT- 0 (ADON) BIT
This bit is automatically cleared by
is set to 1. The code segment is as
hardware when the A/D conversion
follows
has completed.
0 = A/D conversion completed/not in MOVLW 0x01 ; Vdd Vref
progress (bit 6), AN0 (0000 of bit 5-2), on (bit 0)

Bit 0 ADON: ADC Enable bit MOVWF ADCON0 ; also LEFT


JUSTIFY
1 = ADC is enabled

0 = ADC is disabled and consumes


no operating current e. Acquisition time

Acquisition time is the amount time


required to charge the holding
First the following code segment is
capacitor on the front end of an
used to select the bank-0 where the
analogue-to-digital converter. The
ADCON0 register is located.
holding capacitor must be given
BCF STATUS, RP0 ; Bank 0 sufficient time to settle to the
analogue input voltage level before
BCF STATUS, RP1 the actual conversion is initiated. If
sufficient time is not allowed for
The ADFM is used to select the result
acquisition, the conversion will be
format; for this case, the conversion
inaccurate. The required acquisition
result formats are left justified, i.e. bit
time is based on a number of factors,
7 (ADFM) is kept low.
two of them being the impedance of
the internal analogue multiplexer and
the output impedance of the analogue
source. An increase in the source
impedance will increase the required
acquisition time[12].

Figure4.10 Left justification format To determine the minimum


acquisition time, the following
VDD has been used as the voltage relationship is used.
reference, thus bit 6 is also kept low.

33
GOTO
TACQ = Amplifier Settling Time+ following code segments show how
Hold Capacitor Charging Time + data from the addresses are stored in
Temperature Coefficient the general purpose registers.
MOVF ADRESH, W ; Read upper 8 bits
= TAMP + TC + TCOFF.............. (eq 4-
MOVWF OUTPUTH ; move contents of AD
1)

= 5μs + TC + [(Temperature -
25°C)(0.05μs/°C)]...........(equ 4-2)
BANKSEL ADRESL ; select the bank wher
We can approximate the value of T C
MOVF ADRESL, W ; Read lower 2 bits
using the following equation:
BCF STATUS, RP1 ; bank- 0
TC = –CHOLD(RIC + RSS + RS) ln
(1/2047).................. (equ 4-3) BCF STATUS, RP0 ; select bank-0
= –10pF(1kΏ + 7kΏ + 10kΏ) ln MOVWF OUTPUTL ; move contents of AD
(0.0004885)

= 1.37μs

Where, RSS=sampling switch 4.2.2 LCD DISPLAY


The pins of the LCD are connected to
RIC=interconnect resistance the microcontroller as follows; the 8
RS=Input impedance data lines are connected to PORTC
since 8 bit configuration has been
Assuming day temperature of 40oC used. The R/W pin is connected to
low (ground) since data is always
TACQ = 5μS + 1.37μS + [(40°C- written into the LCD. The RS pin is
25°C)(0.05μS/°C)] connected to pin 12 of the
microcontroller and is used to control
= 7.12μS
instructions or characters sent to the
Thus a suitable minimum acquisition LCD. The Enable pin was connected
time is = 7.12μSec to pin 18 of the microcontroller and it
was used to enable the LCD to either
f. Storing the data after conversion feed instruct instruction into the
register or write character into it. The
Because left justification format has
following code segments are used to
been selected, the ADRESH of the
initialize the LCD;
ADC takes the upper 8 bits of the
conversion while the upper two bits For the LCD to power, it needs some
of ADRESL are occupied by the time, thus a delay of 20milliseconds
lower two bits of the conversion. The is created. This delay is called at the

34
GOTO
start of the initialization. The MOVLW 0Ch
following code has been used. ; Display ON, cursor OFF & blink OFF

CALL Delay20 To take cursor home, 00000010


binary or 02Hex is used. To clear the
After powering the LCD, the type of screen in readiness for writing,
interface is set to 8-bit interface by 00000001 binary or 01Hex is used.
setting, (DL=1) the number of line
display and character font is also MOVLW 0x02
selected by setting N=1 (two lines) ;takes cursor home
and F=0 (font of 5x7). Thus the MOVLW 0x01
instruction with 00111000 binary or ;clears LCD display
38 Hex on the data lines. A delay of
In order to write into the LCD, data is
more than 40μs is used then a
first taken to the PORTC, then both
subroutine is called to feed the
E and RS pins of the LCD are set. A
instruction.
small delay is then given to allow
MOVLW b'00111000' ;select 8-bit interface,
data to be written, then enable pin is
CALL Delay50 ; 50μSec used
clearedsubroutine
and a delay applied.
CALL LCDcom ; instruction
The entry mode is set as follows; In order to write characters to the first
Cursor is made to move to the right row on the LCD, a code for the
and at the same time the register is address of the first row first column
incremented by 1- (I/D=1), no is addressed to PORTC. The first row
display shift (S=0). This results in on the LCD starts from 80Hex. This
00000110 binary or 06 Hex. The is placed in a register and
code segment is as follows. incremented up to the number of
times equal to the number of
MOVLW b’00000110’
characters to be displayed. In this
; Increments
design, the number of characters to
display
be displayed is 16. In order to know
that we have moved to the last
Display on/off control: the display is column, the content of the counter is
set on by setting D=1, while cursor subtracted from 8F. This is done until
and blinking are put off (C=0, B=0), the carry bit of the Status register is
resulting in 00001100 binary or 0C set. An XOR instruction is also used
Hex. The code segment is as follows. to identify the end of text. The entire
program code is presented in the
appendix.

Sending an instruction to the LCD


requires that a code be written. First,

35
GOTO
the value is moved to the PORTC. values
For an instruction, RS is set to 0. This
is achieved by setting bit-5 of
PORTB low. Then some small delay
of 5μSec is applied to the LCD. It is
then enabled, (E=1) then another
short delay of 5μSec that gives it time
to fetch data is used before clearing
the enable bit (E=0) and calling
another delay routine.

The values stored in ADC are in


binary form. For them to be
displayed on the LCD, they need to
be converted to ASCII values. The 10
bits of the ADC are stored in two
registers- ADRESH and
ADRESL. The ADC can encode
analogue input up to 1024 (210)
different levels. On the other hand,
the full scale analogue voltage from
Figure4.11
the current sensor is 5V. The
ADC output
resolution of the
against input
converter indicates the number of
voltage [12]
discrete values it can produce over
the range of analogue The resolution is the minimum
voltage required to cause a change at
the output level. It is also referred to
as the least significant bit voltage. It
is calculated as follows

Where: E =5V

N = (210- 1)
= 1023

36
GOTO
register for all the bits upon testing
whether or not each is set.

After assigning the values to the


The range of the sensor is 0 – 30A.
different registers, they are used
The voltage output range is 0 - 5V
when writing the values on the LCD.
The upper and lower registers have to
be tested as well to establish whether
The 10 bits and corresponding values they contain any value or not so that
of current were calculated as shown only those that have values are
in the table below. written. E.g., if the tens register is
zero its place is left blank. The same
test is carried out for the ones
position until the last decimal value.
TABLE 4.3 Value of each bit in Volts
and Amperes 4.2.3 Relay and Fault Signals
Bit Equivalent voltage (V)
When Equivalent
the amount current
of current
(A)
circulating through the transformer
Bit 0 (LSB) 0.005 0.29
goes beyond the rated value, the relay
Bit 1 0.010 is energized
0.059 so as to isolate the
transformer from the power system
Bit 2 0.020 0.117
until the over current fault is cleared.
Bit 3 0.039 The relay keeps testing automatically
0.234
and in case the fault is still present, it
Bit 4 0.078 0.469
keeps isolating the transformer until
Bit 5 0.156 the conditions
0.938 are safe. For the
model, a 5V relay has been used and
Bit 6 0.313 1.877to the secondary side of
connected
Bit 7 0.626 the transformer.
3.754 It is driven by pin
RB6 of the microcontroller via a
Bit 8 1.251 7.507
transistor. The need to send an alarm
in case of a fault warrants the use of
Bit 9 (MSB) 2.502 15.014
a 5V buzzer and a red LED. In case a
TOTAL 5 30
fault occurs, the red LED blinks and
at the same time, the buzzer goes on.
To be able to display current values,
The red LED and buzzer are
six registers are declared; they
controlled by pins RA5 and RB7
included; hundreds, tens, ones,
respectively.
first_dec , sec_dec and third_dec.
Each value is put in its respective For demonstration, a preset current
value has been set in the program.

37
GOTO
The microcontroller sets the relay,
buzzer and red LED pins on in case
the current amounts reaches this
value and off as long as the current
value remains lower than the pre-set
value. For the actual power
transformer, current rating for a
particular transformer is be used. The
preset current value in this case has
been set to 15Amperes. This in
binary form is as follows;

ADC results = 200He

ADRESH = 80H CHAPTER 5: RESULTS AND


ANALYSIS
ADRESL = 00H

The exact amount of current at which


5.1 Simulated results
the relay triggers is 15.015A since
The following results have been
the binary value is 1000000000,
obtained after simulating the design
which means that only bit 9 is set and
on proteus. Table 5.1shows the state
bit 9 contains15.015A. So there is no
of the relay, LED and buzzer as
need of checking the OUTPUTH
current increases. A decrease in load
register since it would contain zero. resistance makes current circulating
in the primary side of the transformer
to increase.

TABLE 5.1 SIMULATED RESULTS


% Load Sensor Display on State State of
Resistance output LCD of the the
(V) Relay buzzer
100 0.05V 0.352A OFF OFF
90 0.06V 0.381A OFF OFF
80 0.07V 0.44A OFF OFF
70 0.08V 0.498A OFF OFF
60 0.09V 0.586A OFF OFF
50 0.12V 0.704A OFF OFF
40 0.14V 0.88A OFF OFF
30 0.19V 1.143A OFF OFF

38
GOTO
above. An increase in the
sensor output voltage led to a
corresponding increase in the
current value displayed on
the LCD.

20 0.28V 1.701A OFF OFF GREEN


10 0.51V 3.079A OFF OFF Current
GREEN displayed
5 0.89V 5.337A OFF OFF on
GREEN LCD
2 1.70V 10.234A OFF OFF GREEN
1 2.52V 15.132A ON ON RED Figure5.1 Graph of
OVERCURRENT
current /Voltage
FAULT
0 2.52V 15.161A ON ON RED against Resistance
OVERCURRENT
FAULT
A graph of line current
5.2 Analysis against resistance drawn on
It Is observed that as the matlab shows a trend of
current circulating in the decrease in current as
transformer increases, the resistance increases. Little
sensor output also increases. resistance means that the load
This is illustrated in the table has increased thus more

39
GOTO
current is drawn from the The above binary
transformer. More resistance representation corresponds
limits current flow, with the following sensor
signifying reduced load. So resolutions;
as resistance is reduced by
varying the rheostat, current 0.312+0.156+0.039+0.004=0
increases up to a point where .511
the relay trips the circuit. It can therefore be concluded
This confirms that the system that the ADC module has
has been designed well and been well programmed.
thus it is able to read and It is also observed that during
record the current as it normal transformer
changes, and operate the operation, the green LED
switches at optimum current blinked. The normal
levels. operation range is between 0
The ADC gave satisfactory and 15.132A. Within this
results as expected. The input range of, the relay contact
value from the sensor remains intact, the buzzer
matches well with the remains quiet, the red LED
displayed value on the LCD. remains off and the LCD
For example a value of 3.07A displays varying current as
displayed on the LCD the load current is varied
corresponds to 0.51V from from 0 – 20KΩ. The
the sensor. following figures illustrate
Proof the simulated device
operation.
The value 3.07 calculated RL1
RV2
from the table will include 12 V

the following bit values;


1.877+0.938+0.235+0.029=3
.07 10

These
values
mean that Figure5.2 Relay closed Green blinks
the ADC
bits were
LCD1
set as LM016L

follows;
00011010
01.

40
GOTO

Figure5.5 Over current Fault

From the observations, the system


Figure5.3 LCD Display achieves the function of an over-
Finally, it is observed that current relay that automatically
when the current is varied up detects over current fault and uses a
to the pre-set level, of microcontroller to record the fault,
15.015A, the relay, buzzer isolate the transformer from the
and the red LED are affected zone and report the fault
triggered. The buzzer sounds occurrence so that the system
an alarm notifying the operator is aware that there is a
operators of the fault, the problem. The advantage of this
relay isolates the transformer system over analogue over current
from the system, the red LED relay is that it automatically recloses
blinks to signify that the once the fault is cleared. The level of
current level is too much for accuracy of the system is also super
the transformer to supply. as compared to analogue operated
The LCD displays a over-current relay. To take care of
notification that there is an inrush current, a delay of 255μSec x
OVERCURRENT FAULT. 4 has used. This delay allows the
The observations are as inrush phenomenon to clear so that
follows. the transformer comes back to
normal operation before the relay
RL1 D3
12V RV2 starts its work. R2
220
LED-RED

D2
R3
10
5.3 Results after220implementation
LED-GREEN
The following figures shows the
outcome upon implementation on a
Figure5.4 Relay Open, Red LED breadboard.
blinking
LCD1
LM016L

41
GOTO

Figure5.7 current level approaching


Figure5.6 Normal transformer
fault level
operation
The system as shown in figure 4.9
The figure 4.8 above shows the
shows the red LED blinking to warn
outcome when the transformer is
that the load current is approaching
operating under normal conditions.
the rated value of the transformer.
The LCD is operating normally and
This warning is triggered when the
the green LED blinks to show that the
current exceed 7 - 8A. In actual
system is responding accordingly. A
power transformer protection, this
20KΩ variable resistor has been used
visual warning would be triggered
as the load. Varying the resistor
when the current circulating in the
signifies the varying load connected
transformer is approaching the rated
to a transformer. The current reading
level.
on the LCD changes as the resistor is
varied up to the preset fault point.
The normal operation condition
operates as expected and as depicted
in the simulation.

42
GOTO

Figure5.8 Over current fault

The system as shown in the figure 5-


0 above shows the LCD display
when the current circulating in the
transformer exceeds the rated value.
The LCD displays
“OVERCURRENT FAULT” and at
the same time, the buzzer is activated
to alert the system operator of the Figure5.9 Lab set up
fault occurring in a given
transformer. A signal is also sent to
the relay to isolate the transformer
from the power system. In this
model, a relay and a contactor are
used to carry out the process of
transformer isolation from the
system. The circuit design is in
appendix A.

43
GOTO
CHAPTER 6: CONCLUSION Every customer desires to optimize
and RECOMMENDATINS the usage of a gadget yet at a low
cost. The cost of implementing the
system is relatively cheap as the
components used are few and can be
The main objective if this project has cheaply found in the market. The
been to design and implement a microcontroller can be used to drive
system that uses a microcontroller to multiple relays using the same
protect a power transformer. This program. The only thing that needs to
objective was achieved as the system be done is free more ports for
works effectively. As the current multiple input and outputs. This will
circulating in the transformer coil allow for more variables from
varies, the LCD displays the different transformers and multiple
readings. The relay is able to operate outputs to different relays.
and isolate the transformer in case of
Owing to the fact that transformers
an over current fault. The relay is the
are very important components of the
main switching element in the
electrical power system, their safety
system. When energized, it opens its
is paramount. Over current
contacts and de-energizes the
phenomenon can cause damage to
contactor thus isolating the
transformers. Damage to a
transformer to safety in case of
transformer puts interrupts electrical
adverse current conditions. The other
supply to consumers. Blackouts
peripheral devices act as means of
cause economic derailment and
sending warning messages in case a
disorients consumers’ work
fault occurs.
schedule. This explains why this
This system if put to use in power system is needed and can help
transformer protection can serve the mitigate the effects of fault in a
purpose with greater advantages than transformer.
the analogue over current relay. Its
In case an over current fault occurs,
ability to automatically reclose the
the power engineers should consider
circuit after the fault is cleared
taking time to evaluate the possible
warrants the system usability in
cause of this phenomenon. For
remote areas that may be too far for
example, if there is an overload at the
an operator to reach easily and
consumer end, there may be a call to
reconnect the transformer back to the
install a new transformer that can
supply line. The admirable fact about
withstand the increased load. The
it is the accuracy with which it closes
other mitigation option may be to add
and recloses during either normal
another supply line to the consumer
operation or fault occurrence.
so that the consumer demand is met.

44
GOTO
This system comes with a power c) Another limitation is that
supply that can be directly plugged to whereas the relay
240V source and give the appropriate automatically recloses its
operating voltage. The 240V source contacts, the contactor used
can be easily cultivated in a power has to be restarted physically
system line. by an operator. Using a
It can be used in substations or in circuit that automatically
distribution trans recloses the system would be
a great solution.
6.2 limitations and Future d) Lastly, the method of
recommendations relaying the information to an
Transformer protection is a very operator in a control room far
crucial engineering principle. It is from the sub-station has not
clear that the demand for electricity been explored in this project
is increasing fast with increasing due to time constraint. An
population and economic growth. area for future study is how
This demands that more the system can automatically
sophisticated transformer protection send a message to a control
methods be used in the future in order centre and notify the
to maintain a stable electrical power engineers of the exact
supply as will be demanded by the location of a faulted
growing economy. transformer. A GSM module
can be used in this case.
Based n the work done in this project,
the future may demand that some
improvements be made.

Some of the limitations faced in the


design and future solutions include;

a) The current sensor does not


offer a 100% sensing speed
as needs some time do sense
and transfer the signal to the
microcontroller. A device
with a faster sensing speed
should be established.
b) Instead of using the relay as a
switch, a semiconductor
switching device such as a
thyristor should be used.

45
GOTO

APENDIX A: Circuit Design

46
47

You might also like