Professional Documents
Culture Documents
CHAPTER 1
INTRODUCTION
The transformer is a static device, which converts energy at one voltage level to another
voltage level. The project is all about protecting the transformer under overload condition.
Due to overload on the transformer, the efficiency drops and the secondary winding gets
over heated and may burnt. So, by reducing the load on the transformer, the transformer is
protected. This will be done by arranging another transformer through a micro-controller.
The micro-controller 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 transformers work efficiently under overload condition and the
damage is prevented.
In this project three modules are used to control the load current. The first module is
Sensing unit, which is used to sense the current of the load; the second module is control
unit. In this module Electromagnetic relay is the main role, and its function is to change
the position with respect to the control signal and last module is microcontroller. It will
read the analogue signal and perform some calculation and finally gives control signal to
the relay. When designing low-voltage power systems to supply large load currents,
paralleled lower-current modules are often preferred over a single, large power converter
for several reasons. These include the efficiencies of designing and manufacturing
standard modular converters which can be combined in whatever number necessary to
meet a given load requirement; and the enhanced reliability gained through redundancy.
EEE Dept.
Intelligent power sharing of transformer with auto protection 2
The project is all about protecting the transformer under overload condition. Due to
overload on the transformer, the efficiency drops and the secondary winding gets over
heated and may burnt. So, by reducing the load on the transformer, the transformer is
protected. By introducing this method it have advantage to maintain a stable level of short
circuit current. It reduces the voltage drop and balances the current and it is reverse power
protection.
EEE Dept.
Intelligent power sharing of transformer with auto protection 3
CHAPTER 2
SUBSTATION
2.1 Introduction
Bus bars (or bus) term is used for a main bar or conductor carrying an electric
current to which many connections may be made. Bus bars are merely convenient means
of connecting switches and other equipments into various arrangements. The usual
arrangement of connections in most of the substation permits working on almost any
piece of equipment without interruption to incoming or outgoing feeders.
EEE Dept.
Intelligent power sharing of transformer with auto protection 4
A transfer bus is added to the single bus scheme. An extra bus-tie breaker is provided
to tie the main and transfer buses together. When circuit breaker is in maintenance, the
bus-tie breaker can be used for energizing the circuit. Bus-tie breaker relaying must be so
arranged to protect the transmission line or transformer, if the protective relays also are
not transferred.
This is superior to the single bus and main and transfers bus schemes. There are two
main buses and each circuit can be connected to either of the buses by bus isolators. A
bus-tie breaker connects the two main buses when closed allows the transfer of a circuit
from one to the other without a break in supply.
The circuit may operate all from one bus, or half of the circuit connected in each bus.
For a bus fault, only half the number of circuit will be lost. In some cases the tie breaker
is permanently closed and both the buses stand connected. A bus protection scheme will
be necessary for opening the tie breaker in the event of a bus fault. Possibility of operator
error is more as to bus isolators are involved for every circuit
(e) Insulators
They are used for supporting live conductors and bus bars. For low voltage up to
66kV, this can be used in stacks and mounted horizontally or vertically as the
circumstances permit but for voltages beyond that, they are rarely used in a horizontal
configuration. The porcelain insulators are employed in substations are of the post and
bushing type. They serve as the supports and insulators of the bus bars.
EEE Dept.
Intelligent power sharing of transformer with auto protection 5
A post insulator consists of porcelain body, cast iron cap and flanged
cast iron base. The hole in the cap is threaded so that the bus bars are either directly
bolted to the cap of fixed by means of a bus bar clamp. Past insulators are available with
round, oval and square flanged bases for fixing respectively, with aid of one, two or four
bolts. Each base in addition also has an earthing bolt. A bushing or through insulator
consist of porcelain-shell body, upper and lower locating washers used for fixing the
position of bus bars or rod in shell, and mounting flange with holes drilled for fixing bolts
and supplied with an earthing bolt. For current rating above 2000A, the bushings are
designed to allow the main bus bars to be passed directly through them.
(f) Isolators
Isolators (disconnecting switch) operate under no load condition. It does not have
any specified current breaking capacity or current making capacity, so it is not even used
for breaking load currents.
Circuit breakers are switching devices, which open during fault condition and
interrupt the short circuit currents automatically within about 2.5 cycles. They are
EEE Dept.
Intelligent power sharing of transformer with auto protection 6
mounted on support structures .The circuit breakers are classified on the basis of the
medium used for arc extinction. The types of circuit breaker include the following:
1. Single pressure buffer type SF6 CB .There is used for 132kV, 400kV, and 765kV.
2. Air blast circuit breakers.
3. Minimum oil CB. These were preferred for 33KV, 66kV, and 132kV.
The circuit breakers are automatically switches, which can interrupt fault
currents. The part of the circuit breaker connected in one phases is called the pole. A
circuit breaker suitable for a three phase system is called triple pole CB.
Power transformers are used for stepping up the voltage for transmission at
generating stations and for stepping down voltages for further distribution at main step
down transformer substation. Usually naturally cooled, oil immersed, known as on type,
two winding, 3-phase transformer, are used up to the rating of 10MVA. The transformers
of rating higher than 10MVA are usually air blast cooled. For very high rating, the forced
oil, water-cooling and air blast cooling may be used. For regulating the voltage the
transformers used are provided with on load tap changer.
EEE Dept.
Intelligent power sharing of transformer with auto protection 7
The transformers are generally installed upon length of rails fixed on concrete slabs
having foundation 1 to 1.5 meters deep.
1. To reduce the triple harmonic contents of the output voltage, there by stabilizing
potential of the neutral point, and reducing communication interference.
2. To permit the transformation of unbalanced three phase load.
3. To reduce system zero sequence impedance for effective grounding, where solid
ground is not provided.
4. To supply additional auxiliary loads, this for some reason must be kept isolated from
that of the secondary.
5. To function as a voltage coil in a testing transformers.
6. To load large split-winding transformers.
7. To interconnect three supply systems operating at different voltages.
These instrument transformers are connected in ac power circuits to feed the current
coils of indicating and metering instruments (ammeters, wattmeter, and watt hour meters)
and protective relays. Thus the CT broadens the limits of measurements and maintains a
watch over the currents flowing in the circuits and over the power loads. In high voltage
installation CT’s in addition to above, also isolate the indicating and metering instruments
from high voltage.
EEE Dept.
Intelligent power sharing of transformer with auto protection 8
The current transformers are rated voltage of the installation, the rated currents of
primary and secondary windings and the accuracy class. The accuracy class indicates the
limit of the error in percentage of the rated turn ratio of given CT. CT is available in
accuracy classes .5, 1, 3, 10.
The PT is employed for 380 volts to feed the potential coils of indicating and
metering instruments (voltmeter, wattmeter, and watt hour meters) and relays. These
transformers make the ordinary low voltage instruments suitable for measurement of high
voltage and isolate them from high voltage.
The primary winding of the PT is connected to the main bus bars of the switch gear
installation and to the secondary windings various indicating and metering instruments
and relays are connected. When the rated high voltage is applied to the primary of a PT,
the voltage of 110volt appear across the secondary winding. The PT is rated for primary
and secondary rated voltage, accuracy class, number of phases and system of cooling.
(d) Autotransformers
Autotransformers are well known for their reduced size and economic use of material.
In an autotransformer the primary and secondary windings have a common part. The
secondary is connected electrically to the primary at the common point. Most of the three
phase autotransformers are star connected and it is a usual practice to add an additional
delta winding called tertiary winding. The purpose of the delta tertiary is to provide an
internal path to the third harmonic current required for execution and thus eliminating
them from the AC network. The delta tertiary also helps to stabilize the neutral with
reference to the line voltage. The economy and reduced size of autotransformer as
compared with two winding transformer has resulted in development of an
autotransformer for a very wide range of applications at EHV-AC transmission level, MV
distribution levels as well as in industrial applications .A very wide choice is available for
the tapping on the autotransformer. The suitable choice of tapping must be made for
obtaining the alternatives.
EEE Dept.
Intelligent power sharing of transformer with auto protection 9
As per the rules star-star connected autotransformer is provided with delta tertiary for
the following purposes:
1. Stabilizing the phase to phase voltages during unbalanced load on secondary side.
2. Suppression of the third harmonic currents due to no load current in neutral to ground
circuit when neutral is earthed.
3. Reduction in zero sequence reactance.
4. Increase of KVAR.
Switch is connected between the line conductor and earth. Normally it is open. When
line is disconnected, the earthing switch is closed so as to discharge the voltage trapped
on the line capacitance to the earth. Though the line is connected, there is some voltage
on the line to which the capacitance line and earth is charged. This voltage is significant
in high voltage system. Before proceeding with the maintenance work the voltage is
discharged to earth, by closing the earthing switch.
(f) Earthing
EEE Dept.
Intelligent power sharing of transformer with auto protection 10
1. The frames, tanks and enclosures of electrical machines, transformers and apparatus,
lighting fitting and other items of equipments.
2. Operating mechanism of switch gear
3. Frame work of switch boards, control boards, individual panel boards, and cubicles.
4. Structural steel work of indoor and outdoor substations.
1. Pipe earthing: This is the best and cheapest method. In this method, a galvanized steel
and perforated pipe of approved length and diameter is placed up right in permanently
wet soil
2. Plate earthing: In this method either a copper of dimensions 60cmx 60cm x 3 mm or
of galvanized iron of dimensions 60cmx 60cmx6mm is buried into the ground with its
face vertical at a depth of not less than 3m from the ground level.
There equipment connected between the conductor and ground, to discharge the
excessive voltage to the earth. Surge arresters divert the transient over voltages to the
earth and protect the substation equipment from lightning and switching over voltage
surges. There are two types of designs
EEE Dept.
Intelligent power sharing of transformer with auto protection 11
(h) Relays
The protective relays are connected in the secondary circuits of the CT & PT. The
relays sense the abnormal conditions and close the trip circuit of associated CB. The CB
opens its contact. An arc is drawn between the contacts as they separate. The arc is
extinguished by suitable medium and technique. The relays distinguish the normal and
abnormal condition.
EEE Dept.
Intelligent power sharing of transformer with auto protection 12
2.4 Transformers
Transformers are used in substations for conversion of voltage 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
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
voltage" in the
secondary winding. This effect is called mutual induction.
EEE Dept.
Intelligent power sharing of transformer with auto protection 13
The essential conditions for successful parallel operation of transformers are given below:
I. Transformation or turn-ratios and voltage ratings are same.
II. Polarities of the transformers are same.
III. Percent impedances of the transformers are same.
IV. Ratios of resistance to reactance are same.
V. Phase displacement between primary and secondary windings of the transformers is
same.
VI. Phase sequences of the transformers are same.
For single phase transformers only the first four conditions apply as there
is no phase sequence and phase displacement due to voltage transformation.
If the turn-ratios or voltage ratings are not same a circulating current will flow even at no
load. If the percent impedance or the ratios of resistance to reactance are not same there
will be no circulating current, but the division of load between the transformers when
supplied will no longer be proportional to their KVA ratings. Hence the capacities of the
transformers cannot be utilized to a full extent.
When the polarity of one transformer is additive and that of the other is
subtractive, the transformers may be operated in parallel by reversing the connection of
primary or secondary side of either transformer. In such a case check that dielectric
strength is satisfactory when the reversed winding has a graded insulation.
EEE Dept.
Intelligent power sharing of transformer with auto protection 14
The same conditions hold true for three phase transformers except in the
case the questions of phase displacement and phase sequence must be considered.
Phase sequence refers to the order in which the terminal voltages reach their maximum
values. In paralleling those terminals whose voltages reach their maximum
simultaneously are paired.
Certain transformer connections as the Wye-delta or Wye-
Zigzag produce a phase displacement of 30° between the line voltage of primary side and
those of the secondary side. Transformers of such connections cannot be run in parallel with
the transformers not having this phase displacement such as Wye-Wye, delta, - delta zigzag-
delta or zigzag-zigzag.
EEE Dept.
Intelligent power sharing of transformer with auto protection 15
CHAPTER 3
#include<pic.h>
#include<stdio.h>
#include"delay.c"
#define LED1 RD0;
___CONFIG(0x3f72);
void GetADC1(void);
void main( )
{
TRISA=0xff;
ADCON1=0x00;
DelayMs(10);
While (1)
{
GetADC1 ( );
If (CT >=0.7)
{
LED1=1;
EEE Dept.
Intelligent power sharing of transformer with auto protection 16
RELAY0=1;
}
}
DelayMs (250);
DelayMs (250);
Void GetADC1 ( )
{
ADCON0=0x41;
DelayMs (1);
ADGO=1;
While (ADGO==1);
CT=ADRESH;
}
EEE Dept.
Intelligent power sharing of transformer with auto protection 17
CHAPTER 4
LOAD SHARING
4.1 Introduction
While most modem-day 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--
temperatures--a recognized
contributor to reduced reliability .Therefore, the challenge in paralleling modular supplies
is to insure predictable, uniform current sharing
sharing-regardless of load levels
vels and the number
of modules. Another major goal should be to provide enhanced system reliability through
thr
complete redundancy such 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.
EEE Dept.
Intelligent power sharing of transformer with auto protection 18
When the second module reaches its current limit, number three starts
conducting, and so on. Of course, there is no current sharing at all except for the units
which are in current limiting, and it could be expected that the dynamic load regulation,
particularly as each current limit threshold is passed, would be less than desirable.
The current transformer is used with its primary winding connected in series
with line carrying the current to be measured and therefore the primary current is
dependent upon the load connected to the system and is not determined by the load
connected on the secondary winding of the current transformer . The primary winding
consists of very few turns and therefore there is no appreciable voltage drop across it. The
secondary winding of current transformer has large number of turns, the exact number
EEE Dept.
Intelligent power sharing of transformer with auto protection 19
being determined by the turn’s ratio. The ammeter current coil or the over current relay
are connected directly across the secondary winding terminals. Thus a current transformer
operates it secondary windings nearly under short-circuit conditions. One of the
secondary windings is earthed so as to protect equipment and personnel in the vicinity in
the event of an insulation breakdown in the current transformer.
A crystal is a solid in which the constituent atoms, molecules, or ions are packed in
a regularly ordered, repeating pattern extending in all three spatial dimensions. Almost
any object made of an elastic material could be used like a crystal, with appropriate
EEE Dept.
Intelligent power sharing of transformer with auto protection 20
When the field is removed, the quartz will generate an electric field as it
returns to its previous shape, and this can generate a voltage. The result
result is that a quartz
crystal behaves like a circuit composed of an inductor, capacitor and resistor,, with a
precise resonant frequency (See Fig.4.3).
Quartz has the further advantage that its elastic constants and its
size change in such a way that the frequency dependence on temperature can be very low.
l
The specific characteristics will depend on the mode of vibration and the angle at which
the quartz is cut (relative to its crystallographic axes). Therefore, the resonant frequency
of the plate, which depends on its size, will not change much, either. This means that a
quartz clock, filter or oscillator will remain accurate. For critical applications the quartz
oscillator is mounted in a temperature-controlled
temperature controlled container, called a crystal oven, and can
also be mounted on shock absorbers to prevent perturbation
perturbation by external mechanical
vibrations. A quartz crystal can be modeled as an electrical network with a low
impedance (series) and a high impedance (parallel) resonance
resonance point spaced closely
together.
EEE Dept.
Intelligent power sharing of transformer with auto protection 21
EEE Dept.
Intelligent power sharing of transformer with auto protection 22
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.
EEE Dept.
Intelligent power sharing of transformer with auto protection 23
When the coil is energized with direct current, a diode is often placed across the
coil to dissipate the energy from the collapsing magnetic field at deactivation, which
would otherwise generate a voltage spike dangerous to semiconductor circuit
components. Some automotive relays include a diode inside the relay case. Alternatively,
a contact protection network consisting of a capacitor and resistor in series (snubber
circuit) may absorb the surge. If the coil is designed to be energized with alternating
current (AC), a small copper "shading ring" can be crimped to the end of the solenoid,
creating a small out-of-phase current which increases the minimum pull on the armature
during the AC cycle.
A regulator circuit removes the ripples and also remains the same dc value even if
the input dc voltage varies, or the load connected to the output dc voltage changes. This
voltage regulation is usually obtained using one of the popular voltage regulator IC units.
EEE Dept.
Intelligent power sharing of transformer with auto protection 24
(a) Transformer
The potential transformer will step down the power supply voltage (0-230V) to (0-6V)
level. Then the secondary of the potential transformer will be connected to the precision
rectifier which is constructed with the help of op–amp. The advantages of using precision
rectifier are it will give peak voltage output as DC; rest of the circuits will give only RMS
output.
When four diodes are connected as shown in figure, the circuit is called as bridge
rectifier. The input to the circuit is 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 and a negative potential at point B. 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. this path is indicated by the solid arrows. Waveforms (1) and (2) can be observed
across D1 and D3.
EEE Dept.
Intelligent power sharing of transformer with auto protection 25
One-half cycle later the polarity across the secondary of the transformer reverse,
forward biasing D2 and D4 and reverse biasing D1 and D3. Current flow will now be
from point A through D4, up through RL, through D2, through the secondary of T1, and
back to point A. This path is indicated by the broken arrows. Waveforms (3) and (4) can
be observed across D2 and D4. The current flow through RL is always in the same
direction. In flowing through RL this current develops a voltage corresponding to that
shown waveform (5). Since current flows through the load (RL) during both half cycles
of the applied voltage, this bridge rectifier is a full-wave rectifier.
(c) 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.
(d) 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. 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.
EEE Dept.
Intelligent power sharing of transformer with auto protection 26
CHAPTER 5
PIC MICROCONTROLLER
5.1 Introduction
A micro-controller-based physiological sensing unit has been
designed, prototyped, and field-tested for recording galvanic skin response data and
relaying them to a computer for physiological analysis. Focusing on system design issues
concerning battery-driven ambulatory applications, this paper presents a special data
compression algorithm based on relative encoding to optimize memory utilization and
reduce data transfer time. Data flow coordination and timing control are enabled by a PIC
micro-controller. The embedded block is connected with the computer through serial port
and the patient reaches an abnormal condition, automatically an alert message will given
to the doctor.
The major parts of the PIC MCU (Microcontroller Unit) that we will be concerned with
are the program memory, data memory which is also called file registers, and the
Working Register, and finally the EEPROM memory section.
EEPROM Memory ----- 8 bit word length ---- separate address space
The program memory in the PIC16F877A has a total of 8K words. The word
length for the midrange family of PIC microcontrollers is 14 bits long. Because each
word uses 14 bits this amount of memory is roughly equivalent to 14K bytes. The
EEE Dept.
Intelligent power sharing of transformer with auto protection 27
program memory can be made up of EPROM using the 16CXXX parts or it can have
FLASH memory as in the 16FXXX parts. After the program memory has been
programmed it will retain the program even if power is lost. Therefore program memory
is said to be non-volatile. The 8K words or program memory are made up of 4 sections or
pages of 2K words each. Within each page every 14 bit word has an address with the first
one starting at 000hex and ending with 7Ffhex which corresponds to 0 through 2047
decimal. The MCU can only use one of the program memory pages at a time. To read or
write to a different page requires the programmer to do page switching within his
program. How to do this will be covered in detail in a later section.
The PIC 16F877A microcontroller is at the top of the end of the range for the
midrange family. Other members have less memory than this. Members that have 4K
words of program memory will only have 2 pages. Some members have only enough
program memory for one page. For example the PIC 16F84A only has 1024 words of
program memory so consequently needs only one page to contain its program memory.
For the PIC16F84A page switching is not a consideration. For the programs used in this
course we will normally only use the first page of program memory and will not have to
worry with page switching. The methods for page switching will be covered in detail later
in the course.
EEE Dept.
Intelligent power sharing of transformer with auto protection 28
The file registers are where data and variables are stored. File registers contain a single
byte in each address location. File registers will not retain their contents when power is
lost and therefore is said to be volatile memory.
File Registers are considered the data memory section of the MCU. File
registers can be broken down into two types of data storage. General purpose registers
(GPR) are used by the programmer for normal calculations and temporary data storage.
Special Function registers (SFR) are used to control various internal functions contained
within the microcontroller such as interrupts, serial communications, timers and counters,
A/D converters, program counter, port direction control and many others. Special
Function registers will have a name associated with them such as TMR0, STATUS,
PORTA, PORTB, etc. Each Special Function register allows control or access to data
associated with a particular hardware function within the microcontroller. General
purpose registers do not have a name since they can be used for any purpose the
programmer designates. After a power-up any special function registers that are going to
be used must be loaded with the necessary setup data before they can be used. The file
registers in data memory are divided up into Banks similar to the way program memory is
divided into pages. Each Bank can hold up to 128 bytes and uses addresses from 00h to
7Fh. Notice in the image of the register map that in each bank the special function
registers always start at address 00h and go up to a certain address at which point the
general purpose registers begin. If all four banks contained 128 bytes each there would be
512 bytes total in the file register space. However not all locations are used. The byte
locations tinted in grey are not available. Also in banks 1, 2 and 3 the last 16 bytes all
map to the same 16 bytes that are in bank 0. After these considerations we find that there
are actually 368 bytes of General Purpose Register Space. Other microcontrollers that are
at the lower end of the midrange product line may have only 2 banks that contain even
fewer bytes than the 128 bytes in each bank of the PIC 16F877A. For example the PIC
16F84A has 2 banks with each bank having addresses between 0 and 4Fh. This MCU has
a total of 68 bytes of general purpose file register space. We will be using all 4 banks of
the file register space available to the PIC 16F877A in our programs. The methods used
to switch banks will be covered in detail in a later programming section of the course.
EEE Dept.
Intelligent power sharing of transformer with auto protection 29
The Working register is a single byte register that is used in most of the PIC
MCU instructions. The Working register is nearly always involved in any actions
involving data in the File Registers. Whenever two values are used in arithmetic
operations or logic operations one of the values will be loaded into the Working register
at the start of the instruction. After the instruction finishes the result is often left in the
Working register. In other manufacturers microcontrollers the Working register is known
as the accumulator. However, we will stick with the term working register for our
purposes. If you look in the File Register Map you will not find the Working register. It is
not part of file register space. It exists on its own within the PIC MCU.
EEE Dept.
Intelligent power sharing of transformer with auto protection 30
EEE Dept.
Intelligent power sharing of transformer with auto protection 31
The Status register is at address location 03 in bank 0. Notice that it is also listed
in banks 1, 2 and 3 at addresses 83h, 103h and 183h respectively. The Status register is
used so often in programming that it was designed in to all banks so that it would be easy
to access without switching banks. So there is really only one Status register but its
contents are available in all 4 File Register banks. Each of the 8 bits in the Status register
has a function. For example bit 0 is the Carry Flag. This bit is used to signal a carry when
the result of an addition is too large to fit into a single byte. It can also be used to indicate
a borrow when subtraction is performed. The carry flag can also be cleared or set directly
by an instruction. Bit 1 is DC or Digit Carry. When working with binary coded decimal
it is necessary to have a carry for each decimal digit. Since each decimal digit is
represented by 4 bits, the DC works as the carry for the low order digit and the regular
Carry bit works as the carry for the high order digit. Often we want to test to see if the
result of an arithmetic or logic operation resulted in zero or a non-zero number. The Z
flag or Zero flag will be modified after arithmetic and logic instructions. If the result was
0 the Z flag will be set to 1. However if the result was not a zero the Z flag will be cleared
to 0. The instruction set gives us the capability to check the results of C, DC and Z flags
in order to make decisions based on their contents. For right now we will not concern
ourselves with the functions of bits 3, 4 and 7. We will pick them up later when they will
make more sense. Bits 5 and 6 are the bits that control which File Register bank is active.
They are called RP0 and RP1 respectively. If both bit 5 and 6 are cleared then bank 0 is
active. When bit 6 is cleared and bit 5 is set then bank 1 is active. All that is needed to
change File Register banks is to set bit 5 and 6 as shown in the Status Register Map.
EEE Dept.
Intelligent power sharing of transformer with auto protection 32
• Only 35 single- word instructions to learn .Hence it is user friendly. Easy to use
• All single – cycle instructions except for program branches, which are two-cycle
• Two Capture, Compare and some PWM modules, having following features
(2) Programmable on-chip voltage reference (VREF) module (3) Programmable input
multiplexing from device inputs and internal voltage reference thus 3 parts
I CMOS Technology:
EEE Dept.
Intelligent power sharing of transformer with auto protection 33
EEE Dept.
Intelligent power sharing of transformer with auto protection 34
EEE Dept.
Intelligent power sharing of transformer with auto protection 35
(a) OSC1/CLKI:
Oscillator crystal or external clock input. Oscillator crystal input or external clock source
input. ST buffer when configured in RC mode; otherwise CMOS. External clock source
input. Always associated with pin function OSC1 (see OSC1/CLKI, OSC2/CLKO pins).
(c) OSC2/CLKO:
Oscillator crystal or clock output. Oscillator crystal output. Connects to the crystal or
resonator in Crystal Oscillator mode. In RC mode, OSC2 pin outputs CLKO, which has
1/4 the frequency of OSC1 and denotes the instruction cycle rate.
EEE Dept.
Intelligent power sharing of transformer with auto protection 36
(d) MCLR/VPP:
• RA0/AN0.
• RA1/AN1.
• RA2/AN2/VREF-/CVREF.
• VREFCVREF.
• RA3/AN3/VREF+.
• VREF+.
• RA4/T0CKI/C1OUT.
• T0CKI.
• C1OUT.
• RA5/AN4/SS/C2OUT/SS/C2OUT.
Some pins for these I/O ports are multiplexed with an alternate function for the
peripheral features on the device. In general, when a peripheral is enabled, that pin may
not be used as a general purpose I/O pin.
EEE Dept.
Intelligent power sharing of transformer with auto protection 37
Pin RA4 is multiplexed with the Timer0 module clock input to become the RA4/T0CKI
pin. The RA4/T0CKI pin is a Schmitt Trigger input and an open-drain output. All other
PORTA pins have TTL input levels and full CMOS output drivers. Other PORTA pins
are multiplexed with analog inputs and the analog VREF input for both the A/D
converters and the comparators. The operation of each pin is selected by clearing/setting
the appropriate control bits in the ADCON1 and/or CMCON registers. The TRISA
register controls the direction of the port pins even when they are being used as analog
inputs. The user must ensure the bits in the TRISA register are maintained set when using
them as analog inputs.
Four of the PORTB pins, RB7:RB4, have an interruption- change feature. Only pins
configured as inputs can cause this interrupt to occur (i.e., any RB7:RB4 pin configured
as an output is excluded from the interruption- change comparison). The input pins (of
RB7:RB4) are compared with the old value latched on the last read of PORTB. The
“mismatch” outputs of RB7:RB4 are together to generate the RB port change interrupt
with flag bit RBIF (INTCON<0>).
This interrupt can wake the device from Sleep. The user, in the Interrupt
Service Routine, can clear the interrupt in the following manner:
a) Any read or write of PORTB. This will end the mismatch condition.
A mismatch condition will continue to set flag bit RBIF. Reading PORTB
will end the mismatch condition and allow flag bit RBIF to be cleared. The interrupt-on-
EEE Dept.
Intelligent power sharing of transformer with auto protection 38
change feature is recommended for wake-up on key depression operation and operations
where PORTB is only used for the interrupt-on-change feature. Polling of PORTB is not
recommended while using the interrupt-on- change feature. This interrupt-on-mismatch
feature, together with software configurable pull-ups on these four pins, allow easy
interface to a keypad and make it possible for wake-up on key depression.
PORTC is an 8-bit wide, bidirectional port. The corresponding data direction register is
TRISC. Setting a TRISC bit (= 1) will make the corresponding PORTC pin an input (i.e.,
put the corresponding output driver in a High- Impedance mode). Clearing a TRISC bit (=
0) will make the corresponding PORTC pin an output (i.e., put the contents of the output
latch on the selected pin). PORTC is multiplexed with several peripheral functions (Table
4-5). PORTC pins have Schmitt Trigger input buffers. When the I2C module is enabled,
the PORTC<4:3> pins can be configured with normal I2C levels, or with SMBus levels,
by using the CKE bit (SSPSTAT<6>). When enabling peripheral functions, care should
be taken in defining TRIS bits for each PORTC pin. Some peripherals override the TRIS
bit to make a pin an output, while other peripherals override the TRIS bit to make a pin an
input. Since the TRIS bit override is in effect while the peripheral is enabled, read-modify
write instructions (BSF, BCF, XORWF) with TRISC as the destination, should be
avoided. The user should refer to the corresponding peripheral section for the correct
TRIS bit settings.
PORTD is an 8-bit port with Schmitt Trigger input buffers. Each pin is individually
configurable as an input or output. PORTD can be configured as an 8-bit wide
microprocessor port (Parallel Slave Port) by setting control bit, PSP MODE (TRISE<4>).
In this mode, the input buffers are TTL.
EEE Dept.
Intelligent power sharing of transformer with auto protection 39
TRISE<2:0> bits are set and that the pins are configured as digital inputs. Also, ensure
that ADCON1 is configured for digital I/O. In this mode, the input buffers are TTL.
Register 4-1 shows the TRISE register which also controls the Parallel Slave Port
operation. PORTE pins are multiplexed with analog inputs.
When selected for analog input, these pins will read as ‘0’s. TRISE controls. The
direction of the RE pins, even when they are being used as analog inputs. The user must
make sure to keep the pins configured as inputs when using them as analog inputs.
The TMR0 interrupt is generated when the TMR0 register overflows from FFh to 00h.
This overflow sets bit TMR0IF (INTCON<2>). The interrupt can be masked by clearing
bit TMR0IE (INTCON<5>). Bit TMR0IF must be cleared in software by the Timer0
module Interrupt Service Routine before re-enabling this interrupt. The TMR0 interrupt
cannot awaken the processor from Sleep since the timer is shut-off during Sleep.
The Timer1 module is a 16-bit timer/counter consisting of two 8-bit registers (TMR1H
and TMR1L) which are readable and writable. The TMR1 register pair
(TMR1H:TMR1L) increments from 0000h to FFFFh and rolls over to 0000h. The TMR1
interrupt, if enabled, is generated on overflow which is latched in interrupt flag bit,
TMR1IF (PIR1<0>). This interrupt can be enabled/disabled by setting or clearing TMR1
interrupt enable bit, TMR1IE (PIE1<0>). Timer1 can operate in one of two modes:
• As a Timer
• As a Counter
The operating mode is determined by the clock select bit, TMR1CS (T1CON<1>).
EEE Dept.
Intelligent power sharing of transformer with auto protection 40
set), the RC1/T1OSI/CCP2 and RC0/T1OSO/T1CKI pins become inputs. That is, the
TRISC<1:0> value is ignored and these pins read as ‘0’.
(m)TIMER2 Module:
Timer2 is an 8-bit timer with a prescaler and a postscaler. It can be used as the PWM
time base for the PWM mode of the CCP module(s). The TMR2 register is readable and
writable and is cleared on any device Reset. The input clock (FOSC/4) has a prescale
option of 1:1, 1:4 or 1:16, selected by control bits T2CKPS1:T2CKPS0 (T2CON<1:0>).
The Timer2 module has an 8-bit period register, PR2. A Timer2 increment from 00h until
it matches PR2 and then resets to 00h on the next increment cycle. PR2 is a readable and
writable register. The PR2 register is initialized to FFh upon Reset. The match output of
TMR2 goes through a 4-bit postscaler (which gives a 1:1 to 1:16 scaling inclusive) to
generate a TMR2 interrupt (latched in flag bit, TMR2IF (PIR1<1>)). Timer2 can be shut-
off by clearing control bit, TMR2ON (T2CON<2>), to minimize power consumption.
The analog-to-digital (A/D) converter module can have up to eight analog inputs
for a device. The analog input charges a sample and hold capacitor. The output of the
sample and hold capacitor is the input into the converter. The converter then generates a
digital result of this analog level via successive approximation. This A/D conversion, of
the analog input signal, results in a corresponding 10-bit digital number. The analog
reference voltages (positive and negative supply) are software selectable to either the
device’s supply voltages (AVDD, Avss) or the voltage level on the AN3/VREF+ and
AN2/VREF.
EEE Dept.
Intelligent power sharing of transformer with auto protection 41
Control register:
00 = FOSC/2
01 = FOSC/8
10 = FOSC/32
EEE Dept.
Intelligent power sharing of transformer with auto protection 42
When ADON = 1
1 = A/D conversion in progress (setting this bit starts the A/D conversion which is
automatically cleared by hardware when the A/D conversion is complete)
EEE Dept.
Intelligent power sharing of transformer with auto protection 43
(o)ADCON1 Register:
EEE Dept.
Intelligent power sharing of transformer with auto protection 44
CHAPTER 6
HARDWARE LAYOUT
1
D1
1
R5
6
220 ohm 5 8
RESET 1k TO RA1 PIN D3 2
11
32
12
31
3
1 4
VSS 5V zener
VSS
JP1
VD D
VD D
Load 1 Load 2 T1
1 40 RB7 2 TRANSFORMER CT
3
MCLR 2 MCLR/Vpp RB7/PGD 39 RB6 1
RA1 3 RA0/AN0 RB6/PGC 38 RB5
RA2 4 RA1/AN1 RB5 37 RB4 230 VAC K3
RA3 5 RA2/AN2/Vref- RB4 36 RB3 4
RA4 6 RA3/AN3/Vref+ RB3/PGM 35 RB2 3
RA5 7 RA4/T0CKI PIC16F877 RB2 34 RB1 5
RE0 8 RA5/AN4/SS U3 RB1 33 RB0 8
RE1 9 RE0/AN5/RD RB0/INT 6
RE2 10 RE1/AN6/WR 7
RE2/AN7/CS V DD 1
1k 2
R13
13
14 OSC1/CLKIN 30 RD7 Q3 RELAY DPDT
OSC2/CLKOUT RD7/PSP7 29 RD6 BC547
RC0 15 RD6/PSP6 28 RD5
Y1
RC1 16 RC0/T1OSO/T1CKI RD5/PSP5 27 RD4
17 RC1/T1OSI/CCP2 RD4/PSP4 22 RD3 K3
10Mhz RC3 18 RC2/CCP1 RD3/PSP3 21 RD2 4
RC4 23 RC3/SCK/SCL RD2/PSP2 20 RD1 3
C9 C10 RC5 24 RC4/SDI/SDA RD1/PSP1 19 RD0 5
27 pF 27 pF RC6 25 RC5/SDO RD0/PSP0 8
RC7 26 RC6/TX/CK 6
RC7/RX/DT 7
1
1k VDD 2
R13
Q3 RELAY DPDT
TX RX BC547
220ohms
220ohms
1
D1 LM7805
U2 VDD
JP1
2- +4 1 3
2 VIN VOUT VDD
GN D
1
R4
220 VAC C5 C6 C7 220 ohm
2
D2
LED
Title
Pic Development Board - PIC Main and PS
Size Document Number Rev
B 2 2
EEE Dept.
Intelligent power sharing of transformer with auto protection 45
CHAPTER 7
The project describes about how to use power supply intelligently under peak
loads. The project automatically connects and disconnects the transformer thus protecting
transformer from overload. Sensing unit, ie.Current transformer plays an important role
by sensing the current through the load and sending feedback signal to the
microcontroller.PIC Microcontroller is so programmed that as soon as the load exceeds a
particular current limit it will soon generate a control signal that would be amplified by
the driver unit and finally control signal is fed to the Electromagnetic relay. For working
the relay AC supply is obtained through the inverter. The switching process occurs in the
Electromagnetic Relay which automatically connects the transformer in parallel in
accordance to the load sensed by the CT.
REFERENCES
EEE Dept.
Intelligent power sharing of transformer with auto protection 46
[3] http://www.pdf4me.net/pdf-data/load-sharing-of-transformers-using-embedded-systems.php
[4]http://www.docstoc.com/docs/10934947/IEEE-Electrical-IEEE-Project-Titles_-2009---2010-
NCCT-Final-Year-Projects
[5] www.2010ieeeprojects.com/power_electronics_projects.html
[6]www05.abb.com/1MRK500401SEN_en_Transformer_protection_monitoring_and_control.pdf
[7]http://www.chetanasprojects.com/Thread-EMBEDDED-MICROCONTROLLER-PROJECTS-
-4754
[8] ww1.microchip.com/downloads/en/devicedoc/39582b.pdf
[9]http://www.docstoc.com/docs/41554618/PIC-Microcontroller-Development-Board-%28PIC-
16F877A-40-Pin%29
[10] www.barcolair.com/PDF/BarberColman/Load%20Sharing/f22107-4.pdf
EEE Dept.