You are on page 1of 74

1.1.

OVERVIEW OF NLC:
Neyveli, an unknown village in the early 20th century has a
commercial breakthrough in the mid fifties by the discovery of Lignite. The
discovery of lignite led to the establishment of Neyveli Lignite Corporation on 14th
November, 1956 as a Government of India Enterprise.
In day-to-day life, electrical energy plays a vital role globally to
meet the industrial and domestic requirement. This form of energy is generated at
Neyveli using abundantly available fuel lignite, also referred “Black Gold” from
the mines. “Mines” is the place where lignite is dug out and transferred to thermal
power station through belt conveyors. The power station is the area where the
power is generated and transmitted to supply grid.

VISION
To emerge as leading Mining and Power Company, continue to
be a socially responsible company and strive for the operational excellence in
Mining and Exploration.

MISSION
Strive towards greatest cost competitiveness and work towards
continued financial strength.

1
1.2. INDUSTRIAL SECTORS IN NLC:
Three open cast Mines:
Mine-I : 10.5MT of Lignite per annum.
Mine-IA : 3MT of Lignite per annum.
Mine-II : 10.5MT of Lignite per annum.
Three Thermal Power Stations:
TPS-I 600MW
TPS-I (Exp) 420MW
TPS-II 1470MW
Hence, a total of 2490MW is produced.

MINE-I

Mine-I with a production capacity of 10.5 million tonnes of lignite per annum,
feeds lignite to Thermal Power Station-I (600 MW) and Thermal Power Station-I
Expansion (420 MW). This mine is spread over an area of 26.69 sq.km. with a reserve of
365 million tones. The lignite seam was first exposed in August 1961 and regular mining
of lignite commenced in May 1962. German excavation technology in opencast mining
using Bucket Wheel Excavators, Conveyors and Spreaders was used in the mine for the
first time in the country.

A huge reservoir of ground water occurs below the entire lignite bed, exerting an upward
pressure of 6 to 8 Kg/cm2 ; which is tackled by an effective ground water management
system. The overburden to lignite ratio in this mine is 5.5 – 5 m2 to one tonne (11 tonnes
of overburden is to be removed for mining 1 tonne of lignite). A systematic drilling and
blasting programme loosen the hard overburden strata, so that the bucket wheel excavator
can give the rated output.

2
THERMAL POWER STATION – I

The 600 MW Neyveli Thermal Power Station – I consists of six units of 50 MW
each and three units of 100 MW each. The first unit of this Power Station was
synchronized in May 1962 and the last unit in September 1970.

Some of the special features of this Power Station are:
 First lignite-fired Thermal Power Station in South East Asia
 First pit-head Thermal Power Station in India
 First Thermal Power Station in India with Soviet collaboration

The power generated from this Thermal Power Station is fed into the grid of Tamil Nadu
Electricity Board, which is the sole beneficiary.
Since all the units of this Power Station have served more than one lakh hours, Life
Extension Programme (LEP) was carried out between 1992 and 1999 in tandem, thus
extending the life by another fifteen years.

MINE-IA
Mine-IA is adjacent to the existing Mine-I block on the eastern side. The project
was commissioned in 2001. the total reserve in Mine-IA is 120 million tones in an area of
11.6 sq.km. The annual capacity of this mine is 3 miilion tones and lignite was first
exposed in March 2003. This mine feeds lignite to M/S ST-CMS, an independent Power
Project of 250MW and NLC’s Thermal Power Stations.

3
THERMAL POWER STATION – I EXPANSION

This Power station consists of two units of 210 MW each. The first unit of this
Power Station was synchronized on 21-10-2002 and the second unit on 22-7-2003. The
power generated from this Power Station is shared by Tamil Nadu, Kerala, Karnataka,
and Pondichery.

Some of the special features of this Power Station are:

 Fully automated Plant controlled by Distributed Digital Control Monitoring and
Information System (DDCMIS)
 Environment-friendly equipment and Dry Ash collection system
 Online Sulphur dioxide (SO2) Monotoring
 Oxides Nitrogen(NOX) Analysers

MINE-II
Mine-II with an annual production capacity of 10.5 million tonnes is spread over
an area of 26 sq.km with 390 million tones reserves. The lignite seam in Mine-II was first
exposed in September 1984 and the excavation of lignite commenced in March 1985. The
lignite excavated from this Mine meets the fuel requirement of Thermal Power Station-
II(1470MW). The method of mining and equipment used are similar to that of Mine-I.

THERMAL POWER STATION – II

The 1470 MW Second Thermal Power Station – II consists of 7 units of 210 MW each.
The Power Station was constructed in two stages as 630 MW and 840 MW. The first 210
MW unit was synchronized in March 1986 and the last unit was synchronized in June
1993.

4
Some of the special features of this Power Station are:

 Largest lignite-fired Thermal Station in Asia
 First and tallest tower type boiler in the country (92.7 m.height).
 First software based burner management system
 First hydrogen/hydrogen cooled generator of this size
 First boiler to be cleaned by hydrofluoric acid

The power generated from this Power Station is shared by all the Southern States, viz.,
Tamil Nadu, Kerala, Karnataka, Andra Pradesh and Pondicherry.

1.3. THERMAL POWER STATIONS:
There are two Thermal Power Stations fed with lignite by the three
open cast mines.
Thermal Power Station-I:
Consists of nine units, which include six units of 50MW and three
units of 100MW power each. Thus TS-I generates a total power of 600MW.
Thermal Power Station-II:
It comprises of stages I and II.
• Stage I consists of three units of 210MW power each. It
was erected by Trans Electro/ Franco Tosi.
• Stage II consists of four units of 210MW power each. It
was erected by BHEL.

5
1.4. THERMAL POWER STATION-II:
The TPS-II consists of seven numbers of 210MW units having an
installed capacity of 1470MW. Units 1, 2 and 3 were constructed in stage I
followed by the second stage units 4, 5, 6 and 7. Lignite for the station is supplied
from Mines-II having an annual capacity of 10.5 million tonnes. Unit I was
commissioned in March 1986 and commissioning of the 7th unit was carried out in
June 1993. Year after year Thermal Power Station II breaks production records.
The Southern states of Tamil Nadu, Kerala, Karnataka and Andhra Pradesh and the
union territory of Pondicherry are the beneficiaries of the power produced in the
power stations.

1.4.1. Fuel Handling System:

