You are on page 1of 34

SMART GRID FAILURE CONTROL SYSTEM

Project Report submitted to


Delhi Technological University
In partial fulfillment for the award of the degree of
Bachelors in Technology in
Electrical engineering
By
Sanchit Jain (2K12/EE/117)
Tushant Vijayran (2K12/EE/142)
Tushar Jindal (2K12/EE/143)
Vishesh Jindal (2K12/EE/146)
Under the guidance of
Prof. Mini Sreejeth

2015-2016

CERTIFICATE
This is to certify that the project report titled Smart grid failure control system
submitted by SANCHIT JAIN, TUSHANT VIJAYRAN, TUSHAR JINDAL AND
VISHESH JINDAL in the fulfillment of the requirements of the course (Major project-I)
at DELHI TECHNOLOGICAL UNIVERSITY as a part of the degree in
ELECTRICAL ENGINEERING. The work was carried and has not submitted
anywhere else for any other purpose.

(Mrs. Mini Sreejeth)


PROFESSOR
DEPT OF ELECTRICAL
ENGINEERING

ACKNOWLEDGEMENT
WE SANCHIT JAIN, TUSAHNT VIJAYRAN, TUSHAR JINDAL & VISHESH
JINDAL are using this opportunity to express my gratitude to everyone who supported
me throughout the course of this major project. We are thankful for their aspiring
guidance, invaluably constructive criticism and friendly advice during the project work.
We are sincerely grateful to them for sharing their truthful and illuminating views on a
number of issues related to the project.
We express our warm thanks to Mrs. Mini Sreejeth for their support and guidance at
DELHI TECHNOLOGICAL UNIVERSITY

SANCHIT JAIN, TUSHANT VIJAYRAN, TUSHAR JINDAL, VISHESH JINDAL

Contents
1. Certificate............................................................................2
2. Acknowledgement.. .................3
3. Abstract and key words.............................................4

Project aim: To seek out the world's biggest blackout problem, 67 crore
Indians without power.

Project working
In our final year project we had sought out the world's biggest blackout
problem by using pic microcontroller.
We are using one power source as grid (north grid) and connect three
different bulb holders on that power source (grid) as a consumer states.
Now what we are doing different is, we fix three power load coil over the
state lines, these load coil sense the consumption load and send pulse to
pic controller unit.
We program our pic controller in such a manner that 80w load is sensation
load. If any of the three state overloads to power source (grid) by crossing
80w sensation load, controlling unit disconnect state power supply to
protect over loading on grid.
Block diagram

Circuit

COMPONENTS USED
1. Pic 16f877a
2. Ossilator-6mhz
3. Lcd 16 x 2
4. Ic uln2003
5. Load coil
6. Regulator-7805
7. Capacitor
8. Resistance
9. Diode
10. Leds
11. Relay
12. Transformer

COMPONENT DETAIL
1. Current transformer (CT)
In electrical engineering, a current transformer (CT) is used for measurement of
electric currents. Current transformers, together with voltage transformers (VT)
(potential transformers (PT)), are known as instrument
transformers. When current in a circuit is too high to
directly apply to measuring instruments, a current
transformer produces a reduced current accurately
proportional to the current in the circuit, which can be
conveniently connected to measuring and recording
instruments. A current transformer also isolates the
measuring instruments from what may be very high
voltage in the monitored circuit. Current transformers
are commonly used in metering and protective relays in
the electrical power industry.

Design
Like any other transformer, a current transformer has a primary winding, a magnetic
core, and a secondary winding. The alternating
current flowing in the primary produces a
magnetic field in the core, which then induces a
current in the secondary winding circuit. A
primary objective of current transformer design
is to ensure that the primary and secondary
circuits are efficiently coupled, so that the
secondary current bears an accurate
relationship to the primary current.
The most common design of CT consists of a length of wire wrapped many times
around a silicon steel ring passed over the circuit being measured. The CT's primary
circuit therefore consists of a single 'turn' of conductor, with a secondary of many
tens or hundreds of turns. The primary winding may be a permanent part of the
current transformer, with a heavy copper bar to carry current through the magnetic

