You are on page 1of 42

DIREDAWA UNIVERSITY INSTITUTE OF TECHNOLOGY

SCHOOL OF ELECTRICAL ANDCOMPUTER ENGINEERING


(POWER STREAM)
Title: Automatic Load Sharing of power Transformer Using
Microcontroller in Dire-Dawa city
PREPAERED BY
NAME ID. No
1. BINYAM BOKREY ……………….……… R/0408/08
2. ANDARGACHEW SHIMEKT …………,,.. R/0256/08
3. ABDURAHMAN JEMAL ………..….….… R/1047/08
4. BIRTUKAN HAILU …………..………...… R/0626/08

ADVISOR [SEMAHIGN S. (MSc)]


Submission date 12/06/2013 E.C

1
DECLARATION
We are students of Dire Dawa Institute of technology (DDIT), School of Electrical and Computer
Engineering. The information found in this thesis is our original work. In addition, all sources of
materials that will be used for the project work will be fully acknowledged.

2
Abstract
Transformer is basically a static device which transfers the electrical power from one circuit to
another circuit with desired change in voltage and current at constant frequency. It is the only device
which operates at highest efficiency at full load condition. Hence, transformer is the vital component
in the electric power transmission and distribution system. Due to overload on transformer, the
efficiency drops and windings get overheated and may get burnt. It takes lot of time to its repair and
also involves lot of expenditure. The aim of the project is to protect the transformer under overload
condition by load sharing. This will be done by connecting another transformer in parallel through
a micro-controller. The microcontroller compares the load on the first transformer with a reference
value. When the load exceeds the reference value, the second transformer will share the extra load.
Therefore, the two transformer work efficiently and damage is prevented. In this project three
modules are used to control the load currents. The first module is a sensing unit, which is used to
sense the current of the load and the second module is a control unit which contains current
transformers, LCD, Analog to digital converters, bridge rectifier, and integrated circuit regulator.
The last module is microcontroller unit and it will read the analogue signal and perform some
calculation and finally gives control signal to a relay. The advantages of the project are transformer
protection, uninterrupted power supply, and short circuit protection. This design and simulation were
carryout on the proteus and keil software.

KEYWORDS: Transformer, LCD, Microcontroller, current sensor, ADC

3
Acknowledgments
We consider it as a privilege to articulate a few words of gratitude and respect to all those deserving
individuals who guided us in this project. First and foremost, we would like to extend our profound
gratitude and our sincere thanks to our SEMAHIGN S. (MSc) as our advisor for the continuous
support of our thesis, for his patience, motivation, enthusiasm, and immense knowledge. We are
also grateful to Electrical and Computer Engineering, Electrical power system engineering
departments Of Dire dawa University for their kind full help on giving related information. We
would like to extend our thanks to EYASU (BSc) and to those who helped us with different ideas
and motivation that inspired us for successful completion of the project.

4
Contents
DECLARATION......................................................................................................................................... 2

Abstract........................................................................................................................................................ 3

Acknowledgments ....................................................................................................................................... 4

Chapter One ................................................................................................................................................ 9

Introduction ................................................................................................................................................. 9

1.1 Background ....................................................................................................................................... 9

1.2 Motivation........................................................................................................................................ 10

1.3 Statement of the Problem ............................................................................................................... 10

1.4 Objectives of the study .................................................................................................................... 11

1.4.1 General Objective .................................................................................................................... 11

1.4.2 Specific Objectives ................................................................................................................... 11

1.5 Scope and Limitations .................................................................................................................... 11

1.6 Application of Results ..................................................................................................................... 12

1.7 Organization of the Rest of the Thesis .......................................................................................... 12

Chapter Two .............................................................................................................................................. 13

Literature (related work) review ............................................................................................................. 13

2.1. Introduction .................................................................................................................................... 13

2.2. Related works ................................................................................................................................. 13

2.3. Summary......................................................................................................................................... 15

Chapter Three ........................................................................................................................................... 16

Design of automatic load sharing of power transformer ....................................................................... 16

3.1 Introduction ..................................................................................................................................... 16

3.2 Power supply ................................................................................................................................. 17

3.2.1 Transformer ............................................................................................................................. 18

3.2.2 Bridge rectifier ......................................................................................................................... 18

5
3.2.3 Filter .......................................................................................................................................... 19

3.2.4 IC Regulator ............................................................................................................................. 20

3.3 The Electromagnetic Relay ........................................................................................................ 20

Basic operation .......................................................................................................................................... 21

3.4 Current sensor................................................................................................................................. 21

3.4.1 Operation of current sensor .................................................................................................... 22

3.5 Power Transformer ........................................................................................................................ 22

3.5.1 Operation of power transformer ............................................................................................ 23

3.6 Mathematical modelling for Load sharing of two transformers ................................................ 23

3.6.1. Equal Voltage Ratios .............................................................................................................. 23

3.6.2 Unequal Voltage Ratios ........................................................................................................... 25

Chapter Four ............................................................................................................................................. 27

Interfacing of microcontroller AT89C51 with ADC0804 and LCD LM016........................................ 27

4.1 Microcontroller AT89C51 ............................................................................................................ 27

4.1.1 Major Features of AT89C51 ................................................................................................... 27

4.1.2 AT89C51 Microcontroller Architecture ................................................................................ 28

4.1.3 Pin-Descriptn ............................................................................................................................ 29

4.1.4 The AT89C51 oscillator and clock.......................................................................................... 31

4.1.5 TImers ....................................................................................................................................... 32

4.1.6 Interrupts .................................................................................................................................. 32

4.2 Analog to Digital Converter Interfacing ....................................................................................... 33

4.2.1 Pin description .......................................................................................................................... 35

4.3 Liquid Crystal Display Interface ................................................................................................... 36

4.3.1 Pin Description ......................................................................................................................... 37

Chapter five ............................................................................................................................................... 38

Simulation and result................................................................................................................................ 38

6
5.1 Proteus ............................................................................................................................................. 38

5.2 Keil cross C Compiler ..................................................................................................................... 38

5.3 Simulation ........................................................................................................................................ 39

5.3.1 Schematic Explanation and discussion .................................................................................. 39

Chapter six................................................................................................................................................. 40

Conclusions and future recommendations ............................................................................................. 40

6.1Conclusions ....................................................................................................................................... 40

6.2 Recommendation for Future Work ............................................................................................... 41

REFERENCES: ........................................................................................................................................ 41

7
List of figures
Figure 3.1; Block diagram the project .................................................................................................. 17
Figure 3.2: block diagram of power supply .......................................................................................... 17
Figure 3.3: output of transformer .......................................................................................................... 18
Figure 3.4: output of rectifier ................................................................................................................ 19
Figure 3.5: output of filter ..................................................................................................................... 19
Figure 3.6: output of Ic regulator .......................................................................................................... 20
Figure 3.7: Electromagnetic relay ......................................................................................................... 21
Figure 3.8: Equivalent circuit of parallel transformer ........................................................................... 23
Figure 4.1: Microcontroller AT89C51 .................................................................................................. 29
Figure 4.2: Crystal oscillator................................................................................................................. 32
Figure 4.3: Block diagram ADC ........................................................................................................... 34