Even though lignite is the main fuel, Light Diesel Oil (LDO) and Low
Sulphur Heavy Stock (LSHS) are used during startup and shutting down when the
unit is in service at low loads for the oil flame stability in the furnace. Mines II
supplies lignite to TPS II at the rate of 10.5 million tonnes per annum through a
single belt conveyor. There is a stockyard capable of storing 2, 00,000 tones of
lignite. Lignite requirement per day per boiler is 5,000 tonnes and per day
requirement for the power station when all the units are running it is 35,000 tones.
Lignite from Mines II may be consisting of lumps up to a size of
600mm. Two spiked roll crushers are installed in a crusher house to bring down the
maximum size of lumps to 80mm to pass through the crushers and there by
preventing unnecessary overloading of crushers. A system of parallel conveyors
installed above the boilers bunkers is used for filling the boiler bunkers.

6
1.4.2. Water Treatment Plants:
Two water treatment plants, one for stage I with a capacity of 120
tones / hour and the other meant for stage II with a capacity of 160 tones / hour are
available. Demineralised water is prepared by using Ion-exchange process. 7 bore
well pumps, 4 meant for stage I and 3 for stage II supply raw water for the two
plants. Interconnections are available on raw water and treated watersides. Storage
tanks are also available for DM water in two plants. Treated water is supplied to
condensate storage tanks in boiler area.

1.4.3. Steam Generator:

The boilers are of natural circulation, single drum, membrane water
wall, pulverized lignite firing with tangential firing system, balanced draught,
tower type with dry bottom furnace. Its capacity is 690 tones / hour.
Two axial flow forced Draught fans supply air for combustion,
which is heated in two regenerative air pre-heaters. Steam coiled air pre-heaters are
used only during startup. Flue gas generated in furnace passes through Super
heaters, Re-heaters, Economizer, Electrostatic precipitator, two induced draught
fans and then chimney
An Electrostatic precipitator separates 99% of fly ash and thereby
reducing the air pollution problem to the nearest minimum. A hydro ash disposal
system with many pump houses uses low-pressure water for mixing and high-pressure
water for flushing. Slurry pumps take the ash slurry to two ash bunds. A slag conveyor
is installed below the boiler furnace, which handles the bottom ash.

7
1.4.4. Turbine:
Turbine has three cylinders namely High pressure (HP), Intermediate
pressure (IP) and Low pressure (LP). The turbine is also equipped with HP and LP
bypass systems for easy startup and shutdown of 60% capacity.
Electro hydraulic governing system is used to control the turbine
during startup, shutdown, normal running or any emergency. An oil system is used
to meet the lubricating oil needs and governing system oil needs.
Chlorination is done for circulating water to prevent algae growth. A
circulating water pump house supplies the circulating water through condenser and
cooling tower. Each unit has counter flow type natural draught, hyperbolic cooling
tower standing to a height of 124 meters with gigantic structures.

1.4.5 Electrical Systems:

Stage-I generators are hydrogen cooled. The generating voltage is
15kV, which is stepped up to 230kV. In stage-II, the generator has a stator water-
cooling system. Rotor and other parts are hydrogen cooled. The generating voltage
is 15.75kV, which is stepped up to 400kV. Static excitation is also employed. Two
hydrogen plants supply hydrogen for the generators. On 230kV, there are 10
feeders, on 400kV side there are 5 feeders. A switchyard control room regulated
the power flow. Each unit has a control room with elaborate protection, interlocks,
control circuits and instruments. Data acquisition system is employed in Stage-I
whereas Distributed Digital Control is available for Stage-II units.

8
2.0. INTRODUCTION TO 210 MW GENERATOR:
2.1. SALIENT FEATURES AND SPECIFICATION:
Active power = 210 MW
MVA rating = 247 MVA
Reactive power = 130 MVAR
Power factor = 0.85 lagging
Voltage = 15 kV
Current = 9507A
Frequency = 50Hz
Speed = 3000 rpm
Cooling system = hydrogen cooled
H2 pressure = 3.12 kg/cm2
Excitation voltage = 340V
Excitation current = 2854A
Generator volume = 54m3

STATOR:
The stator core consists of a series of laminations pressed by a hydraulic
press. It is treated to protect it from rust formation. The core is permanently
mounted in a flexible mounting. The copper strands which make up the armature
coils are transposed internally so that eddy currents are reduced. The main and
neutral leads are brought out through bushings in the generator frame. Temperature
detectors are located in the generator armature winding and in the gas passages.
The leads from these detectors are wired through the frame to the gas tight terminal
board.

9
ROTOR:
The windings are placed in radial slots in the rotor. Insulating cells are
first placed in the slots, and the coils are then assembled a half turn at a time.
Insulation between turns is provided by strips of glass laminate bonded to the
copper. The rotor winding is cooled by hydrogen by means of direct cooling
method. For protection against the effect of centrifugal force the winding is
secured in the slots by slot wedges.

RETAINING RINGS:
The rotor and turns are supported by high strength steel retaining rings
which are shrunk fit at the end of the rotor body. To facilitate assembly of the
retaining ring, it is heated and placed on the hot rotor. The shrink fit of the
retaining ring will decrease when the rotor is brought to speed. To prevent axial
motion of the retaining ring relative to the rotor body, a circumferential locked ring
is provided.

VENTILATION:
Circulation of the hydrogen is obtained by a blower mounted on the
turbine end of the shaft just outside the retaining ring. The blower is located
immediately after the cooler so that the gas temperature rise due to the blower
losses will not be added to the total temperature rise of the electrical components.
Cold gas leaving the coolers is carried by means of duct work to the opposite end
of the generator where it is introduced into the ventilating paths of the stator leads.
A portion of the gas leaving the cooler is led to the outer periphery of
the stator lamination. It enters radial ventilation passages distributed in the length
of the stator core. The gas passes over lamination and coil surfaces in the vent

10
passages and enters the air gap. It passes axially in the air gap to the blower at the
turbine end which is led to the gas cooler.
A portion of the cold gas leaving the coolers is also diverted by means
of baffles and ventilating passages through the rotor. Portion of this gas centers the
rotor at each end flowing through the ventilating passages provided in the rotor
winding itself and is then discharged into the air gap at the centre of the rotor
where it is drawn back to the blower and re-circulated through the cooler on 2 pole
rotor.

BEARINGS:
The spherical support seats, as well as the stop dowel, are insulated
from the bearing seat and insulation is provided between the top half of the bearing
and the bearing keeper. In addition, insulation is provided on both ends generator
to prevent shaft currents from flowing through the bearings.
H
YDROGEN GAS COOLERS:
The hydrogen is cooled by passing it through coolers where the gas
gives up its heat to the cooling water in the fine tubes of the cooler. The nozzle end
is bolted solidly to the generator frame while the top end is supported by a
diaphragm, which permits the cooler to move freely with temperature changes. The
top end is covered with a gas tight steel cover which must be removed to clean the
cooler tubes.

11
COLLECTOR RINGS:
D.C.excitation is delivered to the generator field by static exciter
through two collector rings. The collector rings are made up of tool steel. The rings
are provided with ventilating passages which give additional cooling surfaces and
also force the air to circulate in the immediate vicinity of the rings.

