MAJOR PROJECT ONDESIGN OF EFFICIENCY METER FOR TRANSFORMERSubmitted in partial fulfillments of requirements for the award of degree ofBACHELOR OF TECHNOLOGYINELECTRICAL AND ELECTRONICS ENGINEERINGBYNAME: ROLL NUMBER:SAI KUMAR P 15315A0215 SAI VARAPRASAD REDDY 14311A02A8LAXMAN G 13311A02A0BHARATH D 14311A02B4 681038133350Department Of Electrical And Electronics Engineering Sreenidhi Institute of Science & Technology Yamnampet, Ghatkesar, Medchal, Telangana. 501301Department of Electrical & Electronics Engineering SREENIDHI INSTITUTE OF SCIENCE & TECHNOLOGY (Autonomous)135731357150CERTIFICATEThis is to certify that the project entitledDESIGN OF EFFICIENCY METER FOR TRANSFORMER Has been carried out by the following students: NAME : ROLL NO. :SAI KUMAR P 15315A0215SAI VARAPRASAD REDDY 14311A02A8LAXMAN G 13311A02A0BHARATH D 14311A02B4of IV year, I semester B. Tech (Electrical & Electronics Engineering) under our supervision during the year 2018 in partial fulfillment of the requirement for the award of Bachelor of Technology degree in Electrical & Electronics Engineering, Jawaharlal Nehru Technological University, Hyderabad.
ACKNOWLEDGEMENTThis project titled “DESIGN OF EFFICIENCY METER FOR TRANSFORMER” was carried out by us.I would like to thank my parents, for all their support and take opportunity to thank our coordinator M RAVIKANTH,Asst. Professor, for his constant and continued encouragement and suggestions in completion of the project successfully.
Also, I would like to thank Mrs.Uma Devi, Assistant Professor, Mrs. Madhulika Das, Assistant professor, project coordinators and Mr.M.Ravikanth,Asst.
professor our Internal guide for their support.I express my deep sense of gratitude to Dr. P.Ravi Babu, Head of the Department, Department of Electrical and Electronics Engineering, SNIST for his encouragement.I would also like to thank Dr. P. Narasimha Reddy, Executive Director and Dr.
K.Shiva Reddy, Principle, for giving us a chance to do this project. Finally, we wish to express our gratitude towards our all teachers, who helped us throughout our course work. We extend our acknowledgement to our lab mates, lab staff, who are directly or indirectly involved in carrying out the project work. with gratitude: SAI KUMAR P 15315A0215 ABSTRACTDESIGN OF EFFICIENCY METRE FOR TRANSFORMER With the advancement of technology there has been a rapid growth in almost each and every field, particularly in the field of instrumentation, design of a crucial instrument that contains fuzzy algorithms is possible with microcontroller chips. The system designed here falls under the subject of electrical instrumentation, in this field we have different instruments for measuring the electrical parameters such as voltage, current, frequency, etc. But there is no such instrument that can measure the efficiency of a power transformer directly. Hence a system is designed with micro controller that measures the efficiency of a power transformer and displays the same in percentage.
So here a system is designed, which does all the above calculations internally through an embedded system and will be displayed through the LCD.1.INTRODUCTION The primary purpose of this project work is to measure & display the transformer efficiency continuously. The system is designed such that the measuring circuits are built with the transformer, there by additional instruments are not required for measuring the efficiency.
This kind of arrangement is essential for few transformers where load conditions are differed frequently. Because of the irregular loads efficiency may fall down, hence continuous monitoring is essential & according to the load conditions, in time action is necessary, otherwise life of the transformer may decrease. To prove the concept practically, a prototype module is constructed with 1:1 ratio single phase transformer, this transformer is designed to deliver a maximum current of 0.
5 Amps current at 220V approximately. Hence applied load to the secondary should not exceed more than 110 watts as continuous load. This transformer consists of an iron core made of laminated sheets, well insulated from one another. The primary & secondary coils are wound on the same core, but are well insulated with each other.
In addition both the coils are insulated from the core. For an ideal transformer, we assume that the resistance of the primary & secondary winding is negligible. Further, the energy losses due to magnetic the iron core is also negligible. The losses are described in 12TH chapter. The main concept is to measure the efficiency at different load conditions; in this regard the trail run transformer used in this project work is overloaded sometimes.
The demo module contains three 60 Watts lamps & these are powered through switches, this arrangement is made to create different load conditions. The functional description of the project work is provided in the next chapter. As the subject is related to the transformer & its efficiency, it is necessary to describe the transformer & its losses; therefore the following is brief description.1.1.BRIEF INTRODUCTION OF TRANSFORMER: A transformer is an electrical device which is used for changing the A.
C. voltages. A transformer is most widely used device in both low and high current circuit. As such transformers are built in an amazing strength of sizes. In electronic, measurement and control circuits, transformer size may be so small that it weight only a few tens of grams whereas in high voltage power circuits, it may weight hundred of tones. In a transformer, the electrical energy transfer from one circuit to another circuit takes place without the use of moving parts. A transformer which increases the voltages is called a step-up transformer. A transformer which decreases the A.
C. voltages is called a step-down transformer. Transformer is, therefore, an essential piece of apparatus both for high and low current circuits.2.WORKING OF TRANSFORMER A transformer is a device that transfers electrical energy from one circuit to another through inductively coupled conductors or the transformer’s coils. A varying current in the first or primary winding creates a varying magnetic flux in the transformer’s core, and thus a varying magnetic field through the secondary winding. This varying magnetic field induces a varying electromotive force (EMF) or "voltage" in the secondary winding. This effect is called mutual induction.
If a load is connected to the secondary, an electric current will flow in the secondary winding and electrical energy will be transferred from the primary circuit through the transformer to the load. In an ideal transformer, the induced voltage in the secondary winding (VS) is in proportion to the primary voltage (VP), and is given by the ratio of the number of turns in the secondary (NS) to the number of turns in the primary (NP) as follows: By appropriate selection of the ratio of turns, a transformer thus allows an alternating current (AC) voltage to be "stepped up" by making NS greater than NP, or "stepped down" by making NS less than NP. In the vast majority of transformers, the notable exception.Transformers come in a range of sizes from a thumbnail-sized coupling transformer hidden inside a stage microphone to huge units weighing hundreds of tons used to interconnect portions of national power grids. All operate with the same basic principles, although the range of designs is wide. While new technologies have eliminated the need for transformers in some electronic circuits, transformers are still found in nearly all electronic devices designed for household ("mains") voltage. Transformers are essential for high voltage power transmission, which makes long distance transmission economically practical.2.
1. Introduction to Transformer Losses Transformer losses are produced by the electrical current flowing in the coils and the magnetic field alternating in the core. The losses associated with the coils are called the load losses, while the losses produced in the core are called no-load losses.
Load Losses Load losses vary according to the loading on the transformer. They include heat losses and eddy currents in the primary and secondary conductors of the transformer. Heat losses, or I2R losses, in the winding materials contribute the largest part of the load losses. They are created by resistance of the conductor to the flow of current or electrons. The electron motion causes the conductor molecules to move and produce friction and heat.
The energy generated by this motion can be calculated using the formula:Watts = (volts) (amperes) or VI. According to Ohm’s law, V=RI, or the voltage drop across a resistor equals the amount of resistance in the resistor, R, multiplied by the current, I, flowing in the resistor. Hence, heat losses equal (I) (RI) or I2R. Transformer designers cannot change I, or the current portion of the I2R losses, which are determined by the load requirements.
They can only change the resistance or R part of the I2R by using a material that has a low resistance per cross-sectional area without adding significantly to the cost of the transformer. Most transformer designers have found copper the best conductor considering the weight, size, cost and resistance of the conductor. Designers can also reduce the resistance of the conductor by increasing the cross-sectional area of the conductor.No-load Losses No-load losses are caused by the magnetizing current needed to energize the core of the transformer, and do not vary according to the loading on the transformer. They are constant and occur 24 hours a day, 365 days a year, regardless of the load, hence the term no-load losses. They can be categorized into five components: hysteresis losses in the core laminations, eddy current losses in the core laminations, I2R losses due to no-load current, stray eddy current losses in core clamps, bolts and other core components, and dielectric losses.
Hysteresis losses and eddy current losses contribute over 99% of the no-load losses, while stray eddy current, dielectric losses and I2R losses due to no-load current are small and consequently often neglected. Thinner lamination of the core steel reduces eddy current losses. The biggest contributor to no-load losses is hysteresis losses. Hysteresis losses come from the molecules in the core laminations resisting being magnetized and demagnetized by the alternating magnetic field. This resistance by the molecules causes friction that result in heat.
The Greek word, hysteresis, means ;to lag; and refers to the fact that the magnetic flux lags behind the magnetic force. Choice of size and type of core material reduces hysteresis losses3.FUNCTIONING PROCEDUREThe procedure of efficiency measurement is set in motion with power transformer; this is the basic electrical device need to measure the efficiency of it. For this purpose single phase transformer is used, in general transformers categorized in to two types, step-up or step-down, but here this transformer is designed to produce equal voltage at secondary that is applied at primary. This type of transformer is called as one-to-one, i.
e. the ratio is 1:1. The secondary voltage will be the same as primary at no-load condition, as described in the introduction this transformer is rated for 110 Watts, thereby it can drive two 60 Watts lamp loads comfortably. To create difference in efficiency, transformer is overloaded by connecting additional load of another 60 Watts lamp. Thereby the demo module is having three 60 Watts lamps, ; these lamps are powered through switches. When one lamp is energized, the voltage may fall down by 2-3 % approximately, if another load is activated the voltage may fall down by another 2%, this is treated as normal condition, but when third lamp is energized, the voltage may fall down drastically because the transformer is overloaded.
There by the load conditions are differed manually to create the difference in efficiency. The process starts from measuring the input voltage ; current, i.e. primary voltage ; current. The load current is measured with CT (Current Transformer); similarly the primary voltage is measured with PT (Potential Transformer). Similarly with the help of another CT ; PT, secondary voltage ; current are measured. To monitor the load current of both windings individually two CT’s are used with their primary connected in series with the load. Now the current flowing through each CT primary is monitored.
These CT’s are able to generate sufficient voltage at secondary though the load is less. When one lamp load of 60 Watts is energized very less current of 0.3Amps approximately will be passed through CT primary. As the load is less, there won’t be any appreciable voltage drop at primary, it is negligible. But because of the transformer action & as this CT is designed in 1: 50 ratio, sufficient voltage will be produced at secondary.
The outputs of both the CT’s are rectified ; filtered, voltage is adjusted for the calibration at particular reference point, and then the values are converted in to digital through ADC. As this ADC is interfaced with microcontroller, the controller reads the data of both CT’s outputs. Now the current flowing through each CT is displayed independently through LCD panel interfaced with controller through its output port. The other important function for calculating the efficiency is to measure the input & output voltages; in this regard primary as well as secondary voltages are monitored through PT’s, these PT’s primaries are connected across the windings. Here a step down transformer of six volts at secondary is used; this voltage varies proportionately according to the primary voltage. The output of both PT’s are rectified ; filtered through diodes ; capacitor, after converting the output in to pure DC, using a potential dividing network connected across the DC source output voltage is adjusted to the desired level for the calibration.
This voltage is called reference voltage ; this voltage varies according to the line voltage. The potential dividing network is designed with 2K variable resistor; there by reference voltage can be varied very linearly. The outputs of both the CT’s & PT’s are fed to ADC, the ADC used in this project work is having eight channels, out of eight channels four channels are engaged to acquire analog data of both windings voltage ; current. The analog information is converted in to digital through eight bit; this information is passed to the microcontroller. This ADC selects the input channel according to the command signals received from the controller. As all the channels data must be converted, all the channels are selected one after another in a sequence.
The conversion time depends upon the clock frequency produced by the timer chip. According to the device manufacturer instructions, the clock frequency must be 10 KHz, there by the conversion time will be as fast as 20 milliseconds. Hence the ADC 0809 can be said as high speed device. The frequency produced by the timer chip is configured as ‘Astable multi-vibrator’. Based on the values of resistor and capacitor connected externally to the frequency compensation pins, the frequency can be set to the required level.
The display section is designed with 2 lines LCD (Liquid Crystal Display), this LCD is having 16 characters in each line, there by all the four values with efficiency can be displayed simultaneously in short cut method. The display shows both windings voltage ; current levels simultaneously, in addition efficiency is also displayed. The collected data from ADC is calculated by the microcontroller unit internally, ; finally efficiency will be displayed in percentage. The instrument designed with 89C51 microcontroller performs the function of calculator ; displays the result automatically. The microcontroller chip used in this project work belongs to atmel family, this is very popular device generally used for many applications because it offers many latest expectations.
This is an 8- bit controller widely used for instrumentation ; control applications. This microcontroller is the integration of a microprocessor having 4kb memory, 32 I/O lines, timers, ROM, etc. on a single chip. As this chip is having four ports, lot of electronic hardware can be interfaced with this single chip.
The ADC ; LCD used in this project work requires more I/O lines, hence out of four ports three ports are engaged for these two devices. Micro-controller works according to the program written in it. The program is written in such a way, so that the Microcontroller can read and it can store the information received from the A-D Converter circuit. After many internal calculations, finally this controller displays the transformer efficiency. In general Micro-controllers are dedicated to one task and run one specific program. But here the program is prepared for multi functions, such that the controller is monitoring the various parameters data acquired from the ADC, calculated internally ; result is displayed. The program is stored in ROM (read-only memory) and generally does not change. The detailed description is provided in following chapters3.
1.LOAD SENSING CIRCUITTwo similar types of circuits are constructed for measuring the transformer primary ; secondary load currents. The main function of this circuit is to measure the current that is flowing through current transformer (CT) primary.
For any power transformer this is an important feature for measuring the efficiency. As described in previous chapters, here this power transformer is designed to deliver a maximum current of 0.5amps from its secondary, so the load applied to the secondary should not exceed more than 110 Watts. To create difference in efficiency, this transformer can be overloaded for few seconds; hence additional load is also arranged over the demo module. The CT primary is connected in series with the load, ; depending up on the current flowing through its primary, little voltage will be induced at primary. This drop across the primary is negligible, because the primary will have very less turns when compared with secondary turns. Often most industrial CT’s primary will be having only one turn, the voltage induced at this primary is directly proportional to the load current. If more current is passed more voltage will be induced.
The current transformer is used with its primary winding connected in series with line carrying the current to be measured and, therefore, the primary current is dependant upon the load connected to the system and is not determined by the load (burden) connected on the secondary winding of the current transformer. The primary winding consists of very few turns and, therefore, there is no appreciable voltage drop across it. The secondary winding of the current transformer has larger number of turns, the exact number being determined by the turns ratio.
The function of the CT used in this project work is to amplify the voltage at secondary; it is nothing but a step-up transformer. This transformer is designed in 1:50 ratio, so that the voltage developed across the secondary is 50 times more than the voltage induced at primary. The CT secondary when it is open circuited, the voltage developed across the open terminals may be very high because of the step-up ratio, and therefore the secondary winding of the CT should always be connected to a burden resistor.
The secondary AC signal, which is proportional to the current flowing through the primary, due to transformer action, is rectified with the help of a diode (Half wave rectification) and then filtered by a filter capacitor. This DC voltage is a variable voltage, which varies according to the load current. The variable voltage from the CT secondary is fed to analog to digital converter for converting the analog information into digital information. The output of the A/D converter is fed to Microcontroller, now according to the program prepared for the controller; it reads and displays the both channels current in amps. The current transformer used in this project work is designed for 3 Amps i.
e., the current flowing through the primary is restricted for 3 Amps because of the winding wire gauge. A 470 ohms resistor connected across the CT secondary is acting as Burden resistor, therefore a steady voltage proportionate to the current flowing through the primary will be appeared at secondary. This voltage can be adjusted to the required level through a potential divider designed with 2K variable resistor; output is taken from mid point of the preset & it is fed to the ADC. DESCRIPTION OF CT In general the current transformers are used with low range ammeters to measure currents in high voltage alternating current circuits. As this transformer is having two separated isolated windings, the instrument which is designed to measure the high voltage line is isolated for safety precautions. Most of the CT’s are designed to generate low current voltages at secondary, they step-down the current in a known ratio. The current or series transformer has a primary coil of one or more turns of thick wire connected in series with the line whose current is to be measured.
The secondary consists of large number of turns of line wire and connected across the ammeter terminals. As regards voltage, the transformer is of step-up variety but it is obvious that current will be stepped down. For example if the current transformer has secondary to primary turn ratio of 100:5, then it steps up the voltage in the 20:1 ratio whereas it steps down the current in the ratio 1:20. Hence if we know current ratio of the transformer and the reading of the A.C. ammeter, the line current can be calculated. One of the most commonly used current transformers is one known as clamp-on or clip-on type.
It has a laminated core, which is so arranged that it can be opened out at a hinged section by merely pressing a trigger like projection. When the core is thus opened, it permits the admission of very heavy current carrying bus bars or feeders whereupon the trigger is released and the core is tightly closed by a spring. The current carrying conductor or feeder acts as a single turn primary whereas the secondary is connected across the standard ammeter conveniently mounted in the handle of instrument. It should be noted that, since the ammeter resistance is very low, the current transformer normally works short-circuited. If for any reason the ammeter is taken out of the secondary winding, then this winding must be short-circuited. If this is not done, then due to the absence of counter amp-turns of the secondary, the unopposed primary m.m.
f. will set up an abnormally high flux in the core, which will produce excessive core loss with subsequent heating and a high voltage across the secondary terminals. This is not the case with ordinary constant potential transformers, because their primary current is determined by the load on their secondary whereas in a current transformer, the primary current is determined entirely by the load on the system.
Hence the circumstances The following is the circuit diagram of load sensing circuit.FIG:1 LOAD SENSING UNIT3.2. VOLTAGE MONITORING CIRCUIT The voltage sensing circuit is designed with potential transformer (PT). Here two PT’s are used for measuring the power transformer primary & secondary windings voltages independently. In general these transformers are extremely accurate-ratio step-down transformers and are used to measure high voltages at primary side. The transformation ratio will be accurate, gives the proportionate true voltage on secondary side. Most of the PT’s are designed to measure a very high voltage at primary side; therefore the secondary is isolated to with stand up to 11KV when tested with megger.
These types of PT’s are used to measure the HT line voltages. But here the PT application is deferred it is intended to measure single phase supply, there by the measuring voltage will not exceeds more then 250V under any conditions. The PT used in this project work can generate 6V at secondary when 220V applied at primary. This voltage varies proportionately according to the line voltage; here the line voltage is nothing but main transformer primary or secondary. The primary voltage is constant according to the line supply; whereas the secondary voltage of main transformer varies according to the load applied to it. The PT secondary is rectified & filtered for converting the ac to pure dc, this voltage is adjusted to the required level & it is fed to ADC for converting the analog information in to digital.
Based on this digital data the controller can read both winding voltages & displayed independently through LCD. The potential transformer used in this project is having centre tap at secondary, with the help of two diodes the ac voltage is rectified in to dc. A large capacitor of 1000 microfarads is connected across the dc source for smoothening the dc. The reference voltage is adjusted through 2K variable resistor (preset); this preset is acting as a potential dividing network. The output (reference voltage) is taken from the mid point of the preset; this voltage can be varied very linearly. Initially we required some known reference value; accordingly sample voltage at secondary can be adjusted.
For example, if the line voltage is 200V at primary of PT, according to this the PT secondary voltage can be set to 2V through preset. This is treated as reference value, based on this value the controller can estimate the PT primary voltage & same will be displayed through LCD. The applied voltage to the ADC should not exceed more than 5V, so that the output voltage is clamped at +5V DC, for this purpose, 1W, 5V zener is used. The following is the circuit diagram of the High voltage Sensing FIG:2 VOLTAGE SENSING CIRCUIT4.A/D CONVERTERThe main function of this converter is to convert the analog information produced by the CT or PT in to digital through eight bit data. Most of the real physical quantities such as temperature, voltage, current etc.
are available in analog form. Even though an analog signal represents a real physical parameter with accuracy, it is difficult to process further in digital circuits. Therefore for processing, it is often convenient to express this variable in digital form.
It gives better accuracy for the process automation. The analog signal obtained from the transducer is sampled at a particular frequency rate. The sampled signal has to be held constant while conversion is taking place in ADC. This requires that ADC should be preceded by a sample and hold circuit built in with the same device. The ADC output is a sequence in binary digit. Here in this project work Microcontroller is used to perform the numerical calculations of the desired control algorithm. The most commonly used ADC’s are successive approximation and the integrator type. The successive approximation ADC’s are used in applications such as data loggers and instrumentation where conversion speed is important.
The successive approximation and comparator type are faster but generally less accurate than integrating type converters. The flash (comparator) type is expensive for high degree of accuracy. The integrating type converter is used in applications such as digital meter, panel meter and monitoring systems where the conversion accuracy is critical. Here the ADC is interfaced with microcontroller and the purpose is to display the data that is obtained from the ADC and to implement control action. The following is the brief description about microcontroller & ADC working together, i.e. control theory that is relevant to the ADC.
The control theory that is relevant to the analysis and design of microcontroller controlled systems, with an emphasis on basic concepts and ideas. It is assumed that a digital controller with reasonable software is available for computations and simulations so that many tedious details can be left to the microcontroller. The control system design is also carried out up to the stage of implementation in the form of programs prepared for microcontrollers in machine (assembly) language. At best the results are only as good as those obtained with analog circuits. The controller or computer-controlled system contains essentially four parts, i.e.
, the process, the analog to digital converter, the control algorithm, and the clock. The times when the measured signals are converted to digital form are called the sampling instants; the time between successive samplings is called the sampling period and is denoted by h. The output from the process is a continuous time signal. The output is converted into digital form by the A – D converter. The conversion is done at the sampling times. The microcontroller understand the converted signal, as a sequence of numbers, processes the measurements using an algorithm, and gives a new sequence of numbers.
In this project work, the program is prepared in assembly language & it is derived from ‘C’, and facilitates that the parameter values are displayed through 2 lines LCD. Now coming to the ADC, the process of converting an analog voltage into an equivalent digital signal is known as Analog to Digital Conversion (ADC). The A/D converter used in this project work is having 8 channels, and out of 8 channels 6 channels are used, the remaining 2 channels are left over for the future expansion. This IC is having built in multiplexer, so that channel selection can be done very easily through the micro controller. As described in the next chapter, conversion time depends up on the clock rate that is produced by the 555 timer IC. As the peripheral signals usually are substantially different from the ones that microcontroller can understand (zero and one), they have to be converted into a pattern which can be comprehended by a microcontroller.
This task is performed by a block for analog to digital conversion or by an ADC. This block is responsible for converting an information about some analog value to a binary number and for follow it through to a CPU block so that CPU block can further process it. FIG:3 Converting an analogue to digital formThis analog to digital converter (ADC) converts a continuous analog input signal, into an n-bit binary number, which is easily acceptable to a microcontroller. As the input increases from zero to full scale, the output code stair steps. The width of an ideal step represents the size of the least significant Bit (LSB) of the converter and corresponds to an input voltage of VES/2n for an n-bit converter. Obviously for an input voltage range of one LSB, the output code is constant. For a given output code, the input voltage can be anywhere within a one LSB quantization interval.
An actual converter has integral linearity and differential linearity errors. Differential linearity error is the difference between the actual code-step width and one LSB. Integral linearity error is a measure of the deviation of the code transition points from the fitted line. The errors of the converter are determined by the fitting of a line through the code transition points, using least square fit, the terminal point method, or the zero base technique to provide the reference line.
A good converter will have less than 0.5 LSB linearity error and no missing codes over its full temperature range. In the basic conversion scheme of ADC, the unknown input voltage VX is connected to one input of an analog signal comparator, and a time dependant reference voltage VR is connected to the other input of the comparator. 4.1.SUCCESSIVE APPROXIMATION A/D CONVERTERS:Successive approximation A/D conversion is best suited for many applications where speed is important. This type of A/D converter requires only N+1 clock cycles to make the conversion, and some designs allow truncation of the conversion process after fewer cycles if the final value is found prior to N+1 Cycles. The successive approximation converter operates by making several successive trails at comparing the analog input voltage with a reference generated by a DACPARALLEL OR “FLASH” A/D converters: The parallel A/D Converter is probably the fastest A/D circuit known; indeed, the very fastest ordinary commercial products use this method.
Some sources call the parallel A/D converter the “flash” circuit because of its inherent high speed. The parallel A/D converter consists of a blank of (2N-1) voltage comparators biased by reference potential Vref through a resistor Network that keeps the individual comparators 1-LSB a port. Since the input voltage is applied to all the comparators simultaneously, the speed of conversion is limited essentially by slow rate of the slowest comparator in the bank, and also by the decoder circuit propagation time. The decoder converts the output code to binary code needed by the computers. The A/D converter is a circuit that is used to produce a binary number output that represents an analog voltage applied to the input. 5.
PULSE GENERATORThe required clock pulses for the ADC are generated through 555 Timer IC, this chip is configured as Astable multi-vibrator (Self Oscillator). In this mode of operation the required frequency can be adjusted using two external components i.e., resistor and capacitor. Keeping capacitor value constant whereas by varying the value of resistor the frequency can be adjusted from 1Hz to 500 KHz. Here the required frequency is 10 KHz approximately.
The ADC used in this project work belongs to signatics, & the manufacturer of this device recommends operating the device by feeding 10 KHz frequency for fast response. The conversion time depends up on the clock signal. The required frequency can be adjusted using variable resistor of 100K (RB).
The following is the description of timer IC.The 555 is an integrated circuit implementing a variety of timer and multi-vibrator applications. The IC was designed and invented by Hans R. Camenzind. It was designed in 1970 and introduced in 1971 by Signatics (later acquired by Philips).
The original name was the SE555/NE555 and was called "The IC Time Machine". The 555 gets its name from the three 5-kOhm resistors used in typical early implementations. It is still in wide use, thanks to its ease of use, low price and good stability. The 555 timer is one of the most popular and versatile integrated circuits ever produced. It includes 23 transistors, 2 diodes and 16 resistors on a silicon chip installed in an 8-pin mini dual-in-line package (DIP-8). The 556 is a 14-pin DIP that combines two 555s on a single chip. The 558 is a 16-pin DIP that combines four slightly modified 555s on a single chip (DIS & THAT are connected internally; TR is falling edge sensitive instead of level sensitive). Also available are ultra-low power versions of the 555 such as the 7555 and TLC555.
The 7555 requires slightly different wiring using fewer external components and less power.The 555 timer has three operating modes:Monostable mode: in this mode, the 555 functions as a "one-shot". Applications include timers, missing pulse detection, bounce free switches, touch switches, Frequency Divider, Capacitance Measurement, Pulse Width Modulation (PWM) etcAstable – Free Running mode: the 555 can operate as an oscillator.
Uses include LED and lamp flashers, pulse generation, logic clocks, tone generation, security alarms, pulse position modulation, etc.Bistable mode or Schmitt trigger: the 555 can operate as a flip-flop, if the DIS pin is not connected and no capacitor is used. Uses include bounce free latched switches, etc.The connection of the pins is as follows:Nr. Name Purpose1 GND Ground, low level (0V)2 TR A short pulse high ? low on the trigger starts the timer3 Q During a timing interval, the output stays at +VCC4 R timing interval can be interrupted by applying a reset pulse to low (0V)5 CV Control voltage allows access to the internal voltage divider (2/3 VCC)6 THR The threshold at which the interval ends (it ends if U.thr ? 2/3 VCC)7 DIS Connected to a capacitor whose discharge time will influence the timing interval8 V+, VCC The positive supply voltage which must be between 3 and 15 VASTABLE MODE OF OPERATION:A 555 set in the Astable mode is basically an oscillator. It changes states by itself according to the support components connected externally. On (high) then off (low) then on then off.
.. in the schematic diagram given below, an LED is connected at the output, which turns on turn off at every interval of one second. According to that the timing components are selected, based on the formulas given below frequency can be adjusted to the required level. The following is the circuit diagram.FIG:3 IC 555 TIMERDescription of Circuit: This circuit requires very few external components. The main three are R1, R2 and C1.
C2 is merely there to prevent instability problems. R3 limits current to the LED. A 9V battery is used as power source, but for the same purpose 5V supply also can be used. The time high (ON) and time low (OFF) are determined by R1, R2 and C1.
Let’s call the time high Th and the time low Tl. The total time is TtThe formula to solve Th is: Th = 0.693 X C1 X (R1 + R2) In the circuit above R1 is 1 Ohm, R2 is 147,000 Ohms (147K) and the Capacitor is .00001 Farads (10 microfarads). Th=0.693X0.00001 X(1+147,000) Th = .693 X .
00001 X 147001 Th = 1.014 Seconds Now to figure out the Time low, we use the same formula ignoring R1. Tl = 0.693 X C1 X R2 Tl = .693 X .00001 X 147,000 Tl = 1.014 seconds All that is left to figure out is Time Total. Just add the Tl and Th.
Tt = Th + Tl Tt = 2.03 seconds If we want to convert this to frequency instead of time: F = 1/Tt F = .5 Hertz (Hz) or cycles per second. Using a one ohm resistor for R1 gives nearly the same time on as off. The ratio of time ON to total time is called Duty Cycle. The example circuit we made has a duty cycle of 1:2 or 50% (50% on and 50% off) To make a circuit that provides with a longer time on and shorter time off, the following is the example: C1 = 10 microfarad (.00001 Farad) R1 = 147K R2 = 47KTh = .
693 X .00001 X 194,000 Th = 1.34 seconds. Tl = .693 X .00001 X 47,000 Tl = .33 seconds This produces a circuit with the LED on for 1.
34 seconds and off .33 seconds. Its duty cycle is now 3:4 or 75%. The following is the simple formula to figure out duty cycle.
Percentage of Duty CyCle = (Th divided by Tt) X 100 5.1.DISPLAY SECTIONThe display section is designed with LCD panel; this panel is interfaced with microcontroller through its output port. This panel is having two rows, and each row contains 16 characters. These panels are capable of display numbers, characters, and graphics.
The display contains two internal byte-wide registers, one for commands (RS=0) and the second for characters to be displayed (RS=1), it also contains a user. Programmed RAM area (the character RAM), that can be programmed to generate any desired character can be formed using a dot matrix. To distinguish between these two data areas, the hex command byte 80 will be used to signify that the display RAM address 00h is chosen.The LCD circuit is constructed with 89C51 microcontroller. The LCD contains 16 pins of which 8 are data pins and 3 are control pins.
The microcontroller used in this project work is having 32 I/O lines and 10 I/O lines are interfaced with LCD panel, D0 – D7 of LCD panel are called as 8 – bit data pins and this panel acquires the information from microcontroller through this data pins. The data receiving module which is called as wireless scrutinizer is designed as portable; this module is powered with 6V battery. Push to on switch is used to provide supply to the portable unit. Whenever the receiver is brought with in the range and by depressing the switch, the information acquired through RF module will be decoded and displayed through this LCD. The main function of this receiver unit is to locate the fault in power system.
Due any fault, if the power system is failed, that failure cause will be displayed. If the power system is working well, then parameter values are displayed. Similarly if the power system fuse is blown, this information also will be displayed through same LCDThe following figure shows how the display unit is interfaced to the Microcontroller.FIG: 4 LIQUID CRYSTAL DISPLAY Interfacing the display unit to the microcontroller: As seen from the above figure, Pins from 7 to 14 are data pins used for the selection of a particular character and pins 4 to 6 are Control signal pins used for performing Register bank selection, Read / Write and Enable pins respectively. By adjusting the voltage at pin number 3 we can change the contrast of the display. To display a particular character its associated logic sequence has to be placed on the data pins and write signal (Pin-6) has to be enabled.
Microcontroller takes care of all these things based on the program loaded into it. In the receiving end, Microcontroller places the logic sequence on the data pins based on the information obtained from the decoder output.The function of each pin is given in the following table. Pin Symbol I/O Description1 Vss– Ground2 Vcc– +5V Power Supply3 VEE– Power supply to Control Contrast4 RS I RS = 0 to select command register, RS=1 to select data register5 R/W I R/W =0 for write, R/W=1 for read6 EI/O Enable7 DB0I/O The 8-bit data bus8 DB1I/O The 8-bit data bus9 DB2I/O The 8-bit data bus10DB3I/O The 8-bit data bus11DB4I/O The 8-bit data bus12DB5I/O The 8-bit data bus13DB6I/O The 8-bit data bus14DB7I/O The 8-bit data busTable:5.
1 Function of each pin in LCDIn the above table Vcc and Vss are supply pins and VEE (Pin no.3) is used for controlling LCD contrast. Pin No.4 is Rs pin for selecting the register, there are two very important registers are there in side the LCD.
The RS pin is used for their selection as follows. If RS = 0, the instruction command code register is selected, allowing the user to send a command such as clear display. If RS=1, the data register is selected, allowing the user to send data to be displayed on the LCD. R/W is a read or writes Pin, which allows the user to write information to the LCD or read information from it.
R/W=1 when reading, R/W=0 when writing. The enable (E) pin is used by the LCD to latch information presented to its data pins. When data is supplied to data pins, a high –to-low pulse must be applied to this pin in order for the LCD to latch in the data present at the data pins. This pulse must be a minimum of 450 ns wide.The 8-bit data pins, D0-D7, are used to send information to the LCD or read the contents of the LCD’S internal registers. To display letters and numbers, we must send ASCII (Antenna Standard Code for Information InterChange, Pronounced “ask – E”) codes for the letters A – Z, and numbers 0 – 9 to these pins while making RS=1.DESCRIPTION ABOUT LCD INTERFACINGThis section explains about how to interface the LCD to Microcontroller, before interfacing we have to study the operation modes of LCD’s and how to program using assembly language and C. In recent years the LCD panels became very popular because of their widespread use in various electronic systems like instruments to read the parameter values, digital communications for sending or receiving the text information, data acquisition systems, etc.
These display units dominating seven segment displays by providing more features to the user. The LCD system can display numbers, characters, and graphics, whereas seven segments LED displays only numbers, therefore most of the engineers prefers LCD’s. The data fed to the LCD remains as it is and the same will be displayed until it gets an erase signal from the controller. The data can be stored and it can be refreshed for the next task. The instruction command codes from microcontroller can be sent to the LCD to clear the display, depending up on the command the cursor can be brought to home position or blink the cursor. The LCD is having two important resistors internally, command resistor and data register; RS pin is used to select either command register or data register. If RS = 0, the instruction command code register is selected and allowing the user to send a command to clear the display.
If RS = 1 the data register is selected, there by the user is allowed to send data that is to be displayed on LCD screen. By making RS pin to zero, we can also check the busy flag bit to see if the LCD is ready to receive information. As already mentioned that D0 – D7 of LCD pins are 8 – bit data pins and the busy flag is D7, it can be read when R/W (Read or Write) pin is high (R/W = 0) and RS = 0, as follows; if R/W = 1, R/S = 1. When D7 pin is high, the LCD is busy taking care of internal operations and will not accept any new information.
When D7 = 0, the LCD is ready to receive new information. It is recommended to check the busy flag before writing any data to the LCD. The following is the table shows the list of instruction command codes. Code Command to LCD Instruction 1 Clear display screen 2 Return home 4 Decrement cursor (shift cursor to left) 6 Increment cursor (shift cursor to right) 5 Shift display right 7 Shift display left 8 Display off, cursor off A Display off, cursor on C Display on, cursor off E Display on, cursor blinking F Display on, cursor blinking 10 Shift cursor position to left 14 Shift cursor position to right 18 Shift the entire display to the left IC Shift the entire display to the right 80 Force cursor to beginning of first line CO Force cursor to beginning of second line 38 2 Lines and 5×7 Matrix Table:5.
2 Commands to LCD Screen To send any commands from instruction command code table to the LCD, make RS pin to zero. For data, feed high signal to RS pin, then send a high – to – low pulse to the E pin to enable the internal latch of the LCD. For this, the suitable program is to be prepared for LCD connections. Another suitable program is to be prepared for sending code to the LCD with checking busy flag. Depending up on the program the busy flag can be D7 of the command resistor, to read command register R/W pin must be high and RS pin must be low, and a low to high pulse for the enable pin will provide the command register.
After reading the command register, if bit D7 (busy flag) is high, the LCD is busy and no information (either command or data) should be issued to it. During D7 is zero; at that time we can send data or commands to the LCD. In this method time delays are not required in the program, because we are checking the busy flag before issuing commands to the LCD. Enable line must be negative-edge triggered for the write and it should be positive-edge triggered for the read. 6.MICROCONTROLLER Today, there is no such instrument that can functions without Microcontroller. Micro controllers have become an integral part of all instruments.
Many tedious from simple to dedicated tasks are left over to the controller for solutions. The Microcontroller used in this project work is ATMEL 89C51, basically this IC belongs to 8051 family. In 1981, Intel Corporation introduced an 8- bit Microcontroller, which is named as 8051. This controller is having 128 bytes of RAM, 4K bytes of ROM, two timers, one serial port, and four ports.
This IC is called as 8- bit Processor, means that the CPU can work on only 8-bits of data at a time. The 8051 is having four ports and each port contain 8 input / output lines. This IC became very popular after Intel allowed other manufacturers to make and market any flavors of the 8051 they please with the condition that they remain code compatible with the 8051. This has led to many versions of the 8051 with different speeds and amounts of on-chip ROM marketed by many manufacturers. ATMEL is one of the major manufacturers of these devices and are compatible with the original 8051 as far as the instructions are concerned. The original 8051 of Intel are having a maximum of 64K bytes of on-chip ROM, where as the ATMEL 89C51 is having only 4K bytes on the chip. ATMEL 89C52 is designed with 8K memory, like wise up to 20K bites on the chips are available from ATMEL Company. The Atmel Corporation has a wide selection of 8051 chips and out of, the AT89C51 is a popular and inexpensive chip used for many applications.
It has 4K bytes of flash ROM; ‘C’ stands for ‘CMOS’, which has low power consumption. The ATMEL AT89C51 is a low power, higher performance CMOS 8-bit microcomputer with 4K bytes of flash programmable and erasable read only memory (PROM). Its high-density non-volatile memory compatible with standard MCS-51 instruction set makes it a powerful controller that provides highly flexible and cost effective solution to control applications. Micro-controller works according to the program written in it. Most microcontrollers today are based on the Harvard architecture, which clearly defined the four basic components required for an embedded system. These include a CPU core, memory for the program (ROM or Flash memory), memory for data (RAM), one or more timers (customizable ones and watchdog timers), as well as I/O lines to communicate with external peripherals and complementary resources all this in a single integrated circuit. A microcontroller differs from a general-purpose CPU chip in that the former generally is quite easy to make into a working computer, with a minimum of external support chips. The idea is that the microcontroller will be placed in the device to control, hooked up to power and any information it needs.
A traditional microprocessor won’t allow you to do this. It requires all of these tasks to be handled by other chips. For example, some number of RAM memory chips must be added. The amount of memory provided is more flexible in the traditional approach, but at least a few external memory chips must be provided, and additionally requires that many connections must be made to pass the data back and forth to them. For instance, a typical microcontroller will have a built in clock generator and a small amount of RAM and ROM (or EPROM or EEPROM), meaning that to make it work, all that is needed is some control software and a timing crystal (though some even have internal RC clocks). Microcontrollers will also usually have a variety of input/output devices, such as analog-to-digital converters, timers, UARTs or specialized serial communications interfaces like I²C, Serial Peripheral Interface and Controller Area Network. Often these integrated devices can be controlled by specialized processor instructions.
Originally, microcontrollers were only programmed in assembly language, or later in C code. Recent microcontrollers integrated with on-chip debug circuit accessed by In-circuit emulator via JTAG (Joint Test Action Group) enables a programmer to debug the software of an embedded system with a debugger.With all latest features, this chip can be called as a mini computer. The prime use of a microcontroller is to control the operation of a machine using a fixed program that is stored in ROM and that does not change over the lifetime of the system.
The microcontroller design uses a much more limited set of instructions that are used to move code and data from internal memory to the ALU. Many instructions are coupled with pins on the IC package. The pins are programmable independently, that is capable of having several different functions depending on the program. The microcontroller is concerned with getting data from and to its own pins; the architecture and instruction set are optimized to handle data in bit, byte, and word size. Generally for any application, often designers chose the 8 – bit controller, because they are most popular microcontrollers in use today, another important aspect is cost effective. The following are the features of 8051 microcontrollerEight – bit CPU with registers16 – bit program counter and data pointer8 – bit program status word8 – bit stack pointerInternal ROM or EEPROM (4k)Internal RAM of 128 bitesFour register banks, each containing eight registers16 bytes, which may be addressed at the bit level80 bytes of general purpose data memory 32 input / output pins arranged as four 8 – bit ports Two sixteen bit timer / counter Full duplex serial data receiver / transmitter Two external and three internal interrupt sources Oscillator and clock circuits Control registers The heart of the chip is the circuitry that generates the clock pulses by which all internal operations are synchronized. Typically a quartz crystal and capacitors are connected to the oscillator pins of microcontroller. The crystal frequency is the final internal clock frequency of the microcontroller.
The manufacturers of the 8051 devices specifies the frequency range, less frequency other then specified may erase the data that is stored in ROM, there by the frequency must be always be more than the above normal. The oscillator formed by the crystal and capacitors generates a pulse train at the frequency of the crystal. A 12 MHz crystal yields the convenient time of one microsecond per cycle. Today in the field of microcontrollers had their beginnings in the development of technology of integrated circuits. This development has made it possible to store hundreds of thousands of transistors into one chip.
That was a prerequisite for production of microprocessors, and the first computers were made by adding external peripherals such as memory, input-output lines, timers and other. Further increasing of the volume of the package resulted in creation of integrated circuits. These integrated circuits contained both processor and peripherals. Memory is part of the microcontroller whose function is to store data. The easiest way to explain it is to describe it as one big closet with lots of drawers.
If we suppose that we marked the drawers in such a way that they can not be confused, any of their contents will then be easily accessible. It is enough to know the designation of the drawer and so its contents will be known to us for sure. Memory components are exactly like that. For a certain input we get the contents of a certain addressed memory location and that’s all. Two new concepts are brought to us: addressing and memory location.
Memory consists of all memory locations, and addressing is nothing but selecting one of them. This means that we need to select the desired memory location on one hand, and on the other hand we need to wait for the contents of that location. Besides reading from a memory location, memory must also provide for writing onto it.
This is done by supplying an additional line called control line. We will designate this line as R/W (read/write). Control line is used in the following way: if r/w=1, reading is done, and if opposite is true then writing is done on the memory location. Memory is the first element, and we need a few operation of our microcontroller. Intel Corporation introduces 89C51; it is an 8-bit microcontroller. This microcontroller has 128 bytes of RAM, 4K of on-chip ROM, two timers, one serial port, and four ports of 8-bits each all on a single chip. 89c51 is basically Flash ROM version of 8051 families.
89c51 is basically a 40 pin Dual-in-package . Fig:6.1 89C51 Microcontroller6.
1.Pin descriptions:1.VSS (pin-20) Ground=0V reference2. VCC (pin-40) Supply= 5VThis is the power supply voltage for normal, idle and power-down modes.3.
P.0-P0.7 (pin-39 to pin 32 i.e., port 0) Port 0 is an open-drain, bidirectional I/O port. Pins of Port 0 on which there is a high logic will float and can be used as a high impedance inputs. Port 0 is also the multiplexed low-order address and data bus during accesses to external program and data memory; in this application it uses strong internal pull-ups for emitting 1’s.4.
P1.0 – P1.7 (Pin-1 to Pin 8 i.
e., Port 1)Port 1 is an 8-bit bidirectional I/O port with internal pull-ups. Port 1 pins that have 1s written to them are pulled high by the internal pull-ups and can be used as inputs. As inputs, port 1 pins that are externally pulled low will source current because of the internal pull-ups.5. P2.0 – P2.7 (Pin-21 to Pin 28 i.
e., Port 2)Port 2 is an 8-bit bidirectional I/O port with internal pull-ups. Port 2 pins that have 1s written to them are pulled high by the internal pull-ups and can be used as inputs. As inputs, port 2 pins that are externally being pulled low will source current because of the internal pull-ups. Port 2 emits the high-order address byte during fetches from external program memory and during accesses to external data memory that uses 16-bit addresses (MOVX @DPTR).
In this application, it uses strong internal pull-ups when emitting 1s. During accesses to external data memory that use 8 – bit addresses (MOV @Ri), port 2 emits the contents of the P2 special function register.6.
P3.0 – P3.7 (Pin-10 to Pin 17 i.e., Port )Port 3 is an 8-bit bidirectional I/O port with internal pull-ups.
Port 3 pins that have 1s written to them are pulled high by the internal pull-ups and can be used as inputs. As inputs, port 3 pins that are externally being pulled low will source current because of the pull-ups. Port 3 also serves the special features of the 89C51, as listed below: RxD (P3.0): Serial input port.TxD (P3.1): Serial output port.INT0 (P3.2): External interrupt.
INT1 (P3.3): External interrupt.T0 (P3.4): Timer0 external input.T1 (P3.5): Timer 1 external input.WR (P3.
6): External data memory write strobe.RD (P3.7): External data memory read strobe.7. RESET (Pin-9)A high on this pin for two machine cycles while the oscillator is running, resets the device. An internal diffused resistor to VSS permits a power-on reset using only an external capacitor to VCC.8. ALE (Pin-30)Output pulse for latching the low byte of the address during an Access to external memory.
In normal operation, ALE is emitted at a constant rate of 1/6 the oscillator frequency, and can be used for external timing or clocking. Note that one ALE pulse is skipped during each access to external data memory. Setting SFR auxiliary,0 can disable ALE. With this bit set, ALE will be active only during a MOVX instruction.9. PSEN (Pin-29)The read strobe to external program memory. When executing code from the external program memory, PSEN is activated twice each machine cycle, except that two PSEN activations are skipped during each access to external data memory. PSEN is not activated during fetches from internal program Memory.10. EA/VPP (Pin-31)EA must be externally held low to enable the device to fetch code from external program memory locations 0000H to the maximum internal memory boundary. If EA is held high, the device executes from internal program memory unless the program counter contains an address greater than 0FFFH for 4 k devices, 1FFFH for 8 k devices, 3FFFH for 16 k devices, and 7FFFH for 32 k devices. The value on the EA pin is latched when RST is released and any subsequent changes have no effect. This pin also receives the 5V/12V programming supply voltage (VPP) during FLASH programming.11. XTAL1 and XTAL2 (Pin-18 and Pin-19)Crystal 1: Input to the inverting oscillator amplifier and input to the internal clock generator circuits.Crystal 2: Output from the inverting oscillator amplifier6.2.OSCILLATOR CHARACTERISTICSXTAL1 and XTAL2 are the input and output, respectively, of an Inverting amplifier. The pins can be configured for use a an On-chip oscillator. To drive the device from an external clock source, XTAL1 should be driven while XTAL2 is left unconnected. There are no requirements on the duty cycle of the external clock signal, because the input to the internal clock circuitry is through a divide-by-two flip-flop. However, minimum and maximum high and low times specified in the data sheet must be observed.Reset: A reset is accomplished by holding the RST pin high for at least two machine cycles (24 oscillator periods), while the oscillator is running. To insure a good power-on reset, the RST pin must be high long enough to allow the oscillator time to start up (normally a few milliseconds) plus two machine cycles. At power-on, the voltage on VCC and RST must come up at the same time for a proper start-up. Ports 1, 2, and 3 will asynchronously be driven to their reset condition when a voltage above VIH1 (min.) is applied to RST. The value on the EA pin is latched when RST is disserted and has no further effect.Accumulator: The A (Accumulator) is the versatile of the two CPU registers and is used for many operations, including addition, subtraction, division, integer multiplication and Boolean bit manipulations. The A register is also used for data transfers between the 8091 and any external memory.B Register: The B register is used during multiply and divide operations. For other instructions it can be treated as another scratch pad register.Program Status Word The PSW register contains program status information as detailed in Table below: The PSW consists of math flags, user program flag F0, and the register bank select bits that identify which of the four general register banks is currently in use by the program.Stack Pointer The Stack Pointer register is 8 bits wide. It is incremented before data is stored during PUSH and CALL executions. While the stack may reside anywhere in on-chip RAM, the Stack Pointer is initialized to 07H after a reset. This causes the stack to begin at locations 08H.Data Pointer ; The Data Pointer (DPTR) consists of a high byte (DPH) and a low byte (DPL). Its intended function is to hold a 16-bit address. It may be manipulated as a 16-bit register or as two independent 8-bit registers.Serial Data Buffer The Serial Buffer is actually two separate registers, a transmit buffer and a receive buffer. When data is moved to SBUF, it goes to the transmit buffer and is held for serial transmission. (Moving a byte to SBUF is what initiates the transmission.) When data is moved from SBUF, it comes from the receive buffer.Timer Registers Register pairs (TH0, TL0), and (TH1, TL1) are the 16-bit Counting registers for Timer/Counters 0 and 1, respectively.Control Register Special Function Registers IP, IE, TMOD, TCON, SCON, and PCON contain control and status bits for the interrupt system, the Timer/Counters, and the serial port. They are described in later sections.Timers And CountersTimer 0 and Timer 1The “Timer” or “Counter” function is selected by control bits C/T in the Special Function Register TMOD. These two Timer/Counters have four operating modes, which are selected by bit-pairs (M1, M0). In TMOD. Modes 0, 1, and 2 are the same for both Timers/Counters. Mode 3 is different. The four operating modes are described in the following text:Mode 0: Timer, which is an 8-bit Counter with a divide-by-32 pre scalar. The Mode 0 operation as it applies to Timer 1. In this mode, the Timer register is configured as a 13-bit register. As the count rolls over from all 1s to all 0s, it sets the Timer interrupt flag TF1. The counted input is enabled to the Timer when TR1 = 1 and either GATE = 0 or INT1 = 1. (Setting GATE = 1 allows the Timer to be controlled by Putting either Timer into Mode 0 makes it look like an 8048 external input INT1, to facilitate pulse width measurements). TR1 is a control bit in the Special Function Register TCON .GATE is in TMOD: The 13-bit register consists of all 8 bits of TH1 and the lower 5 bits of TL1. The upper 3 bits of TL1 are indeterminate and should be ignored. Setting the run flag (TR1) does not clear the registers. Mode 0 operation is the same for the Timer 0 as for Timer 1. Substitute TR0, TF0, and INT0 for the corresponding Timer 1 signals in Figure 2. There are two different GATE bits, one for Timer 1 (TMOD.7) and one for Timer 0 (TMOD.3).Mode 1: Mode 1 is the same as Mode 0, except that the Timer register is being run with all 16 bits.Mode 2: Mode 2 configures the Timer register as an 8-bit Counter (TL1) with automatic reload, as shown in Figure 4. Overflow from TL1 not only sets TF1, but also reloads TL1 with the contents of TH1, which is preset by software. The reload leaves TH1 unchanged. Mode 2 operations are the same for Timer/Counter 0. Mode 3: Timer 1 in Mode 3 simply holds its count. The effect is the same as setting TR1 = 0. Timer 0 in Mode 3 establishes TL0 and TH0 as two separate counters. The logic for Mode 3 on Timer 0 is shown in Figure 5. TL0 uses the Timer 0 control bits: C/T, GATE, TR0, and TF0, as well as the INT0 pin. TH0 is locked into a timer function (counting machine cycles) and takes over the use of TR1 and TF1 from Timer 1. Thus, TH0 now controls the “Timer 1” interrupt. Mode 3 is provided for applications requiring an extra 8-bit timer on the counter. With Timer 0 in Mode 3, an 80C51 can look like it has three Timer/Counters. When Timer 0 is in Mode 3, Timer 1 can be turned on and off by switching it out of and into its own Mode 3, or can still be used by the serial port as a baud rate generator, or in fact, in any application not requiring an interrupt. TCON and TMOD are the two registers used for setting the above modes. The format of these registers is as shown in figure TMOD is dedicated solely to the timers and can be considered to be two duplicate 4-bit registers, each of which controls the action of one of the timers. TCON has control bits and flags for the timers in the upper nibble, and control bits and flags for the external interrupts in the lower nibble. 5.3.Criteria for choosing 89c51 Microcontroller1. The first and foremost criterion in choosing a microcontroller is that it must meet the task at hand efficiently and cost effectively. In our project we have chosen an 8-bit microcontroller, which can handle the computing needs of the task most effectively.The highest speed this microcontroller can support is 12MHZTo fulfill our requirements in terms of space, assembling, we have chosen the 40-pin DIP.To support the memory requirement we have chosen it as it includes 4K ROM and 128 byte RAM.As there are 32 I/O pins and 2 timers, it supports our input-output requirement greatly.6. We have used the battery power product like an RTC the power consumption is critical for it.7. In choosing this controller we have considered the availability of an assembler, debugger, simulator etc.8. The ready availability in needed quantities both now and in the future. Currently, of the leading 8-bit microcontrollers, the 8051 family has the largest number of diversified suppliers.7.TRANSFORMERS – OVERVIEW A transformer is a static device comprising coils coupled through a magnetic medium connecting two ports at different voltage levels in any electric system allowing the interchange of electrical energy between the ports in either direction via the magnetic field. The transformer is one of the most important components of variety of electrical circuits ranging from low-power, low-current electronic and control circuits to ultra high-voltage power systems. A circuit model and performance analysis of transformers is necessary for understanding of many electronic and control systems and almost all power systems. The transformer being an electromagnetic device, its analysis greatly aids in understanding the operation of electromechanical energy conversion devices which also use magnetic field but for the interchange of energy between electrical and mechanical parts. The most important tasks performed by transformers are a) changing voltage and current levels in electric power systems, b) matching source and load impedances for maximum power transfer in electronic and control circuitry, and c) electrical isolation. Transformers are used extensively in ac power systems because they make possible power generation at the most desirable and economical level, power transmission at economical transmission voltage and power utilization at most convenient distribution voltages for industrial, commercial and domestic purposes. Indeed the transformer is a device which plays an important and essential role in many facets of electrical engineering. A transformer, in simplest form,consists essentially of two insulated windings interlinked by a common or mutual magnetic field established in a core of magnetic material. When one of the windings, termed the primary, is connected to an alternating voltage source, an alternating flux is produced in the core with amplitude depending up on the primary voltage and number of turns. This mutual flux links the other winding, called the secondary. A voltage is induced in this secondary and its magnitude will depend on the number of secondary turns. When the numbers of primary and secondary turns are properly proportioned, almost any desired voltage ratio, or ratio of transformation can be achieved. Principle A Transformer based on the Principle of mutual induction according to this principle, the amount of magnetic flux linked with a coil changing, an e.m.f is induced in the neighboring coil.Construction A transformer consists of a iron core made of laminated sheets, well insulated from one another. Two coils p1 ; p2 and s1 ; s2 are wound on the same core, but are well insulated with each other. Both the coils are insulated from the core, the source of alternating e.m.f is connected to p1p2, the primary coil and a load resistance R is connected to s1 s2, the secondary coil through an open switch S. thus there can be no current through the sec. coil so long as the switch is open. For an ideal transformer, we assume that the resistance of the primary ; secondary winding is negligible. Further, the energy losses due to magnetic the iron core is also negligible.7.1.Theory and Working of Transformer When an altering e.m.f. is supplied to the primary coil p1p2, an alternating current starts falling in it. The altering current in the primary produces a changing magnetic flux, which induces altering voltage in the primary as well as in the secondary. In a good-transformer, whole of the magnetic flux linked with primary is also linked with the secondary, then the induced e.m.f. induced in each turn of the secondary is equal to that induced in each turn of the primary. Thus if Ep and Es be the instantaneous values of the emf induced in the primary and the secondary and Np and Ns are the no. of turns of the primary secondary coils of the transformer and D?? / dt = rate of change of flux in each turn off the coil at this instant, we have Ep = -Np d ? ?/dt —————–(1) And Es = -Ns d??/dt —————– (2)Since the above relations are true at every instant, so by dividing 2 by 1, we get Es / Ep = – Ns / Np —————-(3)As Ep is the instantaneous value of back e.m.f induced in the primary coil p1, so the instantaneous current in primary coil is due to the difference (E – Ep ) in the instantaneous values of the applied and back e.m.f. further if Rp is the resistance , p1p2 coil, then the instantaneous current Ip in the primary coil is given by Ip = E – Ep / Rp E – Ep = Ip Rp When the resistance of the primary is small, Rp Ip can be neglected so therefore E – Ep = 0 or Ep = EThus back e.m.f = input e.m.fHence equation 3 can be written as Es / Ep = Es / E = output e.m.f / input e.m.f = Ns / Np = KWhere K is constant, called turn or transformation ratio.In a step up transformer Es ; E so K ; 1, hence Ns ; Np In a step down transformer Es ; E so K ; 1, hence Ns ; NpIf Ip = value of primary current at the same instant tAnd Is = value of sec. current at this instant, then Input power at the instant t = Ep Ip and Output power at the same instant = Es Is If there are no losses of power in the transformer, then Input power = output power Or Ep Ip = Es Is Or Es / Ep = Ip / Is = KIn a step up transformer As k ; 1, so Ip ; Is or Is ; Ipi.e. current in sec. is weaker when secondary voltage is higher.Hence, whatever we gain in voltage, we lose in current in the same ratio. Similarly it can be shown, that in a step down transformer, whatever we lose in voltage, we gain in current in the same ratio.Thus a step up transformer in reality steps down the current ; a step down transformer steps up the current.Efficiency:- Efficiency of a transformer is defined as the ratio of output power to the input power. i.e. ? = output power / input power = Es Is / Ep Ip Thus in an ideal transformer, where there is no power losses, ? = 1. But in actual practice, there are many power losses, therefore the efficiency of transformer is less than one. ENERGY LOSSES:-Following are the major sources of energy loss in a transformer:1. Copper loss is the energy loss in the form of heat in the copper coils of a transformer. This is due to joule heating of conducting wires.2. Iron loss is the energy loss in the form of heat in the iron core of the transformer. This is due to formation of eddy currents in iron core. It is minimized by taking laminated cores.3. Leakage of magnetic flux occurs in spite of best insulations. Therefore, rate of change of magnetic flux linked with each turn of S1S2 is less than the rate of change of magnetic flux linked with each turn of P1P2. 4. Hysteretic loss is the loss of energy due to repeated magnetization and demagnetization of the iron core when A.C. is fed to it. 5. Magneto striation i.e. humming noise of a transformer.7.2.USES OF TRANSFORMER A transformer is used in almost all a.c. operations In voltage regulator for T.V., refrigerator, computer, air conditioner etc. In the induction furnaces. A step down transformer is used for welding purposes. A step down transformer is used for obtaining large current. A step up transformer is used for the production of X-Rays and NEON advertisement. Transformers are used in voltage regulators and stabilized power supplies. Transformers are used in the transmissions of a.c. over long distances. Small transformers are used in Radio sets, telephones, loud speakers and electric bells etc.7.3.TRANSFORMER LOSSES A method for measuring power losses in transformers under actual working conditions is presented here. The technique is based on an unusual correlation between input and output electric quantities and yields uncertainties lower than those obtainable by evaluating these quantities as the difference between input and output powers. The analysis is carried out based on the following various losses in a transformer. CORE-LOSS These are hysteresis and eddy current losses resulting from alternations of magnetic flux in the core. When a magnetic material undergoes cyclic magnetization, two kinds of power losses occur in it, hysteresis and eddy current losses, which together are known as core-loss. The core-loss is important in determining heating, temperature rise, rating and efficiency of transformers, machines and other ac run magnetic devices. When a magnetic core carries a time-varying flux, voltages are induced in all possible paths enclosing the flux. The result is the production of circulating currents in the core. These currents are known as eddy-currents and have power loss (I2R) associated with them called eddy-current loss. The core loss is constant for a transformer operated at constant voltage and frequency. COPPER-LOSS (I2R-loss): This loss occurs in winding resistances when the transformer carries the load current. This loss varies as the square of the loading expressed as a ratio of the full-load. LOAD-LOSS: It largely results from leakage fields inducing eddy-currents in the tank wall, and conductors.DIELECTRIC-LOSS: The seat of this loss is in the insulating materials, particularly in oil and solid insulations. An important consideration when evaluating the impact of harmonics is their effect on power system component and loads. Transformers are major components in power systems. The increased losses due to harmonic distortion can cause excessive losses and hence abnormal temperature rise. The measurement of iron losses and copper losses of single-phase transformers is important in particular for transformers feeding nonlinear loads. In computing of transformer losses, it is assumed that source voltage is sinusoidal and load impedance is linear. This study presents the effects of harmonic distortion of load current and voltage on single-phase transformer losses utilizing the on-line measurements (monitoring) method of the primary side. The usage of nonlinear loads on power systems increasingly creates the awareness of the potential reduction of a transformer’s operational life due to increase heat losses. The performance analysis of transformers in harmonic environment requires knowledge of the load mix, details of the load current harmonic content and total harmonic distortion (THD). The additional heating experienced by a transformer depends on the harmonic content of the load current and the design principles of the transformer. The harmonic problems are mainly due to the substantial increase of nonlinear loads due to technological advances, such as the use of power electronic circuits and devices, in ac/dc transmission links, or loads in the control of power systems using power electronic or microprocessor controllers. In general, sources of harmonics are divided into, (a) Domestic loads, (b) Industrial loads and (c) Control devices. Increases in harmonic distortion component of a transformer will result in additional heating losses, shorter insulation lifetime, higher temperature and insulation stress, reduced power factor, lower productivity, efficiency, capacity and lack of system performance of the plant.7.4.TRANSFORMER EFFICIENCY The transformer has no moving parts so that its efficiency is much higher then that of rotating machines. Power and distribution transformers are designed to operate under conditions of constant rms voltage and frequency and so the efficiency and voltage regulation are of prime importance. The rated capacity of a transformer is defined as the product of rated voltage and full load current on the output side. The power output depends upon the power factor of the load. Transformer Efficiency:Efficiency is a function of a transformer power losses, but it’s easy to lose sight of what transformer efficiency means in the real world. We can calculate the transformer efficiency, the same way we calculate efficiency for other equipment: Divide the output by the input ; multiply the result by 100, hence we can show this number as a percentage.Efficiency is a function of a transformer power losses, and two factors account for nearly all of these losses. One is winding copper loss. Since the transformer is having two sets of windings, copper loss at primary and secondary winding copper losses are considered.The second factor accounting for transformer power losses is core loss. Core losses affected due to hysteresis – a function of several characteristics of the core steel (or iron), all determined by the manufacturing process. Fortunately, the core losses for any given transformer stay constant (provided supply frequency is constant). Maximum efficiency can be obtained when winding copper loss equals core loss. To calculate transformer efficiency in any condition other than no-load, we must first calculate the equivalent resistance (ER) of both the primary and secondary (including the load). The effort needed to arrive at the ER (which changes with facility reconfigurations) is hard to justify for typical applications.No-load efficiency can be calculated very easily. First, we must multiply the output voltage by the output current. The same is repeated at input side, and then we have to divide the output results by the input results. The no-load efficiency can be a basis for comparing transformers or testing a transformer against a specification. But when the transformer is loaded, it can not be estimated how efficient the transformer is when it is in use. That’s why we still – at least in theory – calculate transformer efficiency in conditions other than no-load. Yet, the no-load calculation – because it is so easy – is often worthwhile. For example, you first establish a baseline for each transformer. When we experience problems that indicate a transformer malfunction, recalculating no-load efficiency again can shorten troubleshooting time dramatically.Does the transformer efficiency, under load conditions, have any real value, to know this we can calculate the ER of everything on the load side – something few installations merit paying for. Thus, in the real world, we go back to the basic rule of thumb for maximizing transformer efficiency: Load the transformer to about 80% of capacity. In a lightly loaded transformer, the equivalent secondary resistance will not bring the winding and core losses anywhere close.Once the transformer is properly loaded, we can safely assume it will run as efficiently as it’s going to run. Now, just ensure it has proper cooling and is not subject to excessive harmonics. Transformer Losses and Efficiency All transformers have copper and core losses. Copper loss is power lost in the primary and secondary windings of a transformer due to the ohmic resistance of the windings. Copper loss, in watts, can be found using Equation Copper Loss = I2P RP + I2S RSWhere IP = primary current IS = secondary current RP = primary winding resistance RS = secondary winding resistanceCore losses are caused by two factors: hysteresis and eddy current losses. Hysteresis loss is that energy lost by reversing the magnetic field in the core as the magnetizing AC rises and falls and reverses direction. Eddy current loss is a result of induced currents circulating in the core.The efficiency of a transformer can be calculated using EquationsEfficiency = Power Output / Power Input = ( PS / PP ) x 100 Efficiency = (Power Output / (Power Output + Copper Loss + Core Loss)) x 100 Efficiency = ( ( VS IS x PF) / ( ( VS IS x PF ) + Copper Loss + Core Loss ) ) x 100 Where PF = power factor of the loadPower Relationship Between Primary And Secondary Windings As just explained, the turn ratio of a transformer affects current as well as voltage. If voltage is doubled in the secondary, current is halved in the secondary. Conversely, if voltage is halved in the secondary, current is doubled in the secondary. In this manner, all the power delivered to the primary by the source is also delivered to the load by the secondary (minus whatever power is consumed by the transformer in the form of losses). Refer again to the transformer illustrated in figure. The turns ratio is 20:1. If the input to the primary is 0.1 ampere at 300 volts, the power in the primary is P = E X I = 30 watts. If the transformer has no losses, 30 watts is delivered to the secondary. The secondary steps down the voltage to 15 volts and steps up the current to 2 amperes. Thus, the power delivered to the load by the secondary is P = E X I = 15 volts X 2 amps = 30 watts. The reason for this is that when the number of turns in the secondary is decreased, the opposition to the flow of the current is also decreased. Hence, more current will flow in the secondary. If the turns ratio of the transformer is increased to 1:2, the number of turns on the secondary is twice the number of turns on the primary. This means the opposition to current is doubled. Thus, voltage is doubled, but current is halved due to the increased opposition to current in the secondary. The important thing to remember is that with the exception of the power consumed within the transformer, all power delivered to the primary by the source will be delivered to the load. The form of the power may change, but the power in the secondary almost equals the power in the primary. As a formula:PS = PP – PLWhere PS = Power delivered to the load by the secondaryPP= Power delivered to the primary by the sourcePL= Power losses in the transformer8.POWER SUPPLY UNITThe power Supply is a Primary requirement for the project work. Before designing a power supply, first we must calculate how much current is required to drive entire circuit including LCD ; Microcontroller unit. As per the calculations based on the assumption, it is estimated that the entire circuit power consumption of efficiency measuring module will not exceed more then 350 milliamps. Therefore a higher rating transformer of 750 milliamps at secondary is to be selected for the safe side. Since the required DC power supply for the total circuitry to be derived from the single phase mains, a step down transformer with center tapped secondary of 12V-0-12V transformer is considered for the purpose. The secondary is rectified with two diodes to convert the AC in to DC, for this purpose higher rating diodes of 2N4007 are selected; these diodes can with stand up to 400V at 1 Amp current. Now a large capacitor of 1,000 microfarads is connected across the DC source for eliminating the AC ripple, there by smooth DC is availed from the power supply unit. The DC voltage derived from the supply is un-regulated, initially around 18V DC is available at no load, when load is connected, and the voltage may fall down by 13V. The main drawback of this un-regulated supply is, it varies according to the line voltage, therefore the required voltage must be regulated, because for the control circuit ; other electronic devices like LCD ; ADC, a stable supply of +5V is essential, therefore with the help of a positive voltage regulator, a constant voltage source of +5V is derived. For this purpose 7805 Pin 3 Voltage regulator is used so that, though the mains supply varies from 170V to 250V, the output DC level remains constant. The 7805 used in this project work can deliver a maximum current of 800 Milliamps, this device is having thermal shut-down facility internally such that whenever the device body temperature rises more than 70 degree centigrade, automatically output become zero and protects the regulator burning due to the over temperature. A suitable Aluminum heat sink coupled to the regulator body is essential when maximum current is drawn. As stated above, the consumption is less, here heat sink is not required. Rectification is a process of rendering an alternating current or voltage into an unidirectional one. The component used for rectification is called ‘Rectifier’. A rectifier permits current to flow only during the positive half cycles of the applied AC voltage by eliminating the negative half cycles or alternations of the applied AC voltage. Thus pulsating DC is obtained. To obtain smooth DC power, additional filter circuits are required. A diode can be used as rectifier. There are various types of diodes. But, semiconductor diodes are very popularly used as rectifiers. A semiconductor diode is a solid state device consisting of two elements is being an electron emitter or cathode, the other an electron collector or anode. Since electrons in a semiconductor diode can flow in one direction only-form emitter to collector- the diode provides the unilateral conduction necessary for rectification. The rectified Output is filtered for smoothening the DC, for this purpose suitable capacitor is to be selected depending up on the current rating, generally for 1 Amp rating power supply 1000 Micro-farad capacitor is used in the filter circuit, hear the supply rating is more, so that heavy capacitor is used. The filter capacitors are usually connected in parallel with the rectifier output and the load. The AC can pass through a capacitor but DC cannot, the ripples are thus limited and the output becomes smoothed. When the voltage across the capacitor plates tends to rise, it stores up energy back into voltage and current. Thus the fluctuation in the output voltage is reduced considerable. The circuit diagram of this power supply is shown in main diagram, and the data sheets of voltage regulator are provided in hardware details chapter.The following is the circuit diagram of Power supply. Fig: 5 Power Supply Unit8.1.HARDWARE DETAILS The Electronic Hardware like IC’s and other important components used in this project work are procured from the Hyderabad Electronics Market. The bulky electrical device used in the project work is 1:1 ratio main transformer, whose efficiency is to be measured. This transformer & required PCB (printed circuit board), both are designed and fabricated at Kushaiguda industrial estate, this estate is very familiar for fabricating these devices & this area is located in Hyderabad. The data sheets of IC’s are gathered from websites. The following are the important components details, and their data sheets are provided in this chapter. 1 – 89C51 ATMEL Microcontroller2 – ADC0809 A/D Converter chip3 – LM555 Timer chip4 – Voltage Regulator5 – BC547 NPN Transistor9.CONCLUSIONS ; REFERENCES The project work Titled “Transformer Efficiency Measuring Meter” is successfully designed ; developed, a demo unit is fabricated ; it is implemented over one single phase transformer for the live demonstration. The concept is to measure on load efficiency. The same system with required modifications, it can be implemented over power distribution transformers at electric sub-stations, such that the on line efficiency can be measured and displayed continuously. In addition other important parameters related to substation can be monitored ; displayed, if required sub-station can be controlled accordingly. The future work will be focused about substation automation. If required the data of entire power transformer can be transmitted directly to the monitoring station, from where all the substations are monitored. The technology can be further enhanced, such that the received information can be stored in the computer at remote place. When the data is stored in computer it will be quite helpful for further analysis. By adopting these types of instruments everywhere at power distribution points, maintenance of these power systems will become quite easy. With the help of a centralized monitoring station designed with computer, all the transformers data can be accumulated at one place from where the concern person is monitoring entire zone. The main advantage of using this kind of system is that, in addition to the monitoring of transformer, by implementing control technology, it also protect the power system burning due to various reasons, there by life of the transformer can be increased. REFERENCESWhile designing and fabrication of this project work, we studied lot of material gathered from websites. The information gathered from yahoo.com search Engine. Regarding micro controllers, A/D converters, plenty of books are available, the following are the references made during design, development and fabrication of the project work.(1) Digital and Data CommunicationsBy: Michael A. Miller(2). Programming and Customizing the 8051 Microcontroller By: Myke Predko (3) The IC 555 Timer applications sourcebook. BY: HOWARD M.BERLIN(4) Digital Electronics. By JOSEPH J.CARR(5) The concepts and Features of Microcontrollers – By: Raj Kamal(6) The 8051 Microcontroller Architecture, programming ; Applications By: Kenneth J. Ayala(7) Electric Machines By: I. J. Nagrath ; D. P. Kothari