8
Chapter One
Introduction
1.1 Background
Power travels from the power plant to house through an amazing system called the power
distribution grid. For power to be useful in a home or business, it comes off the transmission grid
and is stepped-down to the distribution grid. This may happen in several phases. The place where
the conversion from "transmission" to" distribution" occurs is in a power substation. It has
transformers that step transmission voltages (in the tens or hundreds of thousands of volts range)
down to distribution voltages (typically less than 10,000 volts). It has a “bus” that can split the
distribution power off in multiple directions. It often has circuit breakers and switches so that the
substation can be disconnected from the transmission grid or separate distribution lines can be
disconnected from the substation when necessary.

Transformers being one of the most significant equipment in the electric power system, needs
protection as a part of the general system protection approach. Moreover the increasing population
and their unavoidable demands have led to an increasing demand on electrical power. With this
increased needs, the existing systems have become overloaded. The overloading at the consumer
end appears at the transformer terminals which can affect its efficiency and protection systems.
Due to overload on the transformer, the efficiency drops and the windings gets over heated and
may get burnt. It takes a lot of time to repair and involves a lot of expenditure. Transformers are
occasionally loaded beyond nameplate ratings because of existing possible contingencies on the
transmission lines, any failure or fault in power systems, or economic considerations. One of the
reported damage or tripping of the distribution transformer is due to thermal overload. To eliminate
the damaging of transformers due to overloading from consumer end, it involves the control
against over current tripping of distribution transformer. Rise in operating temperature of the
transformer due to overloading has an influence on ageing of transformers. The accelerated aging
is one of the main consequences of overloading power transformers. Thus load limitations must
be implemented to operate the transformers within safe limits. Moreover on overloading the
transformers voltage regulation may increase and power factor drops.

The project is all about protecting the transformer under overload condition. This can be done by
connecting another transformer in parallel through a microcontroller and a relay which shares the

9
excess load of the first transformer. The transformers are switched alternatively to avoid thermal
overloading. Therefore, two transformers work efficiently under overload condition and damage
can be prevented. If there is a further increase in load beyond the capacity of two transformers
there will be a priority based load shedding of consumers which will provide un-interrupted power
supply for the hospitals, industries etc.

1.2 Motivation
The desire and commitment to work on this system pulled out from the concept of automatic load
sharing of transformer or overload protection of transformer which has been done by various
means like by using microprocessors, by using GSM technology, and by using relays. In this work
the use of a relay and comparator IC’s for automatic load sharing between two transformers is
made. The number of transformers to be operated in parallel can also be increased according to
demand of a particular area. While operating the number of transformers in parallel some
considerations needed to be made, like same voltage ratio, same X/R ratio, same KVA ratings,
same polarity etc. i.e. we have to operate identical transformers in parallel.

1.3 Statement of the Problem


Government more than any time ever, exerts efforts in transforming the country by maximizing
the need for power requirement. These efforts are showing some kinds of progress so that every
citizen will get access to electric utility in few years ahead. As we all know, the steps for the power
system are generation of power, transmission of power and distribution of power. Once power
transmission to the subsystem is done, the next thing is to distribute the power among all the
consumers like school, industries, organization etc...

One of the major problems related to this country’s power system are problems that arise during distribution
of power to different areas. This is a place where transformers are expected to be involved and if distribution
of the power within all consumers is not effective, overloading or less loading conditions may happen.
Overloading of the power at the destination area can cause the entire transmission interruption. It has been
witnessed for years that transmission interruption causing high level of negative impact on individuals,
firms, organizations in Dire Dawa city and in the country as well. Moreover, the cost and time it takes
damaged and burnt transformers is way too much.

Before the use of this automatic generation control, one generating unit in a system would be
designated as the regulating unit and would be manually adjusted to control the load balance. So,
this is why it has been decided to come up with a project describes about how to use power supply

10
intelligently under peak loads. The project automatically connects and disconnects load according
to need and demand there by protecting the transformer from overload. Sensing unit, i.e. Current
transformer plays an important role by sensing the current through the load and sending feedback
signal to the microcontroller.

1.4 Objectives of the study


1.4.1 General Objective
The general objective of this project work to protect the transformer under overload condition by
sharing load with a standby transformer and to provide un-interrupted power supply to the
consumers in Dire Dawa city.

1.4.2 Specific Objectives


The following specific objectives are identified in order to achieve the specified general
objective:
✓ Automatic load sharing by transformers
✓ Reducing errors due manual approach to load balancing
✓ Prevention the main transformer from damage due to the like overload and overheats
✓ Supply un-interrupted power supply to the consumers
✓ Complete monitoring of transformers Automatic Load Sharing by Transformers
✓ Highly sensitive low cost and reliable circuit

1.5 Scope and Limitations


Scope of this project is “how to use power supply intelligently under peak loads?” The project
automatically connects and disconnects the transformer thus protecting transformer from overload.
Sensing unit, i.e. Current transformer plays an important role by sensing the current through the
load and sending feedback.

Relay driver gives the signal to the changeover relay in case of overload conditions. Change over
relay closes its contact when load on the master transformer is more than its rated capacity and the
2nd transformer i.e. slave transformer is automatically connected in parallel with the main
transformer and if the load is increased to such an amount signal to the that can’t be handled with
the two transformers. Here is the exact limitation to this very system.

11
1.6 Application of Results
This thesis work is about the use power supply intelligently under peak loads for Ethiopian Electric
Utility Dire Dawa district. This project is applicable to provide un-interrupted power supply to the
consumers in Dire Dawa city.

After completely implemented, this system will be used by:

✓ Operators of Ethiopian Electric Utility Dire Dawa district in substation


✓ Industrial areas
✓ Shopping malls
✓ Process Industrial Power
✓ Distribution Station
✓ Agricultural Transformer

1.7 Organization of the Rest of the Thesis


The report is organized as follows. Chapter Two covers literature review. Chapter Three presents
the previous works that are related to this thesis. Chapter Four discusses the system analysis of
web based complaint management system of Addis Ababa City Administration. In Chapter Five
we will discuss system design. The test and experiment of the proposed system are discussed in
Chapter Seven. Finally, the conclusion made on the thesis result, the contribution of this research
work and recommendation on possible future work related to the thesis are presented.

12
Chapter Two
Literature (related work) review
2.1. Introduction
Many of the researchers in the recent-past focused on the effective load sharing of status of the
system and hence to solve the problem of voltage collapse. In this regard, voltage stability index
of each transmission line becomes a useful measure of power system monitoring. The index could
identify when the transformer is from its point of collapse. Performance indices to predict
closeness to voltage stability boundary have been a permanent concern of researchers and power
system operators, as these indices can be used to automatic load distribution and sharing.
Publications on the topic relevant to voltage stability and its improvement are too numerous and
so only those important publications which are directly related to this work have been referred and
presented in this thesis. The optimal reactive power reserves techniques and the load shedding
methods cited in the literature along with a few research reports on contingency techniques using
varies indices and the inference from literature are discussed. Literature survey made has been
presented under the following topics: Voltage stability indices, Maximum load ability,
Contingency analysis, parallel operation and load sharing method.

2.2. Related works


Distribution transformers are an important part of power system which distributes power to the
low-voltage users directly, and its operation condition is important for the entire distribution
network operation. However, their life is significantly reduced if they are subjected to overloading
and over temperature resulting in unexpected failures and loss of supply to a large number of
customers thus effecting system reliability. Protection against fault in power systems is very
essential and vital for its reliable performance. Thus to protect the transformers from overloads
and over temperature, the concept of load sharing has been proposed, wherein, automatic load
sharing occurs whenever the rated conditions are exceeded. From engineering and economic
standpoint, the most favorable conditions for a power supply is attained when the power factor is
close to unity. Thus in order to attain increased voltage levels on the load and reduced electric
utility bills, a temperature monitoring and power factor correction circuit is also included.
(Ahmad, 2010)