BRUSH HOLDER:
The collector ring brush holders are designed to permit changing
brushes with the use of tools. It is possible to change one brush at a time. A special
spring maintains a constant pressure on the brush for all the length of the normal
wear of the brush itself.

2.2. COOLING PROCESS:

The generator losses are dissipated as heat through stator and rotor
bodies. An efficient, ventilating system is needed to keep the temperature of the
windings resulting due to various losses below certain limits depending upon
insulation. Also the demand for increased output from a single generator
necessitated improved methods of cooling to keep the size of the generator with in
the reasonable limits, to minimize losses and to improve efficiency of generator.
The primary cooling medium is air or hydrogen, which in turn is passed through a
water cooled heat exchanger (gas cooler). Building of air cooled turbo generators
above 50 MW rating presented serious ventilation difficulties, not only in
circulating requisite quantity of air through the machine, but also because the high
fan power required to circulate the air.
The cooling system shall also ensure that no excessive hot spots occur at
windings/core. As the single largest loss in the generator is the windage loss, the

12
air must be replaced with a lighter gas. Hydrogen has a great advantage that its
density at atmosphere pressure is only 1/14th of that of air. So, windage loss can be
reduced in the same ratio. Because of many other properties like specific heat,
density, thermal conductivity etc., hydrogen is widely used as coolant in large
turbo-alternators.

2.3. ADVANTAGESOF HYDROGEN COOLING:
1) Windage and ventilating losses are reduced due to the low gas density.
2) An increased output per unit volume of active material because of the high
thermal conductivity and high heat transfer co-efficient of hydrogen.
3) The life of the insulation on the stator winding is increased because of the
absence of oxygen, moisture and the corona discharge.
4) The reduction of windage noise, dirt and moisture because of lesser density
of gas and closed recirculation.
5) Because of the hydrogen atmosphere inside the generator, the chances of fire
are reduced as hydrogen cannot support combustion or oxidization.

13
2.4. GENERATION OF HYDROGEN:
INTRODUCTION:
o Hydrogen is obtained from water by the process of electrolysis.
o Pure water possesses least conductivity, so NaOH solution is added to
water to form the required electrolytic solution.
o The electrolyte solution is in ionized form. (H+ and OH- ions).
o By applying electrical potential, ions move towards the opposite
electrodes.

ELECTROLYSIS PROCESS:

NaOH → Na+ + OH-
H2O → H+ + OH-
H+ + e- → H◦
H◦. +H◦ →. H2
2OH-+2e- → O◦. +H2O
O◦+O◦. → O2
At cathode, the H+ ion discharges itself from water and become hydrogen atom. At
anode, the OH- ions discharges its excess electrons and forms oxygen atom. The
discharged electron from the anode flow to the cathode through external circuit.

14
2.5. HYDROGEN GAS SYSTEM:

HYD ROGEN
M ANIF OLD

COLLEC TOR TURBINE
END EN D

CARBON DI-OXIDE
MANIFOLD

HYDROGEN
COOLER

PRESSUR E
GAS
RED UCER
DRIER

C AR BON DI-OXIDE
HYDROGEN SUPPLY
SUPPLY

Fig 2.1 HYDROGEN GAS SYSTEM

15
Hydrogen treatment plant supplies hydrogen to the generator for cooling
purpose. The hydrogen gas is transferred in cylinders at a pressure of 150 kg/cm2.
The pressure is reduced to 3.5 kg/cm2 and supplied at the top portion of the
generator. The generator gets heated up due to various losses and the huge amount
of current flowing through the stator. Hydrogen absorbs the heat generated and in
turn, it gets heated up. The hydrogen gas is now termed as the “HOT GAS”. The
air blower (fan) collects the hot gas and forces it towards the cooler (fig 2.1).
Two vertical coolers are being placed at the turbine end. The cooler
consists of many tubes through which chill water flows. The hot gas passes
through the coolers and gets cooled. Once the gas is cooled, it is being termed as
“COLD GAS”. The chill water, flowing in the tubes, inside the cooler, is being
controlled by two valves (70% valve and 30% valve). The 30% valve is an auto
valve which is controlled by using a microprocessor. The 70% valve is being
controlled manually.

16
3.0 COLD GAS MANAGEMENT SYSTEM:

F i e l d m o d u l e @ 4 .5 M L E RVS E4L8 5 R S 485

R S 232 R S 232

H y d ro g en p r
O pen cm d
H y d r . te m p P C B ased
C lo s e c m d m o n ito r in g a n d c o n tr o l
S e a l o il p r A R e la y m im ic p a n e l
C B o o s te r p u m p o n
V o lta g e s ig n a l D I 2C BUS M o d u le
M v a r .D e c . c m d

M v a r .in c . c m d

M a tr ix K e y P a d
U C B @ 15 M L E V E L
POW ER
SUPPLY

D i s tr ib u te d c o n t r o l f o r c o ld g a s m a n a g e m e n t s y s te m

17
3.1 CIRCUIT LOGIC:
i. If the cold gas temperature ‘T’ is less than 44°C, NORMAL
operation is performed.
ii. If the cold gas temperature lies between 44°C and 45°C, then
the relays
get energized and they operate the 70% and 30% valves which control
the amount of chill water flowing inside the cooler.
iii. If the cold gas temperature reaches 45°C, then a hydrogen
cooler booster pump is started which increases the rate of flow of
cooling water and improves cooling process.
iv. Further increase in cold gas temperature (50°C) is being
controlled by
controlling MVAR and voltage.
v. If ‘T’ still continues to increase, a load reduction request is sent.
vi. If all the above measures fail in controlling the cold gas temperature i.e.
if the temperature reaches 51°C, then the unit should be tripped.

18
19
3.2 VB EXPLANATION:

The above figure is the VB platform for the cold gas management.
This figure contains the over view of the whole equipments (i.e.) generator, booster
pumps, Temperature, voltage, MVAR readings, etc.

In the kit using matrix keyboard the values of the set temperature,
high temperature, very high temperature, trip temperature are entered these
readings are displayed in the LCD display and also in VB platform.

In the kit using potentiometer we can vary the temperature, voltage
and MVAR readings. The variations are seen VB screen ,while varying the
temperature potentiometer if the temperature exits the set temperature it indicates
high temperature. Future increasing the temperature while reaching very high
temperature the booster pumps automatically starts. Thus temperature reduces if
not and further increases around the 52° the unit is tripped.
To avoid that unit tripping load reduction is requested, also we can
reduce the MVAR rating by the commands or manually by switch. S o reduction in
reactive power automatically temperature of hydrogen reduces. The MVAR
reduction is done only to a particular limit further deceasing to a particular value it
shows action denied in the VB screen.
Hence these all factors all considered to maintain the hydrogen
temperature to be constant around 42°C for normal and safe operation .Any drastic
change occurs it affects the system and leads to unit tripping to avoid major
accidents or damages.