core. Window-type current transformers (aka zero sequence current transformers, or


ZSCT) are also common, which can have circuit cables run through the middle of an
opening in the core to provide a single-turn primary winding. When conductors
passing through a CT are not centered in the circular (or oval) opening, slight
inaccuracies may occur.
Shapes and sizes can vary depending on the end user or switchgear manufacturer.
Typical examples of low voltage single ratio metering current transformers are either
ring type or plastic moulded case. High-voltage current transformers are mounted on
porcelain bushings to insulate them from ground. Some CT configurations slip
around the bushing of a high-voltage transformer or circuit breaker, which
automatically centers the conductor inside the CT window.
The primary circuit is largely unaffected by the insertion of the CT. The rated
secondary current is commonly standardized at 1 or 5 amperes. For example, a
4000:5 CT would provide an output current of 5 amperes when the primary was
passing 4000 amperes. The secondary winding can be single ratio or multi ratio, with
five taps being common for multi ratio CTs. The load, or burden, of the CT should be
of low resistance. If the voltage time integral area is higher than the core's design
rating, the core goes into saturation towards the end of each cycle, distorting the
waveform and affecting accuracy.

Usage

Current transformers used in metering equipment for three-phase 400 ampere electricity supply

Current transformers are used extensively for measuring current and monitoring the
operation of the power grid. Along with voltage leads, revenue-grade CTs drive the
electrical utility's watt-hour meter on virtually every building with three-phase service
and single-phase services greater than 200 amps.
The CT is typically described by its current ratio from primary to secondary. Often,
multiple CTs are installed as a "stack" for various uses. For example, protection
devices and revenue metering may use separate CTs to provide isolation between
metering and protection circuits, and allows current transformers with different
characteristics (accuracy, overload performance) to be used for the devices.

Safety precautions
Care must be taken that the secondary of a current transformer is not disconnected
from its load while current is flowing in the primary, as the transformer secondary will
attempt to continue driving current across the effectively infinite impedance. This will
produce a high voltage across the open secondary (into the range of several kilovolts
in some cases), which may cause arcing. The high voltage produced will
compromise operator and equipment safety and permanently affect the accuracy of
the transformer.

Accuracy
The accuracy of a CT is directly related to a number of factors including:

Burden
Burden class/saturation class
Rating factor
Load
External electromagnetic fields
Temperature and
Physical configuration.
The selected tap, for multi-ratio CTs

For the IEC standard, accuracy classes for various types of measurement are set out
in IEC 60044-1, Classes 0.1, 0.2s, 0.2, 0.5, 0.5s, 1, and 3. The class designation is
an approximate measure of the CT's accuracy. The ratio (primary to secondary
current) error of a Class 1 CT is 1% at rated current; the ratio error of a Class 0.5 CT
is 0.5% or less. Errors in phase are also important especially in power measuring

circuits, and each class has an allowable maximum phase error for a specified load
impedance.
Current transformers used for protective relaying also have accuracy requirements at
overload currents in excess of the normal rating to ensure accurate performance of
relays during system faults. A CT with a rating of 2.5L400 specifies with an output
from its secondary winding of 20 times its rated secondary current (usually 5 A x 20 =
100 A) and 400 V (IZ drop) its output accuracy will be within 2.5 percent.

Burden
The secondary load of a current transformer is usually called the "burden" to
distinguish it from the load of the circuit whose current is being measured.
The burden, in a CT metering circuit is the (largely resistive) impedance presented to
its secondary winding. Typical burden ratings for IEC CTs are 1.5 VA, 3 VA, 5 VA, 10
VA, 15 VA, 20 VA, 30 VA, 45 VA & 60 VA. As for ANSI/IEEE burden ratings are B-0.1,
B-0.2, B-0.5, B-1.0, B-2.0 and B-4.0. This means a CT with a burden rating of B-0.2
can tolerate up to 0.2 of impedance in the metering circuit before its secondary
accuracy falls outside of an accuracy specification. These specification diagrams
show accuracy parallelograms on a grid incorporating magnitude and phase angle
error scales at the CT's rated burden. Items that contribute to the burden of a current
measurement circuit are switch-blocks, meters and intermediate conductors. The
most common source of excess burden is the conductor between the meter and the
CT. When substation meters are located far from the meter cabinets, the excessive
length of wire creates a large resistance. This problem can be reduced by using CTs
with 1 ampere secondaries, which will produce less voltage drop between a CT and
its metering devices.