13
This report presents brief overview about the distribution system automation. The application
areas, advantages and commercially available products for the distribution system automation are
also described in detail. It also discusses about the present implantation philosophies and current
challenges in the distribution system automation. Further, EPRI ‘IntelliGrid’ project is discussed
as an example of advance distribution system automation. Finally, communication aided advanced
distribution system automation and its advantages are explained in detail. (Parikh, 2013)

Implementing superconductor technologies in the distribution networks can eliminate the voltage
regulation and power losses issues that face the conventional networks, however, the impedance
of superconductor distribution networks is very small which causes a very small changes in voltage
magnitude. Nevertheless, the conventional control technologies implemented with the
conventional distribution networks are relied on the voltage changes magnitude in the network.
This would be a serious issue for the future superconductor distribution networks where a very
small voltage change magnitude occurs. Therefore, this paper introduces a proposal of autonomous
voltage regulator (AVR) which can be implemented with the future superconductor distribution
networks to control shared reactive power between distribution generators and then compared with
the conventional AVR that is used with the conventional distribution networks. (Kelvin, 2013)

The reasons of traditional paralleled converter’s not being load-sharing. The fuzzy logical control
is applied to parallel converter’s load-sharing control technology by making an in-depth research.
In order to reduce adjustable-range of voltage and make each module’s voltage balance quickly, a
middle voltage-programming automatic load-sharing technique is presented. Simulation results
show that the proposed loaf-sharing control method can achieve better dynamic current-sharing
and load-sharing characters, and can operate well within the large adjustable-load range. (Zheng,
2010)

Optimal steady state load shedding was formulated to minimize the sum of the squares of the
differences between the connected loads and the generated power. The supplied power was treated
as a dependent variable modeled as a function of the bus voltage magnitude (Mostafa, 1996). A
simple new technique was developed to define the optimum location and the optimum quantity of
load to be shed in order to prevent the system voltage from going to the unstable zone using L-
indicator index (Sadek, 1999). (Hazarika & Sinha, 1998) has proposed a method of load shedding
with the objective of minimizing load shedding in the situation where total generation is less than

14
the total demand by minimizing system loss with the constraints on generator limits and line flow
limits. Some studies proposed corrective model or preventive model for load shedding
incorporating dynamic analysis to increase loading margin (Chattopadhyay & Chakrabarti
2003, Echavarrene, 2006). A new methodology has been developed for optimum load shedding
based on Hopfield neural network model for optimization. Minimum Eigen value was used as
indicator. A threshold value of this indicator could be assumed for a specific system. Emergency
load shedding was required if this value fell below the threshold value (Arya, 2005). Recently
many researchers proposed many heuristic algorithms to improve load shedding automation. An
optimal load-shedding algorithm was developed for under-voltage load shedding using two
heuristic (PSO and GA) methods (Amraee, 2007). A computational algorithm for minimum load
shedding at selected load buses was developed using differential Evolution.

2.3. Summary
It would be also useful to keep in mind that some requirements, for example, functional, protection,
monitoring and distribution requirements comprise the core set of requirements and carry more
weights than others. Therefore, a system satisfying more of these requirements should be
considered a better system than a system satisfying less of these core requirements.

The load sharing system tells us about the benefits and capabilities that will be provided to the
distribution automation system. It also states the various requirements, specifications, advantages
and constraints that the system should abide by.

The load sharing system tell us about providing a better dynamic current-sharing and load-sharing
characters, and can operate well within the large adjustable-load range.

So, this is why decision been made to develop a load sharing system for Dire Dawa city based on
the available requirements that will provide un-interrupted power supply to the consumers in Dire
Dawa city.

15
Chapter Three
Design of automatic load sharing of power transformer
3.1 Introduction
Automatic load sharing of transformers is an integral part of the power system control process,
allowing smooth and immediate transfer of electrical current between multiple sources and the load.
Here we are using two transformers TF1 Main transformer and TF2 sharing transformer. The
transfers switch senses when utility power increases more than rating of transformer1, then starts up
the transformer TF2 which acts as a sharing transformer. The transfer switch continues to monitor
utility power, and when it is less than the rating of TF1 then sharing transformer will cut off from
load and switches the load from the Transformer TF2 back to the Main transformer TF1. Once the
Transformer TF2 is disconnected, it goes through a cool-down routine and is automatically shut
down.
Automatic load sharing of Transformers is to satisfy the above needs with an extent. The present
system is designed around two transformers. One transformer TF1 is used as the main supply and
the other transformer TF2 is used as sharing transformer. These two transformers are connected with
the relay, which is controlled by the embedded controller. The loads are connected to the main line
TF1 and as well as to the TF2 through relay.
Initially TF1 is connected to the load, the loads run with this power. If the load on transformer 1 is
increase beyond its rating, then controller will find out that and it will connect the sharing transformer
parallel to the main transformer. In addition, controller will continuously monitor the current flowing
in the load and when the load current decreases below the TF1, rating then it will turn off the sharing
transformer. Here we are using current transformer CT for measuring and protecting the load current,
and the output of CT were given to ADC for converting analog output of CT into digital data. That
ADC output were given to microcontroller for monitoring purpose. When current is beyond certain
limit then we are going to sharing transformer.
While most modern-day power supplies can be paralleled for higher currents, the load current will
not share equally between modules without some extra effort in the design process. With unequal
load sharing, the stress placed on the individual modules will be unequal; resulting in some units
operating with higher temperatures contributor to reduced reliability. Therefore, the challenge in
paralleling modular supplies is to insure predictable, uniform current sharing of modules. Another
major goal should be to provide enhanced system reliability through complete redundancy such

16
that the failure of one or more modules could be tolerated as long as the total remaining capacity
is equal to or greater than the demands of the load.

Visual indicator

Change over Relay Relay driver


Transformer 2

Reference voltage Comparator

Shunt Load switching


Transformer 1 Load Bank
network

Figure 3.1 Block diagram of the project


3.2 Power supply
Power supply circuit design is one of the important parts of this project, without a power supply the
electronic devices such as microcontroller, relay, ADC, LCD etc. display will not function.
Similarly, a wrong power supply design will lead to the damaging of the electronic devices used in
this project. The main power supplies needed for this project is 5V DC in order to power on the relay
and other electronic devices such as microcontroller, LCD and ADC etc.
Most of the power supply were designed to convert high voltage AC mains electricity to a suitable
low voltage supply for electronic circuits and other devices. A power supply can be broken down
into a series of blocks, each of which performs a particular function.

230V AC Step Down Filter


Bridge rectifier
Supply Transformer

+5V +5V Mains/battery


+12V Regulator
Power Indicator
Gnd
Figure3.2: block diagram of power supply

17
3.2.1 Transformer
Power supply input voltage is obtained from the main supply 220VAC outlet and then connected
to the transformer. A step down transformer is used in stepping the 220VAC to a 12VAC.The
12VAC serves as an input voltage to the bridge rectifier.
The transformer primitive requires properties for inductances of each coil plus the coupling
coefficient between the coils.
This can be calculated via equation:
➢ M =k root (LP*TLs)

Where M is the coupling ratio between the primary and secondary coils (effectively the same as the
turns ratio), Lp and Ls are inductances of the primary and secondary coils respectively and k is the
coupling coefficient.

Figure 3.3: output of transformer


