Anda di halaman 1dari 31

A PROJECT REPORT

ON
Turbine failure protection system using
microcontroller
Bachelor of Technology
In
Electronics & Communication

2006-2007

Project Incharge :

Submitted By:

MR.ANURAG SINGHAL

MRS. ABHA AGGARWAL

Department of Electronics

Amit kumar arya(0312831007)


Ashwani kumar(0312831016)
Brajesh kumar (0312831020)
Pawan kishore(0312831051)

& Communication

BHARAT INSTITUTE OF TECHNOLOGY,


MEERUT (U.P.)

CERTIFICATE

This is to certify that work which is being presented in the project entitled
Grid failure protection system using microcontroller
submitted by Mr. AMIT KUMAR ARYA , Mr. ASHWANI
KUMAR,Mr.BRAJESH KUMAR ,Mr.PAWAN KISHORE student of final
year B.Tech. In ELECTRONICS & COMMUNICATION in partial
fulfillment of the requirement for award of the degree of B.Tech in
ELECTRONICS & COMMUNICATION is a record of students work
carried out by them under my guidance and supervision.
As per the candidates declaration this work has not been submitted
elsewhere for the award of any other degree.

Dated
Place: Meerut

Signature of Project Incharge

Signature of Project Guide


Name: Mr. ANURAG SINGHAL
Designation: LECTURER

Signature of H.O.D

ACKNOWLEDGEMENT
Enthusiasm is the feet of all progresses, with it there is
accomplishment and without it there are only slits alibis.
Acknowledgment is not a ritual but is certainly an important thing for
the successful completion of the project. At the time when we were made to
know about the project, it was really very tough to proceed further as we
were to develop the same on a platform, which was new to us. More so, the
coding part seemed so tricky that it seemed to be impossible for us to
complete the work within the given duration.
We really feel indebted in acknowledging the organizational support
and encouragement received from the management of our college.
The task of developing this system would not have been possible
without the constant help of our mentors. We take this opportunity to express
our profound sense of gratitude and respect to those who helped us
throughout the duration of this project.
We express our gratitude to Mr.ANURAG SINGHAL(Lecturer,BIT)
MRS. ABHA AGGARWAL(Lecturer,BIT). We would again like to thank
all of them for giving their valuable time to us in developing this project.

Dated:
Place: Meerut

Mr. AMIT KUMAR ARYA


Mr. ASHWANI KUMAR
Mr. BRAJESH KUMAR
Mr. PAWAN KISHORE

TABLE OF CONTENTS
INTRODUCTION
PLATFORM USED
AIM OF THE PROJECT
BLOCK DIAGRAM
WORKING OF THE PROJECT
MICROCONTROLLER UNIT
REFERENCE

Introduction

INTRODUCTION
We know that in todays time there is a big problem regarding failure of our
turbine (power distribution system) when a turbine fails the electricity of the
whole area get disconnected for days so it is a big problem to be solved that
how to protect our turbine before failure. Keeping this point in our mind we
are trying to develop a system which can turn our turbine off when
dangerous condition occurs.
For keeping our turbine protected we measure two factors first the
temperature of the turbine should not exceed a particular level and second is
that the voltage level in the transformer should not go below a particular
level.
Sensing these two conditions we regulate all our decisions suppose if oil in
the transformer is less then a particular level then a indication is provided
and even if temperature exceeds a particular level then also a indication is
provided if the problem is not resolved then condition keeps on going down
so the power supply from the turbine disconnected and let the turbine getting
cooled when normal temperature is attained then turbine again starts
functioning.

Platform used

Hardware requirements:
1) Pic microcontroller 16f72
2) LM7805 Regulator
3) Power Supply
4) Resistors
5) Capacitors
6) Transistors
7) LEDs
8) Connectors
9) Relays
10) Liquid crystal display
11) Temperature sensor
12) Buzzer
13) switches

Software requirements:
PIC16F72 is a 28-pin, 8-bit CMOS FLASH microcontroller with A/D
converter.
INFONICS:
Serial Programmer Software
Hex file editor