20
3.3 CIRCUIT DIAGRAM:

+12V
F IE LD M ICR O CO NT R O LLE R M O D U LE
R L1

U LN +
2803
+
1 N 40 0 7 40
TO LO C AL F E E D BA CK S
C O N TRO L 1 39
C IR C U ITS F E E D BA CK S
+12V 2 38

R L8 3 37 F E E D BA CK S

4 36 F E E D BA CK S

5 35
BU CH A CT
6 34
P R.RL .A CT
+ 1 N 40 0 7 7 33

8 32

9 H ydr.tem p
1 0 M FD 1 1 .0 5 4 9 2
M HZ H ydrogen pr
2X 3 3P F 89C52
Seal oil pr
1N4007 8 .2 K
18 V oltage signal
19
+
10M F D

1 16
+

8 RO 1 RX D
10 2 15
7B RE 2 10K
TO U N IT 3 14
C O N TR O L 6A DE 3 17
RO O M 4 13
5 D1 4 3X 10K A DC
11 31 5 12
+
6 11
11
20 7 10
21 20 8 9
M at rix
K ey P ad 22
25
23
26
17 1 6 1 5 1 4

F ield prog ram m a ble co ld g as m ana gem en t system

21
3.4. POWER SUPPLY MODULE:

The power supply module consists of
1) +5 V regulated power supply using positive voltage regulator IC 7805.
2) +12 V regulated power supply using positive voltage regulator IC 7812.
3) +1.5 to +18 V variable regulated power supply using positive voltage
regulator IC LM317.
All the regulated power supply circuits (fig 4.3) are designed to deliver maximum
current of 500 mA. A 230V/15V transformer with current rating of 1A is used. The
bridge rectifier circuit is formed with four silicon power diodes of 1A current
rating. An electrolytic Capacitor C1 of 2200MFD / 25V rating is provided at the
output of the rectifier circuit as filter. 0.1MFD/100V capacitors are provided in the
circuit to bypass the high frequency components of the rectified voltage. Capacitor
C3 470MFD/25V is provided at the output of the regulator to further smoothen the
output. Regulated output availability is indicated by LEDs.
Voltage regulators are also available in circuit configurations that allow
the user to set the output voltage to a desired value. The LM317, for example, can
be operated with the output voltage regulated at any setting over the range of
voltage from 1.2V to 37V. Regulator ICs 7805 and 7812 are provided whose
advantages are

 The ripple voltage is of the order of few milli-volts.

 Internal fold-back current limiting.

 Thermal shut-down.

22
1) +5 V REGULATED POWER SUPPLY
+5V REGULATED POWER SUPPLY USING IC ‘7805’
230V/15V@1A
TRANSFORMER
Ph 4X1N4007 C1 C2 C3 C4 +5V
1 7805 3
230VAC 2 3.3K
INPUT

N
E
2200 MFD 0.1MFD 0.1MFD 470 MFD
25V 100V 100V 10V

2) +12 V REGULATED POWER SUPPLY

+12V REGULATED POWER SUPPLY USING IC ‘7812’
230V/15V@1A
TRANSFORMER
Ph 4X1N4007 C1 C2 C3 C4 +12V
1 7812 3
230VAC 2 8.2K
INPUT

N
E
2200 0.1MFD 0.1MFD 470 MFD
MFD 100V 100V 25V
25V
3) +1.5 to+18V VARIABLE POWER SUPPLY

23
+1.5V TO +18V VARIABLE POWER SUPPLY USING IC ‘LM317’
230V/15V@1A
TRANSFORMER 4X1N4007 C1 C2 C3 C4 +1.5V
Ph 3 LM317 2 TO
+18V
1 220E
230VAC R1 4.7K
INPUT

N R2
E 10K

2200 MFD 0.1MFD 0.1MFD 470 MFD
25V 100V 100V 25V

FIG 4.3 POWER SUPPLY MODULE

LIST OF COMPONENTS
1. Transformer 230V/15V@ 1A.
2. Diodes 1N4007
3. Fixed Regulators IC 7805, IC 7812
4. Variable Regulator IC LM317
5. LEDs (Blue,White,Red) (3 mm )

6. Resistors 220Ω , 1K, 3.3K & 8.2K ( ¼ W)

7. Variable Resistor 10K ( ¼ W)

8. Capacitor 0.1 µ F / 100V

9. Capacitor 470 µ F / 25V

10. Capacitor 2200 μF / 25 V

24
3.5 RELAY MODULE:
A relay is an electrically operated switch. A MOVING N/C
CONTACT N/O
simple relay consists of a coil, a moving contact, and

two fixed contacts. The coil when energized by a DC DC
COIL
SUPPLY
source attracts the moving contact. The two fixed

contacts are known as N/O and N/C (fig 4.4) FIG 4.4
A)Simple
Simple Relay
relay

The contact which is open when the coil is in de-energized condition is known as

normally open or N/O contact. And the contact which is in closed condition is

known as normally closed or N/C contact. The contacts can make and break at

much higher voltage and current than that of the coil.

The following circuit (fig 4.5) shows how the availability of a DC source

can be indicated by lamps operated at different voltage using a relay.

B) Indicator lamp circuit
110AC 110AC
(Ph) (Ph)

R G R G

12V 12V

Relay de-energised condition Relay energised condition

FIG 4.5 INDICATOR LAMP CIRCUIT

25
In general Red lamp indicates that the supply is available and Green colour
indicates its failure.

FIG 4.6 ULN2003 PIN DIAGRAM

4.0. MICRO-CONTROLLER AT89C52:

4.1. FEATURES:
 Programmable Watchdog Timer Compatible with MCS-51 TM
Products.
 8K Bytes of In-System Reprogrammable Downloadable Flash
Memory.
 Endurance: 1,000 Write/Erase Cycle.
 2K Bytes EEPROM.
 4V to 6V Operating Range.
 Fully Static Operation: 0Hz to 24MHz.
 Three-Level Program Memory Lock.

26
 256 x 8-bit Internal RAM.
 32 Programmable I/O Lines.
 Three 16-bit Timer/Counters.
 Eight Interrupt Sources.
 Programmable UART Serial Channel.
 SPI Serial Interface.
 Low Power Idle and Power Down Modes.
 Interrupt Recovery from Power Down.
 Dual Data Pointer.
 Power off Flag.