3.2.2 Bridge rectifier
When four diodes are connected, the circuit is called as bridge rectifier. The input to the circuit were
applied to the diagonally opposite corners of the network, and the output is taken from the remaining
two corners.

Let us assume that the transformer is working properly and there is a positive potential,

At point A, a negative potential at point B, and the positive potential at point A will forward bias D3
and reverse bias D4. The negative potential at point B will forward bias D1 and reverse D2. At this
time D3 and D1 are forward biased and will allow current flow to pass through them; D4 and D2 are
reverse biased and will block current flow. The path for current flow is from point B through D1, up
through RL, through D3, through the secondary of the transformer back to point B.

18
One advantage of a bridge rectifier over a conventional full-wave rectifier is that with a given
transformer the bridge rectifier produces a voltage output that is nearly twice that of the conventional
full-wave circuit.

Figure 3.4: output of rectifier


The varying DC output is not suitable for electronic circuits unless they include a smoothing
capacitor.
3.2.3 Filter
Filters are electronic circuits which perform signal processing functions, specifically to remove
unwanted frequency components from the signal, to enhance wanted ones, or both. The most
common types of electronic filters are linear filters, regardless of other aspects of their design.
Figure 3.5.: output of filter

Figure 3.5.: output of filter

The smooth DC output has a small ripple. It is suitable for most electronic circuits.
V (rms) =Idc/4√𝟑fc=2.4Idc/c

19
3.2.4 IC Regulator
An IC regulator is an electrical regulator designed to automatically maintain a constant voltage level.
A voltage regulator may be a simple ―feed-forward design or may include negative feedback
control loops. Negative voltage regulators are available, mainly for use in dual supplies. Voltage
regulator ICs are available with fixed (typically 5, 12 and 15V) or variable output voltages. They are
also rated by the maximum current they can pass.
Most regulators include some automatic protection from excessive current ('overload protection')
and overheating ('thermal protection').It may use an electromechanical mechanism, or electronic
components. Depending on the design, it may be used to regulate one or more AC or DC voltages.

Figure 3.6: output of Ic regulator

The regulated DC output is very smooth with no ripple. It is suitable for all electronic circuits.
3.3 The Electromagnetic 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. It used to open and close under the control of another electrical circuit. In the original form,
the switch is operated by an electromagnet to open or close one or many sets of contacts. It was
invented by Joseph Henry in 1835. Because a relay is able to control an output circuit of higher
power than the input circuit, it can be considered to be, in a broad sense, a form of an electrical
amplifier.
Diagram that a relay uses an electromagnet. This is a device consisting of a coil of wire wrapped
around an iron core. When electricity is applied to the coil of wire it becomes magnetic, hence the
term electromagnet. The A, B and C terminals are an SPDT switch controlled by the electromagnet.

20
Figure3.7: Electromagnetic relay

When electricity is applied to V1 and V2, the electromagnet acts upon the SPDT switch so that the
B and C terminals are connected. When the electricity is disconnected, then the A and C terminals
are connected. It is important to note that the electromagnet is magnetically linked to the switch but
the two are NOT linked electrically.

Basic operation
The EMRs have three components: the coil, spring and contacts. A digital +5V can control a 220Vac
transformer 2, 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 connect the transformer 2 secondary from the input ac to the load.
3.4 Current sensor
Current sensors, also commonly referred to as current transformers or CTs, are devices that
measure the current running through a wire by using the magnetic field to detect the current and
generate a proportional output. They are used with both AC and DC current. Current sensors allow
us to be able to measure current passively, without interrupting the circuit in any way. They are
placed around the conductor that is current we want to measure.

The Allegro ACS75x family of current sensors provides economical and precise solutions for
current sensing in industrial, automotive, commercial, and communications systems. The device
package allows for easy implementation by the customer. Typical applications include load
detection and management, power supplies, and overcurrent fault protection. The device consists
of a precision, low-offset linear Hall sensor circuit with a copper conduction path located near the
die. Applied current flowing through this copper conduction path generates a magnetic field which
is sensed by the integrated Hall IC and converted into a proportional voltage.

21
3.4.1 Operation of current sensor
When current flows through a conductor, it creates a proportional magnetic field around the
conductor. Current transformers use this magnetic field to measure current flow. If the CT is
designed to measure AC current, inductive technology is often used. AC current changes potential,
which causes the magnetic field to continually collapse and expand. In an AC current sensor, wire
is wrapped around a core. The magnetic field produced by the current flowing through your
conductor induces a proportional current or voltage in the wire that is within the current sensor.
The sensor then outputs a certain voltage or current that a meter connected to the sensor can read
and translate into the amount of current flowing through the conductor. For instance, you could
have a current transformer that outputs 333mV (333mV is a common output for CTs) when the
current through the conductor is at 400A. Once you configure your meter to read 400A when it
receives a 333mV input, it will be able to calculate how many amps are flowing through the
conductor based on what input it is receiving. DC current sensors work similarly, but they rely on
Hall Effect technology to operate.

3.5 Power Transformer


Power transformers are used for conversion of voltage and current from high to low and vice versa.
A transformer is a static device that transfers electrical energy from one circuit to another through
inductively coupled conductors the transformer's coils. A varying current in the first or primary
winding creates a varying magnetic flux in the transformer's core and thus a varying magnetic field
through the secondary winding. This varying magnetic field induces a varying electromotive force
(EMF) or voltage in the secondary winding. This effect is called mutual induction. If a load is
connected to the secondary, an electric current primary circuit through the transformer to the load.

For transmission and distribution networks to transfer large amounts of alternating current electricity
over long distances with minimum losses and least cost, different voltage levels are required in the
various parts of the networks.

For example, the transfer of electricity efficiently over a long transmission line requires the use of
high voltages. At the receiving end where the electricity is used, the high voltage has to be reduced
to the levels required by the consumer. Transformers enable these changes in voltage to be carried
out easily, cheaply and efficiently. We normally use the step down transformer that converts 15kv
to 220v AC supply.

22
A transformer consists of two coils electrically separate but linked by a common magnetic circuit of
low reluctance formed by a laminated soft iron core. If one coil (the primary coil) is connected to an
AC supply, an alternating magnetic flux is set up in the iron core. This alternating magnetic flux
passes through the secondary coil and induces and alternating voltage in the secondary coil. The
magnitude of the secondary voltage is directly proportional to the ratio of the number of turns in the
secondary and primary windings and to the primary voltage.

3.5.1 Operation of power transformer


This project is designed by two transformers. TF1 is used as the main supply and TF2 is used as
sharing transformer. They are connected with the relay which is controlled by the embedded
controller. The loads are connected to the main line TF1 and as well as to the TF2 through relay.
Initially TF1 is connected to the load, the loads run with this power.
In order to connect these two transformers, (Loading Considerations When Paralleling
Transformers, p. [5]) the following condition must be satisfied:

✓ The polarity must be the same, so that there is no circulating current between the
transformers.
✓ The voltage ratio must be the same.

✓ The unit per impedance of each must be the same.

✓ The phase sequence must be the same

3.6 Mathematical modelling for Load sharing of two transformers


Let us consider the following two cases:

✓ Equal voltage ratios.


✓ Unequal voltage ratios.

3.6.1. Equal Voltage Ratios


Assume no-load voltages EA and EB are identical and in phase. Under these conditions if the primary
and secondary are connected in parallel, there will be no circulating current between them on no
load.

23
Figure 3.8: Equivalent circuit of parallel transformer