MPLAB IDE v7.00:


Source code Editor
Assembler

AIM OF THE
PROJECT

This system is PIC microcontroller based project as PIC has


inbuilt ADC, analog to digital converter so this ADC
conversion is the basic principle of our project.
Since

this

project

involves

measuring

the

voltage,

temperature and monitoring the level of coolant and taking


the required decisions according to that.
Our main aim is to protect the turbine from failure so keeping
this in mind we have designed our project.

Block diagram

TURBINE FAILURE PROTECTION SYSTEM

POWER
SUPPLY

ALARMING SYSTEM FOR


OVER LOAD AND OVER
TEMPERATURE

MICROCONTR
OLLER

FOR
DECISION

TEMPEATURE
DISPLAY

LCD DISPLAY

TERMINATING
POWER
SUPPLY IN
DANGER
CONDITION

OIL
TANK

THREE TRANSFORMER FOR THREE


PHASE SUPPLY

FLOW GRAPH
START MONITORING
THE TEMPERATURE AND
OIL LEVEL

CHECKIN FOR THE


HAZARDOUS
CONDITION
IF CRITICAL CONDITION HAS OCCURRED

TEMPERATURE OR OIL IS IN DANGER CONDITION

IF

DECISION
CUT OF THE
POWER SUPPLY

WARNING ALARM IS
TURNED ON

IF
CONDITION
IS NORMAL

WORKING OF
THE PROJECT

We are using six analog channels three channels for voltage R,Y,B and rest
of the three channels for temperature sensing. The voltage and temperature
setting of voltage and temperature is done using ports. The value of low cut
voltage is 180,as soon as the voltage comes below it then there is a cut and
the value of high cut voltage is 263 so this condition is sensed by the
controller when voltage reaches high or low upto a particular limit then we
will stop the relay with the help of programming. Similar is the case with the
temperature when it reaches 35 then also we will trip the transformer. So in
this way we can protect our turbine from failure by using the ADC feature
of PIC IC 16f877 as PIC senses the analog value and converts it into
corresponding digital value and according to that value we perform our
required tasks.
The value of channel at the same time we can made it display on the LCD
screen
We are using 16x2 LCD for display.
Also we are using buzzer for alarming the hazardous condition and relay
works as an electrical switch so we make the transformer on or off by using
relay as a switch.
And relay is further made on or off by using the transformer as a switch we
are using in our circuit diagram NPN transistor.
The property of NPN transistor is when base is high then collector and
emitter short and transistor gets on
And if base is low then collector and emitter get open and transistor gets off.

MICROCONTROLLER
UNIT

MICROCONTROLLER (PIC16F72)
4.2.1 CRITERIA FOR CHOOSING A MICROCONTROLLER

The basic criteria for choosing a microcontroller suitable for the application
are:
1) The first and foremost criterion is that it must meet the task at hand
efficiently and cost effectively. In analyzing the needs of a microcontrollerbased project, it is seen whether an 8- bit, 16-bit or 32-bit microcontroller
can best handle the computing needs of the task most effectively. Among the
other considerations in this category are:
(a) Speed: The highest speed that the microcontroller supports.
(b) Packaging: It may be a 28-pin DIP (dual inline package) or a QFP
(quad flat package), or some other packaging format. This is important in
terms of space, assembling, and prototyping the end product.
(c) Power consumption:
products.

This is especially critical for battery-powered

(d) The number of I/O pins and the timer on the chip.
(f) How easy it is to upgrade to higher performance or lower consumption
versions.
(g) Cost per unit: This is important in terms of the final cost of the product
in which a microcontroller is used.
2) The second criterion in choosing a microcontroller is how easy it is to
develop products around it. Key considerations include the availability of an
assembler, debugger, compiler, technical support.
3) The third criterion in choosing a microcontroller is its ready availability in
needed quantities both now and in the future.
4.2.2 DESCRIPTION
This powerful (200 nanosecond instruction execution) yet easy-to-program
(only 35 single word instructions) CMOS FLASH-based 8-bit
microcontroller packs Microchip's powerful PIC architecture into an 28-