KNEE-POINT VOLTAGE
The knee-point voltage of a current transformer is the magnitude of the
secondary voltage after which the output current ceases to follow linearly
the input current. This means that the one-to-one or proportional
relationship between the input and output is no longer within declared
accuracy. In testing, if a voltage is applied across the secondary terminals
the magnetizing current will increase in proportion to the applied voltage,
up until the knee point. The knee point is defined as the voltage at which a
10% increase in applied voltage increases the magnetizing current by

50%. From the knee point upwards, the magnetizing current increases
abruptly even with small increments in voltage across the secondary
terminals. The knee-point voltage is less applicable for metering current
transformers as their accuracy is generally much tighter but constrained
within a very small bandwidth of the current transformer rating, typically
1.2 to 1.5 times rated current. However, the concept of knee point voltage
is very pertinent to protection current transformers, since they are
necessarily exposed to currents of 20 or 30 times rated current during
faults.[

RATING FACTOR
Rating factor is a factor by which the nominal full load current of a CT can be
multiplied to determine its absolute maximum measurable primary current.
Conversely, the minimum primary current a CT can accurately measure is "light
load," or 10% of the nominal current (there are, however, special CTs designed to
measure accurately currents as small as 2% of the nominal current). The rating
factor of a CT is largely dependent upon ambient temperature. Most CTs have rating
factors for 35 degrees Celsius and 55 degrees Celsius. It is important to be mindful
of ambient temperatures and resultant rating factors when CTs are installed inside
padmount transformers or poorly ventilated mechanical rooms. Recently,
manufacturers have been moving towards lower nominal primary currents with
greater rating factors. This is made possible by the development of more efficient
ferrites and their corresponding hysteresis curves.

Special designs
Specially constructed wideband current transformers are also used (usually with an
oscilloscope) to measure waveforms of high frequency or pulsed currents within
pulsed power systems. One type of specially constructed wideband transformer
provides a voltage output that is proportional to the measured current. Another type
(called a Rogowski coil) requires an external integrator in order to provide a voltage
output that is proportional to the measured current. Unlike CTs used for power
circuitry, wideband CTs are rated in output volts per ampere of primary current. CT
RATIO

Standards

Depending on the ultimate clients requirement, there are two main standards to
which current transformers are designed. IEC 60044-1 (BSEN 60044-1) & IEEE
C57.13 (ANSI), although the Canadian & Australian standards are also recognised.

High voltage types


Current transformers are used for protection, measurement and control in high
voltage electrical substations and the electrical grid. Current transformers may be
installed inside switchgear or in apparatus bushings, but very often free-standing
outdoor current transformers are used. In a switchyard, live tank current transformers
have a substantial part of their enclosure energized at the line voltage and must be
mounted on insulators. Dead tank current transformers isolate the measured circuit
from the enclosure. Live tank CTs are useful because the primary conductor is short,
which gives better stability and a higher short-circuit current withstand rating. The
primary of the winding can be evenly distributed around the magnetic core, which
gives better performance for overloads and transients. Since the major insulation of
a live-tank current transformer is not exposed to the heat of the primary conductors,
insulation life and thermal stability is improved.
A high-voltage current transformer may contain several cores with multiple
secondary windings for different purposes (such as metering circuits, control, or
protection).

2. RELAY
It is often desirable or essential to isolate one circuit electrically from another, while
still allowing the first circuit to control the second.
For example, if you wanted to control a high-voltage circuit from your computer, you
would probably not want to connect it directly to the a low-voltage port on the back of
your computer in case something went wrong and the mains electricity ended up
destroying the expensive parts inside your computer.
One simple method of providing electrical isolation between two circuits is to place a
relay between them, as shown in the circuit diagram of figure 1. A relay consists of a
coil that may be energized by the low-voltage circuit and one or more sets of switch
contacts, which may be connected to the high-voltage circuit.