The Figure shows two impedances in parallel. Let RA, XA and ZA be the total equivalent resistance,
reactance and impedance of transformer A and RB, XB and ZB be the total equivalent resistance,
reactance and impedance of transformer B. From the Figure we have ;

EA=V2 + IAZA
EB=V2+IBZB ……………………………………Eq1
IAZA=IBZB …………… since they are in parallel
IA/IB=ZB/ZA ZA = RA + XA
ZB = RB + XB
LA/IB = (RB +XB) / (RA + XA) ………………………………. Eq 2
Suppose that if two transformers with different KVA rating are connected in parallel, the total load
will be divided in proportional to their KVA rating and their equivalent impendence are inversely
proportional to their respective rating.
IA/IB = ZB/ZA
IA/IL = ZB/ZL by current division formula
IA / (IA +IB) = ZB / (ZA + ZB)
IA = IL (ZB / (ZA + ZB)) ……………………………………… Eq 3
IB = IL (ZA / (ZA + ZB)) ……………………………………….Eq 4
Substituting for ZA and ZB above by kVAA/ %ZA and KVAB/ %ZB into equations (3) and (4)
produces the following equations
IA = ( kVAA/ %ZA) x IL/( kVAA/ %ZA+ kVAB/ %ZB) ……..Eq 5
IB = ( KVAB/ %ZB) x IL/( kVAA/ %ZA+ kVAB/ %ZB) ……Eq 6
24
Similarly the load share the main transformer (TA)
SA = V2IA X 103 KVA

= V2I (ZA / (ZA +ZB)) X 103 KVA ……………………….. Eq 7


The capacity of load sharing transformer
SB = V2IB X 103 KVA

= V2I (ZAB/ (ZA + ZB)) X 103 KVA ……………………….. Eq 8


Therefore the total load will be
S = SA + SB
S = V2I X 103 KVA ………………………………………...... Eq 9

3.6.2 Unequal Voltage Ratios


For unequal voltage turns ratio, if the primary is connected to the supply, a circulating current will
flow in the primary even at no load. The circulating current has been superimposed on the currents
drawn by the load when the transformers share a load. Let V1 be the primary supply voltage, a1 be
the turns ratio of transformer A, a2 be the turns ratio of transformer B, ZA be the equivalent
impedance of transformer A (= RA + jXA) referred to as secondary, ZB be the equivalent impedance
of transformer B (= RB + jXB) referred to as secondary, IA be the output current of transformer A
and IB be the output current of transformer B.
The induced emf in the secondary of transformer A is
EA =V1/ a1 =V2 +IAZA …………………………………………….10
The induced emf in the secondary of transformer B is
EB=V1/a2 =V2 +IBZB ……………………………………………….11
Again, V2 = IZL where ZL is the impedance of the load

V2= (IA+IB) ZL ………………………………………………………12

From Equations 7, 8 and 9 we have

EA=IAZA+ (IA+IB) ZL ……………………………………………. ….13

AnEA=IBZB+ (IA+IB) ZL ……………………………….…14

25
EA-EB=IAZA-IBZB ………………………………….…..15

IA = ((EA –EB) +IBZB)/ZA ……………………………………….…….16

I.e. substituting IA from equation (16) in equation (14), we have

EB =IBZB + ((EA –EB) +IBZB)/ZA *ZL +IBZL

IB = (EBZA – (EA -EB) ZL)/ZAZB +ZL (ZA + ZB) …………………………17

IA = (EAZB + (EA -EB) ZL)/ ZAZB +ZL (ZA + ZB) …………………………18

26
Chapter Four
Interfacing of microcontroller AT89C51 with ADC0804 and LCD
LM016
4.1 Microcontroller AT89C51
The AT89C51 is a low-power, high-performance CMOS 8-bit microcomputer with 4K bytes of Flash
programmable and erasable read only memory (PEROM). The device is manufactured using Atmel‘s
high-density non-volatile memory technology and is compatible with industry-standard MCS-51
instruction set and pin out. The on-chip Flash allows the program memory to be reprogrammed in-
system or by a conventional non-volatile memory programmer. By combining a versatile 8-bit CPU
with Flash on a monolithic chip, the AT89C51 is a powerful microcomputer which provides a highly-
flexible and cost-effective solution to many embedded control applications.
A Micro controller consists of a powerful CPU tightly coupled with memory RAM, ROM or
EPROM, various I/O features such as Serial ports, Parallel Ports, Timer/Counters, Interrupt
Controller, Data Acquisition Interfaces-Analog to Digital Converter ADC, and Digital to Analog
Converter (ADC), everything integrated onto a single Silicon Chip. It does not mean that any micro
controller should have all the above said features on chip, depending on the need and area of
application for which it is designed, The ONCHIP features present in it may or may not include all
the individual section said above. Any microcomputer system requires memory to store a sequence
of instructions making up a program, parallel port or serial port for communicating with an external
system, timer / counter for control purposes like generating time delays, apart from the controlling
unit called the Central Processing Unit. (p. [4])[4]
Functions of micro controller
✓ Sends appropriate commands to ADC to start conversion,
✓ Collects the output of ADC for every 10 sec and stores in buffer,
✓ After data gets transmitted sends command for disconnection
✓ Sends appropriate information to the display unit as per status of the communication medium

4.1.1 Major Features of AT89C51

✓ Compatible with MCS-51 products


✓ 4k Bytes of in-system Reprogrammable flash memory-indurance:1000 write/erase cycles
✓ Fully static operation: 0HZ to 24MHZ
✓ Three level programmable clock

27
✓ 32 Programmable I/O Lines
✓ Two 16-bit Timer/Counters
✓ 128 * 8 –bit timer/counters
✓ Six interrupt sources
✓ Programmable serial channel
✓ Low power idle power-down mod
4.1.2 AT89C51 Microcontroller Architecture
The AT89C51 architecture consists of these specific features:
✓ Eight –bit CPU with registers A (the accumulator) and B
✓ Sixteen-bit program counter (PC) and data pointer (DPTR)
✓ Eight- bit stack pointer (PSW)
✓ Eight-bit stack pointer (Sp)
✓ Internal ROM or EPROM
✓ Internal RAM of 128 bytes:
o Four register banks, each containing eight registers
o Sixteen bytes, which may be addressed at the bit level
o Eighty bytes of general- purpose data memory
✓ Thirty –two input/output pins arranged as four 8-bit ports: p0-p3
✓ Full duplex serial data receiver/transmitter: SBUF
✓ Control registers: TCON, TMOD, SCON, PCON, IP, and IE
✓ Two external and three internal interrupts sources.
✓ Oscillator and clock circuits.

28
Figure 4.1: Microcontroller AT89C51
4.1.3 Pin-Descriptn
VCC: Supply voltage.
GND: Ground.
Port 0:
Port 0 is an 8-bit open-drain bi-directional I/O port. When 1‘s are written to port 0 pins, the pins can
be used as high impedance inputs. Port 0 may also be configured to be the multiplexed low order
address/data bus during accesses to external program and data memory. In this mode P0 has internal
pull-ups. Port 0 also receives the code bytes during Flash programming, and outputs the code bytes
during program verification.
Port 1:
Port 1 is an 8-bit bi-directional I/O port with internal pull-ups. The Port 1 output buffers can
sink/source four TTL inputs. When 1s are written to Port 1 pins they are pulled high by the internal
pull-ups and can be used as inputs. As inputs, Port 1 pins that are externally being pulled low will
source current because of the internal pull-ups. Port 1 also receives the low-order address bytes
during Flash programming and verification.
Port 2:
Port 2 is an 8-bit bi-directional I/O port with internal pull-ups. The Port 2 output buffers can
sink/source four TTL inputs. When 1s are written to Port 2 pins they are pulled high by the internal
pull-ups and can be used as inputs. As inputs, Port 2 pins that are externally being pulled low will
source current because of the internal pull-ups. Port 2emits the high-order address byte during
fetches from external program memory and during accesses to external data memories that use 16-