pin package and is upwards compatible with the PIC16C5X, PIC12CXXX


and PIC16C7X devices. The PIC16F72 features 5 channels of 8-bit Analogto-Digital (A/D) converter with 2 additional timers, capture/compare/PWM
function and the synchronous serial port can be configured as either 3-wire
Serial Peripheral Interface (SPI) or the 2-wire Inter-Integrated Circuit
(IC) bus. All of these features make it ideal for more advanced level A/D
applications in automotive, industrial, appliances and consumer applications.
4.2.3 DEVICE SPECIFICATION
High Performance RISC CPU:
Only 35 single word instructions to learn
All single cycle instructions except for program branches, which are
two-cycle
Operating speed: DC - 20 MHz clock input DC - 200 ns instruction
cycle
2K x 14 words of Program Memory, 128 x 8 bytes of Data Memory
(RAM)
Pin out compatible to PIC16C72/72A and PIC16F872
Interrupt capability
Eight-level deep hardware stack
Direct, Indirect and Relative Addressing modes
Peripheral Features:
High Sink/Source Current: 25 mA
Timer0: 8-bit timer/counter with 8-bit prescaler
Timer1: 16-bit timer/counter with prescaler, can be incremented
during SLEEP via external crystal/clock
Timer2: 8-bit timer/counter with 8-bit period register, prescaler and
postscaler

Capture, Compare, PWM (CCP) module


- Capture is 16-bit, maximum resolution is 12.5 ns
- Compare is 16-bit, maximum resolution is 200 ns
- PWM maximum resolution is 10-bit
8-bit, 5-channel analog-to-digital converter
Synchronous Serial Port (SSP) with SPI (Master/Slave) and I2C
(Slave)
Brown-out detection circuitry for Brown-out Reset (BOR)
CMOS Technology:
Low power, high speed CMOS FLASH technology
Fully static design
Wide operating voltage range: 2.0V to 5.5V
Industrial temperature range
Low power consumption:
- < 0.6 mA typical @ 3V, 4 MHz
- 20 micro A typical @ 3V, 32 kHz
- < 1 micro A typical standby current
Special Microcontroller Features:
1,000 erase/write cycle FLASH program memory typical
Power-on Reset (POR), Power-up Timer (PWRT) and Oscillator
Start-up Timer (OST)
Watchdog Timer (WDT) with its own on-chip RC oscillator for
reliable operation
Programmable code protection
Power saving SLEEP mode

Selectable oscillator options


In-Circuit Serial Programming (ICSP) via 2 pins
Processor read access to program memory

4.2.4 PIN DIAGRAM OF PIC16F72

Fig 4.8 Pin Diagram of Microcontroller


4.2.5 BLOCK DIAGRAM OF MICROCONTROLLER

Fig 4.9 Block Diagram of Microcontroller


4.2.6 PIN DESCRIPTION: Following table shows the pin description of
microcontroller
Table 4.4 Pin Description

4.2.7 ANALOG-TO-DIGITAL CONVERTER (A/D) MODULE


The analog-to-digital (A/D) converter module has five inputs for the
PIC16F72. The A/D allows conversion of an analog input signal to a

corresponding 8-bit digital number. The output of the sample and hold is the
input into the converter, which generates the result via successive
approximation. The analog reference voltage is software selectable to either
the devices positive supply voltage (VDD) or the voltage level on the
RA3/AN3/VREF pin. The A/D converter has a unique feature of being able
to operate while the device is in SLEEP mode. To operate in SLEEP, the A/D
conversion clock must be derived from the A/Ds internal RC oscillator.
The A/D module has three registers:
A/D Result Register ADRES
A/D Control Register 0 ADCON0
A/D Control Register 1 ADCON1
A device RESET forces all registers to their RESET state. This forces the
A/D module to be turned off and any conversion is aborted. The ADCON0
register, shown in Register 10-1, controls the operation of the A/D module.
The ADCON1 register, shown in Register 10-2, configures the functions of
the port pins. The port pins can be configured as analog inputs (RA3 can
also be a voltage reference) or a digital I/O.