How Relays Work


In figure 2a the relay is off. The metal arm is at its rest position and so there is
contact between the Normally Closed (N.C.) switch contact and the 'common' switch
contact.
If a current is passed through the coil, the resulting magnetic field attracts the metal
arm and there is now contact between the Normally Open (N.O.) switch contact and
the common switch contact, as shown in figure 2b.

Advantages of Relays
The complete electrical isolation improves safety by ensuring that high
voltages and currents cannot appear where they should not be.
Relays come in all shapes and sizes for different applications and they have
various switch contact configurations. Double Pole Double Throw (DPDT)
relays are common and even 4-pole types are available. You can therefore
control several circuits with one relay or use one relay to control the direction
of a motor.
It is easy to tell when a relay is operating - you can hear a click as the relay
switches on and off and you can sometimes see the contacts moving.
Disadvantages of Relays
Being mechanical though, relays do have some disadvantages over other methods
of electrical isolation:
Their parts can wear out as the switch contacts become dirty - high voltages
and currents cause sparks between the contacts.
They cannot be switched on and off at high speeds because they have a slow
response and the switch contacts will rapidly wear out due to the sparking.
Their coils need a fairly high current to energise, which means some microelectronic circuits can't drive them directly without additional circuitry.
The back-emf created when the relay coil switches off can damage the
components that are driving the coil. To avoid this, a diode can be placed

across the relay coil, as will be seen in any Electronics in Meccano circuits
that use relays with sensitive components.
Choosing a Relay
When choosing a relay to use in a circuit, you need to bear in mind properties of both
the coil and the switch contacts. Firstly, you will need to find a relay that has the
required number of switch poles for your application. You then need to make sure
that the switch contacts can cope with the voltage and current you intend to use - for
example, if you were using the relay to switch a 60W mains lamp on and off, the
switch contacts would need to be rated for at least 250mA at 240V AC (or whatever
the mains voltage is in your country).
Also of importance is the material that the switch contacts are made of - gold is good
for low-voltages, whereas tungsten is suitable for switching high voltages and
currents.
Finally, you need to choose a relay that has a coil that can be energised by your lowvoltage control circuit. Relay coils are generally rated by their voltage and resistance,
so you can work out their current consumption using Ohm's Law. You will need to
make sure that the circuit powering the coil can supply enough current, otherwise the
relay will not operate properly.
The Latching Relay Circuit
If a relay is connected as shown in figure 3, it will become 'latched' on when the coil
is energized by pressing the Trigger button. The only way to turn the relay off will
then be to cut the power supply by pressing the Reset button (which must be a pushto-break type).

The technical name for this type of behavior is 'bi-stable', since the circuit has two
stable states for its output - on and off. Bistable circuits can also be constructed

using many other components, including the 555 timer IC and transistors.
What's the point of this circuit? The Normally Open switch contact of the relay could
also be connected to a device such as a motor, as shown by the dotted connections
in figure 3. The device will then run indefinitely until some event (maybe triggered by
the device) momentarily presses the Reset button, thereby turning off the coil ready
for the Trigger button to be pressed again.
This system could be used in a model which needs a 'Push to Operate' button. A
motor and gearing system in the model can be used to press the Reset button to cut
the power to the relay coil after the model has been running for a certain amount of
time, or until a certain event has occurred. Of course, you would have to be sure that
there was enough momentum in the mechanism that the button is released ready for
the next cycle.

3. TRANSFORMER
Transformers are a major class of coils having two or more windings usually
wrapped around a common core made from laminated iron sheets.
It has two coils named primary & secondary. If the current flowing through primary is
fluctuating, then a current will be induced into the secondary winding. A steady
current will not be transferred from one coil to other coil.
Transformers are of two types:
1. Step up transformer
2. Step down transformer
In power supply we use step down transformer. We apply 220V AC on the primary of
step down transformer. This transformer steps down this voltage to 9V AC. We give
this 9 V AC to rectifier circuit, which convert it to 5V DC.