29
bit addresses. In this application, it uses strong internal pull-ups when emitting 1s. During accesses
to external data memories that use 8-bit addresses, Port 2 emits the contents of the P2Special
Function Register. Port 2 also receives the high-order address bits and some control signals during
Flash programming and verification.
Port 3:
Port 3 is an 8-bit bi-directional I/O port with internal pull-ups. The Port 3 output buffers can
sink/source four TTL inputs. When 1s are written to Port 3 pins they are pulled high by the internal
pull-ups and can be used as inputs. As inputs, Port 3 pins that are externally being pulled low will
source current because of the pull-ups. Port 3 also serves the functions of various special features of
the AT89C51 as listed below: Port 3 also receives some control signals for Flash programming and
verification

Port pin Alternate function


P3.0 RXD(serial input port)
P3.1 TXD(serial output port)
P3.2 INT0(external interrupt0)
P3.3 INT1(external interrupt1)
P3.4 T0(timer 0 external input)
P3.5 T1(timer 1 external input)
P3.6 WR(external data memory write strobe)
P3.7 RD(external data memory read strobe)
Table 4.1: port description of microcontroller

RST:
Reset input. A high on this pin for two machine cycles while the oscillator is running resets the
device.
ALE/PROG:
Address Latch Enable output pulse for latching the low byte of the address during accesses to
external memory. This pin is also the program pulse input (PROG) during Flash programming.
PSEN:
Program Store Enable is the read strobe to external program memory. When theAT89C51 is
executing code from external program memory, PSEN is activated twice each machine cycle, except
that two PSEN activations are skipped during each access to external data memory.

30
EA/VPP:
External Access Enable (EA) must be strapped to GND in order to enable the device to fetch code
from external program memory locations starting at 0000H up to FFFFH. Note, however, that if lock
bit 1 is programmed, EA will be internally latched on reset. EA should be strapped to VCC for
internal program executions. This pin also receives the12-volt programming enable voltage (VPP)
during Flash programming, for parts that require 12-volt VPP.
XTAL1:
Input to the inverting oscillator amplifier and input to the internal clock operating circuit.
XTAL2: Output from the inverting oscillator amplifier.

4.1.4 The AT89C51 oscillator and clock


The clock circuit is an important element that is required in the system board. This is because the
microcontroller works digitally based on generated clock. The rate of the clock is determined by a
crystal oscillator that is connected to the clock logic pins. A high speed crystal of 16 MHz is used in
this project in order to avoid any delay in terms of relay tripping ON and OFF, and monitoring of
the transformer parameters through the ADC of the microcontroller. Because the monitoring of
transformer parameters and tripping off the relay has to be very fast to avoid failure of the entire
protection system. The crystal inscribed into the microcontroller, with two 33 pF capacitors used to
filter out external noise from interfering with the crystal frequency.
The heart of the 89C51 circuitry that generates the clock pulses by which all internal operations are
synchronized. Pins XTAL1 and XTAL2 is provided for connecting a resonant network to form an
oscillator. Typically, a quartz crystal and capacitors are employed. The crystal frequency is the basic
internal clock frequency of the microcontroller. The manufacturers make AT89C51 designs that run
at specific minimum and maximum frequencies typically 1 to 16 MHz’s.
4.1.4.1 Oscillator Characteristics
XTAL1 and XTAL2 are the input and output, respectively, of an inverting amplifier which can be
configured for use as an on-chip oscillator, as shown in figs. To drive the device from an external
clock source, XTAL2 should be left unconnected while XTAL1 is driven as shown in figure. There
are no requirements on the duty cycle of the external clock signal, since the input to the internal
clocking circuitry is through a divide-by-two flip-flop, but minimum and maximum voltage high and
low time specifications must be observed.

31
Figure 4.2: Crystal oscillator

4.1.5 Timers
On-chip timing/counting facility has proved the capabilities of the microcontroller for implementing
the real time application. These include pulse counting, frequency measurement, pulse width
measurement, baud rate generation, etc. Having sufficient number of timer/counters may be a need
in a certain design application. The 8051 has two timers/counters. They can be used either as timers
to generate a time delay or as counters to count events happening outside the microcontroller. Let
discuss how these timers are used to generate time delays and we will also discuss how they are
being used as event counters.

4.1.5.1 Programming 8051 timers


The 8051 has timers: Timer 0 and Timer1.they can be used either as timers or as event counters. Let
us first discuss about the timers ‘registers and how to program the timers to generate time delays.
Basic registers of the timer
Both Timer 0 and Timer 1 are 16 bits wide. Since the 8051 has an 8-bit architecture, each 16-bit
timer is accessed as two separate registers of low byte and high byte.
4.1.6 Interrupts
Interrupts are hardware signals that are used to determine conditions that exist in external and internal
circuits. Any interrupt can cause the 8051 to perform a hardware call to an interrupt –handling
subroutine that is located at a predetermined absolute address in the program memory. Five
interrupts are provided in the 8051.
Three of these are generated automatically by the internal operations: Timer flag 0, Timer Flag 1,
and the serial port interrupt (RI or TI). The Timer0 and Timer 1 Interrupts are generated by TF0 and
TF1, which are set by a rollover in their respective Timer/Counter registers. When a timer interrupt
is generated, the flag that generated it is cleared by the on-chip hardware when the service routine is

32
vectored to. The Serial Port Interrupt is generated by the logical OR of RI and TI. Neither of these
flags is cleared by hardware when the service routine is vectored to. In fact, the service routine will
normally have to determine whether it was RI or TI that generated the interrupt, and the bit will have
to be cleared in software.
Two interrupts are triggered by external signals provided by the circuitry that is connected to the
pins INTO 0 and INTO1. The flags that actually generate these interrupts are bits IE0 and IE1 in
TCON. When an external interrupt is generated, the flag that generated it is cleared by the hardware
when the service routine is vectored to only if the interrupt was transition-activated. If the interrupt
was level activated, then the external requesting source is what controls the request flag, rather than
the on-chip hardware. The interrupts maybe enable or disabled, given priority or otherwise controlled
by altering the bits in the Interrupt Enabled (IE) register, Interrupt Priority (IP) register, and the
Timer Control (TCON) register. These interrupts are mask able i.e. they can be disabled. Reset is a
non-mask able interrupt which has the highest priority. It is generated when a high is applied to the
reset pin. Upon reset, the registers are loaded with the default values. Each interrupt source causes
the program to do store the address in PC onto the stack and causes a hardware call to one of the
dedicated addresses in the program memory.
4.2 Analog to Digital Converter Interfacing
Analog to Digital Converters are most widely used devices for data acquisition. Digital Computers
use Binary values, but in the physical world everything is analog in nature; or we can say that they
are continuous in nature. A physical quantity which is analog in nature is converted to electrical
signals using a device called transducers. Transducers are also referred to as sensors. Sensors
produce an output that is voltage or current. Therefore, we need an ADC to translate the analog
signals to digital numbers so that micro-controller can read and process them.
Microcontroller can only perform complex processing on digitized signals. When signals are in
digital form they are less susceptible to the deleterious effects of additive noise. ADC Provides a
link between the analog world of transducers and the digital world of signal processing and data
handling.
So let‘s start the discussion of interfacing of ADC with AT89C51 and its application to measure the
voltage and current and display and pass it on to the LCD and Serial Port.
Application of ADC
ADC is used virtually everywhere where an analog signal has to be processed, stored, or transported
in digital form. Some examples of ADC usage are digital volt meters, cell phone, thermocouples,