4.2. DESCRIPTION:
The AT89C52 is a low-power, high-performance CMOS 8-bit
microcomputer with 8K bytes of Downloadable Flash programmable and erasable
read only memory and 2K bytes of EEPROM. The device is manufactured using
Atmel’s high-density non-volatile memory technology and is compatible with the
industry standard 80C51 instruction set and pin out. The on-chip Downloadable
Flash allows the program memory to be reprogrammed in-system through an SPI
serial interface or by a conventional nonvolatile memory programmer. By
combining a versatile 8- bit CPU with Downloadable Flash on a monolithic chip,
the Atmel AT89C52 (fig 5.1) serves as a powerful microcomputer which provides
a highly flexible and cost effective solution to many embedded control
applications. In addition, the AT89C52is designed with static logic for operation

27
down to zero frequency and supports two software selectable power saving modes.
The Idle Mode stops the CPU while allowing the RAM, timer/counters, serial port,
and interrupt system to continue functioning. The Power down Mode saves the
RAM contents but freezes the oscillator, disabling all other chip functions until the
next interrupt or hardware reset.

28
4.3 BLOCK DIAGRAM:

29
FIG 5.1 BLOCK DIAGRAM
4.4. PIN DIAGRAM:

30
FIG 5.3 89C52 PIN DIAGRAM
4.4 PIN DETAILS:
Port 0:
Port 0 is an 8-bit open drain bi-directional I/O port. As an output port, each
pin can sink eight TTL inputs. When 1s are written to port 0 pins, the pins can be

31
used as high impedance inputs. Port 0 can also be configured to be the multiplexed
low order address/data bus during accesses to external program. Port 0 also
receives the code bytes during Flash programming and outputs the code bytes
during program verification. External pull-ups are required 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 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. Port 2 also receives the high-order
address bits and some control signals during Flash Programmable 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. Port 3 also receives some control
signals for Flash programming and verification.

Table 5.1 PORT Details

32
RST:
A high on this pin for two machine cycles while the oscillator is running
resets the device.

ALE/PROG:
Address Latch Enable is an output pulse for latching the low byte of the
address during access to external memory. This pin is also the program pulse input
(PROG) during Flash programming. In normal operation, ALE is emitted at
constant rate of 1/6 the oscillator frequency and may be used for external timing or
clocking purposes.

PSEN:
Program Store Enable is the read strobe to external program memory. When
the AT89C52 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.

33
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. This pin also receives the 12-volt programming enable
voltage (VPP) during Flash programming when 12-volt programming is selected.

XTAL1:
Input to the inverting oscillator amplifier and input to the internal clock
operating circuit.

XTAL2:
Output from the inverting oscillator amplifier.

4.5. ADVANTAGES OF 89C52:
 Flash memory for program storage.
 89C52 has on-chip resources to achieve a higher level of integration and
reliability at a lower cost.
 Flash memory modules provides greater flexibility with regard to field
programmability
 FLASH modules are electrically erasable.

5.0 A/D CONVERTER 8591

34
5.1 FEATURES:
• Single power supply.
• Operating supply voltage 2.5V to 6V.
• Low standby current.
• Four channel ADC.
• Serial communication is used.
• Inter Integrated Circuit is one of the protocols for serial
communication.
• 8-bit successive approximation A/D conversion.

5.2. GENERAL DESCRIPTION:
The PCF 8591 is a single-chip, single-supply low power eight bit
CMOS Data Acquisition device with 4 analog inputs, 1 analog output and I2C bus
interface. Three address pins A0, A1 and A2 are used for programming the
hardware address, allowing the use of the up to eight devices connected to I2C-bus
without additional hardware. Address, allowing the use of up to eight devices is
transferred serially via the two-line bi-directional I2C-bus. The function of the
device includes analog input multiplexing, on-chip track and hold function, eight-
bit A/D conversion and eight-bit D/A conversion. The maximum conversion rate is
given by the maximum speed of the I2C.

5.3. INTERNAL BLOCK DIAGRAM 8591:

35
FIG 6.1 BLOCK DIAGRAM

5.4. FUNCTIONAL DESCRIPTION:
Each PCF 8591 device is sending a valid address to the I 2C bus
system. The address consists of fixed part and the programmable part. The
programmable part must be set according to the address pins A0, A1 and A2. The
address always has to be sent as the first byte after the start condition in the I2C-bus
protocol.
The last bit of the address bit is the read/write bit, which sets the direction of
the following data transfer. The second byte sent to a PCF8591 device (fig 6.1)
will be stored in its control register and is required to control the device function.

36
5.4.1. OSCILLATOR:
An on-chip oscillator generates the clock signal required for the A/D
conversion cycle and for refreshing the auto-zeroed buffer amplifier.

5.4.2 CHARACTERISTICS OF THE I2C-BUS:
The I2C-bus is for bi-directional two-line communication between
different ICs or modules. Two lines are a serial data line (SDA) and a serial clock
line (SCL). Both lines must be connected to a positive supply via a pull-up resistor.
The number of devices connected to the I2C-bus is decided by the maximum
allowable capacitance on the line. It is a multi-master bus where more than one
device can control the bus.

5.4.3 I2C-BUS PROTOCOL:
After a start condition a valid hardware address has to be sent to a
PCF8591 device. The read/write bit defines the direction of a single or multiple
byte data transfer. The format and timing of the start condition(s), the stop
condition (P) and the acknowledge bit (A) are carried out. In the write mode,
sending either a stop condition or start condition of the next data transfer
terminates the data transfer. The bus has high noise immunity, low current
consumption and it is extremely cheap.

37
5.5 PIN DIAGRAM:

FIG 6.2 PIN DIAGRAM

5.5.1. PIN DESCRIPTION:
The PCF 8591 is a serial ADC, which is a 16 pin IC (fig 6.2).

Analog Inputs:
The ADC PCF 8591 has four analog inputs namely,
• AIN0 Analog input 0
• AIN1 Analog input 1
• AIN2 Analog input 2
• AIN3 Analog input 3

Hardware Address:
The ADC uses A0, A1 and A2 that is pin 5, 6 and 7 are used to address the
device from 000 to 111 (0 to 7). Totally eight ADC’s can be connected in the 2
pins.

TABLE 6.1 PIN DETAILS

38
Vss:
The pin number 8 is given as Vss. The Vss is the negative supply given to the
ADC PCF 8591.

SDA:
The SDA is Serial Data, which is used to transfer the digital data to the
micro controller or to receive the digital data when it is used as ADC and DAC
respectively.

SCL: The SCL is the Serial Clock, which transfers the clock signal to the micro
controller serially. Pin number 10 is used as SCL.
OSC:

39
Pin 11 is OSC, is the oscillator in which the clock signal can be given as
input or taken as output.

EXT:
The EXT is a switch to say whether the oscillator is internal or external
oscillator, which is given by pin number 12.

AGND:
Pin number 13 is given as Analog ground, which is used when the PCF act
as DAC.

VREF:
The voltage range of the ADC is varied according to the V REF. If the VREF is
2.5, the range is 0 to 5volt. Pin 14 is VREF.