4. REGULATOR 7805
7805 IC is used as regulator in 5V power supply.
7805

1 - IN
2 - OUT
3 - GND
2

IN 7805 pin no.1 is input pin through which non-regulated signal is applied. Pin no.3
is grounded & the regulated output is taken from pin no.2.

5. POWER SUPPLY
Most of the digital circuits operate on 5 volt DC supply which is obtained by the
following circuit. The power supply circuit consists of a step down transformer, bridge
rectifier and 7805 voltage regulator IC.

1
D1

7805

D3
1000 F

AC
SUPPLY

D4
B

5V
DC

D2
2

BRIDGE RECTIFIERS
Bridge rectifier circuit consists of four diodes arranged in the form of a bridge as
shown in figure.
OPERATION:
During the positive half cycle of the input supply, the upper end A of the transformer
secondary becomes positive with respect to its lower point B. This makes Point1 of
bridge positive with respect to point2. The diode D1 & D2 become forward biased &

D3 & D4 become reverse biased. As a result a current starts flowing from point1,
through D1 the load & D2 to the negative end.
During negative half cycle, the point2 becomes positive with respect to point1. Diode
D1 & D2 now become reverse biased. Thus a current flow from point 2 to point 1.
A

1
D1

AC
SUPPL
Y

D3

3
+

Load

D4

6. CAPACITOR
B

4
D2

It is an electronic component whose function is to accumulate charges and then


release it.

To understand the concept of capacitance, consider a pair of metal plates which all
are placed near to each other without touching. If a battery is connected to these
plates the positive pole to one and the negative pole to the other, electrons from the
battery will be attracted from the plate connected to the positive terminal of the
battery. If the battery is then disconnected, one plate will be left with an excess of
electrons, the other with a shortage, and a potential or voltage difference will exists
between them. These plates will be acting as capacitors. Capacitors are of two
types: - (1) fixed type like ceramic, polyester, electrolytic capacitors-these names
refer to the material they are made of aluminium foil. (2) Variable type like gang
condenser in radio or trimmer. In fixed type capacitors, it has two leads and its value
is written over its body and variable type has three leads. Unit of measurement of a
capacitor is farad denoted by the symbol F. It is a very big unit of capacitance. Small
unit capacitor are pico-farad denoted by pf (Ipf=1/1000,000,000,000 f) Above all, in
case of electrolytic capacitors, it's two terminal are marked as (-) and (+) so check it
while using capacitors in the circuit in right direction. Mistake can destroy the
capacitor or entire circuit in operational.

7. RESISTANCE
Resistance is the opposition of a material to the current. It is measured in Ohms
(). All conductors represent a certain amount of resistance, since no conductor is
100% efficient. To control the electron flow (current) in a predictable manner, we use
resistors. Electronic circuits use calibrated lumped resistance to control the flow of
current. Broadly speaking, resistor can be divided into two groups viz. fixed &
adjustable (variable) resistors. In fixed resistors, the value is fixed & cannot be
varied. In variable resistors, the resistance value can be varied by an adjuster knob.
It can be divided into (a) Carbon composition (b) Wire wound (c) Special type. The
most common type of resistors used in our projects is carbon type. The resistance
value is normally indicated by colour bands. Each resistance has four colours, one of
the band on either side will be gold or silver, this is called fourth band and indicates
the tolerance, others three band will give the value of resistance (see table). For
example if a resistor has the following marking on it say red, violet, gold. Comparing
these coloured rings with the colour code, its value is 27000 ohms or 27 kilo ohms
and its tolerance is 5%. Resistor comes in various sizes (Power rating). The bigger,
the size, the more power rating of 1/4 watts. The four colour rings on its body tells us
the value of resistor value as given below.
COLOURS
CODE

Black--------------------------------------------------------0
Brown-------------------------------------------------------1
Red----------------------------------------------------------2
Orange-----------------------------------------------------3
Yellow-------------------------------------------------------4
Green-------------------------------------------------------5
Blue---------------------------------------------------------6
Violet--------------------------------------------------------7
Grey---------------------------------------------------------8
White--------------------------------------------------------9

