Multifunctional Relay Based On Microcontroller


Published on

B.Tech (EEE) Final Year project report brought to you by TECHNOFRIENDZ, To download visit

Published in: Technology, Business
  • Be the first to comment

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Multifunctional Relay Based On Microcontroller

  1. 1. Technofriendz A community of technical scholars A PROJECT REPORT ON A RELAY WORK AS MULTIFUNCTION UNDER THE FAULT CONDITION Submitted in partial fulfilment of the award of Degree of Bachelor of Technology in Electrical & Electronics 2010-11 GUIDED BY SUBMITTED BY J.K.VASHISHTHA RAJEEV KUMAR (ASST.PROFESSOR) VIPUL BATRA SANJAY KUMAR RAVI RAJ (Sr. LECTURER) DEPARTMENT OF ELECTRICAL ENGINEEERING COLLEGE OF ENGINEERING ROORKEE, ROORKEE 1 Project Report By Rajeev Prajapati
  2. 2. Technofriendz A community of technical scholars ACKNOWLEDGEMENT I avail this opportunity to express my sincere gratitude and profound thanks to my Project guide Mr.J.K. Vathishta, Asst Professor of College of Engineering Roorkee and Mr Sanjay Kumar Senior Lecturer, of College of Engineering Roorkee for giving me constant guidance to work on Minor Project on cost estimation of “A Relay Works As multifunction Under The Fault Condition”. He has been a guiding source by providing continuous suggestions and advice throughout the study period of the Project. With heartfelt gratitude, I acknowledge the cooperation and support rendered to me by Mrs. Anuradha , Asst.Professor, College of Engineering Roorkee from time to time. I would also take this opportunity to thank my group members, and classmates, who have been a source of moral support and continuous encouragement in undertaking this Project work. 2 Project Report By Rajeev Prajapati
  3. 3. Technofriendz A community of technical scholars COLLEGE OF ENGINEERING ROORKEE ROORKEE CERTIFICATE This is to certify that the Project Work titled “A RELAY WORK AS MULTIFUNCTION UNDER THE FAULT CONDITION” is a bonafide work of Rajeev(17); Vipul Batra(64); Ravi raj(20) carried out in partial fulfillment for the award of degree of B.TECH Of UTTARAKHAND TECHNICAL UNIVERSITY under my guidance. This project work is original and not submitted earlier for the award of any degree / diploma or associate ship of another University / Institution. Date : Rajeev Kumar (07060108081) Ravi Raj (07060108084) Mr. J.K.Vashishtha Vipul Batra (07060108117) Mr. Sanjay Kumar (Assistance Professor of COER) (Senior lecturer of COER) 3 Project Report By Rajeev Prajapati
  4. 4. Technofriendz A community of technical scholars Abstract The main objective of this project report is to establish a microcontroller based system as a multifunctional relay. To understand how microcontroller works as a multifunctional relay it is necessary to know about microcontroller working, functions and its applications. In this project report description of input/output interfacing of microcontroller and the program, which is required to perform a specific task (here to give a trip command), is explained. Firstly, we describe about the microcontroller based multifunctional relay which is carried out by using microcontroller and same principles and algorithms are applicable for Pentium processors. Hence, we extended the same for Pentium processor also. An Earth fault Relay has been implemented in our project by using with different relay characteristics further the multifunctional properties can be extended. For multifunctional features in the relay the same principles and algorithms stated in microcontroller based multifunctional relay holds good. At first the protection of single-phase system is considered for the explanation of microcontroller based system working as a relay. Henceforth it is extended for three phase systems. With advances in technology, protective relays have progressed from electromechanical, to solid state to microcontroller-based relays. The increased growth of power systems both in size and complexity has brought about the need for fast and reliable relays to protect major equipment and to maintain system stability. With the development of economical, powerful and sophisticated microcontroller, there is a growing interest in developing microcontroller-based protective relays which are more flexible because of being programmable and are superior to conventional electromagnetic and static relays. The main features which have encouraged the design and development of microcontroller- based protective relays are their economy, compactness, reliability, flexibility and improved performance over conventional relays. The distance relays are preferred to overcurrent relays because they are not nearly so much affected by changes in short-circuit-current magnitude as over current relays are, and, hence are much less affected by change in generating capacity and in system configuration. 4 Project Report By Rajeev Prajapati
  5. 5. Technofriendz A community of technical scholars CONTENTS Chapter 1 : Introduction 1.1 About Microcontroller 1 1.2 Microcontroller Based System 3 1.3 Functions of various components of microcontroller based system Chapter 2 : 4 Microcontroller as an multi functional relay 2.1 Interfacing I/O devices to a Microcontroller 5 2.2 Input Interfacing 7 2.3 Operating Principle 8 2.3.1 Memory Units 2.3.2 Relay Interface Unit 2.4 9 10 Principle of operation 2.4.1 Operation of one relay 2.4.2 Operation of Four Relays 2.5 11 12 Interfacing Circuit Of ADC Using Memory Mapped I/O 14 5 Project Report By Rajeev Prajapati
  6. 6. Technofriendz A community of technical scholars Chapter 3 : Relay 3.1 General Consideration 17 3.2 Operating Principles 3.3 Definition of Operation 3.4 Operation Inductor 18 3.5 Seal-in and Holding Coils and Seal-in relays 19 3.6 Time Delay and Its Definition 20 3.7 Electromagnetic-Attraction type relay 3.7.1 Operating Principle 22 3.7.2 To Pick Up 23 3.7.3 Tendency Toward Vibration 3.7.4 Directional Control 24 3.7.5 Effects of Transients 3.7.6 Time Characteristics 3.8 Line Protection with Distance Relay 25 3.9 Choice between Impedance, Reactance 3.10 Adjustment of Distance Relay Chapter 4 : 26 Procedure To Design An Relay 4.1 Design of Over Current Relay 31 4.2 Design of distance Relay 32 4.3 Supply 33 Chapter 5 : Working of a Microcontroller based Relay 34 Chapter 6 : Programming To Work A Relay 36 6 Project Report By Rajeev Prajapati
  7. 7. Technofriendz A community of technical scholars Chapter 7 : Component Used To Design An Multifunctional Relay 7.1 Diode 43 7.2 Voltage Regulator 45 7.2.1 Electrical Characteristics 7.2.2 Typical Performance Characteristics 46 47 7.3 LED 48 7.4 Amplifier 49 7.5 Potentiometer Chapter 8 : Advantages of Microprocessor Relay 52 54 Conclusion 56 Appendix 57 Reference 60 7 Project Report By Rajeev Prajapati
  8. 8. Technofriendz A community of technical scholars Chapter 1 Introduction 1.1 About Microcontroller A microcontroller is a multipurpose, programmable, clock-driven register based electronic device that reads binary instructions from a storage device called memory, accepts binary data as input and processes data according to those instructions, and provides results as output. A typical programming machine is used for performing a specific function/ task. It can be represented with three components microcontroller, memory, and input/output. These three components work together or interact with each other to perform a given task, thus they comprise a system. The physical components are called hardware. A set of instructions written for the microcontroller to perform a task is called a program and a group of programs is called software. Memory Microcontroller Micro I/O Fig 1.1 Functional block diagram of microcontroller based system The microcontroller operates in binary digits, 0 and 1, also known as bits. These digits are represented in terms of electrical voltages in the machine. Generally 0 represents one voltage level and 1 represents another. The digits 1 and 0 are synonymous with high and low respectively. Each microcontroller recognizes and processes a group of bits called the word, and microcontrollers are classified according to the word length. A processor with 8 bit word is called 8 bit microcontroller and a processor with a 32-bit word is known as a 32-bit microcontroller. Microcontroller is a programmable device means it can be instructed to perform 8 Project Report By Rajeev Prajapati
  9. 9. Technofriendz A community of technical scholars given tasks within its capability. These instructions are simply a pattern of 0s and 1s.These instructions are entered or stored in storage, called memory, which can be read by the microcontroller. Memory is like the pages of a notebook with space for a fixed number of binary numbers on each line. Each line is an 8-bit register that can store eight binary bits. These registers are nothing but group of flip-flops. An n-bit register has a group of n flip-flop sand is capable of storing any binary information containing n-bits, and several of these 8-bit registers are arranged in a sequence called memory. The user can enter instructions and data into memory through devices such as a keyboard or simple switches. These devices are called input devices. The microcontroller reads the instructions from the memory and processes the data according to those instructions. The result can be displayed by a device such as seven-segment LED’s or printed by a printer. These devices are called output devices. Microcontroller recognizes and operates in binary numbers. Each microcontroller has its own binary words, meanings, and language. Combining a number of bits for a given machine forms the words. The word is defined as the number of bits the microcontroller recognizes and processes at a time. The number of bits in a word for a given machine is fixed and words are formed through various combinations of these bits. For e.g. a machine with a word length of 8 bits can have 256 combinations of eight bits thus a language of 256 words. In a microcontroller combination of bit patterns of the word, gives a specific meaning for each combination by using electronic logic circuits called an instruction. Here word is nothing but the number of data lines for the microcontroller. This data will be n-bits for an n-bit microcontroller e.g. 16-bit microcontroller, word length 16 bits. Data lines 16. Instructions are made of several words. The set of instructions designed into the machine makes up its machine language-a binary language composed of 1’s and 0’s. Even though the instructions can be written in hexadecimal code, it is difficult to understand a program written in hexadecimal numbers. Therefore each manufacturer of a microcontroller has devised a symbolic code for each instruction called mnemonic. The mnemonic for a particular 9 Project Report By Rajeev Prajapati
  10. 10. Technofriendz A community of technical scholars instruction consists of letters that suggest the operation to be performed by that instruction. Translation codes are necessary to convert this alphabetical language to binary language. ROM stands for read-only memory. A ROM chip is programmed with a permanent collection of pre-set bytes. The address bus tells the ROM chip which byte to get and place on the data bus. When the RD line changes state, the ROM chip presents the selected byte onto the data bus. RAM stands for random-access memory. RAM contains bytes of information, and the microcontroller can read or write to those bytes depending on whether the RD or WR line is signaled. 1.2 Microcontroller Based System: A microcontroller-based system can perform a specified function or task, and a single unit microcontroller without the total system can’t perform a specified function hence it is necessary to know about the basic three components of microcontroller based system. They are microcontroller, I/O, and memory (read write and read only memory). These components are organized around a communication path called a bus. The microcontroller-based system consist of a ALU unit with system buses. Which are used for the communication link as shown in the fig 1.2. Input / Output I/O ALU Register Array Memory Figure.1.2 Microcontroller based system 10 Project Report By Rajeev Prajapati
  11. 11. Technofriendz A community of technical scholars 1.3 Functions of various components of microcontroller based system 1. The microcontroller  Reads instructions from memory.  Communicates with all peripherals using the system bus.  Controls the timing of information flow.  Performs the computing tasks specified in the program. 2. The memory  Stores binary information, called instructions and data  Provides the instructions and data to the microcontroller on request  Stores results and data for the microcontroller 3. The input device  Enters data and instructions under the control of a program such as a monitor program. 4. The output device  Accepts data from the microcontroller as specified in a program. 5. The Bus  Carries bits between the microcontroller and memory and I/O’s. 11 Project Report By Rajeev Prajapati
  12. 12. Technofriendz A community of technical scholars Chapter 2 Microcontroller Multifunctional Relay Protective relays play a critical role in the operation of the electrical power system. The protective relays are designed to take action when abnormal conditions occur on the power system. These abnormal conditions may be short circuits, overload conditions, and loss of system synchronism. Elaborate protection schemes have been developed to detect these various conditions using trial and error and system operating experience. The protection schemes have typically been made up of discrete components such as over current relays, distance relays, auxiliary relays, and re-closing relays. A microcontroller-based system can be used for detecting faults in the Power system. The real time data monitoring of various electrical parameters in the Power system helps us in detecting electrical faults. In this system the abnormal conditions are detected by the microcontroller and necessary initiation of the trip signal to the circuit breaker is given. For this process to happen, real time monitoring of the data is required. Since the microcontroller understands only binary language we need to convert our analog signal to digital by using ADC. After getting this data based upon the programming in the memory (ROM/RAM) the microcontroller takes the decision of the tripping of electrical system i.e. it detects faults based on the conditions of the program written. This process is just for understanding in brief but it has lot of hardware/software, interfacing I/O, timing signals, machine cycles and decision-making programs involved. Based on the microcontroller used, (Intel/Motorola) hardware/software and programming instructions vary. 2.1 Interfacing I/O devices to a Microcontroller The I/O devices, such as keyboards and displays, are the ears and eyes of the MPUs; they are the communication channels to the "outside world." Data can enter (or exit) in groups of eight bits using the entire data bus; this is called the parallel I/O mode. The other method is the serial I/O, whereby one bit is transferred using one data line; typical examples include peripherals such as the CRT terminal. In this we will focus on interfacing I/O devices in the parallel mode. 12 Project Report By Rajeev Prajapati
  13. 13. Technofriendz A community of technical scholars Figure below shows a practical decoding circuit for the output device with address 01H. Address lines A7-A0 are connected to the 8-input NAND gate that functions as a decoder. Line A0 is connected directly, and lines A7-A1 are connected through the inverters. When the address bus carries address 01H, gate G1 generates a low pulse; otherwise the output remains high. Gate G2 combines the output of G1 and the control signal IOW to generate an I/O select pulse when both input signals are low. Meanwhile (as was shown in the timing diagram- machine cycle M3), the contents of the accumulator are placed on the data bus and are available on the data bus for a few microseconds and, therefore, must be latched for display. The I/O select pulse clocks the data into the latch for display by the LEDs. Fig 2.1.1 Block Diagram of I/O Interface Fig 2.1.2 Decode logic for Output Port 13 Project Report By Rajeev Prajapati
  14. 14. Technofriendz A community of technical scholars 2.2 Input Interfacing Figure below shows an example of interfacing an 8-key input port. The basic concepts behind this circuit are similar to the interfacing concepts of output port. The address lines are decoded by using an 8-input NAND gate. When address lines A7-A0 are high (FFH), the output of the NAND gate goes low and is combined with control signal lOR .in gate G2; When the MPU executes the instruction (IN FFH), gate G2 generates the device select pulse that is used to enable the tri-state buffer. Data from the keys are put on the data bus D7-D0 and loaded into the accumulator. The circuit for the input port differs from the output port as follows:- 1. Control signal lOR is used in place of lOW 2. The tri-state buffer is used as an interfacing port in place of the latch. 3. In input port, data flow from the keys to the accumulator; on the other hand, in output port, data flow from the accumulator to the LED’s. Figure 2.2.3 Decode Logic for a DIP-Switch Input Port 14 Project Report By Rajeev Prajapati
  15. 15. Technofriendz A community of technical scholars 2.3 Microcontroller Based Multifunctional Relay System Description and Operating Principle: A four-relay system is built around a microcontroller driven by a 6.14-MHz crystal. The block diagram of the system is shown in Fig.2.3. Besides the microcontroller, the system includes memory units and a relay interface unit. The microcontroller is capable of directly addressing up to 64K memory locations with its 16-b address. Eight of the 16 bits A8-A15 are provided directly on the three-state address pins A0-A7 .The other eight bits A0-A7 are provided on the bidirectional, three-state addressed data pins ADo-AD7. The addressed data bits are time multiplexed. Address information is provided on the addressed data pins at the beginning of each memory reference and is externally latched and held during the remainder of the memory reference to provide address bits Ao to A7. The 8-bit address latch in Fig latches the address information from the addressed data pins when clocked by the address latch enable (ALE) signal. The microcontroller generates this signal at the appropriate time when providing address information on its address/data pins. The control bus consists of three bits: RD,WR and IO/M. The RD and WR strobes initiate the read and write operations, respectively, whereas the signal IO/M determines whether the memory or the input/output is being referenced. Figure 2.3 Block Diagram of the system 15 Project Report By Rajeev Prajapati
  16. 16. Technofriendz A community of technical scholars 2.3.1 Memory Units Fig. 2 shows that the memory of the system consists of an EPROM unit 2716 and a read/write memory (RWM) unit 6264. The 2716 is a 2K x 8 EPROM, and the 6264 is an 8K x 8 RWM. Therefore, the total memory of the system is 10K bytes. The 1-out-of-8 decoder (74ALS138) in Fig. 2 decodes the first 16K of the memory addressable space by 2K because A11, A12, and A13 are used as inputs to the decoder. Since the 2716 EPROM is selected by the output YO of the decoder, it occupies the first 2K of the memory address space, which is the address range 0000 to 07FF H. The 6264 RWM is selected by any of the four outputs Y 1, Y2, Y 3, or Y4 of the decoder, thereby providing it with an addressable range from 0800 to 27FF H. The remaining outputs of the decoder Y5, Y6, and Y7 can be used, in the future, to expand the memory of the system by 6K bytes. To avoid memory fold back, A14 and A15 are connected through an OR gate to the enable pin G2A of the decoder. Figure 2.3.1 Memory units 16 Project Report By Rajeev Prajapati
  17. 17. Technofriendz A community of technical scholars 2.3.2 Relay Interface Unit As shown in Fig.2.3 the relay interface unit is the input/output unit of the system. Each relay requires one input port and one output port. A 1-out-of-8 decoder (74ALS138) is used to generate four input pulses and four output pulses, which are enough to implement four relays. The input pulses are referred to as ICPl (input current pulse 1) through ICP4. On the other hand, the output pulses are called TCBl (trip circuit breaker 1) through TCB4. In Fig. 3, the measuring unit 1 measures the current I1 and sends an analog signal to the A/D unit. The digital output of the A/D unit is connected to the data bus through an input port 1. The microcontroller reads the current by generating the signal, say ICP1, which enables input port 1. When the conditions for tripping circuit breaker 1 are met, the microcontroller generates the output pulse TCB 1, which triggers the circuit breaker. Figure 2.3.2 Relay interface unit 2.4 Principle of operation The four-relay system described is a real-time multitasking system. It has four tasks, where each over current relay program is one task. All four tasks run on one microcontroller: the 8085. These tasks cannot be executed sequentially (one complete task at a time) because each task is a never-ending program. Each relay constantly monitors a current value. An alternative to sequential execution is to allow the four tasks to equally share the time of the microcontroller, which is the essence of the introduced four-relay system. The microcontroller executes part of 17 Project Report By Rajeev Prajapati
  18. 18. Technofriendz A community of technical scholars the first task followed by part of the second task and so on. After executing part of the fourth task, the microcontroller resumes the partial execution of the first task. This way, if one relay detects a fault, the microcontroller will not abandon the other relays. The success of the system depends on including the execution time of the other partial tasks in the time delay of each relay. 2.4.1 Operation of one relay: For each over current relay the microcontroller implements the appropriate time delay by a combination of counter and a look-up table in the memory. The look up table contains the timecurrent characteristics of the relay. The counter which is updated frequently by the microcontroller, measures the duration of fault current. Based on the information contained in the look up table and the latest value of the counter, the microcontroller decides when to trip the circuit breaker. The time-current relationship of an over current relay can be approximated as I n *t= constant. In general the time current relationship of the ith over current relay is described as, T=G(i) for Ij> Fi………(1) When the current is below a predetermined fault level Fi the circuit breaker should not trip. The counter counti starts as soon as Ii exceeds Fi. It continues to count as long as the fault remains. The value ni on the counter outputs is proportional to the time that is t=k(ni)…….(2) where k is a constant. Substituting (1) in (2) ni = -G(Ii) k …(3) Equation (3) is the foundation of the look-up table of relay 1. Under fault conditions, the input current Ii is used as an offset to jump into the look-up table to read n. If latest value of counter counti is greater than ni; , the microcontroller generates the pulse TCBi . 18 Project Report By Rajeev Prajapati
  19. 19. Technofriendz A community of technical scholars 2.4.2 Operation of Four Relays: The four-relay system is a time-sharing system. As shown in Fig. the microcontroller executes, in turns, parts of the programs of the individual relays. The parts executed from each relay program are similar except that each relay has its own counter and input/output ports. In the partial program, the microcontroller performs the following actions before exiting to the next relay program: Figure 2.4.2 (a) Tasks of the system (b) Service routine of relay 1 1) Read the current. If the current is below fault level, clear the counter, and exit to the next relay program. 2) Increment the present count by one. If the updated value of the counter is below Ni, exit to the next relay program. 3) Trip the circuit breaker, and exit to the next relay program. 19 Project Report By Rajeev Prajapati
  20. 20. Technofriendz A community of technical scholars If the first relay detects a fault, the counter count1 starts counting. According to Fig., after each increment of the counter countl, the other three relays are checked for faults. Now, if the third relay detects a fault, count 3 starts to count as well. The system maintains count on both counters count1 and counts. Whenever the count exceeds nl for count1 (n3 for count3), the signal TCBl (mis) generated. Furthermore, the system can handle faults in all four relays in a similar way. There are four counters in the system. The relationship between time t and the count value ni on each counter can be described by (2), that is t = k(ni). Since the microcontroller checks the other three relays between the increments of each counter, the constant k in (2) must include the execution time of the other three partial programs. The precise value of k is equal to the time interval between two successive measurements of the same current Ii. The value of k is, therefore, equal to the execution time of all the instructions in the sampling interval of the current Ii. Each instruction in the 8085 instruction set consists of a certain number of states [2]. Each state time is equivalent to one cycle of the internal frequency, which is equal to half the crystal frequency. The crystal frequency is 6.14 MHz; that gives a state time equivalent to 325.5 ns. For example, the instruction XCHG (exchange Hand L with D and E) consists of four states and takes 1302 ns to execute on the described system. The way the partial program of one relay is shown in Fig.leads to variable values for k because it contains two conditional-branch instructions. The execution time of the partial program depends on the outcomes of the two conditions. However, k is made constant by inserting the appropriate number of NOP (no operation) instructions to balance all the branches of the routine. The NOP instruction is a onestate instruction and does not change the state of the microcontroller. For the four-relay system, the value of k turned out to be 0.153 x l0^-3 s. Since the partial programs of the four relays are identical, the value of k is proportional to the number of relays R in the system, in general k = (38.409 x 10^-6)R s. More relays can easily be added to the presented system because the hardware design as well as the software design are very flexible. It must be pointed out that the memory requirement is far below the 64K addressable memory space of the 8085 microcontroller. 20 Project Report By Rajeev Prajapati
  21. 21. Technofriendz A community of technical scholars 2.5 Interfacing Circuit of ADC Using Memory I/O Figure shows the interfacing of the ADC0801 with the MPU, using the interrupt. Address line A15 with an inverter is used for chip select (CS), and the control signals MEMR and MEMW are connected to RD and WR signals respectively. This is a memory-mapped port with address 8000H The conversion is initiated when CS and WR signals go low. At the end of the conversion, the INTR signal goes low and is used to interrupt the MPU through an inverter. When the service routine reads the data byte, the RD signal causes the INTR to go high, as shown in the timing diagram. This chip includes the control logic to set INTR at the end of a conversion and to reset it when data are read; by including this logic on the converter chip, extra components necessary for interfacing are eliminated To implement the data transfer using the interrupt, the main program should initialize the stack, enable the microcontroller interrupts (EI), unmask the RST 6.5, and initiate a conversion by writing to port 8000H. In addition, the main program should include the initialization of the memory pointer for storing data and the counter to count the readings. At the end of the conversion, the microcontroller is interrupted by RST 6.5, which transfers the program control to location 0034H and then to service routine. At location 0034H a Jump instruction to service address is written such that the service routine gets executed when microcontroller is interrupted by RST 6.5. 21 Project Report By Rajeev Prajapati
  22. 22. Technofriendz A community of technical scholars Fig 2.5 Interfacing ADC 0801 to the Microcontroller and its timing signals 22 Project Report By Rajeev Prajapati
  23. 23. Technofriendz A community of technical scholars The service routine reads the output data by using the instruction LDA, stores the byte in memory, and updates the memory pointer and the counter. The routine assumes that the information concerning the memory pointer (HL) and the counter (B) is supplied by the main program. The memory pointer specifies the location where the data should be stored and the counter specifies the number of bytes to be collected. The STA instruction starts the next conversion by asserting the MEMW signal; this instruction should not be interpreted to mean that it is storing the contents of the accumulator in the converter. Then the service routine sets the interrupt flip-flop for subsequent interrupts and returns to the main program if the counter is not zero. When the counter goes to zero the program completes the data collection. The Increased Demand of Power Systems both in size & complexity has brought about the need for fast &reliable relays to protect major equipment and to maintain the system stability. The Conventional Protective relays are either of electromagnetic or static type. The Electromagnetic relays have several drawbacks such as high burden on instrument transformer, high operating time, contact problems , etc .Static relay have been increasingly use in recent years because of their inherent disadvantages of compactness , lower burden , less maintenance and high speed. Though successfully used the static relays suffer from a number of disadvantages, e.g. inflexibility, inadaptability, changing system conditions and complexity. The concept of digital protection employing computers which shows much promise in providing improved performance has involved during the past two decays. In the beginning, the digital protection philosophy was to use a large computer system for the total protection of power system. This protection system proves to be very costly and required large space. Digital computer can easily fulfill the protection requirements of modern power system without difficulties. Computer hardware technology has tremendously advanced since early 1970’s and new generation of computers tend to make digital computer relaying a viable alternative to the traditional computer system The main feature which encourage the design and development of microcontroller based protective relays are their economy ,compactness ,reliability ,flexibility and improved performance over conventional relays. Different programs are used to obtain different relaying characteristics using the same interfacing circuitry 23 Project Report By Rajeev Prajapati
  24. 24. Technofriendz A community of technical scholars Chapter 3 Relay Protective relays are the "tools" of the protection engineer. As in any craft, an intimate knowledge of the characteristics and capabilities of the available tools is essential to their most effective use. Therefore, we shall spend some time learning about these tools without too much regard to their eventual use. 3.1 General Consideration All the relays that we shall consider operate in response to one or more electrical quantities either to close or to open contacts. We shall not bother with the details of actual mechanical construction except where it may be necessary for a clear understanding of the operation. One of the things that tend to dismay the novice is the great variation in appearance and types of relays, but actually there are surprisingly few fundamental differences. Our attention will be directed to the response of the few basic types to the electrical quantities that actuate them. 3.2 Operating Principle There are really only two fundamentally different operating principles: (1) Electromagnetic attraction, and (2) Electromagnetic induction. Electromagnetic attraction relays operate by virtue of a plunger being drawn into a solenoid, or an armature being attracted to the poles of an electromagnet. Such relays may be actuated by d-c or by a-c quantities. Electromagnetic-induction relays use the principle of the induction motor whereby torque is developed by induction in a rotor; this operating principle applies only to relays actuated by alternating current, and in dealing with those relays we shall call them simply "induction-type" relays. 3.3 Definition of Operation Mechanical movement of the operating mechanism is imparted to a contact structure to close or to open contacts. When we say that a relay "operates," we mean that it either closes or opens its contactswhichever is the required action under the circumstances. Most relays have a "control spring," or are restrained by gravity, so that they assume a given position when completely de-energized; a contact that is 24 Project Report By Rajeev Prajapati
  25. 25. Technofriendz A community of technical scholars closed under this condition is called a "closed" contact, and one that is open is called and "open" contact. This is standardized nomenclature, but it can be quite confusing and awkward to use. A much better nomenclature in rather extensive use is the designation “a” for an "open" contact, book. The present standard method for showing "a" and “b” contacts on connection diagrams is illustrated in Fig. 1. Even though an “a” contact may be closed under normal operating conditions, it should be shown open as in Fig. 1; and similarly, even though a “b” contact may normally be open, it should be shown closed. When a relay operates to open a “b” contact or to close an “a” contact, we say that it "picks up," and the smallest value of the actuating quantity that will cause such operation, as the quantity is slowly increased from zero, is called the "pickup" value. When a relay operates to close a “b” contact, or to move to a stop in place of a “b” contact, we say that it "resets"; and the largest value of the actuating quantity at which this occurs, as the quantity is slowly decreased from above the pickup value, is called the "reset" value. When a relay operates to open its “a” contact, but does not reset, we say that it "drops out," and the largest value of the actuating quantity at which this occurs is called the "drop-out" value. Fig 3.3 : Contact symbols and designations 3.4 Operation Indicator Generally, a protective relay is provided with an indicator that shows when the relay has operated to trip a circuit breaker. Such "operation indicators" or "targets" are distinctively colored elements that are actuated either mechanically by movement of the relay's operating mechanism, or electrically by the flow of contact current, and come into view when the relay operates. They are arranged to be reset manually after their indication has been noted, so as to be ready for the next operation. One type of indicator is shown in Fig. 2. Electrically operated 25 Project Report By Rajeev Prajapati
  26. 26. Technofriendz A community of technical scholars targets are generally preferred because they give definite assurance that there was a current flow in the contact circuit. Mechanically operated targets may be used when the closing of a relay contact always completes the trip circuit where tripping is not dependent on the closing of some other series contact. A mechanical target may be used with a series circuit comprising contacts of other relays when it is Fig 3.4 : One type of contact mechanism showing target and seal-in elements. desired to have indication that a particular relay has operated, even though the circuit may not have been completed through the other contacts. 3.5 SEAL-IN AND HOLDING COILS, AND SEAL-IN RELAYS In order to protect the contacts against damage resulting from a possible inadvertent attempt to interrupt the flow of the circuit trip coil current, some relays are provided with a holding mechanism comprising a small coil in series with the contacts; this coil is on a small electromagnet that acts on a small armature on the moving contact assembly to hold the contacts tightly closed once they have established the flow of trip-coil current. This coil is called a "sealin" or "holding" coil. Figure 2 shows such a structure. Other relays use a small auxiliary relay whose contacts by-pass the protective-relay contacts and seal the circuit closed while tripping 26 Project Report By Rajeev Prajapati
  27. 27. Technofriendz A community of technical scholars current flows. This seal-in relay may also display the target. In either case, the circuit is arranged so that, once the trip-coil current starts to flow, it can be interrupted only by a circuit-breaker auxiliary switch that is connected in series with the trip-coil circuit and that opens when the breaker opens. This auxiliary switch is defined as an " a " contact. The circuits of both alternatives are shown in Fig. 3. Figure 3.5 SEAL IN RELAY Figure 3.5 also shows the preferred polarity to which the circuit-breaker trip coil (or any other coil) should be connected to avoid corrosion because of electrolytic action. No coil should be connected only to positive polarity for long periods of time; and, since here the circuit breaker and its auxiliary switch will be closed normally while the protective-relay contacts will be open, the trip-coil end of the circuit should be at negative polarity. 3.6 Time Delay And Its Definition Some relays have adjustable time delay, and others are "instantaneous" or "high speed." The term "instantaneous" means "having no intentional time delay" and is applied to relays that operate in a minimum time of approximately 0.1 second. The term "high speed" connotes operation in less than approximately 0.1 second and usually in 0.05 second or less. The operating 27 Project Report By Rajeev Prajapati
  28. 28. Technofriendz A community of technical scholars time of high-speed relays is usually expressed in cycles based on the power-system frequency; for example, "one cycle" would be 1/60 second in a 60-cycle system. Originally, only the term "instantaneous" was used, but, as relay speed was increased, the term "high speed" was felt to be necessary in order to differentiate such relays from the earlier, slower types. This book will use the term "instantaneous" for general reference to either instantaneous or high-speed relays, reserving the term "high-speed" for use only when the terminology is significant. Occasionally, a supplementary auxiliary relay having fixed time delay may be used when a certain delay is required that is entirely independent of the magnitude of the actuating quantity in the protective relay. Time delay is obtained in induction-type relays by a "drag magnet," which is a permanent magnet arranged so that the relay rotor cuts the flux between the poles of the magnet, as shown in Fig. 4. This produces a retarding effect on motion of the rotor in either direction. In other relays, various mechanical devices have been used, including dash pots, bellows, and escapement mechanisms. The terminology for expressing the shape of the curve of operating time versus the actuating quantity has also been affected by developments throughout the years. Originally, only the terms "definite time" and "inverse time" were used. An inverse-time curve is one in which the operating time becomes less as the magnitude of the actuating quantity is increased, as shown in Fig. 5. The more pronounced the effect is, the more inverse is the curve said to be. Actually, all time curves are inverse to a greater or lesser degree. They are most inverse near the pickup value and become less inverse as the actuating quantity is increased. A definite-time curve would strictly be one in which the operating time was unaffected by the magnitude of the actuating quantity, but actually the terminology is applied to a curve that becomes substantially definite slightly above the pickup value of the relay, as shown in Fig.3.6 28 Project Report Fig3.6: Curves of operating time versus the magnitude of the actuating quantity By Rajeev Prajapati
  29. 29. Technofriendz A community of technical scholars As a consequence of trying to give names to curves of different degrees of inverseness, we now have "inverse," "very inverse," and "extremely inverse." Although the terminology may be somewhat confusing, each curve has its field of usefulness, and one skilled in the use of these relays has only to compare the shapes of the curves to know which is best for a given application. This book will use the term "inverse" for general reference to any of the inverse curves, reserving the other terms for use only when the terminology is significant. 3.7 Electromagnetic Attraction Type Relay Here we shall consider plunger-type and attracted-armature-type a-c or d-c relays that are actuated from either a single current or voltage source. 3.7.1 Operating Principle The electromagnetic force exerted on the moving element is proportional to the square of the flux in the air gap. If we neglect the effect of saturation, the total actuating force may be expressed: Where F = net force. K1 = a force-conversion constant. I = the rms magnitude of the current in the actuating coil. K2 = the restraining force (including friction). When the relay is on the verge of picking up, the net force is zero, and the operating characteristic is: 29 Project Report By Rajeev Prajapati
  30. 30. Technofriendz A community of technical scholars 3.7.2 To Pick Up One characteristic that affects the application of some of these relays is the relatively large difference between their pickup and reset values. As such a relay picks up, it shortens its air gap, which permits a smaller magnitude of coil current to keep the relay picked up than was required to pick it up. This effect is less pronounced in a-c than in d-c relays. By special design, the reset can be made as high as 90% to 95% of pickup for a-c relays, and 60% to 90% of pickup for d-c relays. Where the pickup is adjusted by adjusting the initial air gap, a higher pickup calibration will have a lower ratio of reset to pickup. For overcurrent applications where such relays are often used, the relay trips a circuit breaker which reduces the current to zero, and hence the reset value is of no consequence. However, if a low-reset relay is used in conjuction with other relays in such a way that a breaker is not always tripped when the low-reset relay operates, the application should be carefully examined. When the reset value is a low percentage of the pickup value, there is the possibility that an abnormal condition might cause the relay to pick up (or to reset), but that a return to normal conditions might not return the relay to its normal operating position, and undesired operation might result. 3.7.3 Tendency Toward Vibration Unless the pole pieces of such relays have "shading rings" to split the air-gap flux into two outof-phase components, such relays are not suitable for continuous operation on alternating current in the picked-up position. This is because there would be excessive vibration that would produce objectionable noise and would cause excessive wear. This tendency to vibrate is related to the fact that a-c relays have higher reset than d-c relays; an a-c relay without shading rings has a tendency to reset every half cycle when the flux passes through zero. 30 Project Report By Rajeev Prajapati
  31. 31. Technofriendz A community of technical scholars 3.7.4 Directional Control Relays of this group are used mostly when "directional" operation is not required. More will be said later about "directional control" of relays; suffice it to say here that plunger or attractedarmature relays do not lend themselves to directional control nearly as well as induction-type relays, which will be considered later. 3.7.5 Effect of Transient Because these relays operate so quickly and with almost equal current facility on either alternating current or direct current, they are affected by transients, and particularly by d-c offset in a-c waves. This tendency must be taken into consideration when the proper adjustment for any application is being determined. Even though the steady-state value of an offset wave is less than the relay's pickup value, the relay may pick up during such a transient, depending on the amount of offset, its time constant, and the operating speed of the relay. This tendency is called "overreach" for reasons that will be given later. 3.7.5 Time characteristics This type of relay is inherently fast and is used generally where time delay is not required. Time delay can be obtained, as previously stated, by delaying mechanisms such as bellows, dash pots, or escapements. Very short time delays are obtainable in d-c relays by encircling the magnetic circuit with a low-resistance ring, or "slug" as it is sometimes called. This ring delays changes in flux, and it can be positioned either to have more effect on air increase if time-delay pickup is desired, or to have more effect on air-gap-flux decrease if time-delay reset is required. 31 Project Report By Rajeev Prajapati
  32. 32. Technofriendz A community of technical scholars 3.8 LINE PROTECTION WITH DISTANCE RELAYS Distance relaying should be considered when overcurrent relaying is too slow or is not selective. Distance relays are generally used for phase-fault primary and back-up protection on sub transmission lines, and on transmission lines where high-speed automatic reclosing is not necessary to maintain stability and where the short time delay for end-zone faults can be tolerated. Overcurrent relays have been used generally for ground-fault primary and back-up protection, but there is a growing trend toward distance relays for ground faults also. Single-step distance relays are used for phase-fault back-up protection at the terminals of generators. Also, single-step distance relays might be used with advantage for back-up protection at power-transformer banks, but at the present such protection is generally provided by inversetime overcurrent relays. Distance relays are preferred to overcurrent reIays because they are not nearly so much affected by changes in short-circuit-current magnitude as overcurrent relays are, and, hence, are much less affected by changes in generating capacity and in system configuration. This is because, as described in, distance relays achieve selectivity on the basis of impedance rather than current. 3.9 Choice Between IMPEDANCE, REACTANCE, or MHO Because ground resistance can be so variable, a ground distance relay must be practically unaffected by large variations in fault resistance. Consequently, reactance relays are generally preferred for ground relaying. For phase-fault relaying, each type has certain advantages and disadvantages. For very short line sections, the reactance type is preferred for the reason that more of the line can be protected at high speed. This is because the reactance relay is practically unaffected by arc resistance which may be large compared with the line impedance, as described elsewhere in this chapter. On the other hand, reactance-type distance relays at certain locations in a system are the most likely to operate undesirably on severe synchronizing power surges unless additional relay equipment is provided to prevent such operation. The mho type is best suited for phase-fault relaying for longer lines, and particularly where severe synchronizing-power surges may occur. It is the least likely to require additional 32 Project Report By Rajeev Prajapati
  33. 33. Technofriendz A community of technical scholars equipment to prevent tripping on synchronizing-power surges.1 When mho relaying is adjusted to protect any given line section, its operating characteristic encloses the least space on the R-X diagram, which means that it will be least affected by abnormal system conditions other than line faults; in other words, it is the most selective of all distance relays. Because the mho relay is affected by arc resistance more than any other type, it is applied to longer lines. The fact that it combines both the directional and the distance-measuring functions in one unit with one contact makes it very reliable. The impedance relay is better suited for phase-fault relaying for lines of moderate length than for either very short or very long lines. Arcs affect an impedance relay more than a reactance relay but less than a mho relay. Synchronizing-power surges affect an impedance relay less than a reactance relay but more than a mho relay. If an impedance-relay characteristic is offset, so as to make it a modified relay, it can be made to resemble either a reactance relay or a mho relay but it will always require a separate directional unit. There is no sharp dividing line between areas of application where one or another type of distance relay is best suited. Actually, there is much overlapping of these areas. Also, changes that are made in systems, such as the addition of terminals to a line, can change the type of relay best suited to a particular location. Consequently, to realize the fullest capabilities of distance relaying, one should use the type best suited for each application. In some cases much better selectivity can be obtained between relays of the same type, but, if relays are used that are best suited to each line, different types on adjacent lines have no appreciable adverse effect on selectivity. 3.10 Adjustment of Distance Relays Phase distance relays are adjusted on the basis of the positive-phase-sequence impedance between the relay location and the fault location beyond which operation of a given relay unit should stop. Ground distance relays are adjusted in the same way, although some types may respond to the zero-phase-sequence impedance. This impedance, or the corresponding distance, is called the "reach" of the relay or unit. For purposes of rough approximation, it is customary to assume an average positive-phase¬sequence-reactance value of about 0.8 ohm per mile for open transmission-line construction, and to neglect resistance. 33 Project Report By Rajeev Prajapati
  34. 34. Technofriendz A community of technical scholars To convert primary impedance to a secondary value for use in adjusting a phase or ground distance relay, the following formula is used: CT ratio Zsec = Zpri × ———— VT ratio where the CT ratio is the ratio of the high-voltage phase current to the relay phase current, and the VT ratio is the ratio of the high-voltage phase-to-phase voltage to the relay phase-to-phase voltage–all under balanced three-phase conditions. The principal purpose of the second-zone unit of a distance relay is to provide protection for the rest of the line beyond the reach of the first-zone unit. It should be adjusted so that it will be able to operate even for arcing faults at the end of the line. To do this, the unit must reach beyond the end of the line. Even if arcing faults did not have to be considered, one would have to take into account an underreaching tendency because of the effect of intermediate current sources, and of errors in: (1) Data on which adjustments are based, (2) Current and voltage transformers, (3) Relays. It is customary to try to have the second-zone unit reach to at least 20% of an adjoining line section; the farther this can be extended into the adjoining line section, the more leeway is allowed in the reach of the third-zone unit of the next line-section back that must be selective with this second-zone unit. 34 Project Report Fig3.10.1: Normal selectivity adjustment of second-zone unit. By Rajeev Prajapati
  35. 35. Technofriendz A community of technical scholars The maximum value of the second-zone reach also has a limit. Under conditions of maximum overreach, the second-zone reach should be short enough to be selective with the second-zone units of distance relays on the shortest adjoining line sections, as illustrated in Fig.3.10. 1. Transient overreach need not be considered with relays having a high ratio of reset to pickup because the transient that causes overreach will have expired before the second-zone tripping time. However, if the ratio of reset to pickup is low, the second-zone unit must be set either with a reach short enough so that its overreach will not extend beyond the reach of the first-zone unit of the adjoining line section under the same conditions, or with a time delay long enough to be selective with the second-zone time of the adjoining section, as shown in Fig.3.10.2 In this connection, any under reaching tendencies of the relays on the adjoining line sections must be taken into account. When an adjoining line is so short that it is impossible to get the required selectivity on the basis of react, it becomes necessary to increase the time delay, as illustrated in Fig3.10.2. Otherwise, the time delay of the second-zone unit should be long enough to provide selectivity with the slowest of bus-differential relays of the bus at the other end of the line, Fig3.10.2 Second-zone adjustment with additional time for selectivity with relay of a very short adjoining line section. or line relays of adjoining line sections. The interrupting time of the circuit breakers of these various elements will also affect the second-zone time. This second-zone time is normally about 0.2 second to 0.5 second. 35 Project Report By Rajeev Prajapati
  36. 36. Technofriendz A community of technical scholars Figure 3.10.3 Normal selective adjustment of third-zone unit. The third-zone unit provides back-up protection for faults in adjoining line sections. So far as possible, its reach should extend beyond the end of the longest adjoining line section under the conditions that cause the maximum amount of under reach, namely, arcs and intermediate current sources. Figure 3 shows a normal back-up characteristic. The third-zone time delay is usually about 0.4 second to 1.0 second. To reach beyond the end of a long adjoining line and still be selective with the relays of a short line, it may be necessary to get this selectivity with additional time delay, as in Fig. 3.10.3. Fig3.10.4: Third-zone adjustment with additional time for selectivity with relay of a short adjoining line and to provide back-up protection for a long adjoining line. 36 Project Report By Rajeev Prajapati
  37. 37. Technofriendz A community of technical scholars When conditions of Fig.3.10.4 adjusting the first- and second-zone units. Under no circumstances should the reach of any unit be so long that the unit would operate for any load condition or would fail to reset for such a condition if it had previously operated for any reason. To determine how near a distance relay may be to operating under a maximum load condition, in lieu of more accurate information, it is the practice to superimpose the relay's reset characteristic on an R-X diagram with the point representing the impedance when the equivalent generators either side of the relay location are 90° out of phase. This is done by the method described in drawing the loss-of-synchronism characteristic. Stability can be maintained with somewhat more than a 90° displacement, but 90° is nearly the limit and is easy to depict. 37 Project Report By Rajeev Prajapati
  38. 38. Technofriendz A community of technical scholars Chapter 4 Procedure to Design A Relay 4. 1 Design of Overcurrent Relay 38 Project Report Fig4.1: Circuit diagram, with microcontroller chip By Rajeev Prajapati
  39. 39. Technofriendz A community of technical scholars 4.2 Design Distance Relay Fig 4.2 Circuit Diagram Of Distance Relay 39 Project Report By Rajeev Prajapati
  40. 40. Technofriendz A community of technical scholars 4.3 supply 40 Project Report By Rajeev Prajapati
  41. 41. Technofriendz A community of technical scholars Fig 4.3 Supply of Circuit Chapter 5 Working of a Microcontroller Based Relay At instant start system the microcontroller-based relay is connected to the a.c. supply . A transformer is assembled in hardware which converted ac supply to dc supply . The transformer has a rating of 12 0 12. It had a three terminal output. This relay works on the short circuit protection and overvoltage protection. A electrolytic capacitor is assembled just after the transformer which remove the ripple in the output of the transformer and give the pure dc voltage. This pure dc voltage is used for the operation to give the accurate result, A potentiometer is used for control the microcontroller which has connected to the ADC channel. The movement of the potentiometer is used for the overvoltage protection. When the voltage rating is increase the overvoltage display on the screen and overvoltage protection clear after the clear the fault. The relay works on LG fault protection in 3 phase supply system. The circuit diagram of the short circuit protection shown in the fig. under the normal condition the green Led glow and shown healthy system when the fault occur the line trip from the main supply and the red Led glow . in this condition microcontroller operate and trip the system from the main supply. The system will try to clear the fault at least three time, if the fault is clear the supply will remains continue otherwise permanently fault occur in the system. The result of the fault condition display on the screen. 41 Project Report By Rajeev Prajapati
  42. 42. Technofriendz A community of technical scholars Chapter 6. Programming For Relay #include <stdio.h> #include <htc.h> #include "usart.h" //#define OPTION_REG (*(0x0081)) unsigned char temph,templ,f1,f2,f3,f4; unsigned int voltage; unsigned char ch1,ch2,ch3,ch4,ch5,ch6; void main(void){ unsigned char input; INTCON=0; // purpose of disabling the interrupts. init_comms(); // set up the USART - settings defined in usart.h TRISA = 0xFF; ADCON0 = 0x89; ADCON1 = 0xC0; TRISB = 0x00; // configure PORTB as output TRISD = 0xFF; // printf("rWELCOMEn"); // print welcome on pc 42 Project Report By Rajeev Prajapati
  43. 43. Technofriendz A community of technical scholars while(1) { ADCON0 = 0x81; // CH0 READ this channel is used for over voltage sense i = 500; while (i--); ADCON0 |= 0x04; // START CONVERSION while ((ADCON0&0x04)==0x04); temph = ADRESH; templ = ADRESL; voltage = temph; voltage = voltage<<8; voltage |= templ; ADCON0 = 0x89; // CH1 READ i = 500; while (i--); ADCON0 |= 0x04; // START CONVERSION while ((ADCON0&0x04)==0x04); temph = ADRESH; templ = ADRESL; 43 Project Report By Rajeev Prajapati
  44. 44. Technofriendz A community of technical scholars ch1 = temph ch1 = ch1<<8; ch1 |= templ; ADCON0 = 0x91; // CH2 READ i = 500; while (i--); ADCON0 |= 0x04; // START CONVERSION while ((ADCON0&0x04)==0x04); temph = ADRESH; templ = ADRESL; ch2 = temph; ch2 = ch2<<8; ch2 |= templ; ADCON0 = 0x99; // CH3 READ i = 500; while (i--); ADCON0 |= 0x04; // START CONVERSION while ((ADCON0&0x04)==0x04); temph = ADRESH; templ = ADRESL; 44 Project Report By Rajeev Prajapati
  45. 45. Technofriendz A community of technical scholars ch3 = temph; ch3 = ch3<<8; ch3 |= templ; ADCON0 = 0xA1; // CH4 READ i = 500; while (i--); ADCON0 |= 0x04; // START CONVERSION while ((ADCON0&0x04)==0x04); temph = ADRESH; templ = ADRESL; ch4 = temph; c4 = ch5<<8; ch4 |= templ; ADCON0 = 0xA9; // CH5 READ i = 500; while (i--); ADCON0 |= 0x04; // START CONVERSION 45 Project Report By Rajeev Prajapati
  46. 46. Technofriendz A community of technical scholars while ((ADCON0&0x04)==0x04); temph = ADRESH; templ = ADRESL; ch5 = temph; ch5 = ch5<<8; ch5 |= templ; ADCON0 = 0xB1; CH6 READ i = 500; while (i--); ADCON0 |= 0x04; // START CONVERSION while ((ADCON0&0x04)==0x04); temph = ADRESH; 46 Project Report By Rajeev Prajapati
  47. 47. Technofriendz A community of technical scholars #include <htc.h> #include <stdio.h> #include "usart.h" void putch(unsigned char byte) { /* output one byte */ while(!TXIF) /* set when register is empty */ continue; TXREG = byte; } unsigned char getch() { /* retrieve one byte */ while(!RCIF) /* set when register is not empty */ continue; return RCREG; } unsigned char getche(void) 47 Project Report By Rajeev Prajapati
  48. 48. Technofriendz A community of technical scholars { unsigned char c; putch(c = getch()); return c; } 3. #ifndef _SERIAL_H_ #define _SERIAL_H_ #define BAUD 9600 #define FOSC 4000000L #define NINE 0 /* Use 9bit communication? FALSE=8bit */ #define DIVIDER ((int)(FOSC/(16UL * BAUD) -1)) #define HIGH_SPEED 1 #if NINE == 1 #define NINE_BITS 0x40 #else #define NINE_BITS 0 #endif #if HIGH_SPEED == 1 #define SPEED 0x4 #else #define SPEED 0 48 Project Report By Rajeev Prajapati
  49. 49. Technofriendz A community of technical scholars #endif #if defined(_16F87) || defined(_16F88) #define RX_PIN TRISB2 #define TX_PIN TRISB5 #else #define RX_PIN TRISC7 #define TX_PIN TRISC6 #endif /* Serial initialization */ #define init_comms() RX_PIN = 1; TX_PIN = 1; SPBRG = DIVIDER; RCSTA = (NINE_BITS|0x90); TXSTA = (SPEED|NINE_BITS|0x20) void putch(unsigned char); unsigned char getch(void); unsigned char getche(void); #endif 49 Project Report By Rajeev Prajapati
  50. 50. Technofriendz A community of technical scholars Chapter 7. Component Used to Design Microcontroller Relay 7.1 Diode Diodes allow electricity to flow in only one direction. The arrow of the circuit symbol shows the direction in which the current can flow. Diodes are the electrical version of a valve and early diodes were actually called valves. Fig 7.1 Diode Fig7.1.2 Characteristics of Si Diode Forward Voltage Drop Electricity uses up a little energy pushing its way through the diode, rather like a person pushing through a door with a spring. This means that there is a small voltage across a conducting diode, it is called the forward voltage drop and is about 0.7V for all normal diodes which are made from silicon. The forward voltage drop of a diode is almost constant whatever the current passing through the diode so they have a very steep characteristic (current-voltage graph). 50 Project Report By Rajeev Prajapati
  51. 51. Technofriendz A community of technical scholars Reverse Voltage When a reverse voltage is applied a perfect diode does not conduct, but all real diodes leak a very tiny current of a few µA or less. This can be ignored in most circuits because it will be very much smaller than the current flowing in the forward direction. However, all diodes have a maximum reverse voltage (usually 50V or more) and if this is exceeded the diode will fail and pass a large current in the reverse direction, this is called breakdown. 51 Project Report By Rajeev Prajapati
  52. 52. Technofriendz A community of technical scholars 7.2 Voltage Regulator Voltage regulator, any electrical or electronic device that maintains the voltage of a power source within acceptable limits. The voltage regulator is needed to keep voltages within the prescribed range that can be tolerated by the electrical equipment using that voltage. Such a device is widely used in motor vehicles of all types to match the output voltage of the generator to the electrical load and to the charging requirements of the battery. Voltage regulators also are used in electronic equipment in which excessive variations in voltage would be detrimental. In motor vehicles, voltage regulators rapidly switch from one to another of three circuit states by means of a spring-loaded, doublepole switch. At low speeds, some current from the generator is used to boost the generator’s magnetic field, thereby increasing voltage output. At higher speeds, resistance is inserted into the generator-field circuit so that its voltage and current are moderated. At still higher speeds, the circuit is switched off, lowering the magnetic field. The regulator switching rate is usually 50 to 200 times per second. Electronic voltage regulators utilize solid-state semiconductor devices to smooth out variations in the flow of current. Fig 7.2 Intenal Block Diagram Project Report By Rajeev Prajapati 52
  53. 53. Technofriendz A community of technical scholars 53 Project Report By Rajeev Prajapati
  54. 54. Technofriendz A community of technical scholars 7.2.2 Typical Performance Characteristics 54 Project Report By Rajeev Prajapati
  55. 55. Technofriendz A community of technical scholars 7.3 Led A light-emitting diode is a semiconductor light source. LEDs are used as indicator lamps in many devices and are increasingly used for other lighting. Introduced as a practical electronic component in 1962, early LEDs emitted low-intensity red light, but modern versions are available across the visible, ultraviolet and infrared wavelengths, with very high brightness When a light-emitting diode is forward biased (switched on), electrons are able to recombine with electron holes within the device, releasing energy in the form of photons. This effect is called electroluminescence and the color of the light (corresponding to the energy of the photon) is determined by the energy gap of the semiconductor. An LED is often small in area (less than 1 mm2), and integrated optical components may be used to shape its radiation pattern.LEDs present many advantages over incandescent light sources including lower energy consumption, longer lifetime, improved robustness, smaller size, faster switching, and greater durability and reliability. LEDs powerful enough for room lighting are relatively expensive and require more precise current and heat management than compact fluorescent lamp sources of comparable output. Light-emitting diodes are used in applications as diverse as replacements for aviation lighting, automotive lighting (particularly brake lamps, turn signals and indicators) as well as in traffic signals. The compact size, the possibility of narrow bandwidth, switching speed, and extreme reliability of LEDs has allowed new text and video displays and sensors to be developed, while their high switching rates are also useful in advanced communications technology. Infrared LEDs are also used in the remote control units of many commercial pro ducts including televisions, and other domestic appliances. Fig7.3 LED Project Report By Rajeev Prajapati 55
  56. 56. Technofriendz A community of technical scholars 7.4 Amplifier An electrical signal can be amplified by using a device which allows a small current or voltage to control the flow of a much larger current from a dc power source. Transistors are the basic device providing control of this kind. There are two general types of transistors, bipolar and field-effect. Very roughly, the difference between these two types is that for bipolar devices an input current controls the large current flow through the device, while for field-effect transistors an input voltage provides the control. In this experiment we will build a two-stage amplifier using two bipolar transistors. In most practical applications it is better to use an op-amp as a source of gain rather than to build an amplifier from discrete transistors. A good understanding of transistor fundamentals is nevertheless essential. Because op-amps are built from transistors, a detailed understanding of op¬ amp behavior, particularly input and output characteristics, must be based on an understanding of other digital device. These integrated circuits are also made from transistors, and so the behavior of logic devices depends upon the behavior of transistors. In addition to the importance of transistors as components of op-amps, logic circuits, and an enormous variety of other integrated circuits, single transistors are still important in many applications. Fig7.4 NPN Transistor 56 Project Report By Rajeev Prajapati
  57. 57. Technofriendz A community of technical scholars The three terminals of a bipolar transistor are called the emitter, base, and collector .A small current into the base controls a large current flow from the collector to the emitter. The current at the base is typically one hundredth of the collector-emitter current. Moreover, the large current flow is almost independent of the voltage across the transistor from collector to emitter. This makes it possible to obtain a large amplification of voltage by taking the output voltage from a resistor in series with the collector. We will begin by constructing a common emitter amplifier, which operates on this principle. A major fault of a single-stage common emitter amplifier is its high output impedance. This can be cured by adding an emitter follower as a second stage. In this circuit the control signal is again applied at the base, but the output is taken from the emitter. The emitter voltage precisely follows the base voltage but more current is available from the emitter. The common emitter stage and the emitter follower stage are by far the most common transistor circuit configurations. 57 Project Report By Rajeev Prajapati
  58. 58. Technofriendz A community of technical scholars 7.4 Electrical Characteristics 58 Project Report By Rajeev Prajapati
  59. 59. Technofriendz A community of technical scholars 7.5 Potentiometer A potentiometer is an instrument for measuring the potential (voltage) in a circuit. Before the introduction of the moving coil and digital volt meters, potentiometers were used in measuring voltage. In this arrangement, a fraction of a known voltage from a resistive slide wire is compared with an unknown voltage by means of a galvanometer. The sliding contact or wiper of the potentiometer is adjusted and the galvanometer briefly connected between the sliding contact and the unknown voltage. The deflection of the galvanometer is observed and the sliding tap adjusted until the galvanometer no longer deflects from zero. At that point the galvanometer draws no current from the unknown source, and the magnitude of voltage can be calculated from the position of the sliding contact. Fig 7.5 Potentiometer Operation Circuit In this circuit, the ends of a uniform resistance wire R1 are connected to a regulated DC supply VS for use as a voltage divider. The potentiometer is first calibrated by positioning the wiper (arrow) at the spot on the R1 wire that corresponds to the voltage of a standard cell so that 59 Project Report By Rajeev Prajapati
  60. 60. Technofriendz A community of technical scholars The supply voltage VS is then adjusted until the galvanometer shows zero, indicating the voltage on R2 is equal to the standard cell voltage. An unknown DC voltage, in series with the galvanometer, is then connected to the sliding wiper, across a variablelength section R3 of the resistance wire. The wiper is moved until no current flows into or out of the source of unknown voltage, as indicated by the galvanometer in series with the unknown voltage. The voltage across the selected R3 section of wire is then equal to the unknown voltage. All that remains is to calculate the unknown voltage from the fraction of the length of the resistance wire that was connected to the unknown voltage. The galvanometer does not need to be calibrated, as its only function is to read zero or not zero. When measuring an unknown voltage and the galvanometer reads zero, no current is drawn from the unknown voltage and so the reading is independent of the source's internal resistance, as if by a voltmeter of infinite resistance. Because the resistance wire can be made very uniform in cross-section and resistivity, and the position of the wiper can be measured easily, this method can be used to measure unknown DC voltages greater than or less than a calibration voltage produced by a standard cell without drawing any current from the standard cell. If the potentiometer is attached to a constant voltage DC supply such as a Lead-acid battery, then a second variable resistor (not shown) can be used to calibrate the potentiometer by varying the current through the R1 resistance wire. If the length of the R1 resistance wire is AB, where A is the (-) end and B is the (+) end, and the movable wiper is at point X at a distance AX on the R3 portion of the resistance wire when the galvanometer gives a zero reading for an unknown voltage, the distance AX is measured or read from a preprinted scale next to the resistance wire. The unknown voltage can then be calculated: 60 Project Report By Rajeev Prajapati
  61. 61. Technofriendz A community of technical scholars CHAPTER 8 Advantages of Microcontroller Relay Protective relays play a critical role in the operation of the electrical power system. The protective relays are designed to take action when abnormal conditions occur on the power system. These abnormal conditions may be short circuits, overload conditions, and loss of system synchronism. Elaborate protection schemes have been developed to detect these various conditions using trial and error and system operating experience. The protection schemes have typically been made up of discrete components such as over current relays, distance relays, auxiliary relays, and re-closing relays. All of the devices must be wired together to have a complete, functional scheme, which means time and money in the design, development, and installation process. Due to the number of components that make up these protection schemes, detailed installation tests, and routine maintenance programs must be performed to ensure that the schemes are functioning correctly. Again, this requires a significant investment in time, money, and manpower. For example, a typical step time distance transmission line protection scheme must be maintained every one to three years to ensure that it is performing within specific guidelines. Microcontroller-based multi functional relays offer many advantages over schemes using discrete components. The overall scheme takes up less panel space. The number of components is greatly reduced. The design and wiring is simpler and less costly to implement. Installation testing and maintenance testing can be greatly reduced. Microcontroller-based multi functional relays also offer many features and functions in addition to the base protection functions. Microcontroller-based relays may be used in all electromechanical relay applications. The added benefits of simple scheme design and improved reliability make them a very attractive option. Microcontroller-based relays also make new applications and protection philosophies available. We can implement more flexible protection schemes, reduce maintenance, and obtain more 61 Project Report By Rajeev Prajapati
  62. 62. Technofriendz A community of technical scholars information to increase our understanding of the power system, and improve the reliability of the protection system as a whole at a cost less than conventional electromechanical relays. A typical three-zone step time distance scheme consists of instantaneous tripping elements, two levels of time-delayed tripping elements for phase faults and an instantaneous tripping element, and time over current element for ground faults. For this example, we shall assume that the step time distance scheme uses phase distance and directional ground over current elements. Phase faults are detected using three zones of phase distance relays. Ground faults are detected using a directional ground over current relay which includes a time-over current element and an instantaneous over current element. The protection scheme also includes a single-shot re-closer for automatic line restoration after a fault has been cleared. The electromechanical relay scheme uses three-phase distance relays. These relays may cover all fault types on a per-zone basis or all three zones on a faulted phase pair basis. This depends upon the manufacturer of the distance relays. However, in either case, three distance relays are required. A timer is also required for the time-delayed backup elements. Typically, the time delay is provided from separate timers, so if one timer fails, the entire step time distance scheme is not lost. A single directional ground over current relay shall be used for ground fault detection. A single-shot re-closing relay shall also be provided for restoring the line. A non-directional over current relay shall be used to supervise the Distance relays. The microcontroller-based scheme shall consist of a multifunction relay that provides three zones of step time distance protection, three levels of instantaneous or definite time directional ground over current protection, a directional ground time-over current function, and three-shot re-closer. The microcontroller based scheme shall also include a single-zone microcontroller-based relay as a backup in case of failure of the primary multi-zone relay. Microcontroller-based relays offer many other features that electromechanical relays do not offer such as fault locating, event reporting, advanced metering functions and control capability. Fault locating has become a standard feature in nearly all microcontroller-based relays. The fault locating information reduces patrol time on permanently faulted lines. The fault locating information can also be used to evaluate problem areas on transmission lines. 62 Project Report By Rajeev Prajapati
  63. 63. Technofriendz A community of technical scholars Microcontroller-based relays are perfect for replacing existing protection systems. Microcontroller -based relay uses much less panel space than the existing electromechanical relays. The schemes and operating principles are nearly identical. The wiring is simplified and can be easily modified to accommodate the new relay. The replacement cost is also very low with respect to replacing all or, in some cases, even one electromechanical relay Conclusion Microcontroller-based relays offer many advantages and benefits over electromechanical relays they are: I. Reduced installation costs 2. Reduced maintenance cost 3. Application flexibility 4. Improved monitoring and control functions The use of microcontroller-based relays has become very common. Many utilities are taking advantage of the new features and innovations offered in these relays. New developments in microcontroller based relays offer added benefits by further reducing costs and by improving the relay functions and features. 63 Project Report By Rajeev Prajapati
  64. 64. Technofriendz A community of technical scholars APPENDIX PIC 16F87XA series: 1.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 • U p to 8K x 14 words of Flash Program Memory, Up to 368 x 8 bytes of Data Memory (RAM), Up to 256 x 8 bytes of EEPROM Data Memory • Pinout compatible to other 28-pin or 40/44-pin PIC16CXXX and PIC16FXXX microcontrollers 2.Peripheral Features: • 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 64 Project Report By Rajeev Prajapati
  65. 65. Technofriendz A community of technical scholars • Two Capture, Compare, PWM modules -Capture is 16-bit, max. resolution is 12.5 ns -Compare is 16-bit, max. resolution is 200 ns • Synchronous Serial Port (SSP) with SPI™ (Master mode) and I2C™ (Master/Slave) • Universal Synchronous Asynchronous Receiver Transmitter (USART/SCI) with 9-bit address detection • Parallel Slave Port (PSP) – 8 bits wide with external RD, WR and CS controls (40/44-pin only) • Brown-out detection circuitry for Brown-out Reset (BOR) 3. Analog Features: • 10-bit, up to 8-channel Analog-to-Digital Converter (A/D) • Brown-out Reset (BOR) • Analog Comparator module with: -Two analog comparators -Programmable on-chip voltage reference (VREF) module -Programmable input multiplexing from device inputs and internal voltage reference 4 .Special Microcontroller Features: • 100,000 erase/write cycle Enhanced Flash program memory typical • 1,000,000 erase/write cycle Data EEPROM memory typical • Data EEPROM Retention > 40 years • Self-reprogrammable under software control 65 Project Report By Rajeev Prajapati
  66. 66. Technofriendz A community of technical scholars • In-Circuit Serial Programming™ (ICSP™) via two pins • Single-supply 5V In-Circuit Serial Programming • 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 Debug (ICD) via two pins 66 Project Report By Rajeev Prajapati
  67. 67. Technofriendz A community of technical scholars References 1. Ram Badri “Power system protection switchgear”. Tata Mcgraw-Hill Puvlising Company Ltd, 7th Edition. 2. M.A. Manzoul, “Multiple overcurrent relays using a single microcontroller”, IEEE Trans. Industrial. Electronics., vol. 37, no. 4, pp. 307-309, Aug-1990. 3. M. A. AI-Nema, S. M. Bashi, and A. A. Ubaid, “Microcontroller based overcurrent relays,” IEEE Trans. Ind. Electron., vol. IE-33, no. 1, pp. 49-51, k b . 1986. 4. Wadhwa C.L. “Electrical power system” New Age International (P) Ltd 3rd Edition 2004. 5. M.A. Manzoul and M. Suliman, “Fault tolerant microcontroller-based overcurrent relays,” Microelectron . Reliab., Vol.31, No.1, pp. 133-139, 1991. 6. bhimra P.S. “Electrical Machinery” Khanna Publisher 7th Edition 7. T.S.Sidhu, M.S.Sachdev, H.C. Wood, “Design of a microcontroller-based over current relay”, Power system Research Group, University of Saskatchewan. IEEE Transactions. 8 Computer assessment of IDMT relay performance for phase and earth fault on interconnected Power Systems”, by D.Lidgate & H. Askarian Abeyance. IEEE Proceedings, Vol.135, Pt.C, No.2. 9. “Microcontroller Programming and interfacing”, Douglas V. Hall, Tata Macgraw Hills Publications. 10. “Microcontroller based tansmission line Relay applications” Schweitzer Engineering, Joe Mooney,. Schweitzer Engineering Laboratories, Inc. Pullman, W A USA 67 Project Report By Rajeev Prajapati
  68. 68. Technofriendz A community of technical scholars For More About Electrical Engineering visit Technofriendz A community of technical scholars 68 Project Report By Rajeev Prajapati