AOUT:
This pin is used when the PCF 8591 is used as DAC.

VDD:
The VDD is used as the positive supply, which is given as 5 volts.

5.6. APPLICATIONS:
• Closed loop control systems.
• Low power converter for remote data acquisition.
• Battery operated equipment.
• Acquisition of analog values in automatic, audio and TV applications.

40
6.0. LIQUID CRYSTAL DISPLAY:
Liquid crystal display (LCD) is the technology used for displays in small
computers. LCDs allow displays to be much thinner than cathode ray tube (CRT)
technology. LCDs consume much less power than LED and gas-displays because
they work on the principle of blocking light rather than emitting it.

6.1. PIN DETAILS:
TABLE 7.1 PIN DETAILS
PINS OPERATION
Pin 1 Ground
Pin 2 VCC
Pin 3 Contrast
Pin 4 Read
Pin 5 Write
Pin 6 Enable
Pin 7 Data 0
Pin 8 Data 1
Pin 9 Data 2
Pin 10 Data 3
Pin 11 Data 4
Pin 12 Data 5
Pin 13 Data 6
Pin 14 Data 7
Pin 15 VCC for Backlight
Pin16 Ground for Backlight

41
7.0. SERIAL COMMUNICATION (RS232):
RS232 (Recommended standard - 232) is a telecommunication
standard for binary serial communication between devices. The devices are
commonly referred to as a DTE (data terminal equipment) and DCE (data
communications equipment). A DTE may be a computer which has a male
connector. A DCE may be a modem which has a female connector.
The pins available in RS232 are TXD (Transmitted data), RXD
(Received data), RTS (Request to send), DTR (Data terminal ready), DSR (Data
set ready), CTS (Clear to send), DCD (Carrier detect) and RI (Ring indicator). This
is a data communication standard for short distance and moderate data rates. It
supplies the roadmap for the way devices speak to each other using serial ports.

42
8.0 PROGRAM

/********************************************** PROJECT TITLE
***********************************/
/*FIELD PROGRAMABLE COLD GAS MANAGEMENT SYSTEM*/

/*********************************************** PRE PROCESSOR
***********************************/

#include<reg51.h>
//#include<stdio.h>

/*********************************************** DEFENITIONS
*************************************/

#define time 1000
#define ACK 0
#define NACK 1

/********************************************** FUNCTION
DECLARATION *********************************/

void delay();
void delay1(int);

void intro();
void intro1();
void intro2();
void intro3();
void intro4();
void intro5();
void intro6();
void intro7();

void intro8();
void intro9();
void intro10();
void intro14();
void intro15();

43
void intro16();
void intro17();
void intro18();
void intro19();
void intro20();
void intro21();

void calls();
void calld();
void init();

void display(int,bit);

void start();
void stop();
void write(int);
int read(unsigned char);
int load(int);
void delayee();

void clear();
void parents();
unsigned char keypad();
void enter_value(unsigned char);

void split(int);
/*************************************** PORT PIN DECLARATION
*******************************/

sbit relay1 = P1^0;
sbit relay2 = P1^1;
sbit relay3 = P1^2;
sbit relay4 = P1^3;
sbit relay5 = P1^4;
sbit relay6 = P1^5;
sbit relay7 = P1^6;
sbit relay8 = P1^7;

44
sbit lcdrs = P2^6;
sbit lcdck = P2^7;

sbit scl = P2^5;
sbit sda = P2^4;

/**************************************** DISPLAY ARRAY
DECLARATION ***********************************/
code char text[] = {" COLD GAS MGMT "};
code char text11[] ={"AND MVAR CONTROL"};

code char text1[] = {"C.G.TEMP NORMAL "};
code char text2[] = {" CLOSE COMMAND "};
code char text3[] = {" OPEN COMMAND "};
code char text4[] = {"BOOSTER PUMP->ON"};
code char text5[] = {" TEMP HIGH "};
code char text6[] = {" TEMP VERY HIGH "};
code char text7[] = {"TRIPPED ON PROT."};

code char text8[] = {"ENTER SET VALUE "};
code char text9[] = {"ENTER B.P COND. "};
code char text10[] = {"ENTER H.TMP COND"};
code char text14[] = {"ENTER VH.TMP CON"};
code char text15[] = {"ENTER TRIP COND."};

code char text16[] = {" MVAR CONTROL "};

code char text17[] = {" MVAR LOW COMM "};
code char text18[] = {"MVAR DEC DENIED "};
code char text19[] = {"MVAR RAISE COMM "};
code char text20[] = {"MVAR INC DENIED "};

code char text21[] = {" COLD GAS MGMT "};

code char text12[] ={"DEDICATED TO OUR"};
code char text13[] ={"PARENTS & STAFFS"};

45
/********************************* GLOBAL VARIABLE
DECLARATION **************************/

unsigned char temp[3];

int set_value, bpump_value, thigh_value, tvhigh_value, trip_value;

sbit ch_select= P3^1;

//sbit low = P3^2;
//sbit high = P3^3;
bit low,high;
bit auto_mode, open, close, booster;

