Professional Documents
Culture Documents
Berihun Project 2 1
Berihun Project 2 1
Berihun Project 2 1
ASSOSA UNIVERSITY
SEMISTER PROJECT
PREPARED BY
ASSOSA, ETHIOPIA
DECLARATION
We declare that the information found in this project is our original work the project has never has
been presented or published anywhere or in any institution of learning. And all sources of materials
that will be used for the project work will be fully acknowledged.
APPROVAL
This is to certify that the project titled “POWER TRANSFORMER PROTECTION BY USING
ATMEGA 32”carried out control stream group six has been read and approved for meeting part of the
requirements and regulations governing the award of the bachelor of science in Electrical and
Computer Engineering.
Name of advisor
………………..
Name of examiners
………………………..
Date submission
ACKNOWLEDGMENT
First of all we would like to express our heart full gratitude for our GOD to help us during our Work
throughout all things. Next to this we would thanks our heart full gratitude to our advisor GETANEH,
our teacher NATARAJAN and our friends for his a reserved guidance, suggestion and advice. We are
great full to this motivation for the timely completion of our project.
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 ACS755 series has been used in this project as the interfacing instrument between the
power transformer and ATmega32 microcontroller. ATmega32 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,
temperature and voltage readings and indicate cases of over-current fault. To warn an operator of a
fault occurrence. Temperature sensor has been used to know amount of temperature of transformer
during it operate. All these peripheral devices depend on the microcontroller to make them operate or
otherwise. Some of the tools used in this project include AVR micro C 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.
Table Contents
CONTENT PAGE
DECLARATION ........................................................................................................................................ ii
APPROVAL ............................................................................................................................................... ii
ACKNOWLEDGMENT.............................................................................................................................. i
ABSTRACT ................................................................................................................................................ ii
List of Figure............................................................................................................................................... v
Acronym and Abbreviation........................................................................................................................ vi
CHAPTER 1 ............................................................................................................................................... 1
BACKGROUND OF THE PROJECT........................................................................................................ 1
1.1 INTRODUCTION ................................................................................................................................ 1
1.2 Objectives ............................................................................................................................................. 2
1.2.1 General Objective .............................................................................................................................. 2
1.2.2 Specific Objective .............................................................................................................................. 2
1.3 Problem statement ................................................................................................................................. 2
1.4 Scope of this project.............................................................................................................................. 2
CHAPTER 2 ............................................................................................................................................... 3
LITERATURE REVIEW AND THEORETICAL BACKGROUND ........................................................ 3
2.1 Electric Power System .......................................................................................................................... 3
2.1.1 Importance of power system protection ............................................................................................. 4
2.2 Transformer protection ......................................................................................................................... 4
2.3. Causes of fault in power transformer ................................................................................................... 5
2.4 Transformer Protection Schemes .......................................................................................................... 6
CHAPTER 3 ............................................................................................................................................... 9
SYSTEM DESIGN OF OUR PROJECT .................................................................................................... 9
3.1 Overview ............................................................................................................................................... 9
3.2 Component details .............................................................................................................................. 10
3.2.1 Microcontroller ................................................................................................................................ 10
List of Figure
Figure 1 Generation, transmission and distribution of electrical power .................................................. 3
Figure 2 Electro-magnetic induction ....................................................................................................... 5
Figure 3 Waveform of a magnetizing inrush current ............................................................................... 6
Figure 4 Restricted Earth Fault Protection............................................................................................... 7
Figure 5 Over current Phenomenon ......................................................................................................... 7
Figure 6 Block diagram of the system ..................................................................................................... 9
Figure 7 Current sensing circuits ........................................................................................................... 12
Figure 8 over voltage sensing circuit. .................................................................................................... 13
Figure 9 230VAC lamp switched ON using microcontroller based relay ............................................. 15
Figure 10 Crystal oscillator circuit inscribed in the controller .............................................................. 16
Figure 11 Transformer power supply .................................................................................................... 16
Figure 12 LM35 sensor interfaced with the AVR microcontroller........................................................ 18
Figure 13 Microcontroller with Max232 interface with RS23 Interface ............................................... 19
Figure 14 Flowchart description of the system ...................................................................................... 20
Figure 15 Complete schematic............................................................................................................... 23
Figure 16 Complete circuit simulation models .......................................Error! Bookmark not defined.
PC personal computer
CT current transformer
PS power system
universal synchronous asynchronous receiver
USART
Transmitter
CHAPTER 1
BACKGROUND OF THE PROJECT
1.1 INTRODUCTION
In the design of electrical power generation, transmission and distribution system, there are various
factors that need to be considered in the quest to satisfy the needs of electricity consumers. Electrical
power systems experience faults at various times due to various reasons. These faults must be
foreseen and safety precautions applied to the power system. An electrical power system consists of
various components such as generators, switches, transmission cables, transformers, capacitor banks
among other components. It cannot therefore operate without an effective protective device to keep
these components safe and the system stable.
Faults in a power system refer to the undesired conditions that occur in the electrical power system.
These conditions may include short circuit, over current, overvoltage, high temperatures among
others. It is clear that over time, there has been an increase in human population, economic growth
and technological advancement. This has continuously made the demand for electrical power to go
high because as technology, human population and economy grows; there is an increase in demand
for power as many more electrical loads are introduced into the supply line. An increase in load leads
to a lot of current drawn from the power line. At times the demand goes above what the power
distributor can supply. The consequence of this is that electrical power overload cases become
common thus posing danger to power system components. This therefore throws in the need for
devices that can monitor the rate of power consumption in accordance with the level that a given
system is designed to sustain. Such a device must be designed to cut off consumption if the system
oversteps its ability thus being dangerous to users and the components.
In this project, we look at the protection of power transformer from various faults that may occur and
may be destructive to the component if left undetected. Power transformer is one of the most
significant equipment in the electric power system, and transformer protection is an essential part of
the general system protection approach. Transformers are used in a wide variety of applications, from
small distribution transformers serving one or more users to very large units that are an integral part
of the bulk power system.
1.2 Objectives
1.2.1 General Objective
The main objective of this project is to design and implement a system that uses microcontroller and
other peripheral devices to protect power transformer.
CHAPTER 2
LITERATURE REVIEW AND THEORETICAL BACKGROUND
An electric Power system refers to a network that constitutes electrical components/machines used in
the supply, transmission and consumption of electric power. 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 consumption depending on the purpose for which a consumer uses electricity.
Electrical power consumers may be industrial, commercial or domestic [6]. These consumers require
different levels of electric power supply. In order to meet their specific needs, certain 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. The main aim of power system
protection scheme is to switch off a section that is faulty in the system from the remaining live
system. This ensures that the remaining portion is able to function satisfactorily locking out chances
of damage that may be caused by fault current.
A circuit breaker closes automatically as a result of trip signals it receives from the relay whenever a
fault is detected. “The basic philosophy of a power protection system is that system faults cannot be
prevented from flowing in the system but can be stopped from spreading in the system”.
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.
it may operate for any ground fault anywhere in the system. It detects faults with values below pick
up of differential relay.
project seeks to apply microcontroller and appropriate software program to design an over current
relay. Thus project is based on microcontroller transformer protection with PC based transformer
parameters monitoring capabilities.
This protection is focused on the transformer parameters feed into the ADC of the microcontroller
and monitoring the transformer voltage, current and temperature through personal computer. The
voltage transformer will be connected across a variable AC input source using an autotransformer
which can be varied from 0-250VAC. The output of the transformer (secondary) will be connected to
electric bulbs which will serve as loads. The load current will be monitored by connecting a current
sensor in series between the load and the secondary side of the transformer. The transformer voltage
will be monitored through rectifying a step down 230-12VAC transformer to a pure 5VDC and then
feed to the microcontroller ADC pin for voltage monitoring. The input of the step down transformer
will be connected to autotransformer and the output will be perfectly rectified to a pure
5VAC.whenever the input voltage is varied, the microcontroller shows the value of the voltage on an
LCD and also on the PC.
As input voltage is varied above 230VAC, the microcontroller detects an over voltage fault and it
sends a trip signal to the voltage protective relay for protecting the transformer and the load
connected. Similarly, the microcontroller monitor’s the load current and temperature added to the
secondary side of the transformer, the current at the secondary side rise. As the load of transformer
and displays the values on LCD and on the PC. Whenever loads are added to the secondary side of
the transformer, the current at the secondary side rise. As the load current exceeds the rated current
rating of the transformer, the temperature of the secondary winding rises, therefore the
microcontroller will send a trip signal to the overcurrent protective relay, thereby protecting the
transformer from burning.
CHAPTER 3
SYSTEM DESIGN OF OUR PROJECT
3.1 Overview
The block diagram of the system is shown in figure 3.1
computer is used to display the transformer parameters for monitoring purpose. While monitoring the
transformer parameters, whenever the load current exceeds the transformer rated current, the
microcontroller detects an overcurrent faults and it sends a trip signal to the overcurrent relay, thereby
protecting the transformer from blowing off. Moreover, when the autotransformer secondary is varied
above the specific limit, the microcontroller detects an overvoltage faults and it sends a trip signal to
the overvoltage protective relay, thereby protecting the transformer and the loads from blowing off.
3.2.1 Microcontroller
The microcontroller is required to serve the purpose monitoring the transformer information such as
temperature, voltage and current through the LCD display, personal computer and triggering the relay
when there is any fault. Modern power networks require faster, more accurate and reliable protective
schemes. Microcontroller-based protective schemes are capable of fulfilling these requirements. They
are superior to electromagnetic and static relays. These schemes have more flexibility due to their
programmable approach when compared with the static relays which have hardwired circuitry.
Therefore in order to achieve this task the ATmega32 microcontroller was chosen because of its
suitability for this project such as speed, power consumption, Universal Synchronous Asynchronous
Receiver Transmitter (USART) functionality, in built ADC, and amount of RAM and ROM on the
chip.
The ATmega32 is a low-power CMOS 8-bit microcontroller based on the AVR enhanced RISC
architecture. It has a High Endurance Non-volatile Memory segments such as 32K Bytes of In-
System Self-programmable Flash program memory, 1024 Bytes EEPROM, 2K Byte Internal SRAM,
write/erase Cycles: 10,000 Flash/100,000 EEPROM. The ATmega32 microcontroller I/O pins are 40
in number, and most of them can be used as I/O pins. The input/output pins serves the purpose of
connecting the ADC chip, LED, LCD display, alarm buzzer and in this case the port A, pin one, two
and three were used to take care of ADC input since we are using three different analogue signals one
for the voltage transformer other for the current transformer and finally for the temperature sensor.
TR1
L1 L2
220v 220v
TRAN-2P2S
4
U1
IP-
VCC IP+
CURRENT SENSOR
VIOUT
GND
2
1
Microcontroller ADC pin for current monitoring
The above calculation shows that the transformer has a turn ratio of 120:6 =20:1
I1=0.667A
The above calculation shows that the step down transformer has step up the primary current from
0.667 to 1A at the secondary.
0-250VAC
C1
50%
1nF
1k
TRAN-2P2S
analogue signal into the ADC without burning the ADC converter. Whenever the primary voltage of
the transformer is adjusted, the secondary voltage also changes, and based on the microcontroller
program, the input voltage can be monitor, displayed and the transformer can be protected from any
over voltage fault.
3.2.5 Relay
The relay is an electrically controllable switch widely used in industrial controls, automobiles, and
.appliances. It allows the isolation of two separate sections of a system with two different voltage
sources. For example, a +5V system can be isolated from a 120V system by placing a relay in
between them. One such relay is called an electromechanical or electromagnetic relay EMR as shown
in figure 3.4. The EMRs have three components: the coil, spring and contacts. In Figure 3.4, a digital
+5V can control a 230Vac lamp without any physical contact between them. When current flows
through the coil, a magnetic field is created around the coil (the coil is energized), which causes the
armature to be attracted to the coil. The armature’s contact acts like a switch and closes or opens the
circuit. The relay serves as the protective device of the entire system. The relay receives trip signal
from the microcontroller and thereby cutting the transformer primary from the input ac source hence
protecting the transformer
U1
9 22
RESET PC0/SCL
23
PC1/SDA
13
XTAL1 PC2/TCK
24 RL1
12
XTAL2 PC3/TMS
25 R2 D1 6v
26 10k DIODE
PC4/TDO
40 27
PA0/ADC0 PC5/TDI
39 28
PA1/ADC1 PC6/TOSC1
38 29
PA2/ADC2 PC7/TOSC2
37
36
PA3/ADC3
14
R1
35
PA4/ADC4 PD0/RXD
15 L1
PA5/ADC5 PD1/TXD 2.2k 12V
34
PA6/ADC6 PD2/INT0
16 Q1
33 17 2N2369
PA7/ADC7 PD3/INT1
18
PD4/OC1B
1 19
PB0/T0/XCK PD5/OC1A
2 20
PB1/T1 PD6/ICP1
3 21
PB2/AIN0/INT2 PD7/OC2
4
PB3/AIN1/OC0
5
PB4/SS
6
PB5/MOSI
7 32
PB6/MISO AREF
8 30
PB7/SCK AVCC
ATMEGA32
C1
U1
9 22
RESET PC0/SCL
33nF 23
PC1/SDA
X1 13
XTAL1 PC2/TCK
24
16MHZ 12 25
C2 XTAL2 PC3/TMS
26
PC4/TDO
40 27
PA0/ADC0 PC5/TDI
39 28
PA1/ADC1 PC6/TOSC1
33nF 38 29
PA2/ADC2 PC7/TOSC2
37
PA3/ADC3
36 14
PA4/ADC4 PD0/RXD
35 15
PA5/ADC5 PD1/TXD
34 16
PA6/ADC6 PD2/INT0
33 17
PA7/ADC7 PD3/INT1
18
PD4/OC1B
1 19
PB0/T0/XCK PD5/OC1A
2 20
PB1/T1 PD6/ICP1
3 21
PB2/AIN0/INT2 PD7/OC2
4
PB3/AIN1/OC0
5
PB4/SS
6
PB5/MOSI
7 32
PB6/MISO AREF
8 30
PB7/SCK AVCC
ATMEGA32
F=
F=16MHZ
T= = =62.5ns
rectifiers, filter capacitor and a voltage regulator. Figure above shows the sequential process of
designing a constant DC power supply.
In Figure 11 the input voltage is obtained the main 230VAC outlet and then connected to the
transformer. A step down transformer is used in stepping the 230VAC to a 12VAC.The 12VAC
serves as an input voltage to the bridge rectifier which is basically for diodes connected where two
diodes are in forward biased and the other two are in reversed biased for each half cycles. The bridge
rectifier is used in converting the 12VAC into a dc voltage. The filter capacitor serves as a smoother
to smooth the dc voltage from the bridge rectifier and the LM7805 is the voltage regulators which
purposely stabilizes the output voltages to 6VDC and 5VDC.
VDD
VSS
VEE
RW
RS
D0
D1
D2
D3
D4
D5
D6
D7
E
1
2
3
4
5
6
7
8
9
10
11
12
13
14
U1
9 22
RESET PC0/SCL
23
PC1/SDA
13 24
XTAL1 PC2/TCK
12 25
XTAL2 PC3/TMS
26
PC4/TDO
40 27
PA0/ADC0 PC5/TDI
39 28
PA1/ADC1 PC6/TOSC1
38 29
PA2/ADC2 PC7/TOSC2
37
PA3/ADC3
36 14
U2 PA4/ADC4 PD0/RXD
1 35 15
PA5/ADC5 PD1/TXD
34 16
PA6/ADC6 PD2/INT0
33 17
PA7/ADC7 PD3/INT1
18
34.0 PD4/OC1B
1 19
PB0/T0/XCK PD5/OC1A
2 20
PB1/T1 PD6/ICP1
2 3 21
VOUT PB2/AIN0/INT2 PD7/OC2
4
PB3/AIN1/OC0
5
PB4/SS
6 R1
PB5/MOSI
3 LM35 7 32
PB6/MISO AREF
8 30 10k
PB7/SCK AVCC
ATMEGA32
C1
1nF
The output voltage of the LM35 varies linearly with temperature. Therefore to calculate the
temperature, a general equation is shown below which is used to convert the output voltage to
temperature
Temperature (C) =V Out * (100 C/V)…………………….. (1)
Hence, if V Out is 0.84V, then, Temperature = 84C
U1
9 22
RESET PC0/SCL
23
PC1/SDA
13 24
XTAL1 PC2/TCK
12 25
XTAL2 PC3/TMS
26
PC4/TDO
40 27
PA0/ADC0 PC5/TDI
39 28
PA1/ADC1 PC6/TOSC1 C1
38 29
PA2/ADC2 PC7/TOSC2
37
PA3/ADC3
36 14
PA4/ADC4 PD0/RXD
35 15 1nF
PA5/ADC5 PD1/TXD U2
34 16 1 3
PA6/ADC6 PD2/INT0
33 17
PA7/ADC7 PD3/INT1
18
PD4/OC1B C1+ C1- P1
1 19
PB0/T0/XCK PD5/OC1A
2 20 11 14
PB1/T1 PD6/ICP1 T1IN T1OUT
3 21 12 13 1
PB2/AIN0/INT2 PD7/OC2 R1OUT R1IN DCD
4 10 7 6
PB3/AIN1/OC0 T2IN T2OUT DSR
5 9 8 2
PB4/SS R2OUT R2IN RXD
6 7
PB5/MOSI RTS
7 32 2 3
PB6/MISO AREF VS+ TXD
8 30 6 8
PB7/SCK AVCC VS- CTS
C3 4
DTR
ATMEGA32
C2+ C2- C4 1nF 9
RI
1nF
4 5 MAX232
C2 ERROR
COMPIM
1nF
the transformer input voltage is greater than 230Vac, if so, it sends a trip signal to overvoltage relay,
thereby protecting the transformer.
CHAPTER 4
HARDWARE AND SOFTWARE DESIGNAND IMPLEMENTATION
The microcontrollers send the monitored parameters to LCD display and also transmit them to a
personal computer. The transmission to personal computer was made possible by interfacing the
microcontroller with the computer using MAX232 through RS232 serial communication. RS232
(recommended standard 232) supports both synchronous and asynchronous transmission and its user
data is send as a time series of bits. While monitoring the parameters, whenever a fault occurs which
might be high voltage or over current, the microcontroller sends a trip signal to the relay and thereby
protecting the transformer from burning.
conversion, PORT C is used for LCD interfacing, PORT D is used for relay control, LCD control
pins and serial port.
4.5 Results
From simulation of this project we can observe that when impute power supply is varied
microcontroller sense this variation and send signal to the relay in order to be ON state after that
whatever input power is changed relay never change its position. and also current sensor never sense
change that happen on the load (i.e. it never detect over current existence automatically ).
CHAPTER 5
CONCLUSION AND FUTURE RECOMMENDATION
5.1 Conclusion
In this project, the transformer protection using a microcontroller is proposed. For transformer
voltage and current sensing, a current sensing circuit and voltage sensing circuits were designed but
the results have not been verified with proteus simulation so much enough.
Reference
Books
[1]Badri ram and D N Vishwakarma (1995) power system protection and switch gear.
[2]Frank D. Petruzella (2010) Electric motors and control systems 1st ed. New york:
McGraw-Hill
[3]J. Lewis Blackburn , Thomas J. Domin (2006). Protective Relaying Principles and
Applications . 3rd ed. United States of America: CRC press
[4]Leonard L. Grigsby (2007). The Electric Power Engineering Handbook. 2nd ed. United
States of America: CRC press.
[5]P. M. Anderson (1998). Power system protection. New York: John Wiley & Sons,
IncP.673.
[6]2002 Student Conference on Research and Development Proceedings, Shah Alam,
Malaysia
[7]International Research Journal Of Multidisciplinary Studies & Sppp's,
Karma yogi Engineering College, Pandharpur Organize National Conference
Special Issue March 2016.
APENDEX
#include <built_in.h>
#define LCD PORTC
sbit LCD_RS at PORTD4_bit;
sbit LCD_EN at PORTD6_bit;
sbit LCD_RW at PORTD5_bit;
sbit LCD_D7 at PORTC7_bit;
sbit LCD_D6 at PORTC6_bit;
sbit LCD_D5 at PORTC5_bit;
sbit LCD_D4 at PORTC4_bit;
sbit LCD_D3 at PORTC3_bit;
sbit LCD_D2 at PORTC2_bit;
sbit LCD_D1 at PORTC1_bit;
sbit LCD_D0 at PORTC0_bit;
// Pin direction
sbit LCD_RS_Direction at DDD4_bit;
sbit LCD_EN_Direction at DDD6_bit;
sbit LCD_RW_Direction at DDD5_bit;
sbit LCD_D7_Direction at DDC7_bit;
sbit LCD_D6_Direction at DDC6_bit;
sbit LCD_D5_Direction at DDC5_bit;
sbit LCD_D4_Direction at DDC4_bit;
sbit LCD_D3_Direction at DDC3_bit;
sbit LCD_D2_Direction at DDC2_bit;
sbit LCD_D1_Direction at DDC1_bit;
sbit LCD_D0_Direction at DDC0_bit;
sbit RS at PORTD4_bit;
sbit EN at PORTD6_bit;
sbit RW at PORTD5_bit;
sbit relay at PORTD2_bit;
sbit relay2 at PORTD3_bit;
unsigned int voltage,current,temp,current2,current1;
int decimal,integer;float analog;
char txt1[] = "Transformer protection";
.
.
.
.
UART1_Write(temp);
UART1_Write(voltage);
UART1_Write(current);
}
}