33
digital oscilloscope, sound processing, temperature processing etc... Microcontrollers commonly
used 8, 10, 12, or 16 bit ADCs, our micro controller uses an 8-bit ADC. Analog-to-digital ADC
converters are used to transform analog information into a form suitable for digital handling, which
might involve any of these operations:
✓ processing by a computer or by logic circuits, including arithmetical operations,
✓ Comparison, sorting, ordering and code conversion,
✓ Storage until ready for further handling,
✓ Display in numerical or graphical form and
✓ Transmission
Functional block diagram

V ref VDD

Sampling clock
ADC DTA

Analog input

Vss Ground DATA READY


Figure 4.3: Block diagram ADC

The reference input terminal of an ADC may be buffered as shown in Figure above in which case it
has input impedance (usually high) and bias current (usually low) specifications, or it may connect
directly to the ADC. In either case, the transient currents developed on the reference input due to the
internal conversion process need good decoupling with external low inductance capacitors.
The sampling clock input is a critical function in an ADC and a source of some confusion. It could
truly be the sampling clock. This frequency would typically be several times higher than the
sampling rate of the converter. It could also be a convert start (or encode) command which would
happen once per conversion. Regardless of the ADC, it is extremely important to read the data sheet
and determine exactly what the external clock requirements are, because they can vary widely from
one ADC to another. In ADCs, this line is variously called busy, end-of-conversion (EOC), data

34
ready, etc. Regardless of the ADC, there must be some method of knowing when the output data is
valid—and again, the data sheet is where this information can always be found.
Another detail which can cause trouble is the difference between EOC and DRDY (data ready). EOC
indicates that conversion has finished, DRDY that data is available at the output. In some ADCs,
EOC functions as DRDY—in others, data is not valid until several tens of nanoseconds after the
EOC has become valid, and if EOC is used as a data strobe, the results will be unreliable.
Our ADC0804 is a single channel analog to digital convertor i.e., it can take only one analog signal.
An ADC has n bit resolution (binary form) where n can be 8,10,12,16 or even 24 bits. ADC 0804
has 8-bit resolution. The higher resolution ADC gives smaller step size. Step size is smallest change
that can be measured by an ADC. For an ADC with resolution of 8 bits, the step sizeis19.53mV
(5V/255). The time taken by the ADC to convert analog data into digital form is dependent on the
frequency of clock source. ADC0804 can be given clock from external source. It also has an internal
clock. However, the conversion time cannot be more than110us. To use the internal clock a capacitor
and resistor is connected to pin 19 and 4 as shown in the circuit diagram. The frequency is given by
the relation f= 1/ (1.1RC). The circuit uses a resistance of 10k and a capacitor of 150pF to generate
clock for ADC0804.Vin, which is the input pin, is connected to a preset to provide analog input is
an active low pin and used to activate the ADC0804.
4.2.1 Pin description
1. CS, Chip Select: By using this selection Bit you can select the Chip. After selecting this bit the
chip is ready to do operation. By using HIGH (1) you can select this pin as an active high.
2. RD, read: This is an input pin and active low. After converting the analog data, the ADC stores
the result in an internal register. This pin is used to get the data out of the ADC 0804 chip. When
CS=0 & high to low pulse is given to this pin, the digital output is shown on the pins D0-D7.
3. WR, Write: This is an input pin and active low. This is used to instruct the ADC to start the
conversion process. If CS=0 and WR makes a low to high transition, the ADC starts the
conversion process.
4. CLK IN, Clock IN: This is an input pin connected to an external clock source.
5. INTR, Interrupt: This is an active low output pin. This pin goes low when the conversion is over.
6. Vin+: Analog Input.
7. Vin-: Analog Input. Connected to ground.
8. AGND: Analog Ground.

35
9. Vref/2: This pin is used to set the reference voltage. If this is not connected the default reference
voltage is 5V. In some application it is required to reduce the step size. This can be done by using
this pin.
10. DGND: Digital Ground.
11-18. Output Data Bits (D7-D0).
19. CLKR: Clock Reset.
20. Vcc: Positive Supply

4.3 Liquid Crystal Display Interface


The alphanumeric 16character X 2line LCD requires 8data lines and also 3 control signals. By using
2 ports, port 0&3 data pins are connected to LCD as data bus. Port0 can be basically used as I/O port
i.e. it can be programmed as an input or as an output port. That means if it is programmed as output
port, suppose if it is required to read data from LCD immediately it is not possible. Before reading
the data it is required to make the port as an input port.

Data reading from LCD gives an erroneous reading & should not be implemented. Because of this
port5 is made as input / output port depending on the situation. The control signals are connected to
port 3 pins. They are EN bar & RS bar, RW bar. At different instance such as data write / command
write / data read etc. Various signals are to be provided as indicated by the by the LCD
manufacturers. To interface the LCD, to the Micro controller it requires an 8 bit and also three control
signals differentiate the data from the control words send to the LCD.
The Microcontroller has to send the necessary control words followed by the data to be displayed.
Depending on the operation to be performed the control words are selected and passes to the LCD.
The data to be displayed on the LCD is to be sent in the ASCII format. Thus all the character to be
displayed are converted into ASCII form and then sent to the LCD along with different control
words. The control word differentiated the various operations and is executed. It is also possible to
read the LCD data if required. The control signals to the LCD are also provided by the Micro
controller. This is also done through pins 2.5, 2.6&2.7. Through program necessary control signals
are passed to the LCD by using the bits of the port. The remaining can be used for some other purpose
if there is a need. The software controls the necessary ports and performs the task it is designed for.
The software and associated hardware perform the LCD interface.

36
4.3.1 Pin Description
Vcc, Vss and Vee While Vcc and Vss provide +5V and ground respectively, Vee is used for
controlling LCD contrast. RS, register select. There are two very important registers inside the LCD.
The RS pin is used for their selection as follows. If RS=0, the instruction command code register is
selected, allowing the user to send a command such as clear display, cursor at home, etc., If RS=1
the data register is selected, allowing the user to send data to be displayed on the LCD.
R/W, read/write R/W input allows the user to write information to the LCD or read information from
it. R/W=1 when reading; R/W=0 when writing. EN, Enable the LCD to latch information presented
to its data pins uses the enable pin. When data is supplied to data pins, a high-to-low pulse must be
applied to this pin in order for the LCD to latch in the data present at the data pins. The 8-bit data
pins, D0-D7, are used to send information to the LCD or read the contents of the LCD‘s internal
registers. To display letters and numbers, we send ASCII codes for the letters A-Z, a-z, and numbers
0-9 to these pins while making RS=1.There are also instruction command codes that can be sent to
the LCD to clear the display or force the cursor to the home position or blink the instruction
command codes. We also use RS=0 to check the busy flag bit to see if the LCD is ready to receive
information.
The busy flag is D7 and can be read when R/W=1 and RS=0, as follows:
If R/W=1, RS=0. When D7=1 (busy flag=1), the LCD is busy taking care of internal operations and
will not accept any information.