/************************************* MAIN ROUTINE
****************************************/
Void main ()
{

int actual;
unsigned char value;
bit channel=0;
int lt,mv;

IE = 0x92;
relay1 = 0;
relay2 = 0;
relay3 = 0;
relay4 = 0;
relay5 = 0;
relay6 = 0;
relay7 = 0;
relay8 = 0;

lcdrs =0;
lcdck =0;
scl =0;
sda =0;

46
parents();
delay1(1500);
intro();
delay1(1500);
clear();
while(1)
{

if(ch_select == 0)
{
while(ch_select==0);
channel=!channel;
if(channel==0)
{
P0=0x80;
calls();
intro21();
delay1(300);
clear();
}
else
{
P0=0x80;
calls();
intro16();
delay1(300);
clear();
}

}

47
//printf("keypad:%d",(int)value);
if(value==15)
{
enter_value(1);

enter_value(2);

enter_value(3);

enter_value(4);

enter_value(5);
}

txs('A');
serial_display(set_value);
delay1(10);
txs('B');
serial_display(actual);
delay1(10);
txs('C');
serial_display(lt);
delay1(10);
txs('D');
serial_display(mv);
delay1(10);

if(channel==0)
{

P0=0xc0;
calls();
P0=0x53;
calld();
P0=0x54;
calld();
P0=0x3a;
calld();
display(set_value,1);

48
P0=0xc8;
calls();
P0=0x43;
calld();
P0=0x47;
calld();
P0=0x54;
calld();
P0=0x3a;
calld();
display(actual,1);
}

else
{
P0=0xc0;
calls();
P0='L';
calld();
P0='T';
calld();
P0=':';
calld();
display(lt,0);
P0=0x56;
calld();

P0=0xc8;
calls();
display(mv,0);
P0=0x20;
calld();
P0=0x56;
calld();
P0=0x41;
calld();
P0=0x52;

49
calld();
}

if(set_value==actual)
{
//relay1=1;
if(channel==0)
{
intro1();
delay1(300);
}
}

if(set_value>actual)
{

if(auto_mode==0)
{
txs('E');
delay1(10);
relay1=1;
delay1(100);
relay1=0;
}

if(channel==0)
{
intro2();
delay1(300);
}
}
else
{
relay1=0;
txs('F');
delay1(10);
}

50
if(actual>set_value&&actual<bpump_value)
{

if(auto_mode==0)
{
txs('G');
delay1(10);
relay2=1;
delay1(100);
relay2=0;
}

if(channel==0)
{
intro3();
delay1(300);
}
}
else
{
relay2=0;
txs('H');
delay1(10);
}

if((actual>=bpump_value)&&(actual<trip_value))
{

if(auto_mode==0)
{
txs('I');
delay1(10);
relay3=1;
}

if(channel==0)
{
intro4();
delay1(300);

51
}

if((actual>=thigh_value)&&(actual<trip_value))
{
txs('K');
delay1(10);
relay4=1;

if(actual>=tvhigh_value&&actual<trip_value)
{
relay5=1;
if(channel==0)
{
intro6();
delay1(300);
}
}
else
{
relay5=0;
if(channel==0)
{
intro5();
delay1(300);
}
}
}
else
{
relay4=0;
txs('L');
delay1(10);
}
}
else
{
if(actual<bpump_value)
{
txs('J');
delay1(10);

52
relay3=0;
relay4=0;
relay5=0;
}
}

if(actual>=trip_value)
{
txs('M');
delay1(10);
relay6=1;
if(channel==0)
{
intro7();
delay1(300);
}
}
else
{
relay6=0;
txs('N');
delay1(10);
}

if(lt<=390)
{
txs('U');
delay1(10);
}
else
{
txs('V');
delay1(10);
}

if(mv>135)
{
txs('W');

53
delay1(10);
}
else
{
txs('X');
delay1(10);
}

if(low==1)
{
low =0;
if(channel!=0)
{
intro17();
delay1(300);
}
if(lt>390)
{
txs('O');
delay1(10);
relay7=1;
}
else
{
txs('Q');
delay1(100);
relay7=0;
if(channel!=0)
{
intro18();
delay1(300);
}
}
}
else
{
relay7=0;
txs('Z');
delay1(10);

54
}

if(high==1)
{
high =0;
if(channel!=0)
{
intro19();
delay1(300);
}
if((lt<450)&&(mv<135))
{
txs('R');
delay1(10);
relay8=1;
}
else
{
txs('S');
delay1(10);
relay8=0;
if(channel!=0)
{
intro20();
delay1(300);
}
}
}
else
{
relay8=0;
txs('T');
delay1(10);
}

if(auto_mode==1)
{
if(open ==1&&close == 0)
{

55
txs('E');
delay1(10);
relay1=1;
}
else
{
relay1=0;
txs('F');
delay1(10);
}

if(open ==0&&close == 1)
{
txs('G');
delay1(10);
relay2=1;
}
else
{
relay2=0;
txs('H');
delay1(10);
}

if(open ==0&&close == 0)
{
relay1 = 0;
relay2 = 0;
}

if(booster)
{
txs('I');
delay1(10);
relay3=1;
}
else
{
txs('J');
delay1(10);

56
relay3=0;
}

}

}

}

/************************** BEGNING OF SUB ROUTINE(FUNCTIONS)
**************************/

void enter_value(unsigned char type)
{
unsigned char loc_value,loc_flag=0;

P0 = 0x01;
calls();
//printf("\n set_value: %d",(int)set_value);
switch(type)
{

case 1: intro8();
split(set_value);
break;

case 2: intro9();
split(bpump_value);
break;

case 3: intro10();

57
split(thigh_value);
break;

case 4: intro14();
split(tvhigh_value);
break;

case 5: intro15();
split(trip_value);
break;
}
/*for(i=0;i<=2;i++)
{
printf("\n temp[%d]: %d",(int)i,(int)temp[i]);

} */
P0=0xc0;
calls();
P0 = 0x0e;
calls();

if(temp[0]!=255)
{
P0=0xc0;
calls();
P0 = temp[0]+0x30;
calld();
}
else
{
P0=0x20;
calld();
}
if(temp[1]!=255)
{
P0=0xc1;
calls();
P0 = temp[1]+0x30;
calld();
}

58
else
{
P0=0x20;
calld();
}

P0 = 0xc2;
calls();
P0 = 0x2e;
calld();

if(temp[2]!=255)
{
P0=0xc3;
calls();
P0 = temp[2]+0x30;
calld();
}
else
{
P0=0x20;
calld();
}
P0=0xc0;
calls();

do
{
loc_value = keypad();
//printf("\n loc_flag: %d",(int)loc_flag);

if(loc_value>=0&&loc_value<=9)
{
if(loc_flag>=0&&loc_flag<=3)
{
switch(loc_flag)
{
case 0: temp[0] =
loc_value;break;

59
case 1:
temp[1] = loc_value;break;
case 3: temp[2] =
loc_value;break;
}
//temp[loc_flag] = loc_value;
P0 = 0xc0+loc_flag;
calls();
P0 = loc_value+0x30;
calld();

if(loc_flag>=0&&loc_flag<3)
loc_flag++;
if(loc_flag==2)
loc_flag=3;
}
}
if(loc_value==10)
{
if(loc_flag>=0&&loc_flag<3)
loc_flag++;
if(loc_flag==2)
loc_flag=3;

}
if(loc_value==11)
{
if(loc_flag>0&&loc_flag<=3)
loc_flag--;
if(loc_flag==2)
loc_flag=1;

}
if(loc_value==12)
{
if(loc_flag!=2)
{
temp[loc_flag]=0xff ;
P0 =0xC0+loc_flag;
calls();

60
P0 = 0x20;
calld();
}
}
P0 = 0xC0+loc_flag;
calls();
//printf("\n loc_value:%d",(int)loc_value);
}while(loc_value!= 14);
/* for(i=0;i<=2;i++)
{
//printf("\n temp[%d]: %d",(int)i,(int)temp[i]);

} */

switch(type)
{
case 1: set_value =
temp[0]*100+temp[1]*10+temp[2];break;

case 2: bpump_value =
temp[0]*100+temp[1]*10+temp[2];break;

case 3: thigh_value =
temp[0]*100+temp[1]*10+temp[2];break;

case 4: tvhigh_value =
temp[0]*100+temp[1]*10+temp[2];break;

case 5: trip_value =
temp[0]*100+temp[1]*10+temp[2];break;
}
//printf("\n set_value: %d",(int)set_value);
P0 = 0x01;
calls();

}