The first rings give the first digit. The second ring gives the second digit. The third
ring indicates the number of zeroes to be placed after the digits. The fourth ring gives
tolerance (gold 5%, silver 10%, No colour 20%).
In variable resistors, we have the dial type of resistance boxes. There is a knob with
a metal pointer. This presses over brass pieces placed along a circle with some
space b/w each of them.
Resistance coils of different values are connected b/w the gaps. When the knob is
rotated, the pointer also moves over the brass pieces. If a gap is skipped over, its
resistance is included in the circuit. If two gaps are skipped over, the resistances of
both together are included in the circuit and so on.

A dial type of resistance box contains many dials depending upon the range, which it
has to cover. If a resistance box has to read upto 10,000 , it will have three dials
each having ten gaps i.e. ten resistance coils each of resistance 10 . The third
dial will have ten resistances each of 100.
The dial type of resistance boxes is better because the contact resistance in this
case is small & constant.

8. TRANSISTOR
The name is transistor derived from transfer resistors indicating a solid state
Semiconductor device. In addition to conductor and insulators, there is a third class
of material that exhibits proportion of both. Under some conditions, it acts as an
insulator, and under other conditions its a conductor. This phenomenon is called
Semi-conducting and allows a variable control over electron flow. So, the transistor is
semi conductor device used in electronics for amplitude. Transistor has three
terminals, one is the collector, one is the base and other is the emitter, (each lead
must be connected in the circuit correctly and only then the transistor will function).
Electrons are emitted via one terminal and collected on another terminal, while the
third terminal acts as a control element. Each transistor has a number marked on its
body. Every number has its own specifications.
There are mainly two types of transistor (i) NPN & (ii) PNP
NPN Transistors:
When a positive voltage is applied to the base, the transistor begins to conduct by
allowing current to flow through the collector to emitter circuit. The relatively small
current flowing through the base circuit causes a much greater current to pass
through the emitter / collector circuit. The phenomenon is called current gain and it
is measure in beta.
PNP Transistor:
It also does exactly same thing as above except that it has a negative voltage on its
collector and a positive voltage on its emitter.

Transistor is a combination of semi-conductor elements allowing a controlled current


flow. Germanium and Silicon is the two semi-conductor elements used for making it.
There are two types of transistors such as POINT CONTACT and JUNCTION
TRANSISTORS. Point contact construction is defective so is now out of use.
Junction triode transistors are in many respects analogous to triode electron tube.
A junction transistor can function as an amplifier or oscillator as can a triode tube, but
has the additional advantage of long life, small size, ruggedness and absence of
cathode heating power.
Junction transistors are of two types which can be obtained while manufacturing.
The two types are: 1) PNP TYPE: This is formed by joining a layer of P type of germanium to an
N-P Junction

P
2)

NPN TYPE: This


is formed by joining a layer of N type
germanium to a P-N Junction.

Both
types are shown in
figure, with their symbols for representation. The

centre section is called the base, one of the outside sections-the emitter and the
other outside section-the collector. The direction of the arrowhead gives the direction
of the conventional current with the forward bias on the emitter. The conventional
flow is opposite in direction to the electron flow.

OPERATION OF PNP TRANSISTOR:A PNP transistor is made by sand witching two PN germanium or silicon diodes,
placed back to back. The centre of N-type portion is extremely thin in comparison to
P region. The P region of the left is connected to the positive terminal and N-region
to the negative terminal i.e. PN is biased in the forward direction while P region of
right is biased negatively i.e. in the reverse direction as shown in Fig. The P region in
the forward biased circuit is called the emitter and P region on the right, biased
negatively is called collector. The centre is called base.

The majority carriers (holes) of P region (known as emitter) move to N region as they
are repelled by the positive terminal of battery while the electrons of N region are
attracted by the positive terminal. The holes overcome the barrier and cross the
emitter junction into N region. As the width of base region is extremely thin, two to
five percent of holes recombine with the free electrons of N- region which result in a
small base current while the remaining holes (95% to 98%) reach the collector junction.
The collector is biased negatively and the negative collector voltage aids in sweeping
the hole into collector region.
As the P region at the right is biased negatively, a very small current should flow but the
following facts are observed:1)