37
Chapter five
Simulation and result
We use two most known software for simulation of our project; that compatible to design component
of automatic load sharing of power transformer. For construction of the schematic diagram of the
project we applied proteus and compile our code by keil.
5.1 Proteus
Proteus is a single application with many service modules offering different functionality (schematic
capture, PCB layout, etc.). The wrapper that enables all of the various tools to communicate with
each other consists of three main parts.

Common Database: The common database contains information about parts used in the project. A
part can contain both a schematic component and a PCB footprint as well both user and system
properties.

Application Framework: This is the framework or container, which hosts all of the functionality of
Proteus. ISIS, ARES, 3DV all open as tabbed windows within this framework and therefore all have
access to the common database.

Live Net list: Together with the common database the maintenance of a live net list allows all open
modules to automatically reflect changes. The most obvious example of this is wiring in ISIS
producing rats nest connections in ARES but it goes much further than that. The new Bill of
Materials module contains a live viewer and the 3D Viewer and Design Explorer are linked into the
live net list.
5.2 Keil cross C Compiler
KEIL can be used to create source files; automatically compile, link and covert using options set
with an easy to use user interface and finally simulate or perform debugging on the hardware with
access to C variables and memory.
Unless you have to use the tolls on the command line, the choice is clear. KEIL Greatly simplifies
the process of creating and testing an embedded application. The Keil Software 8051-development
tools listed below are the programs you use to compile your C code, assemble your assembler source
files, link your program together, create HEX files, and debug your target program. µVision2 for
Windows™ Integrated Development Environment: combines Project Management, Source Code
Editing, and Program Debugging in one powerful environment.

38
❖ C51 ANSI Optimizing C Cross Compiler: creates relocatable object modules from your C
source code,

❖ A51 Macro Assembler: creates relocatable object modules from your 8051 assembler
source code,
❖ BL51 Linker/Locator: combines relocatable object modules created by the compiler and
assembler into the final absolute object module,
❖ LIB51 Library Manager: combines object modules into a library, which may be used by
the linker,
❖ OH51 Object-HEX Converter: creates Intel HEX files from absolute object modules
5.3 Simulation
5.3.1 Schematic Explanation and discussion
Firstly, the required operating voltage for Microcontroller 89C51 is 5V. Hence, the same need the
5V D.C. power supply. This regulated 5V is generated by first stepping down the 220V to 15 V. The
step downed A.C voltage is being rectified by the Bridge Rectifier. The diodes used are 1N4007.
The rectified A.C voltage is now filtered using a ‗C”Filter.

Now the rectified, filtered D.C. voltage is fed to the Voltage Regulator. This voltage regulator allows
us to have a Regulated Voltage, which is +5V. We are using voltage regulators i.e., 7805. These
voltage regulators regulate 5v for microcontroller, ADC, LCD and current transformer. The rectified;
filtered and regulated voltage is again filtered for ripples using an electrolytic capacitor 100μF.
Now the output from this section is fed to 40th pin of 89c51microcontroller to supply operating
voltage. The microcontroller 89C51 with crystal oscillator of 11.0592 MHz crystal in conjunction
with couple of capacitors of is placed at 18th& 19th pins of 89c51 to make it work (execute) properly.
The LCD is interfaced to Microcontroller. The data pins of LCD are connected to Port 1. The control
pins of LCD are connected to Port 2 as shown in schematic. One of the port 2 pin is connected to the
relay to check the status of the transformer one (main transformer) i.e. whether it is overloaded or
not. Relay is used to turn on & off the transformer two when the transformer one is overloaded.
The data pins of ADC are connected to the port 0 of microcontroller. The control pins of ADC are
connected to port 3 of microcontroller. Whatever the data in ADC from C.T (current transformer)
will be converted from analog to digital and fed it to the microcontroller.

39
Chapter six
Conclusions and future recommendations
6.1 Conclusions
Through the transformer current analysis, we can see that the current of the transformer rises as load
increases, whenever the load current goes above the transformer rated current, and the
microcontroller detects an over current and it sends a trip signal to relay thereby the load shared
automatically by transformer two and protecting the transformer one from burning. As the load
current goes below the rated current of the transformer, the microcontroller detects normal there by
sending an on signal to the relay to disconnect the sharing transformer. The results indicate that the
microcontroller based transformer automatic load sharing achieves numerous advantages over the
existing systems in use: 1) fast response,
2) Better isolation,
3) Accurate detection of the fault.
Finally, the results of simulation meet the aim and objectives of the project and automated with no
manual interface required.
The project describes about how to use power supply intelligently under peak loads. The project
automatically connects and disconnects the sharing transformer thus protecting the main transformer
from overload. Current sensor plays an important role by sensing the current through the load and
sending feedback signal to the microcontroller through ADC. Microcontroller is so programmed that
as soon as the load exceeds a particular current limit it will soon generate a control signals and the
signal is fed to the electromagnetic relay. The switching process occurs in the Electromagnetic Relay,
which automatically connects the transformer in parallel in accordance to the load sensed by the CS.

40
6.2 Recommendation for Future Work
Any work and investigation on transformer load sharing is very advantageous and challenging.
Based on the present time, it can be observed that the Dire-Dawa city population is increasing
rapidly. Therefore, demands on electricity will be high and these will lead to demands of highly
sophisticated protection devices, which will be incorporated in transformer load sharing schemes.
Based on the work done in this project which automatic load sharing of transformer using
microcontroller, some improvements need to be made in the future work. It was noticed that use of
switching semiconductor device such as thyristor can be used instead of relay, highly advanced
microcontroller such as 16-bit PIC microcontroller or a digital signal processor can be used for high-
speed analogue to digital (ADC) conversion of the transformer voltage and current.
The future scope of the project is particularly in Substation. In substations particularly during the
peak hours, there is a need for the operation of additional transformer to supply the additional load
requirement. The project automatically connects the transformer under critical loads. Thus, there is
no need to operate both transformers under normal loads, particularly during off peak hours. Thus,
power were shared intelligently with the transformers in parallel.

REFERENCES:
Abb.com, (2015). ABB Power Management - Systems (Process Automation). [Online] Available
at: http://www.abb.com/industries/db0003db004061/55fb5220e70254e7c1257356006d725f.as
px? Tab Key=7 [Accessed 13 Sep. 2015].

Ambalkar, A., Bhoyar, N., Badarkhe, V. and Bathe, V. (2015). Automatic load sharing of
transformers. International Journal for Scientific Research and Development, [online] 2(12),
pp.739-741. Available at:https://www.ijsrd.com/Article.php?manuscript=IJSRDV2I12400
[Accessed 14 Sep. 2015].

EEP - Electrical Engineering Portal, (2012). Principles of Transformers in Parallel Connection


(1) | EEP. [Online] Available at: http://electrical-engineering-portal.com/principles-
oftransformers-in-parallel-connection-1 [Accessed 16 Sep. 2015].

Engineering Projects-Engineering Mini Projects, (2011). Automatic Transformer distribution and


load sharing system. [Online] Available at: http://www.engineeringminiprojects.com/automatic-
transformer-distribution-and-loadsharing-system/2011/ [Accessed 17 Sep. 2015].

41
Gyti.techpedia.in, (2015). AUTOMATIC LOAD SHARING OF TRANSFORMERS | Gandhian
Young Technological Innovation Award. [Online] Available at: http://gyti.techpedia.in/project-
detail/automatic-load-sharing-of-transformers/436 [Accessed 20 Sep. 2015].

42

You might also like