4.2.7.1 ANALOG TO DIGITAL CONVERSION REGISTER 0:

Fig 4.10 A to D Reg0

4.2.7.2 ANALOG TO DIGITAL REGISTER1:

Fig 4.11 A to D Reg1

The ADRESS register contains the result of the A/D conversion. When the
A/D conversion is complete, the result is loaded into the ADRESS register,
the GO/DONE bit (ADCON0<2>) is cleared, and A/D interrupt flag bit
ADIF is set. The block diagram of the A/D module is shown. The value in
the ADRESS register is not modified for a Power-on Reset. The ADRESS
register will contain unknown data after a Power-on Reset. After the A/D
module has been configured as desired, the selected channel must be
acquired before the conversion is started. The analog input channels must
have their corresponding TRIS bits selected as an input. After acquisition
time has elapsed, the A/D conversion can be started. The following steps
should be followed for doing an
A/D conversion:
1. Configure the A/D module:
Configure analog pins/voltage reference and digital I/O (ADCON1)
Select A/D input channel (ADCON0)
Select A/D conversion clock (ADCON0)
Turn on A/D module (ADCON0)
2. Configure A/D interrupt (if desired):
Clear ADIF bit
Set ADIE bit
Set GIE bit
3. Wait the required acquisition time.
4. Start conversion:
Set GO/DONE bit (ADCON0)
5. Wait for A/D conversion to complete, by either:
Polling for the GO/DONE bit to be cleared OR
Waiting for the A/D interrupt
6. Read A/D Result register (ADRES), clear bit ADIF if required.

7. For next conversion, go to step 1 or step 2 as required. The A/D


conversion time per bit is defined as TAD. A minimum wait of 2 TAD is
required before the next acquisition starts.

4.2.8 INSTRUCTION SET SUMMARY


Each PIC16F72 instruction is a 14-bit word divided into an OPCODE that
specifies the instruction type and one or more operands that further specify
the operation of the instruction. The PIC16F72 instruction set summary in
Table below lists byte-oriented, bit-oriented, and literal and control
operations. Table below shows the opcode field descriptions. For byteoriented instructions, f represents a file register designator and d
represents a destination designator. The file register designator specifies
which file register is to be used by the instruction. The destination designator
specifies where the result of the operation is to be placed. If d is zero, the
result is placed in the W register. If d is one, the result is placed in the file
register specified in the instruction. For bit-oriented instructions, b
represents a bit field designator which selects the number of the bit affected
by the operation, while f represents the number of the file in which the bit
is located. For literal and control operations, k represents an eight or
eleven-bit constant or literal value.
The instruction set is highly orthogonal and is grouped into three basic
categories:
Byte-oriented operations
Bit-oriented operations
Literal and control operations
All instructions are executed within one single instruction cycle, unless a
conditional test is true or the program counter is changed as a result of an
instruction. In this case, the execution takes two instruction cycles, with the
second cycle executed as a NOP. One instruction cycle consists of four
oscillator periods. Thus, for an oscillator frequency of 4 MHz, the normal
instruction execution time is 1 s. If a conditional test is true, or the
program counter is changed as a result of an instruction, the instruction
execution time is 2S

4.2.8.1 GENERAL FORMAT FOR INSTRUCTIONS

Fig 4.12 General format

4.2.8.2 INSTRUCTION SET

Table 4.5 Instruction Set

References
en.wikipedia.org
www.batronix.com
Electronics For You(EFY)
Microcontroller Programming
By Julio Sanchez
Microcontroller Programming: The Microchip PIC
By Julio Sanchez (Author), Maria P. Canton
(Author)
A hand book on Pure sine wave DC-AC Inverter
By Samlex America (www.samlexamerica.com)

Anda mungkin juga menyukai