A substantial current flows through it when the emitter junction is biased in a


forward direction.

2)

The current flowing across the collector is slightly less than that of the emitter,

3)

The collector current is a function of emitter current i.e. with the decrease or
increase in the emitter current a corresponding change in the collector current is
observed.

The facts can be explained as follows:1. As already discussed that 2 to 5% of the holes are lost in recombination with the
electron n base region, which result in a small base current and hence the
collector current is slightly less than the emitter current.
2.

The collector current increases as the holes reaching the collector junction are
attracted by negative potential applied to the collector.

3.

When the emitter current increases, most holes are injected into the base region,
which is attracted by the negative potential of the collector and hence results in
increasing the collector current. In this way emitter is analogous to the control of
plate current by small grid voltage in a vacuum triode.

Hence we can say that when the emitter is forward biased and collector is negatively
biased, a substantial current flows in both the circuits. Since a small emitter voltage of
about 0.1 to 0.5 volts permits the flow of an appreciable emitter current the input power
is very small. The collector voltage can be as high as 45 volts.

9. DIODE
The simplest semiconductor device is made up of a sandwich of P-type semi
conducting material, with contacts provided to connect the p-and n-type layers to an
external circuit. This is a junction Diode. If the positive terminal of the battery is
connected to the p-type material (cathode) and the negative terminal to the N-type
material (Anode), a large current will flow. This is called forward current or forward
biased.
If the connections are reversed, a very little current will flow. This is because under
this condition, the p-type material will accept the electrons from the negative terminal
of the battery and the N-type material will give up its free electrons to the battery,
resulting in the state of electrical equilibrium since the N-type material has no more
electrons. Thus there will be a small current to flow and the diode is called Reverse
biased.
Thus the Diode allows direct current to pass only in one direction while blocking it in
the other direction. Power diodes are used in concerting AC into DC. In this, current
will flow freely during the first half cycle (forward biased) and practically not at all
during the other half cycle (reverse biased). This makes the diode an effective
rectifier, which convert ac into pulsating dc. Signal diodes are used in radio circuits
for detection. Zener diodes are used in the circuit to control the voltage.

Some common diodes are:1. Zener diode.


2. Photo diode.
3. Light Emitting diode.

1. ZENER DIODE:A zener diode is specially designed junction diode, which can operate continuously
without being damaged in the region of reverse break down voltage. One of the most
important applications of zener diode is the design of constant voltage power supply.
The zener diode is joined in reverse bias to d.c. through a resistance R of suitable
value.

2. PHOTO DIODE:A photo diode is a junction diode made from photo- sensitive semiconductor or
material. In such a diode, there is a provision to allow the light of suitable frequency
to fall on the p-n junction. It is reverse biased, but the voltage applied is less than the
break down voltage. As the intensity of incident light is increased, current goes on
increasing till it becomes maximum. The maximum current is called saturation
current.

3. LIGHT EMITTING DIODE (LED):When a junction diode is forward biased, energy is released at the junction diode is
forward biased, energy is released at the junction due to recombination of electrons
and holes. In case of silicon and germanium diodes, the energy released is in
infrared region. In the junction diode made of gallium arsenate or indium phosphide,
the energy is released in visible region. Such a junction diode is called a light
emitting diode or LED.

10. MICRO SWITCH


Mechanical switches permit or interrupt the flow of current. They are also used to
direct current to various points.
Different types of switches are:
THE BASIC KNIFE SWITCH
This is also called an SPST (single-pole, single-throw switch)
Various switch symbols are:

MULTIPLE CONTACT SWITCHES


Here are symbols for the major kinds:
SPDT

DPST

DPDT

(The dashed line means both sides move together)


SPDT Single-pole, Double-throw
DPST Double-pole, Single-throw
DPDT Double-pole, Double-throw
OTHER SWITCHES
PUSH BUTTON: usually SPST, normally open (NO) or normally closed (NC).
Spring loader