61
/******************************* DELAY ROUTINE
************************************/

void delay()
{
int i;
for(i=0;i<50;i++);
}

void delay1(int no)
{
int i,j;
for(j=0;j<no;j++)
for(i=0;i<200;i++);
}

/************************************ DISPLAY ROUTINE
***********************************/

void init()
{
P0=0x0c;
calls();
delay();
P0=0x01;
calls();
delay();
P0=0x38;
calls();
}

void calls()
{

62
lcdrs=0;
delay();
lcdck=1;
delay();
lcdck=0;
delay();
}

void calld()
{
lcdrs=1;
delay();
lcdck=1;
delay();
lcdck=0;
delay();
}

void display(int val,bit dot)
{
int val1,val2,val3,val4;
val1 = val/100;
P0 = val1+0x30;
calld();
val2 =(val-val1*100);
val3 = val2/10;
P0 = val3+0x30;
calld();
if(dot==1)
{
P0=0x2e;
calld();
}
val4 = (val2-(val3*10));
P0 = val4+0x30;
calld();
}

void intro()
{

63
int i;
P0 = 0x80;
calls();
delay();
for(i=0;i<=15;i++)
{
P0=text[i];
calld();
delay();
}
P0=0xc0;
calls();
for(i=0;i<=15;i++)
{
P0=text11[i];
calld();
delay();
}
}

void intro1()
{
int i;
P0 = 0x80;
calls();
delay();
for(i=0;i<=15;i++)
{
P0=text1[i];
calld();
delay1(1);
}
}

void intro2()
{
int i;
P0 = 0x80;
calls();
delay();

64
for(i=0;i<=15;i++)
{
P0=text2[i];
calld();
delay1(1);
}
}

void intro3()
{
int i;
P0 = 0x80;
calls();
delay();
for(i=0;i<=15;i++)
{
P0=text3[i];
calld();
delay1(1);
}
}

void intro4()
{
int i;
P0 = 0x80;
calls();
delay();
for(i=0;i<=15;i++)
{
P0=text4[i];
calld();
delay1(1);
}
}

void intro5()
{
int i;

65
P0 = 0x80;
calls();
delay();
for(i=0;i<=15;i++)
{
P0=text5[i];
calld();
delay1(1);
}
}

void intro6()
{
int i;
P0 = 0x80;
calls();
delay();
for(i=0;i<=15;i++)
{
P0=text6[i];
calld();
delay1(1);
}
}

void intro7()
{
int i;
P0 = 0x80;
calls();
delay();
for(i=0;i<=15;i++)
{
P0=text7[i];
calld();
delay1(1);
}
}

void intro8()

66
{
int i;
P0 = 0x80;
calls();
delay();
for(i=0;i<=15;i++)
{
P0=text8[i];
calld();
delay1(1);
}
}

void intro9()
{
int i;
P0 = 0x80;
calls();
delay();
for(i=0;i<=15;i++)
{
P0=text9[i];
calld();
delay1(1);
}
}

void intro10()
{
int i;
P0 = 0x80;
calls();
delay();
for(i=0;i<=15;i++)
{
P0=text10[i];
calld();
delay1(1);
}
}

67
void intro14()
{
int i;
P0 = 0x80;
calls();
delay();
for(i=0;i<=15;i++)
{
P0=text14[i];
calld();
delay1(1);
}
}

void intro15()
{
int i;
P0 = 0x80;
calls();
delay();
for(i=0;i<=15;i++)
{
P0=text15[i];
calld();
delay1(1);
}
}

void intro16()
{
int i;
P0 = 0x80;
calls();
delay();
for(i=0;i<=16;i++)
{
P0=text16[i];
calld();
delay1(1);

68
}
}

void intro17()
{
int i;
P0 = 0x80;
calls();
delay();
for(i=0;i<=17;i++)
{
P0=text17[i];
calld();
delay1(1);
}
}

void intro18()
{
int i;
P0 = 0x80;
calls();
delay();
for(i=0;i<=15;i++)
{
P0=text18[i];
calld();
delay1(1);
}
}

void intro19()
{
int i;
P0 = 0x80;
calls();
delay();
for(i=0;i<=15;i++)
{
P0=text19[i];

69
calld();
delay1(1);
}
}

void intro20()
{
int i;
P0 = 0x80;
calls();
delay();
for(i=0;i<=15;i++)
{
P0=text20[i];
calld();
delay1(1);
}
}

void intro21()
{
int i;
P0 = 0x80;
calls();
delay();
for(i=0;i<=15;i++)
{
P0=text21[i];
calld();
delay1(1);
}
}

void parents()
{
int i;
P0 = 0x80;
calls();
delay();
for(i=0;i<=15;i++)

70
{
P0=text12[i];
calld();
delay();
}
P0=0xc0;
calls();
for(i=0;i<=15;i++)
{
P0=text13[i];
calld();
delay();
}
}

void clear()
{
P0=0x01;
calls();
}

/****************************** I2C ROUTINES
****************************************/
void start()
{
sda=1;
scl=1;
sda=0;
scl=0;
}
void stop()
{
sda=0;
scl=1;
sda=1;
scl=0;
}

int load(int ch)

71
{
int i,cw1=0x9e,cw2=0x00,cwr=0x9f;
start();
write(cw1);
write(cw2+ch);
stop();
start();
write(cwr);
i=read(NACK);
stop();
return i;
}

void write(int in)
{
int i,k=0;
scl=0;
for (i=0;i<8;i++)
{
scl=1;
scl=0;
k=1;
}
sda=1;
scl=0;
scl=1;
while(sda)
{
P0 = 0Xce;
calls();
P0 = 2+0x30;
calld();
}
scl=0;
}

int read(unsigned char b)
{

72
int i,j=0,k=0;
scl=0;
for(i=0;i<8;i++)
{
scl=1;

scl=0;
k=1;
}
if(b == ACK)
sda = 0; /* sda = 1 if next cycle is reset */
else
sda=1;
scl = 1;
scl = 0;
sda = 1; /* Release the sda line */
return(j);
}

/******************************************* END OF SUBROUTINE
************************************************/

73
9.0. CONCLUSION:
We have gained a wonderful experience in NLC limited. We had a
useful knowledge about our project.
The theory and concepts of generator cooling were extensively
discussed. Based on this concept, a practical model for cooling of generator using
Micro-controller is developed. The use of Micro-controller increases the reliability
of the system. Time consumption is very less in this system. It also has added
advantages like on-chip memory, easy service and very economical. Thus we
conclude that the cooling of generators using our project is more advantageous
than the existing system.
Though this system is simple it does a very essential work to cool the
generators efficiently.
Future scope of this project is that it can be implemented by using
TCP/IP, Blue Tooth or IR Rays.

74