ROTARY: wafer like with one pole and 2 or more contacts. Wafers can be stacked to
provide more poles. Many variations are possible.

Programming Code
#include <pic.h>
//lcd
#define RS RD6
#define EN RD7
#define LCDDATA PORTB
#define DL_LOAD RD0
#define HR_LOAD RC3
#define UP_LOAD RC2
#define reset RD3
#define limit 230
typedef unsigned int ui;
typedef unsigned char uc;
unsigned long int DL,HR,UP;
void delay(ui),display(uc),lcddata(uc),lcdcommand(uc com);
void displayline(char*,uc),lcdinit(),displaychar(char,uc);
void system_init(),phase_1(),phase_2(),phase_3();
bit flag1,flag2,flag3;
void main()
{
system_init();
while(1)
{
if(flag1==0)
{
phase_1();displayline(" ON ",2);
}
else
displayline("OFF ",2);

if(flag2==0)
{
phase_2();displayline(" ON ",0XC6);
}
else
displayline("OFF ",0xc6);
if(flag3==0)
{
phase_3();displayline(" ON ",0XCC);
}
else
displayline("OFF ",0xcc);
if(DL>limit)
{
flag1=1;DL_LOAD=0;
}
if(HR>limit)
{
flag2=1;HR_LOAD=0;
}
if(UP>limit)
{
flag3=1;UP_LOAD=0;
}
if(reset==1)
{
display(1);DL_LOAD=1;HR_LOAD=1;UP_LOAD=1;
flag1=0;flag2=0;flag3=0;
}
}
}
void delay(ui i)
{
while(i--);
}
void display(uc mode)
{
switch(mode)
{
case 0 :displayline("SMART GRID POWER",1);
displayline("FAIL.CONT.SYSTEM",2);
delay(60000);delay(60000);delay(60000);
break;
case 1 :displayline(" DL HR UP ",1);
displayline("
",2);
break;
}
}
void displayline(char *p,uc line)
{
if(line == 1)
lcdcommand(0X80);
else if(line == 2)
lcdcommand(0xc0);
else
lcdcommand(line);

lcddata(*p);
}
//****************8BIT*******************************
void lcdcommand(uc com)
{
LCDDATA = com;
RS=1;EN=1;delay(5);EN=0;
delay(100);
}
void lcddata(uc val)
{
LCDDATA = val;
RS=0;EN=1;delay(5);EN=0;
delay(100);
}
void lcdinit()
{
lcdcommand(0x38);delay(1000);
lcdcommand(0x38);delay(1000);
lcdcommand(0x0c);delay(1000);
lcdcommand(0x01);delay(1000);
lcdcommand(0x80);
display(0);display(1);
}
void phase_1()
{
unsigned long int H1,L1,F1,temp;
ADON=1;delay(10);
CHS0=0,CHS1=1,CHS2=0; //channel = 2
while(GO);
H1=ADRESH;
H1=H1<<8;
L1=ADRESL;
F1=(F1*5000)/1023;
PH_1=F1;
}
void phase_2()
{
unsigned long int H1,L1,F1,temp;
ADON=1;delay(10);
CHS0=1,CHS1=0,CHS2=0; //channel = 1
while(GO);
H1=ADRESH;
H1=H1<<8;
L1=ADRESL;
F1=(F1*5000)/1023;
PH_2=F1;
}
void phase_3()
{
unsigned long int H1,L1,F1,temp;
ADON=1;delay(10);

CHS0=0,CHS1=0,CHS2=0; //channel = 0
while(GO);
H1=ADRESH;
H1=H1<<8;
L1=ADRESL;
F1=(F1*5000)/1023;
PH_3=F1;
}
void system_init()
{
ADCON0=0X00;ADCON1=0X84;TRISA=0X0F;TRISB=0X00;
TRISC=0X00;TRISD=0b00111000;TRISE=0X00;
DL_LOAD=1;HR_LOAD=1;UP_LOAD=1;reset=0;
lcdinit();
}

You might also like