* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download project report on
Spark-gap transmitter wikipedia , lookup
Ground (electricity) wikipedia , lookup
Power engineering wikipedia , lookup
Electrical ballast wikipedia , lookup
Time-to-digital converter wikipedia , lookup
Ground loop (electricity) wikipedia , lookup
Variable-frequency drive wikipedia , lookup
Power inverter wikipedia , lookup
Three-phase electric power wikipedia , lookup
Current source wikipedia , lookup
History of electric power transmission wikipedia , lookup
Amtrak's 25 Hz traction power system wikipedia , lookup
Electrical substation wikipedia , lookup
Stray voltage wikipedia , lookup
Power MOSFET wikipedia , lookup
Transformer wikipedia , lookup
Immunity-aware programming wikipedia , lookup
Pulse-width modulation wikipedia , lookup
Oscilloscope history wikipedia , lookup
Integrating ADC wikipedia , lookup
Voltage optimisation wikipedia , lookup
Schmitt trigger wikipedia , lookup
Voltage regulator wikipedia , lookup
Resistive opto-isolator wikipedia , lookup
Distribution management system wikipedia , lookup
Alternating current wikipedia , lookup
Surge protector wikipedia , lookup
Power electronics wikipedia , lookup
Mains electricity wikipedia , lookup
Analog-to-digital converter wikipedia , lookup
Buck converter wikipedia , lookup
INTRODUCTION This project report describes on the design, development and fabrication of one demonstration unit of the project work “SCADA” IMPLEMENTED OVER POWER TRANSFORMER WITH REMOTE MONITORING SYSTEM”. Nowadays, with the advancement of technology, particularly in the field of computers as well as micro-controllers, all the activities in our day to day living have become a part of information and we find computers and micro-controllers at each and every application. Thus, the trend is directing towards computer based project works. However, in this project work the basic signal processing of temperature, load current and input high voltage parameters related to the distribution transformers are monitored with analog electronics only. For measuring various parameters values, various transducers are used, and the output of these transducers are converted to control the parameters. The control circuit is designed using micro-controller. The outputs of all the three parameters are fed to the analog to digital converter for converting the analog information in to the digital information and this digital information is fed to micro-controller. The output of the micro-controller is used to drive the digital display, so that the value of each parameter can be displayed. In addition to the digital display micro-controller outputs are also used to drive four relays independently. These relays energize and de-energizes automatically according to the condition of the parameter. Out of four relays one relay is treated as common relay and energizes automatically whenever any parameter exceeds its preset value. This relay contact is used to break the supply to the transformer primary. The remaining three relays are used for the three different parameters, to transmit the information about the failure parameter. For example, if the load is more than the rated load, then immediately the micro-controller energizes one relay out of these three relays and this relay contact is used to provide supply to the low frequency oscillator, which produces a perfect square wave of 1 KHz approximately. This low frequency is fed to transmitter as a modulating wave, which is super imposed over the carrier and transmitted as a modulated wave. Like wise for other two parameters, two different low frequencies are generated. The idea of generating three different low frequencies is to identify the failure parameter and to transmit the failure information. In the receiver, the received information in the form of low frequency as a modulated wave is demodulated, amplified and converted into proportionate DC voltage using frequency to voltage converter. The output of this F/V converter is again converted into digital pulses, which are essential for the computer. Here the computer is used at receiving end, where the receiver is installed; generally the receiving part of the system can be installed at electrical office. In this project work the micro-controller is playing a major role. Micro-controllers were originally used as components in complicated process-control systems. However, because of their small size and low price, Micro-controllers are now also being used in regulators for individual control loops. In several areas Micro-controllers are now outperforming their analog counterparts and are cheaper as well. Micro-controllers are also being used increasingly as tools for analysis and design of control systems. The control engineer thus has much more powerful tools available now than in the past. Digital computers are still in a state of rapid development because of the progress in very large-scale integration (VLSI) technology. Thus substantial technological improvements can be expected in the future. Because of these developments, the approach to analysis, design, and implementation of control systems is changing drastically. Originally it was only a matter of translating the earlier analog designs into the new technology. However, it has been realized that there is much to be gained by exploiting the full potential of the new technology. control theory has also developed substantially over the past 35 years. Fortunately, For a while it was quite unrealistic to implement the type of regulators that the new theory produced except in a few exotic mostly in aerospace or advanced process control. However, due to the revolutionary development of microelectronics, advanced regulators can be implemented even for basic applications. It is also possible to do analysis and design at a reasonable cost with the interactive design tools that are becoming increasingly available. The purpose of this project work is to present control theory that is relevant to the analysis and design of Micro-controller system with an emphasis on basic concept and ideas. It is assumed that a Microcontroller 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 controller programs in assembly language. Micro-controllers are "embedded" inside some other device so that they can control the features or actions of the product. Another name for a micro-controller, therefore, is "embedded controller". Micro-controllers are dedicated to one task and run one specific program. The program is stored in ROM (read-only memory) and generally does not change. Micro-controllers are often low-power devices. A battery-operated Microcontroller might consume 50 milli watts. A micro-controller has a dedicated input device and often (but not always) has a small LED or LCD display for output. A micro-controller also takes input from the device it is controlling and controls the device by sending signals to different components in the device. Radio transmission technique is incorporated in the design. There are number of mechanisms by which Radio waves may travel from a transmitting to a receiving Antenna. The terms, GROUND WAVES, SKY WAVES, and SPACE or TROPOSHERIC WAVES designates the more important of these. The ground wave can exist when the transmitting and receiving are close to the surface of the Earth and are vertically polarized. The sky wave represents energy that reaches receiving antenna as a result of a bending of the wave path introduced by the ionization in the upper atmosphere. The space wave represents energy that travels from the transmitting to the Receiving Antenna in the Earths troposphere. The radio transmission at frequencies above about 30MHz is normally the space wave propagation. The transmitter that is frequency modulated find extensive use at frequencies above 40MHz. In this project work, 100MHz carrier is considered and 100MHz F.M transmitter is designed. The signals transmitted from the transmitter to the receiver are over load, over Temperature and over voltage information. Coming to the computers, the technology is so much advanced. Initially the PC era started with Intel 8088/8086, then PC-XT with Intel 80286 and PC-AT with 80386 SX and 80386 DX, then with Intel 80486. Subsequently the new generation of Intel series has come with ‘PENTIUM’ processors. In Pentium series, variety of devices have come i.e., (Pentium – I) P – I, P – II, P – III, P – IV, P – Celeron, P – Pro etc. Today we are getting P- 4 or power of 4 processors are available in the Market. Thus the need come to develop PC Based project works in the field of monitoring and control system, which will serve the need of the Industry. The purpose of this project work is to present control theory that is relevant to the analysis and design of computer controlled systems, with an emphasis on basic concepts and ideas. It is assumed that a digital computer with reasonable software is available for computations and simulations so that many tedious details can be left to the computer. The control system design is also carried out up to the stage of implementation in the form of computer programs in a high level language. One can view computer-controlled systems as approximations of analog control systems, but this is a poor approach because the full potential of computer control is not used. At best the results are only as good as those obtained with analog control circuit. The 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 A – D converter. The output is converted into digital form by The A – D converter can be included in the computer or regarded as a separate unit, according to ones preference. The conversion is done at the sampling times. The computer interprets the converted signal, as a sequence of numbers, processes the measurements using an algorithm, and gives a new sequence of numbers. This sequence is converted to an analog signal by a digital to analog converter. Notice that the system runs open loop in the interval between the A – D and the D – A conversion. The real time clock in the computer synchronizes the events. The digital computer operates sequentially in time and each operation takes sometime. The computer-controlled system contains both continuous time signals and sampled, or discrete time, signals such systems have traditionally been called sampled data systems, and this term will be used here as a synonym for computer controlled systems. Now a days, we find lot of transformers are burning because of over loads, voltage variations and transformer body temperature rising. The body temperature of a transformer rises due to overloads and continuous long run, because of these reasons the transformer may shutdown automatically. Particularly, in the rural areas we find shutdown of transformers due to agricultural pump-sets, and we know it takes lot of time to repair and it involves lot of cost. Hence, the transformer failure prevention is become essential for smooth transmission and distribution. For simulation of the faults in the demonstration unit a step-down transformer of 2 amps current rating is used, and above parameters are carried over this transformer and the corrective action is initiated when the parameters crosses its limits. For over voltage parameter monitoring, the input voltage to the transformer primary is fed through autotransformer and the over voltage is checked. Normally the transformer primary is designed to operate at 230V AC, but, if the voltage is more than 250V AC, then there is a chance that the transformer primary winding may burn due to over voltage, to protect from this, supply to the primary is provided through the relay contact, which in turn breaks the supply to the transformer primary when the primary voltage exceeds more than 250V AC. Similarly for other two parameters, if the limits are crosses, the high logic signal from the microcontroller energizes the relay and breaks the supply to the primary and prevents from burning the transformer. For monitoring the transformer body temperature or oil temperature (most of the distribution transformers are oil cooled transformers) SL100 NPN transistor is used as a temperature sensor and this transducer is wired with operational amplifier. Similarly for monitoring the load current, the current transformer (CT) is used which gives the secondary voltage proportional to the current flowing in the primary. The primary of the CT is connected in series with the load (The details of these parameters will be described in detail in later chapters). Thus, this project work simulates the substation environment and any transformer crosses any of these parameters, then the input to the transformer is disconnected and prevents from burning the transformer. By implementing this kind of “SCADA” system everywhere at the distribution transformer end, failures of the transformer can be minimized and lot of revenue can be saved. Now coming to the transformers, a transformer is a static piece of apparatus by means of which AC power in one circuit is transferred to AC power of the same frequency in another circuit. This transformation of Electric power usually takes place with a change in voltage level. When the transformer raises the voltage i.e., output voltage is higher than the input voltage, it is called a step-up transformer, on the other hand, when it lowers the voltage, it is called a step-down transformer. Electric power is almost exclusively generated, transmitted and distributed in the form of alternating current. In order that electric power may be transmitted economically over larger distances, high voltages must be used, but in order that electric power may be safely distributed; low voltages are necessary. This is accomplished by means of transformers; step-up transformers being used to raise the voltage and step-down transformers for lowering down the voltage. A transformer works on the principle of mutual induction between the two circuits linked by a common magnetic flux. The first coil, in which the electric energy is fed from the AC supply mains, is called primary winding, and the other, from which the energy is drawn, is called secondary winding. If the primary is connected to AC supply an alternating flux is set up in the laminated core. The flux links with the turns of both primary and secondary windings, there by inducing e.m.fs, in these windings. The e.m.f induced in the primary is self-induced e.m.f, and opposes the supply voltage. The e.m.f induced in the secondary is the mutually induced e.m.f and is expanded in producing current in it. Thus the electric energy is transformed electro magnetically from first coil to the second coil by virtue of magnetic coupling. The magnetic coupling between the two circuits plays an important part in the action of transformer. Distribution transformer failures have been an expensive problem for the State Electricity Departments, mainly in rural networks. Research centers and consultants have done particular diagnosis studies and punctual solutions in order to reduce transformer failures and improve network performance. Transformer failures have many causes and variables involved, like natural phenomena (lightning, wind, and forest), no natural phenomena (human errors), design, build (manufacturing problems, materials defects) and transformers and networks (lines, protection equipment, and structures) maintenance. Distribution transformers account for the majority of losses in an electric power network. Of these losses, core heating accounts for the substantial portion. They can be considered constant so long as a transformer is in service. By contrast, winding losses are only significant under higher load conditions. On a daily basis, the transformer may experience these conditions only briefly. Also, distribution transformers are often over-rated for their requirements, as load growth and variation may mean an installed capacity much greater than what is actually being used. This means that the winding losses may be well below the nominal short circuit value. BLOCK DIAGRAM AND BRIEF DESCRIPTION The block diagram of the project work “Implementation of wireless communication in supervisory control and data acquisition system of a distribution transformer using microcontroller & computer” is explained. For better under standing, the total block diagram is divided into various blocks and each block explanation is provided in this chapter. The complete block diagram of this project work is provided at the end of this chapter. The complete block diagram consists the following blocks: 1. Load Monitoring Circuit 2. High Voltage Monitoring Circuit 3. Temperature Sensing Circuit 4. Analog to Digital Converter 5. Micro-controller 6. Digital Display 7. Signal Generators 8. Transmitter 9. Receiver 10. Signal Amplifier 11. Frequency to Voltage Converter 12. A/D Converter (RX) 13. Clock Generator 14. Computer LOAD MONITORING CIRCUIT: For monitoring the load current continuously, Current Transformer (CT) is used. The current transformer is used with its primary winding connected in series with load 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 turn’s ratio. The ammeter, or wattmeter current coil, are connected directly across the secondary winding terminals. Thus a current transformer operates its secondary winding nearly under short circuit conditions. One the terminal of the secondary winding is earthed so to protect equipment and personnel in the vicinity in the even of an insulation breakdown in the current transformer. The output of the CT is rectified, filtered and it is fed to A/D converter for converting the analog information of current flowing through the CT primary into digital information, which is accepted by the Micro-controller. HIGH VOLTAGE MONITORING CIRCUIT: Transformer failures have many causes and one of the main causes is over voltage. The primary of the distribution transformer or any other transformer primary is designed to operate at certain specific voltage, if that voltage is more than the rated voltage, then immediately the transformer primary may burn because of over voltage. To protect the transformer, burning due to over voltage, this voltage monitoring and control circuit is used in this project work. In this project work for generating high voltage, autotransformer is used so that the line voltage can be increased to more than 240V. For monitoring the line voltage, a stepdown transformer of 6V-0-6V center-tapped secondary is used as a line voltage sensor. As this transformer primary voltage increases, according to that secondary voltage also raises, and this secondary voltage is rectified, filtered and it is applied to the analog to digital converter for converting the analog information in to the digital information. TEMPERATURE SENSING CIRCUIT: The methods of temperature measurement may be divided into two main classes according as the exchange of heat between the testing body and the hot system takes place by contact or by radiation across a space. In the contact methods, thermometers or thermocouples are used and they are immersed in solids or liquids. The thermodynamic equilibrium between the hot body and the testing body is established by material contact. In the non-contact methods, the thermodynamic equilibrium is established by the radiation emitted as excited atom and molecules in the hot body return to the ground state. For monitoring the transformer body temperature, SL100 general purpose NPN switching transistor is used and it is having ‘TIN’ metal body, so that it can absorb the heat properly. This transistor can be placed over the transformer body, where the transformer radiates maximum heat. The exact location where the transistor is to be installed using suitable clamp should be determined on the ease of access and the degree of accuracy obtainable at the given point. As the transistor body temperature raises, the base-emitter junction resistance decreases and this resistance variation is monitored with the help of op-amp IC, whose feed back resistor is nothing but the transistor. This differential amplifier output is further amplified using another op-amp IC and the output of this 2nd amplifier is fed to analog to digital converter for converting the analog information to digital information. ANALOG TO DIGITAL CONVERTER: 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 micro-controller. 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. This analog to digital converter (ADC) converts a continuous analog input signal, into an n-bit binary number, which is easily acceptable to a computer. 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. voltage range of one LSB, the output code is constant. Obviously for an input For a given output code, the input voltage can be any where 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 un-known 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. In this project work ADC 0809 (8 Bit A/D converter) is used to convert an analog voltage variations (according to the condition of the parameters) into digital pulses. This IC is having built in multi-plexer so that channel selection can be done automatically. MICRO-CONTROLLER: Micro-controller unit is constructed with ATMEL 89C51 Micro-controller chip. The ATMEL AT89C51 is a low power, higher performance CMOS 8-bit microcomputer with 4K bytes of flash programmable and erasable read only memory (PEROM). 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. The program is written in such a way, so that the output from the ADC will be converted into its equivalent voltage and based on the magnitude of the voltage, it calculates the parameter value. Now this magnitude is again digitalized and fed to 7-segment display unit through the latch. Micro-controllers are "embedded" inside some other device so that they can control the features or actions of the product. Another name for a micro-controller, therefore, is "embedded controller". Micro-controllers are dedicated to one task and run one specific program. The program is stored in ROM (read-only memory) and generally does not change. Micro-controllers are often low-power devices. A battery-operated Microcontroller might consume 50 milli watts. A micro-controller has a dedicated input device and often (but not always) has a small LED or LCD display for output. A micro-controller also takes input from the device it is controlling and controls the device by sending signals to different components in the device. DIGITAL DISPLAY: The output of the micro-controller is used to drive the digital display, for this purpose four 7-segment common anode displays are used for measuring the line voltage, transformer body temperature and load current. These displays are used to display the data received from the Microcontroller through the latches. The segments of each display are called A, B, up to G. In order to reduce the numbers of connections needed to address each of the LED’s (Light Emitted Diode), the anodes of the LED’s of each seven-segment display have been connected together. The common anode for the first seven-segment display is called A1, A2 for the second display, etc. In addition, the cathode pins from each display have been connected together to form seven common terminals, called A, B, C, D, E, F and G, corresponding to the seven-segments. In addition to the seven segments, decimal point is also arranged in this common anode display. SIGNAL GENERATORS (LOW FREQUENCY OSCILLATORS): For the three different parameters, three different tone frequencies are generated. Supply to these three-tone generators, provided through three different relay contacts, and these relays energizes automatically, if that particular parameter output exceeds its limit. Three 555 timer IC’s are used for generating 1 KHz, 2 KHz and 3 KHz separately. These IC’s are designed in ‘Astable Multi-vibrator’ Mode (self oscillators). The outputs of all the three oscillators are clubbed together and fed to carrier oscillator as modulating waves. F.M. TRANSMITTER: This block generates a continuous frequency of 100MHz, which is used to form a permanent link between the transmitter and receiver, and this is known as carrier frequency. The outputs of 1 KHz, 2 KHz and 3 KHz Tone generators are combined and are fed to this F.M radio transmitter. This is a frequency modulated radio transmitter. The radiating power of the transmitter is 20mw, and it is designed using BC 494 B high frequency switching transistor. The detailed description is provided in the next chapter FM RECEIVER: The FM receiver is designed with IC TDA5591A, which is AM/FM Radio receiver IC, operates at a local oscillator of 100MHz and is tuned with the transmitter. This IC consists of built in RF amplifier, a double balanced mixer, local oscillator, a two stage IF amplifier, a quadrature demodulator for a ceramic filter and an automatic frequency control. The built in RF amplifier, a part from the amplification of received RF signal, it also reduces the Noise figure, which could other wise be a problem because of the large band widths needed for FM. It also matches the input impedance of the radio receiver with the antenna. SIGNAL AMPLIFIER: The received signal or detected signal from the radio receiver, which is audio tone signal of 1 KHz, 2 KHz and 3 KHz, is amplified with the help of a transformer coupled amplifier. This amplifier can be used in the following three applications. (a) As an input stage, usually driven by a micro-phone (b) As an output stage, feeding the load impedance (c) As an intermediate stage The transformer coupling provides the facility of impedance matching and thus results in increased power gain. Further this method of coupling isolates the load impedance circuit of the amplifier from the DC bios stabilization network of the succeeding stage. FREQUENCY TO VOLTAGE CONVERTER: This circuit is designed to generate DC voltage according to the input frequency, i.e., input frequency is proportional to the output voltage. In this block IC 4046 and IC 4053 are used and the brief description about these two ICS is as follows: IC 4046 phase locked loop IC; the phase locked loop (PLL) is an important building block of linear system. The output from a PLL system can be obtained either as the voltage signal VC (t) corresponding to the error voltage in the feed back loop, or as a frequency signal at VCO output terminal. The voltage output is used in frequency discriminator application whereas the frequency output is used in signal conditioning, frequency synthesis or clock recovery applications. Consider the case of voltage output, when PLL is locked to an input frequency, the error voltage VC (t) is proportional to (fs – fo). If the input frequency is varied as in the case of FM signal, VC will also vary in order to maintain the lock. Thus the voltage output serves as a frequency discriminator, which converts the input frequency changes to voltage changes. IC4053 MULTIPLEXER; the multi-plexer is a special combinational circuit that is one of the most widely used standard circuits in digital design. The Multi-plexer (or data selector) is a logic circuit that gates one out of several inputs to a single output. The output selected is controlled by a set of select input. The following figure shows the block diagram of a multi-plexer with ‘n’ input lines and one output line. For selecting one out of n inputs for connection to the output, a set of ‘m’ select input is required where 2m=n. Depending up on the digital code applied at the select inputs one out of n data sources is selected and transmitted to a single output channel. Normally a strobe (or enable) input (G) is incorporated which helps in cascading and it is generally active-low, which means it performs its intended operation when it is low. ANALOG TO DIGITAL CONVERTER (RX): An analog to digital converter (ADC) converts a continuous analog input signal, into an n-bit binary number, which is easily acceptable to a computer. 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, the input voltage can be anywhere within a one LDB 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 lien. A good converter will have less than 0.5 LSB linearity error and no mission codes over its full temperature range. In the basic conversion scheme of ADC, the un-known 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. In this project work ADC 0809 (8bit A/D converter) is used to convert an analog voltage of frequency to voltage converter output in to an output binary word that can be used by a computer. PC BLOCK: For monitoring and displaying of temperature and load current parameters ‘C’ language is used. This is custom built software. The advantage of using ‘C’ is, while there are around 250 languages existing in the world of computers, today the software professionals are showing increasing performance for ‘C’. According to one survey as much as 75% of total software developed in the world today, is written in ‘C’ or C++. What makes ‘C’ such a success and popular is because it is simple, reliable, capable and easy to use. The compactness of ‘C’ language is mainly due to the fact that it is a one-man language rather than a product of the committees. “DENNIS RITCHIE” developed it at AT & T bell lab, USA. The software details are provided in chapter – 6. Program for the project work copied from ‘C++’ and converted into ‘C’. This program is for reading 8 – channel ADC and two different parameters output is converted into analog signal and it is fed to channel ‘O’ in the ADC i.e., the program is made to read the frequency to voltage converter output. CLOCK GENERATOR: The clock generator circuit is designed using 555 Timer IC. This IC is configured in Astable Mode of operation (free running oscillator). The frequency can be adjusted using external resistor and capacitor. The required frequency is more than 100 KHz. The output of this IC is fed to the A - D converter. The complete block diagram of the project work is shown in the next page. CIRCUIT ANALYSIS The detailed circuit description of the project work ““SCADA” IMPLEMENTED OVER POWER TRANSFORMER WITH REMOTE MONITORING SYSTEM” is explained in section wise. For better understanding the total circuit diagram is divided into various sections and each section explanation along with circuit diagram is provided in this chapter. LOAD MONITORING CIRCUIT: The current transformer used in this project work is designed for 5Amps i.e., the current flowing through the primary is restricted for 5Amps. But in practical a higher rating transformer can be used according to the rated power of the distribution transformer. Most common industrial CT’s have 5 to 10 Amp current outputs and can generate high voltage levels when not connected to a burden resistor. The CT used in this project work 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 voltage induced at primary is proportional to the load current. 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 Micro-controller unit for taking the necessary action. The current flowing through the CT primary can be measured, for this purpose, digital display is provided at the output of the Micro-controller Chip. The following is the circuit diagram of load sensing circuit. In the abov secondary, the ripple can be suppressed and real value can be obtained at the output of CT. This voltage can be adjusted to the required level, for this purpose 2K variable resistor is used and the final output taken from mid point of the preset. Since it is a protype module, in this project work for the demonstration purpose, a small transformer of 12V secondary at 1amp rating is considered, and it is treated as distribution transformer. This transformer secondary is used to drive the lamp load through the current transformer primary. For this purpose two No.s of 12V 10W AC lamps are used, one lamp is treated as nominal load and the other one is used to create a fault, i.e., the transformer secondary is designed to drive only one amp load, if the load is more than one amp then the transformer may burn because of over load, to protect the transformer burning due to the over load, the output of the load monitoring circuit is used to drive the relay through the A/D converter and microcontroller. This relay contact is used to break the supply at the primary side of the transformer; so that once the transformer is overloaded automatically primary supply can be disconnected. HIGH VOLTAGE MONITORING CIRCUIT: The Line voltage-sensing circuit used in this project work is capable to measure up to 250V AC. For this purpose a step-down transformer of 6V-0-6V, 500mA, Center tapped secondary is used for monitoring the line voltage continuously. In the prototype module, the line voltage can be increased through the autotransformer, the output of the line voltage sensing circuit is fed to micro-controller unit through the A/D converter, so that according to the received digital information form the ADC, the micro-controller energizes relay. This relay contact is used to break the supply to the feeder cable. In practical, the distribution transformers primary is designed to operate at very higher voltage of 11KVA or 33KVA, because, the output of the power generating station is very high. According to the main grid voltage, the step-down transformer primary (for Monitoring the line voltage) can be designed. The output of the line voltage-sensing transformer is rectified and filtered for obtaining pure DC voltage. The final output is taken from the mid point of 2K variable resistor (Preset), so that the voltage applied to the A/D converter can be controlled. As the line voltage varies, according to that output voltage also varies. This variable voltage from the potential transformer (PT) is applied to the A/D converter. 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. This circuit is designed such that, the voltage applied to the transformer primary, if it is more than 245V AC then immediately the microcontroller energizes the relay and breaks the supply to the primary, by which the transformer can be protected burning due to the over voltage. Since it is a prototype module, the output of the transformer is restricted for lower voltages for the demonstration purpose, but when it is implemented for the real time applications, at that time the output of the distribution transformer will be around 220V AC, and with the help of this kind of voltage control circuit, the household electrical gadgets like TV, Fridge, Tube, Motor etc., can be protected burning due to the over voltage. The following is the circuit diagram of the High voltage Sensing TEMPERATURE SENSING CIRCUIT: In this block, two op-amps are used to form two different stages, the first stage is configured as differential amplifier and the second stage is configured as gain amplifier. In the first stage an ‘NPN’ General purpose transistor (SL100) is used as a temperature sensor and this transistor is having ‘TIN’ metal body so that it can absorb the heat properly. This transistor is connected in feed back loop (input to output). This first stage is designed in such a way so that, as the transistor body temperature rises, according to the temperature, the baseemitter or base-collector junction resistance decreases. This first stage is designed to generate 2mv/0C which is not sufficient for the calibration. Hence, using 2nd stage this voltage is amplified, and the gain of the 2nd stage is 10, so that (2x10) 20mv per degree centigrade can be obtained at the output of the second stage. This variable voltage (according to the temperature) from the output of second stage is fed to the analog to digital converter for converting the analog information in to the digital information and this digital information is fed to the microcontroller for taking the necessary action. The circuit design consists a basic transducer, which converts temperature in to equalent voltage. For this, transistor ‘SL100’ is used as a sensor. The transistor junction (Base & emitter or Base & collector) characteristics are depends upon the temperature. For a transistor, the maximum average power that it can dissipate is limited by the temperature that collector - base junction can with stand. Therefore, maximum allowable junction temperature should not be exceeded. The average power dissipated in collector circuit is given by the average of the product of the collector current and collector base voltage. At any other temperature the de-rating curves are supplied by the manufacturer to calculate maximum allowable power (Pj). Where TC is case temperature, Tj is junction temperature and Qj is the thermal resistance. The entire circuit design of the temperature sensing circuit is given below. In the above circuit diagram with the help of 2K preset (variable resistor) connected at the input of first stage, the initial room temperature corresponding output voltage can be adjusted for the easy calibration. The output of the second stage is clamped with 5V zener and the same output is fed to the A/D converter. For better understanding the following is the further description along with formulas and equations. For sensing the transformer body temperature, a sensor has to chosen based on the following requirements. 1. Sensitivity and accuracy 2. Temperature Range 3. Desired life of Sensor 4. Budget In the prototype module for the simulation purpose, ‘SL100’ NPN Transistor is used as sensor because semiconductor Temperature sensor are best suited for embedded applications as they tend to be electrically and mechanically more delicate than other temperature sensor types. In general silicon temperature sensors resistance is given by the equation R = Rr (1+a (T - Tr) + b (T - Tr) 2 - c (T - Ti) d); where Rr → Resistance at temperature Tr; a, b, c→ constants. Ti→ Inflection point temperature resistance, such that c=0 for T < Ti Also resistance is dependent to some extent on the excitation current. In the present module, as the resistance property of the transistor cannot be used directly for interfacing, this transistor is employed as a feedback element in the following configuration Let Rf be the resistance offered by the sensor under normal conditions (i.e. at S.T.P). The first stage is configured in Non-inverting amplifier mode, whose output voltage is given by The second stage is designed as summing amplifier whose output is given by (Using superposition Principle) Substituting the value of V01 from eq (1) in eq (2) we get As Temperature increases Rf decreases and so from above equation (2) it can be concluded “V0 increases with Temperature”. After fabricating the circuit as per above configuration and with the resistor values as specified in list of components, it is experimentally observed that the output voltage is increasing by 20mv for each degree rise in temperature, after room temperature the initial output voltage can be set to desired value by varying rest ‘P’. ANALOG TO DIGITAL CONVERTER: The output of the various parameters is fed to A/D converter. The channel selection depends upon the address selection sent by the Micro-controller. This ADC is having three address inputs to select one out of eight channels of the ADC. This ADC 0809 is a successive approx. Analog to digital converter and the clock rate at which the conversion is fed from the IC 555 timer configured as astable multi-vibrator. The digital output after conversion is fed to Micro-controller For ADC to start converting the data after selecting the channel by sending the address inputs, the start conversion signal is to be sent by Micro-controller. Then ADC starts converting the analog signals voltage into corresponding digital data. For Ex: The following table shows the digital data corresponding to analog input. After conversion, the ADC generates EOC (End of conversion). This indicates to Micro-controller that the conversion is completed and takes the digital data corresponding to analog input. The following is Circuit diagram of A/D Converter along with its clock generator: In the above circuit diagram 555 timer IC is used for generating the required clock pulses. CLOCK GENERATOR: The required clock for the ADC is generated using 555 Timer IC that 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 where as by varying the value of resistor the frequency can be adjusted from 1Hz to 500KHz. Here the required frequency is 100 KHz approximately. In the above circuit diagram 555 timer IC is used for generating the required clock pulses. Frequency can be adjusted using variable resistor 100K (RB). In this circuit, the external capacitor charges through RA+RB and discharges through RB. Thus the duty cycle may be precisely set by the ratio of these two resistors. In this mode of operation, the capacitor charges and discharges between 1/3 VCC and 2/3 VCC. As in the triggered mode, the charge and discharge times, and therefore the frequency are independent of the supply voltage. Here the timing resistor is now split into two sections, RA and RB, with the discharge transistor (Pin 7) connected to junction of Ra and Rb. When the power supply is connected, the timing capacitor C charges towards 2/3 VCC through Ra and Rb. When the capacitor voltage reaches 2/3 VCC, the upper comparator triggers the flip-flop and the capacitor starts to discharge towards ground through Rb. When the discharge reaches 1/3 VCC the lower comparator is triggered and a new cycle is started. The capacitor is then periodically charged and discharged between 2/3 VCC and 1/3 VCC respectively. The output state is high during the charging cycle for a time period t1, so that The output state is LOW during the discharge cycle for a time period t2, given by t2 = 0.693 RbC Thus, the total period charge and discharge is T = t1 + t2 = 0.693 (Ra + 2Rb) C (Seconds) So that the output frequency is given as MICRO-CONTROLLER: Circumstances that we find ourselves in today in the field of micro-controllers 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 adding external peripherals such as memory, input-output lines, timers and other made the first computers. Further increasing of the volume of the package resulted in creation of integrated circuits. These integrated circuits contained both processor and peripherals. That is how the first chip containing a microcomputer, or what would later be known as a micro-controller came about. MEMORY UNIT: Memory is part of the micro-controller 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 cannot be confused, any of their contents will then be easily accessible. It is enough to know the designation of the drawer and so we will know its contents 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. Supplying an additional line called control line does this. 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 micro-controller. CENTRAL PROCESSING UNIT: Let add 3 more memory locations to a specific block that will have a built in capability to multiply, divide, subtract, and move its contents from one memory location onto another. The part we just added in is called “central processing unit” (CPU). Its memory locations are called registers. Registers are therefore memory locations whose role is to help with performing various mathematical operations or any other operations with data wherever data can be found. Look at the current situation. We have two independent entities (memory and CPU) that are interconnected, and thus any exchange of data is hindered, as well as its functionality. If, for example, we wish to add the contents of two memory locations and return the result again back to memory, we would need a connection between memory and CPU. Simply stated, we must have some “way” through data goes from one block to another. BUS: That “way” is called “bus”. Physically, it represents a group of 8, 16, or more wires. There are two types of buses: address and data bus. The first one consists of as many lines as the amount of memory we wish to address, and the other one is as wide as data, in our case 8 bits or the connection line. First one serves to transmit address from CPU memory, and the second to connect all blocks inside the micro-controller. INPUT-OUTPUT UNIT: Those locations we’ve just added are called “ports”. There are several types of ports: input, output or bi-directional ports. When working with ports, first of all it is necessary to choose which port we need to work with, and then to send data to, or take it from the port. When working with it the port acts like a memory location. Something is simply being written into or read from it, and it could be noticed on the pins of the micro-controller. The following is the Circuit diagram of Digital Display Driven by the micro-controller In the above circuit diagram, four common anode 7-Segment displays are used for displaying the motor speed. The output of the Micro-controller is fed to digital display through the latches, for this purpose IC 74573 is used, this is an octal transparent D-type latches IC. To drive the displays independently 547 transistors are used. A seven segment LED is a device for display of numbers and letters. It contains seven LED bars, which can be turned on by placing the appropriate signals on the appropriate pins. In order to produce a specific number, we must light the correct segments of the LED. For example, to display the number 3, we must light segments a, b, c, d and g. By which we understand that the pattern of lit and unlit segments can be formed into a binary number. F.M TRANSMITTER: The following is the circuit diagram In the above circuit design, the instantaneous frequency of the carrier is varied directly in accordance with the base band signal by means of a device known as VCO (Voltage controlled oscillator) one way of implementing such a device is to use a sinusoidal oscillatory having a relatively high – Q frequency. Determining network and to control the oscillator by symmetrical incremental variation of the reactive components. Thus the tone signal modulated at 100 MHz carriers. To understand how radio wave are generated and radiated into space, consider alternating currents of suitable frequency fed into conductor or wire of suitable length called the antenna. Fast moving alternating currents produce a moving electric field around the antenna. This field in turn produces a magnetic field at right angles to it. This combination of electric and magnetic fields constitutes the radio wave or electro magnetic wave, which is a form of radiant energy. F.M RECEIVER: The FM receiver is located at the remote end. The first stage of this remote end unit is the F.M. Radio Receiver, which is designed with Phillips IC TEA 5591A. In the circuit diagram an LED indicator is connected at Pin No.7 of 5591 IC, which glows brightly, if the receiver is tuned perfectly with the transmitter. The F.M. receiver, which operates at 100 MHz, will have an intermediate frequency of 10.7 MHz and bandwidth of 200 KHz. This IC consists of a built in RF amplification circuit. It matches the input impedance of the antenna. This IC consists of F.M. Detector including amplifier of modulated signal (RF amplification). Two sections of LC are provided and a ceramic filter is used to filter the IF of 10.7 MHz. The FM demodulator is basically a frequency to amplitude converter, which converts the frequency deviation of the incoming carrier into an AF (Audio frequency) amplitude variation identical to that of modulating signal. In demodulation any change in amplitude of the signal fed to the FM demodulator is a spurious signal. Therefore it must be removed, if distortion is to be avoided. A limiter is a form of clipping device. It is quite possible for the amplitude limiter to be described to be inadequate to its task, because signal strength variations may easily take average signal amplitude outside the limiting range. As a result, further limiting is required. In practice, two amplitude limiters are used in cascade. This arrangement increases the limiting range satisfactory. To ensure that the signal fed to the limiter is within its range regardless of input signal limiting range strength and also to prevent overloading of the amplifier, the AGC (Automatic Gain Control) is used. Instead of designing a double limiter, the better performance is obtained by using one limiter and AGC. The frequency-modulated signal is fed to a tuned circuit whose resonant frequency is to one side of the center frequency (CF) of the FM signal, the output of this tuned circuit will have an amplitude that depends on the frequency deviation of the input signal. The following is the circuit diagram of F.M. Receiver. SIGNAL AMPLIFIER: For maximum power output and impedance matching the audio frequency driver transformer is used in the signal amplifier circuit. The design equation of a driver transformer is When n = Ratio of the transformer Where N1 = Primary winding and N2 = Secondary winding. The following is the Circuit diagram of signal amplifier. The signal, which is detected by the receiver, is further amplified with the help of above audio amplifier. In this circuit, the input capacitor 0.1 MF permits complete input power to flow into the base circuit. It also blocks the DC component to flow into the base circuit. The 330K resistor works as a biasing resistor. The purpose of this biasing is as follows. A study of the transistor characteristics shows that the transistor function is most linear when the transistor operates in its active region. The operating point may then be suitably placed in this region by proper selection or dc potentials and currents through use of external energy sources. With a properly selected operating point, the time varying component of the AC input signal. Say base current in common emitter amplifier, results in output signal of the same waveform. An improperly selected operating points results in an output signal, which differs in waveform from the input signal, such an operative point is unsatisfactory and should be rejected. The selection of suitable operating point is vital for linear amplification. The 100 and 330K forms as a input resistance of the transformer primary. For securing maximum transfer of power from the amplifier to the load, the source impedance should match with the input impedance of the amplifier transferred to the primary of the transformer. Similarly for maximum transfer of power from the amplifier to the load, the output impedance of the amplifier is matched with the load impedance. To get large output the two secondary signals are cascaded and output is taken for further processing. In + VC half cycle, the top transistor circuit enables and in the –VC half cycle, the bottom transistor circuit enables and total cycle gets amplified output signal. The output of this signal amplifier is fed to the F/V converter. FREQUENCY TO VOLTAGE CONVERTER: The output of the signal amplifier is converted into DC voltage in proportion to the tone frequency, with the help of phase locked loop IC 4046 and Multi-plexer IC 4053. The amplified signal is fed to the in signal (Pin NO.14) of the device, which is the input of the phase comparator. The other input of the phase comparator is fed from the internally generated voltage controlled oscillator (VCO), whose frequency is set with the help of external capacitor connected between Pin 6 and 7, here PLL is used for synchronization. The output of the PLL is fed to the Multiplexer. The signals of the phase comparator – I and phase comparator – II are fed so that the output is multi-plexed with the hlp of IC4053. The output of the F/V converter is fed to the Analog to digital converter circuit for converting the Analog information into digital pulses. The circuit design of phase locked loop with multiplexer and its associated circuitry is shown below. ANALOG TO DIGITAL CONVERTER: The A/D Converter used in the receiving module is similar to the A/D converter used in the transmitter. The difference is the transmitter converter is interfaced with the Microcontroller where as the receiver converter is interfaced with computer. The following is the circuit diagram of A/D converter along with latches and buffer used in the receiving module. DETAILS ABOUT WIRELESS COMMUNICATION Model of a communication system: The overall purpose of the communication system is to transfer information from one point to in space and time, called the source to another point, the user destination. As a rule, the message produced by a source is not electrical. Hence an input transducer is required for converting the message to a time varying electrical quantity called a message signal. At the destination point another transducer converts the electrical waveform to the appropriate message. The information source and the destination point are usually separated in space. The channel provides the electrical connection between the information source and the user. The channel can have many deferent forms such as a microwave radio link over free space a pair of wires, or an optical fiber. Regardless of its type the channel degrades the transmitted single in a number of ways. The degradation is a result of signal distortion due to imperfect response of the channel and due to undesirable electrical signals (noise) and interference. Noise and signal distortion are two basic problems of electrical communication. The transmitter and the receiver in a communication system are carefully designed to avoid signal distortion and minimize the effects of noise at the receiver so that a faithful reproduction of the message emitted by the source is possible. The transmitter couples the input message signal to the channel. While it may sometimes be possible to couple the input transducer directly to the channel, it is often necessary to process and modify the input signal for efficient transmission over the channel. Signal processing operations performed by the transmitter include amplification, filtering, and modulation. The most important of these operations is modulation a process designed to match the properties of the transmitted signal to the channel through the use of a carrier wave. Modulation is the systematic variation of some attribute of a carrier waveform such as the amplitude, phase, or frequency in accordance with a function of the message signal. Despite the multitude of modulation techniques, it is possible to identify two basic types of modulation: the continuous carrier wave (CW) modulation and the pulse nodulation. In continuous wave (CW) carrier modulation the carrier waveform is continuous (usually a sinusoidal waveform), and a parameter of the waveform is changed in proportion to the message signal. In pulse modulation the carrier waveform is a pulse waveform (often a rectangular pulse waveform), and a parameter of the pulse waveform is changed in proportion to the message signal. In both cases the carrier attribute can be changed in continuous or discrete fashion. Discrete pulse (digital) modulation is a discrete process and is best suited for messages that are discrete in nature such as the output of a teletypewriter. However, with the aid of sampling and quantization, continuously varying (analog) message signal can be transmitted using digital modulation techniques. Modulation is used in communication systems for matching signal characteristics to channel characteristics, for reducing noise and interference, for simultaneously transmitting several signals over a single channel, and for overcoming some equipment limitations. A considerable portion of this article is devoted to the study of how modulation schemes are designed to achieve the above tasks. The success of a communication system depends to a large extent on the modulation. The main function of the receiver is extracting the input message signal from the degraded version of the transmitted signal coming from the channel. The receiver performs this function through the process of demodulation, the reverse of the transmitter’s modulation process. Because of the presence of noise and other signal degradations, the receiver cannot recover the message signal perfectly. Ways of approaching ideal recovery will be discussed later. In addition to demodulation, the receiver usually provides amplification and filtering. Based on the type of modulation scheme used and the nature of the output of the information source, we can divide communication systems into three categories: 1.analog communication systems designed to transmit analog information using analog modulation methods 2. Digital communication systems designed for transmitting digital information using digital modulation schemes and 3. Hybrid systems that use digital modulation schemes for transmitting sampled and quantized values of an analog message signal. Other ways of categorizing communication systems include the classification based on the frequency of the carrier and the nature or the communication channel. With this brief description of a general model of a communication system, we will now take a detailed look at various components that make up a typical communication system using the digital communication system as an example. We will enumerate the important parameter of each functional block in a digital communication system and point out some of the limitations of the capabilities of various blocks. ELEMENTS OF A DIGITAL COMMUNICATION SYSTEM: The overall purpose of the system is to transmit the messages (or sequences of symbols) coming out of a source to a destination point at as high a rate and accuracy as possible. The source and the destination point are physically separated in space and a communication channel of some sort connects the source to the destination point. The channel accepts electrical/electromagnetic signals, and the output of the channel is usually a smeared or distorted version of the input due to the non-ideal nature of the communication channel. In addition to the smearing, the information-bearing signal is also corrupted by unpredictable electrical signals (noise) from both man-made and natural causes. The smearing and noise introduce errors in the information being transmitted and limits the rate at which information can be communicated from the source to the destination. The probability of incorrectly decoding a message symbol at the receiver is often used as a measure of performance of digital communication system. The main function of the coder, the modulator, the demodulator, and the decoder is to combat the degrading effects of the channel on the signal and maximized the information rate and accuracy. INFORMATION SOURCE: Information sources can be classified into two categories based on the nature of their outputs: Analog information sources, and discrete information sources. Analog information sources, such as a microphone actuated by speech, or a TV camera scanning a scene, emit one or more continuous amplitude signals (or functions of time). The output of discrete information sources such as a teletype or the numerical output of a computer consists of a sequence of discrete symbols or letters. An analog information source can be transformed onto a discrete information source through the process of sampling and quantizing. Discrete information sources ate characterized by the following parameters: 1. Source alphabet (symbols or letters) 2. Symbol rate 3. Source alphabet probabilities 4. Probabilistic dependence of symbols in a sequence From these parameters, we can construct a probabilistic model of the information source and define the source entropy (H) and source information rate (R) in bits per symbol and bits per second, respectively. The term bid is used to denote a binary digit.) To develop a feel for what these quantities represent, let us consider a discrete information source-a Teletype having 26 letters of the English alphabet plus six special characters. The source alphabet for this example consists of 32 symbols. The symbol rate refers to the rate at which the Teletype produces characters: for purposes of discussion, let us assume that the Teletype operates at a speed of 10 characters or 10 symbols/sec. If the Teletype is producing messages consisting of symbol sequences in the English language, then we know that some letters will appear more often than others. We also know that the occurrence of a particular letter in a sequence is somewhat dependent on the letters preceding it. For example, the letter E will occur more often than letter Q and the occurrence of Q implies that the next letter in the sequence will most probably be the letter U, and so forth. These structural properties of symbol sequences can be characterized by probabilities of occurrence of individual symbols by the conditional probabilities of occurrence of symbols. An important parameter of a discrete source is its entropy. The entropy of a source, denoted by H, refers to the average information content per symbol in a long message and is given units of bits for symbol where bit is used as an abbreviation for a binary digit. In our example, if we assume that all symbols occur with equal probabilities in a statistically independent sequence, then the source entropy is five bits per symbols. However, the probabilistic dependence of symbols in a sequence, and the unequal probabilities of occurrence of symbols considerably reduce the average information content of the symbols. Naturally we can justify the previous statement by convincing ourselves that in a symbol sequence QUE, the letter U carries little or no information because the occurrence of Q implies that the next letter in the sequence has to be a U. The source information rate is defined as the product of the source entropy and the symbol rate and has the units of bits per second. The information rate, denoted by R, represents the minimum number of bits per second that will be needed, on the average, to represent the information coming out of the discrete source. Alternately, R represents the Minimum average data rate needed to convey the information from the source to the destination. Source Encoder/Decoder: The input to the source encoder (also referred to as the source coder) is a string of symbols occurring at a rate of rs symbols/sec. The source coder converts the symbol sequence into a binary sequence of 0’s and 1’s by assigning code words to the symbols in input sequence. The simplest way in which a source coder can perform this operation is to assign a fixed-length binary code word to each symbol in the input sequence. For the teletype example we have been discussing, this can be done by assigning 5-bit code world 00000 through 11111 for the 32 symbols in the source alphabet and replacing each symbol in the input sequence by its pre-assigned code word. With a symbol rate of 10 symbols/sec, the source coder output data rate will be 50 bits/sec. Fixed-length coding of individual symbols in a source output is efficient only if the symbols occur with equal probabilities in a statistically independent sequence. In most practical situation symbols in a sequence are statistically dependent, and they occur with unequal probabilities. In these situations the source coder takes a string of two or more symbols as a block and assigns variable-length code words to these block. The optimum source coder is designed to produce an output data rate approaching R, the source information rate. Due to practical constraints, the actual output rate of source encoders will be greater than the source information rate R. the important parameters of a source coder are black size, code word lengths, average data rate, and the efficiency of the coder (i.e., actual output data rate compared to the minimum achievable rate R). At the receiver the source decoder converts the binary output of the channel decoder into a symbol sequence. The decoder for a system using fixed-length code words is quite simple, but the decoder for a system using variable-length code words will be very complex. Decoders for such systems must be able to cope with a number of problems such as growing memory requirement and loss of synchronization due to bit errors. Communication Channel: The Communication channel provides the electrical connection between the source and the destination. The channel may be a pair of wires or a telephone link or free space over which the information-bearing signal is radiated. Due to physical limitations, communication channels have only finite bandwidth (B HZ), and the information-bearing signal often suffers amplitude and phase distortion as it travels over the channel. In addition to the distortion, the signal power also decreases due to the attenuation of the channel. Furthermore, the signal is corrupted by unwanted, unpredictable electrical signals referred to as noise. While some of the degrading effects of the of the channel can be removed or compensated for, the effects of noise cannot be completely removed. From this point of view, the primary objective of a communication system design should be to suppress the bad effects of the noise as much as possible. One of the ways in which the effects of noise can be minimized is to increase the signal power. However, signal power cannot be increased beyond certain levels because of nonlinear effects that become dominant as the signal amplitude is increased. For this reason the signal-to-noise power ratio (S/N), which can be maintained at the output of a communication channel, is an important parameter of the system. Other important parameters of the channel are the usable bandwidth (B), amplitude an phase response, and the statistical properties of the noise. If the parameters of a communication channel are known, then we can compute the channel capacity C, which represents the maximum rate at which nearly errorless data transmission is theoretically possible. For certain types of communication channels it has been shown that c is equal to B log2 (1+S/N) bits/sec. The channel capacity C has to be greater than the average information rate R of the source for errorless transmission. The capacity c represents a theoretical limit, and the practical usable data rate will be much smaller than C. as an example, for a typical telephone link with a usable bandwidth of 3KHz and S/N = 103, the channel capacity is approximately 30,000 bits/sec. At the present time, the actual data rate on such channels ranges from 150 to 9600 bits/sec. Modulator: The modulator accepts a bit stream as its input and converts it to an electrical waveform suitable for transmission over the communication channel. Modulation is one of the most powerful tools in the hands of a communication systems designer. It can be effectively used to minimize the effects of channel noise, to match the frequency spectrum of the transmitted signal with channel characteristics, to provide the capability to multiplex many signals, and to overcome some equipment limitations. The important parameters of the modulator are the types of waveforms used, the duration of the waveforms, the power level, and the bandwidth used. The modulator accomplishes the task of minimizing the effects of channel noise by the use of large signal power and bandwidth, and by the use of waveforms that last for longer durations. While the use of increasingly large amounts of signal power and bandwidth to combat the effects of noise is an obvious method, these parameters cannot be increased indefinitely because of equipment and channel limitations. The use of waveforms of longer time duration to minimize the effects of channel noise is based on the well-known statistical law of large numbers. The law of large numbers states that while the outcome of a single random experiment may fluctuate wildly, the overall result of many repetitions of a random experiment can be predicted accurately. In data communications, this principle can be used to advantage by making the duration of signaling waveforms long. By averaging over longer durations of time, the effects of noise can be minimized. To illustrate the above principle, assume that the input to the modulator consists of 0’s and 1’s occurring at a rate of 1 bit/sec. The modulator can assign waveforms once every second. Notice that the information contained in the input bit is now contained in the frequency of the output waveform. To employ waveforms of longer duration, the modulator can assign waveforms once every four seconds. The number of distinct waveforms the modulator has to generate (hence the number of waveforms the demodulator has to detect) increases exponentially as the duration of the waveforms increases. This leads to an increase in equipment complexity and hence the duration cannot be increased indefinitely. The number of waveforms used in commercial digital modulators available at the present time ranges from 2 to 16. Demodulator: Modulation is a reversible process, and the demodulator accomplishes the extraction of the message from the information bearing waveform produced by the modulator. For a given type of modulation, the most important parameter of the demodulator is the method of demodulation. There are a variety of techniques available for demodulating a given modulated waveform: the actual procedure used determines the equipment complexity needed and the accuracy of demodulation. Given the type and duration of waveforms used by the modulator, the power level at the modulator, he physical and noise characteristics of the channel, and the type of demodulation, we can derive unique relationship between data rate, power bandwidth requirements, and the probability of incorrectly decoding a message bit. A considerable portion of this text is devoted to the derivation of these important relationships and their use in system design. Channel Encoder/Decoder: Digital channel coding is a practical method of realizing high transmission reliability and efficiency that otherwise may be achieved only by the use of signals of longer duration in the modulation/demodulation process. With digital coding, a relatively a small set of analog signals, often two, is selected for transmission over the channel and the demodulator has the conceptually simple task of distinguishing between two different waveforms of known shapes. The channel coding operation that consists of systematically adding extra bits to the output of the source coder accomplishes error control. While these extra bits themselves convey no information, they make it possible for the receiver to detect and/or correct some of the errors in the information bearing bits. There are two methods of performing the channel coding operation. In the first method, called the block coding method, the encoder takes a block of k information bits from the source encoder and adds r error control bits. The number of error control bits added will depend on the value of k and the error control capabilities desired. In the second method, called the convolution coding method, the information bearing message stream is encoded in a continuous fashion by continuously interleaving information bits and error control bits. Both methods require storage and processing of binary data at the encoder and decoder. While this requirement was a limiting factor in the early days of data communication, it is no longer such a problem because of the availability of solid-state memory and microprocessor devices at reasonable prices. The important parameters of a channel encoder are the method of coding. Rate or efficiency of the coder (as measured by the ratio of data rate at input to the data rate at the output), error controls capabilities, and complexity of the encoder. The channel decoder recovers the information bearing bits from the coded binary stream. The channel decoder also performs error detection and possible correction. The decoder operates either in a block mode or in a continuous sequential mode depending on the type of coding used in the system. The complexity of the decoder and the time delay involved in the decoder are important design parameter. THEORY RELATED TO DISTRIBUTION TRANSFORMERS The transformer is a device, which transfers electrical energy from one electrical to another electrical circuit through the medium of magnetic field and without a change in the frequency. The electric circuit, which receives energy from the supply mains, is called primary winding and the other circuit, which delivers electric energy to the load, is called the secondary winding. Actually, the transformer is an electromagnetic energy conversion device, since the energy received by the primary is first converted to magnetic energy and it is then reconverted to useful electrical energy in the other circuits. Thus primary and secondary windings of a transformer are not connected electrically, but are coupled magnetically. This coupling magnetic field allows the transfer of energy in either direction, from high voltage to low voltage circuits or from low voltage to high voltage circuits. If the transfer of energy occurs at the same voltage, the purpose of the transformer is merely to isolate the two electric circuits and this use is very rare in power applications. If the secondary winding has more turns than the primary winding, then the secondary voltage is higher than the primary voltage and the transfer is called a step-up transformer. In case the secondary winding has less turns than the primary winding, then the secondary voltage is lower than the primary voltage and the transformer is called a step-down transformer. Note that a step-up transformer can be used as a step-down transformer, in which case the secondary of step-up transformer becomes the primary of step-down transformer. Actually a Transformer can be termed a step-up or step-down transformer only after it has been put into service. Therefore, when referring to the windings of a particular transformer, the terms highvoltage winding and low voltage winding should be used instead of primary and secondary windings. A transformer is the most widely used device in both low and high current circuits. As such, transformers are built in an amazing range of sizes. In electronic, measurement and control circuits, transformer size may be so small that it weighs only a few tens of grams whereas in high voltage power circuits, it may weigh hundreds tones. There are two general types of transformers, the core type and the shell type. These two types differ from each other by the manner in which the windings are wound around the magnetic core. A transformer works on the principle of electro magnetic induction. According to the principle, an e.m.f. is induced in a coil if it links a changing flux. A distribution transformer should have a small value of voltage regulation, so that the terminal voltage at the consumer’s premises doesn’t vary widely as the load changes. For a transformer of large voltage regulation, the voltage at the consumer’s terminals will fall appreciably with the increase in load. This has a detrimental effect on the operation of the fluorescent tubes, TV sets, Refrigerator Motors etc., since these are designed to operate satisfactorily at a constant voltage. Thus the distribution transformers should be designed to have a low value of leakage impedance. The transformer efficiency can be calculated if the total loses in the transformer are known. Power transformers are used at the sending and receiving ends of a long, high voltage power transmission line for stepping up or stepping down the voltage. These transformers are manipulated to operate almost always at or near their rated capacity. Therefore, power transformers are disconnected during light load periods. In view of this, a power transformer is designed to have maximum efficiency at or near its full load KVA. Hence the choice of a power transformer, out of a large numbers of competing transformers, should be based on full load efficiency. Distribution transformers are those, which change the voltage to a level suitable for utilization purposes at the consumer’s premises. A power transformer does not come in direct contact with the consumer’s terminals, whereas a distribution transformer must have its secondary directly connected with the consumer’s terminals. The load on a distribution transformer varies over a wide range during a 24-hour day. For example, a distribution transformer in a residential colony may have practically little or no load during a considerable portion of the daytime, but in the evenings, the load may be near its rated capacity. Note that the primary of distribution transformers are always energized and, therefore, the core loss takes place continuously. In view of this, the distribution transformers are designed to have very low value of core loss. But for reduced core loss Pc (Pc is constant load voltage) the maximum efficiency may occur at about one-half of its rated KVA. Thus a distribution transformer should not be judged by its full load efficiency, which is usually much less than its maximum efficiency. However, the choice of a distribution transformer, out of a large number of competing transformers, can be based on energy efficiency. While testing the transformer polarity, on the primary side of two ending transformer, one terminal is positive with respect to the other terminal at any one instant. At the same instant one terminal of the secondary winding is positive with respect to the other terminal. These relative polarities of the primary and the secondary terminals at any instant must be known if the transformers are to be operated in parallel or are to be used in a polyphase circuit. A load test on a transformer is necessary if its maximum temperature rise is to be determined. A small transformer can be put on full load by means of suitable load impedance. But for large transformer, full load test is difficult, since it involves considerable waste of energy and a suitable load, capable of absorbing full load power, is not easily available. However, large transformers can be put on full load by means of sumpner’s or back-to-back test. The sumpner’s test can also be used for calculating the efficiency of a transformer, though the later can be determined accurately from open circuit and shortcircuited tests. The back-to-back test on single Phase transformers requires to identical units, where two primaries are connected in parallel, are energized at rated voltage and rated frequency. For performing the load test on single-phase transformers, two identical units are essential, whereas the load test on three phase transformers can be carried out on a single unit. A transformer, in which a part of the winding is common to both the primary and secondary circuits, is called an autotransformer. In a two winding transformer, primary and secondary windings are electrically isolated, but in an auto transformer the two windings are not electrically isolated. The main dis-advantage of an autotransformer is due to the direct electrical connection between the low tension and high-tension sides. DETAILS ABOUT ‘A’ TO ‘D’ CONVERTERS The analog – to – digital converter (A.D) is used to convert an analog voltage or current input to an output binary word that can be used by a computer. Of the many techniques that have been published for performing an A/D conversion, only a few are of interest to us: so we will consider only the voltage to frequency, signal – slope integrator, duel-slope integrator, counter (or servo), successive approximation and flash methods. The basic size of circuit that we will show is the 8-bit A/D converter, which for many purposes is all that is needed. These same discussions are also useful for 10-bit, 12-bit or higher order A/D converters. INTEGRATION A/D METHODS: Most digital panel Meters (DPM) and digital multi-meters (DMM) use either the single integration or duel-slope integration methods for the A/D conversion process. The single slope integrator is simple, but is limited to those applications that can tolerate accuracy of one or two percent. An example of single slope integrator A/D converter is shown in the next page, while its timing diagram is shown below that. The following is the timing diagram The single – slope integrator A/D converter consists of five basic sections: Ramp generator, comparator, and logic. Clock and an output encoder consisting of a binary counter, latch and display in the digital counter block. The ramp generator is an ordinary operational amplifier Miller integrator with its input connected to a stable, fixed, reference voltage source. This makes the input current essentially constant; so the voltage at Ramp o/p will rise in a nearly linear manner, creating the voltage ramp. The comparator is an operational amplifier that has an open feed back loop. The circuit gain is the open-loop gain (A vol) of the device selected. Typically very high even in low cost operational amplifiers. When the analog input voltage Vx is greater than the ramp voltage, the output of the comparator is saturated at logic –HIGH level. The logic section consists of a main AND gate, a main gate control, and a clock. The waveforms associated with this circuit are based on unknown input Voltage Vx. The AND gate requires all three inputs to be high before its output can be HIGH also. The output of the AND gate will go HIGH every time the clock signal is also HIGH. The encoder, in this case an B-bit binary counter, will than see a pulse train with a length proportional to the amplitude of the analog input voltage. If the A/D converter is designed correctly, then the maximum range (full-scale) value of Vx. Several problems are found in single-slope integrator A/D converters. 1) The ramp voltage may be Non-linear 2) The ramp voltage may have too steep or too shallow a slope 3) The clock pulse frequency could be wrong 4) It may be prone to changes in apparent value of Vx caused by Noise The duel-slope integrator corrects many of these problems. This circuit also consists of five basic sections: integrator, comparator, control logic section, binary counter and a reference current or voltage source. An integrator is made with an operational amplifier connected with a capacitor in the negative feed back loop, as was the case in the single-slope version. The comparator in this circuit is also the same sort of circuit as was used in the previous example. In this case though, the comparator is ground referenced by connecting +IN to ground. When a start command is received, the control circuit resets the counter, resets the integrator to ‘O’ volts. The analog voltage creates an input current to the integrator, which causes the integrator output to begin charging capacitor; the output voltage of the integrator will begin to rise. As soon as this voltage rises a few milli volts above ground potential the comparator output snaps HIGH- Positive. A HIG comparator output causes the control circuit to enable the counter, which begins to count pulses. Voltage to Frequency Converters: These circuits are not A/D Converters in the strictest sense, but are very good for representing analog data in a form that can be tape recorder on a low cost audio- machine, or transmitted over radio. The V/F converter output can also be used for direct input to a computer if a binary counter is used to measure the output frequency. Two forms of V/F converter are common. One is a voltage-controlled oscillator (VCO), that is, a regular oscillator circuit in which the output frequency is a function of an input controls voltage. If the VCO is connected to a binary or binary coded decimal (BCD) counter, then the VCO becomes a V/F form of A/D converter. The integrator, which causes the integrator output to begin charging capacitor, the output voltage of the integrator will begin to rise. As soon as this voltage rises a few milli-volts above ground potential the comparator output snaps HIGH – Positive. A HIG comparator output causes the control circuit to enable the counter, which begins to count pulses. The following is the block diagram of voltage to frequency converter Counter type A/D Converter: A counter type A/D converter (Also called “servo” or “ramp” A/D converters) consists of a comparator, voltage output DAC, binary counter, and the necessary control logic. When the start command is received, the control logic resets the binary counter, enables the clock, and begins counting. The counter outputs control the DAC inputs, so the DAC output voltage will begin to rise when the counter begins to increment. As long as analog input voltage Vx is less than Vref (The DAC output), the comparator output is HIGH, when Vx and Vref are equal, however, the comparator output goes low, which turns off the clock and stops the counter output at this time represents the value of Vx. The following is the block diagram of binary A/D converter. 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 DAC. PARALLEL 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 though 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. DETAILS ABOUT MICORCONTROLLER The micro-controller is a chip, which has a computer processor with all its support functions, memory (both program storage and RAM), and I/O built in to the device. These built in functions minimize the need for external circuits and devices to be designed in the final applications. Most micro-controllers do not require a substantial amount of time to learn how to efficiently program them, although many of them have quirks, which you will have to under stand before you attempt to develop your first application. Along with micro-controllers getting faster, smaller and more power efficient they are also getting more and more features. Often, the first version of micro-controller will just have memory and simple digital I/O, but as the device family matures, more and more part numbers with varying features will be available. With all the 8051 manufacturer’s products taken into account, there are over two hundred different 8051 part numbers, each with different features and capabilities. For most applications, we will be able to find a device within the family that meets our specifications with a minimum of external devices, or an external but which will make attaching external devices easier, both in terms of wiring and programming. For many micro-controllers, programmers can be built very cheaply, or even built in to the final application circuit eliminating the need for a separate circuit. Also simplifying this requirement is the availability of micro-controllers with SRAM and EEPROM for control store, which will allow program development without having to remove the microcontroller from the application circuit. Different types of Micro-controllers: Creating applications for micro-controllers is completely different than any other development job in computing and electronic. In most other applications, we probably have a number of sub systems and interfaces already available for our use. This is not the case with a Micro-controller, where we are responsible a) Power distribution b) System clocking c) Interface design and wiring d) Systems programming e) Application programming f) Device programming These work items might seem obvious, but having to do them all is really quite profound in modern computing system development. In no other aspect of electronics are all these requirements found. The process is also made more enjoyable by learning how to work with the features built into the devices that are designed to simplify the task of directly connecting to other devices. Often, very useful applications can be created using a microcontroller and a few passive components. Embedded micro-controllers: When all the hardware required to run the application is provided on the chip, it is referred to as an embedded micro-controller. All that is typically required to operate the device is power, reset, and a clock. Digital I/O pins are provided to allow interfacing with external devices. This complete hardware on a chip is extremely useful for some applications. Embedded micro-controllers are now replacing some very common devices like 555 timers because they are actually cheaper to use in applications and they are much more precise and easier to control Micro-controller memory types: Memory is probably not something we normally think about when we create applications for a personal computer. In a micro-controller, understanding how much memory we have and how its architect is critical, especially when we are planning on how to implement the application code. In a micro-controller, memory for different purposes is typically segregated and arranged to allow the device to execute most efficiently. Control storage: In a PC, when we execute an application, we read the application from disk and store it into an allocated section of memory. In a micro-controller, this is not possible because there is no disk to read from. The application that is stored in non-volatile memory is always the only software the micro-controller will execute. Having the program always available in memory makes the writing of its some what different than PC or work station applications. Control store is known by a number of different names including program memory and firmware (as well as some permutations of the various names). The name really is not important. What is important is under standing that this memory space is the maximum size of the application that can be loaded in to the micro-controller and that the application also includes all the low-level code and device interfaces necessary to execute an application. CHIP TECHNOLOGIES: Micro-controllers, like all other electronic products, are growing smaller, running faster, requiring less power, and are cheaper. This is primarily due to improvements in the manufacturing process and technologies used (and not the adoption of different computer architectures). Virtually all micro-controllers built today use CMOS (complementary metal oxide semiconductor) logic technology to provide the computing functions and electronic interfaces. CMOS is a push-pull technology in which a PMOS and NMOS transistor are paired together. The following is the circuit diagram of push-pull configuration When the input signal is low, the PMOS transistor will be conducting and the NMOS transistor will be ‘off’. This means that the switch (or transistor) at Vcc will be ‘ON’, providing Vcc at the signal out. If a high voltage is input to the gate, then the PMOS transistor will be turned off and the NMOS transistor will be turned on, pulling the output line to ground. During a state transition, a very small amount of current will flow through the transistors. As the frequency of operation increases, current will flow more often in a given period of time (put another way, the charge transferred per unit time, which is defined as “current”, will increase). This increased current flow will result in increased power consumption by the device. Therefore, a CMOS device should be driven at the slowest possible speed, to minimize power consumption. An important point with all logic families understands the switching point of the input signal. For CMOS devices, this is typically 1.4Volts to one half of Vcc. However, it can be at different levels for different devices. Before using any device, it is important to understand what the input threshold level is. CMOS can interface directly with most positive logic technologies, although we must be careful of low voltage logic, to make sure that a high can be differentiated from a low in all circumstances. ATMEL 89C51 PROGRAMMING: Programming the Atmel AT89Cx051 series of 8051 micro-controllers uses some what of a different algorithm than what is used for the standard 40-pin devices. The AT89C51 algorithm is actually quite simple to implement. This programmer hardware can also be used to program AVR 20-pin micro-controllers. The programming can be described as erasing the control store and then presenting bytes to the micro-controller and latching it in. After the byte is latched in, the programmer waits for the byte to be saved into control store before reading it back and incrementing the AT89Cx051’s program counter to receive the next byte. To begin the programming cycle, the AT 89C51 is powered up with the Reset and XTAL1 pins held low. Then, +5V is applied to Reset and the PROG pin. At this point, the program counter inside the AT89C51 is reset to zero. After power up, the first thing we should do is a chip erase, to prepare the control store for the next program (all the control store bytes are loaded with 0FFh). This is accomplished by setting high and to low (this will be characterized as HLLL to show how the control signals are set) and pulsing PROG low for at least 10 msec. With the chip erased, the control store can be programmed. Note that Reset is cycled between +5V and +12V for writes and reads. This means that the Reset driver has to be a circuit that can output 0V, 5V, and 12V to the Reset Pin. The lock bits are used to limit access to the application in control store of a programmed part. If lock bit 1 is programmed, then the flash control store cannot be updated until it is erased again. If bit 2 is programmed, the verify fuction (read back) will return invalid data (this is copy protection for the chip , there is no encryption array in the AT89Cx51) again until the control store on the chip is erased. For obvious reasons, these two bits should not be programmed until the application programming is complete. Often in application programming, there will be gaps in the code, which means there are areas that are not programmed. The AT89Cx51’s program counter can be incremented (by pulsing XTAL1) to skip over these areas. To carry this out, the programmer’s control software will have to keep track of the current value of the program counter as it works through programming the device. AT89Cx051 Programmer Circuit: For many other devices (including the PIC Micro and even the 68HCxx), there are actually quite a few simple circuits available for simply programming the Micro-controller. While not attempting to fill the gap, a perfect programmer circuit can be design and it can be used for all the AT89Cx51 applications. One nice feature of the programmer is its ability to be used in-circuit, it can be wired into a prototype circuit and have the AT89Cx051 run without having to pull the chip in an out of the programmer as circuits are being developed. Another feature is that this circuit could be used for programming 20-pin Atmel AVR micro-controllers in parallel mode. The circuit itself is pretty simple and can be blocked out, with the programmer connected to an IBM –compatible PC via the parallel port. An adaptor with at least 16V peak-to-peak supplies power. The power circuit provides switched +5 and +12V for the 8051’s Vcc and Reset (0 V, +5 V or +12 V). The programmer control block controls the power circuit. If Reset is being driven by something other than 0 V, the programmer drivers are active. With this circuit, it is found that, when going from +12V to +5V on Reset, 30 micro sec was needed. If we end up writing our own software for this circuit, we may have to make sure that we have a long enough delay before attempting to read back what was written. Going from 0 V to +5V or +12V (or from +5V to +12V) took less than a micro sec. The programmer control block is used to control the power applied to the device being programmed as well as to its Reset (as noted in the previous paragraph) and the programming mode of AT89Cx51. A 74LS374 is used with data being latched in from the PC’s parallel port. The output of the ‘374 is always enabled, but all the lines going to the AT89Cx51 (with the exception of the power and Reset, which are independently controlled) pass through a 74LS244, which allows the AT89Cx51 to be pulled from the circuit without turning off the power to the programmer. The ‘244 is also used to pass the RDY/_BSY signal back to the PC to allow the programmer to poll the RDY/_BSY to determine when the programming operation has finished. The Data, which allows a programming byte to be passed to the Micro-controller or read from it. It could have eliminated this pin and had the same functionality by simply using the bi-directional features of the PC’s parallel port. However, to ensure that the AT89Cx51 would run in-circuit, we wanted to make sure that we could disable the connection to the PC, to make sure the cable wouldn’t affect the operation of the application and, more importantly, make sure that invalid voltages or signals in the application circuit would not damage the PC. The PC should have a parallel port capable of bi-directional I/O, and we used a switch-box dual male DB-25 connector cable. This cable is used for connecting a PC’s parallel port to a printer sharing switch box. On two of the Db- 25 connectors, each pin is directly connected (i.e., pin 1 is connected to Pin 1, pin 2 to pin 2, and so on), which makes wiring to the application easier. The final circuit probably looks pretty complex; however, by following the nets, we can find that it’s actually quite simple and easy to understand. What might be surprising is the component reference numbers (they don’t go in any order in the schematic). They are not in any kind of logical order because we developed this raw card. ASSEMBLY LANGUAGE: When we look at the different types of programming languages, we have to understand the “pay menow, pay me later” rule that exists with programming costs. Assembly language programming is generally the cheapest way to get into micro-controller programming, but it is the most difficult to learn, requires the most effort, and is the least portable to other platforms. Conversely, using a high-level language (such as BASIC or C) can make it much easier for a beginner to program a Micro-controller, but it is the most costly option. Code written for a high-level language is, by definition, portable to other platforms. Where the “ pay me now, pay me later” rule comes into effect is if we are developing 8051 applications professionally. Spending time on assembly language programming is probably costing you money over doing it in a high-level language. For learning the 8051 or any other Micro-controller or computer processor, assembly language is, as per the author opinion, the best way of doing it. Before going to an experiment, we will get a good feeling for how the 8051 processes instructions and how it works. Assembly language programming is the process of writing code that uses assembler statement, which are the actual instructions the 8051’s processor executes (the smallest unit of granularity). Along with assembler statement, directives are added to the source file to control the operation of the assembly process. Macros and conditional assembly statements are types of directives that can help you develop code unique to our application. Macros are labels that are replaced with code; they’re similar to subroutines, except the subroutine code is copied directly into the source before the assembly operation. Conditional assembly statements are “if/else/end if” statements that execute during assembly and, depending on the conditions, not allow certain sections of code to be assembled. A completed assembly language source file is assembled into a listing file (showing how the assembly program converted the source into bits for the processor) and an object, or hex, file, which are the actual bits and bytes to be burned into the 8051. Assembly language programming is the lowest form of: “human-readable” source code-processing possible. Interpreters and compilers take high-level language statements and convert them directly into processor instructions without the programmer being involved. Now, if we are well heeled and don’t want to do the drudgery of assembly language programming, we could buy a compiler, but we will never use the full potential of the 8051. Knowing and being proficient in assembly language programming will allow us to enhance our high-level language applications by allowing us to add code that will reduce the number of cycles required to execute, reduce the number of bytes required for the program, or enhance the operation of the application. HARDWARE DETAILS The IC’s and other important components used in this project work, procured from the Hyderabad Electronics Market. The details or data sheets of the IC’s are down loaded from the Internet. The following are the web sites that can be browsed for collecting the data sheets. 1. www. Texas Instruments.com 2. www. National semiconductors.com 3. www. Fairchild semiconductors.com The following are the IC’s and other important components used in this project work (1) ADC 0809 - Analog to Digital Converter IC (2) 74LS 573 Octal Transparent D-type Latches (3) LM324 - Quad Op-Amp IC (4) LM 555 Timer IC (5) Voltage Regulator (6) Relay (7) Current Transformer (8) 89C51 Micro-controller IC (9) TEA 5591 AM/FM Radio Receiver IC (10) 74LS 138 3-line to 8-line Decoder (11) 74 LS 574 Octal D-type Flip-Flop (12) 74LS244 Octal Buffer (13) CD 4046 PLL IC (14) CD 4053 Multiplexer IC POWER SUPPLY: The required DC levels are derived from the mains supply for this purpose a stepdown transformer of 12V-0-12V center tapped secondary transformer is used. The current rating of the transformer is 750 ma at secondary. The secondary is rectified and filtered to generate 12V smooth DC which is un-regulated voltage and which is required to drive the buzzer and relay. With help of positive voltage regulators, a constant voltage source of +5V and +9V are derived, for this purpose 7805 and 7809 3Pin Voltage regulators are used so that, though the mains supply varies from 170V to 250V, the output DC levels remains constant. The following is the circuit diagram of power supply. MICROCONTROLLER SOFTWARE TEMP_ADC DATA 30H DSP_C DATA 31H DSP1 DATA 32H DSP2 DATA 33H DSP3 DATA 34H DSP4 DATA 35H BUF1 DATA 36H BUF2 DATA 37H BUF3 DATA 38H BUF4 DATA 39H LV1 DATA 3AH LV2 DATA 3BH LV3 DATA 3CH LV4 DATA 3DH T1_1 DATA 3EH T1_2 DATA 3FH T1_3 DATA 40H T1_4 DATA 41H T2_1 DATA 42H T2_2 DATA 43H T2_3 DATA 45H T2_4 DATA 46H CT1 DATA 47H CT2 DATA 48H CT3 DATA 49H CT4 DATA 4AH CNT DATA 4BH ;> A0 A1 A2 ALE SOC OE EOC RLY buz BIT P3.0 BIT P3.1 BIT P3.2 BIT P3.3 BIT P3.4 BIT P3.5 BIT P3.6 BIT P2.0 bit p2.1` ;> vvv ttt1 ttt2 ccc1 BIT 00H BIT 01H BIT 02H BIT 03H ;> ONE EQU 11111001B TWO EQU 10100100B THREE EQU 10110000B FOUR EQU 10011001B FIVE EQU 10010010B SIX EQU 10000010B SEVEN EQU 11111000B EIGHT EQU 10000000B NINE EQU 10010000B ZERO EQU 11000000B ;> ORG 0000H LJMP START ;START OF PROG.. ORG 000BH PUSH ACC PUSH PSW LCALL DISPLAY POP PSW POP ACC RETI ;TIMER INT-0 START: MOV MOV SETB MOV MOV MOV MOV MOV MOV MOV MOV MOV SETB P1,#0FFH P2,#00H P3.7 P0,#00H SP,#60H DSP_C,#00H TMOD,#01H IE,#82H buf1,#0C0H buf2,#0C0H buf3,#0C0H buf4,#0C0H TR0 MOV R7,#01H MAIN: CLR A0 ;\\SELECTING THE VOLTAGE CHANNEL-2\\ SETB A1 CLR A2 LCALL GET_ADC MOV A,TEMP_ADC LCALL H_D LCALL STR_SEG MOV LV2,DSP2 MOV LV3,DSP3 MOV LV4,DSP4 MOV A,TEMP_ADC CJNE A,#0F0H,L1 L1: JC li1 setb vvv ljmp here1 li1: clr vvv here1: CLR A0 ;\\SELECTING THE TEMP.. CHANNEL-0\\ CLR A1 CLR A2 LCALL GET_ADC MOV A,TEMP_ADC LCALL H_D LCALL STR_SEG MOV T2_2,DSP2 MOV T2_3,DSP3 MOV T2_4,DSP4 MOV A,TEMP_ADC CJNE A,#32H,L8 L8: JC li3 setb ttt2 ljmp here2 li3: clr ttt2 HERE2: SETB A0 ;\\SELECTING THE CURRENT CHANNEL-1\\ CLR A1 CLR A2 LCALL GET_ADC MOV A,TEMP_ADC LCALL H_D LCALL STR_SEG MOV CT2,DSP2 MOV CT3,DSP3 MOV CT4,DSP4 MOV A,TEMP_ADC CJNE A,#64H,LS3 LS3: JC li4 setb ccc1 MOV R7,#03H ljmp here3 li4: clr ccc1 HERE3: JB P3.7,LAZ LCALL DELAY1 INC R7 LAZ: MOV A,R7 CJNE A,#01,LAZ1 MOV BUF1,#0C1H MOV BUF2,LV2 MOV BUF3,LV3 MOV BUF4,LV4 LAZ1: CJNE A,#00H,LAZ2 LAZ2: CJNE A,#02H,LAZ3 MOV BUF1,#0c6h MOV BUF2,T2_2 MOV BUF3,T2_3 MOV BUF4,T2_4 LAZ3: CJNE A,#03H,LAZ4 MOV BUF1,#88H MOV BUF2,CT2 MOV BUF3,CT3 MOV a,CT4 ANL a,#7Fh mov buf4,a LAZ4: CJNE A,#04H,LAZ5 MOV R7,#00H LAZ5: jb vvv,lt1 jb ttt2,lt3 jb ccc1,lt4 clr rly clr buz ljmp main lt1: setb rly SETB buz ljmp main lt3: lt4: setb rly SETB buz ljmp main setb rly SETB buz ljmp main ;> ;> DISPLAY: MOV A,DSP_C CJNE A,#00H,H1 MOV P0,BUF4 SETB P2.6 CLR P2.5 CLR P2.4 CLR P2.3 H1: CJNE A,#01H,H2 MOV P0,BUF3 CLR P2.6 SETB P2.5 CLR P2.4 CLR P2.3 H2:CJNE A,#02H,H3 MOV P0,BUF2 CLR P2.6 CLR P2.5 SETB P2.4 CLR P2.3 H3:CJNE A,#03H,H4 MOV P0,BUF1 CLR P2.6 CLR P2.5 CLR P2.4 SETB P2.3 H4:INC DSP_C MOV A,DSP_C CJNE A,#04H,H5 MOV DSP_C,#00H H5:MOV TL0,#00H MOV TH0,#0F0H RET ;> GET_ADC: SETB ALE NOP NOP SETB LCALL CLR NOP NOP CLR EOZ: JB EOCZ: JNB SETB MOV MOV NOP NOP CLR RET SOC D1 ALE SOC P3.6,EOZ P3.6,EOCZ OE A,P1 TEMP_ADC,A OE ;> H_D: CLR A MOV R0,#00H ;\\STR THE VALUE UPPER\\ MOV R1,#00H ;\\STR VALUE LOWER\\ MOV R2,#00H MOV R2,TEMP_ADC MOV A,TEMP_ADC CJNE A,#00H,Z0 MOV R0,#00H MOV R1,#00H RET Z0: CLR A LA2: CLR C INC A ADD A,#00H DA A JNC LA1 INC R0 LA1: DJNZ R2,LA2 MOV R1,A RET ;> STR_SEG: MOV A,R1 ANL A,#0FH LCALL SEGMNT MOV DSP2,A MOV A,R1 ANL A,#0F0H SWAP A LCALL SEGMNT MOV DSP3,A MOV A,R0 ANL A,#0FH LCALL SEGMNT MOV DSP4,A RET ;> SEGMNT: CJNE A,#00H,LA3 MOV A,#ZERO LA3:CJNE A,#01H,LA4 MOV A,#ONE LA4:CJNE A,#02H,LA5 MOV A,#TWO LA5:CJNE A,#03H,LA6 MOV A,#THREE LA6:CJNE A,#04H,LA7 MOV A,#FOUR LA7:CJNE A,#05H,LA8 MOV A,#FIVE LA8:CJNE A,#06H,LA9 MOV A,#SIX LA9:CJNE A,#07H,LA10 MOV A,#SEVEN LA10:CJNE A,#08H,LA11 MOV A,#EIGHT LA11:CJNE A,#09H,LA12 MOV A,#NINE LA12:RET ;> D1: MOV R3,#01H DJNZ R3,$ RET ;> DELAY: MOV R4,#0FFH DJNZ R4,$ RET ;> DELAY3: MOV R4,#30H Z2: MOV R5,#20H Z1: MOV R6,#10H DJNZ R6,$ DJNZ R5,Z1 DJNZ R4,Z2 RET ;> DELAY1: MOV R5,#64H LX1: MOV R6,#54H DJNZ R6,$ DJNZ R5,LX1 RET ;> END COMPUTER SOFTWARE /* PC BASED SCADA MONITERING AND CONTROLING.*/ #include <stdio.h> #include <dos.h> #include <bios.h> #include <conio.h> #include <graphics.h> #define LOWER_NIBBLE 3 #define UPPER_NIBBLE 2 #define ADC_CONTROL 1 #define RESET 4 #define HIGH 0xc0 #define STC 0x01 #define ALE 0x02 #define OE 0x04 #define IPRT 0x379 #define OPRT 0x378 #define CPRT 0x37A void print(); void show(); void rdadc(); int read_byte(); int read_sts(); int send_byte(int ,int); /* DISPLAYS RECTANGLES*/ /* DISPLAYS MENUS AND NAMES*/ /* READS ADC VOLTAGES*/ /* READS FROM PARALLEL PORT*/ /* READS STATUS OF ADC*/ /* SEND TO PARALLEL PORT*/ char ch; int maxx, maxy; int buz_sts; main() { int errorcode,posbak; int gdriver=DETECT, gmode; initgraph(&gdriver, &gmode, " "); /* chek path */ errorcode = graphresult(); if (errorcode != grOk) { printf("Graphics error: %s\n", grapherrormsg(errorcode)); printf("Press any key to halt:"); getch(); exit(1); /* terminate with an error code */ } maxx = getmaxx(); maxy = getmaxy(); print(); show(); while(ch!='x' && ch!='X') { rdadc(); } /*reset axxll modes and memorys*/ closegraph(); restorecrtmode(); return 0; } void print() { cleardevice(); setcolor(CYAN); rectangle(1,1,maxx-1,maxy-1); setcolor(LIGHTCYAN); rectangle(2,2,maxx-2,maxy-2); setcolor(BLACK); rectangle(3,3,maxx-3,maxy-3); setcolor(LIGHTCYAN); rectangle(4,4,maxx-4,maxy-4); setcolor(CYAN); rectangle(5,5,maxx-5,maxy-5); setcolor(CYAN); rectangle(6,6,maxx-6,maxy-6); setcolor(LIGHTCYAN); rectangle(7,7,maxx-7,maxy-7); setcolor(BLACK); rectangle(8,8,maxx-8,maxy-8); setcolor(LIGHTCYAN); rectangle(9,9,maxx-9,maxy-9); setcolor(CYAN); rectangle(10,10,maxx-10,maxy-10); setcolor(RED); rectangle(100, 400, maxx-100, maxy-200); setcolor(LIGHTRED); rectangle(101, 401, maxx-101, maxy-201); setcolor(YELLOW); rectangle(102, 402, maxx-102, maxy-202); setcolor(LIGHTRED); rectangle(103, 403, maxx-103, maxy-203); setcolor(RED); rectangle(104, 404, maxx-104, maxy-204); setcolor(RED); rectangle(105, 405, maxx-105, maxy-205); setcolor(LIGHTRED); rectangle(106, 406, maxx-106, maxy-206); setcolor(YELLOW); rectangle(107, 407, maxx-107, maxy-207); setcolor(LIGHTRED); rectangle(108, 408, maxx-108, maxy-208); setcolor(RED); rectangle(109, 409, maxx-109, maxy-209); } void show() { settextstyle(1,0,1); setcolor(LIGHTRED); outtextxy(maxx-(maxx-200),maxy-(maxy-40),"PC BASED SCADA MONITERING"); setcolor(7); line(200,62,465,62); setcolor(7); line(200,64,465,64); } void rdadc() { int temp; int ct1, ct2 = 0,ct3=0; int VOLT = 0; float x1, y1; float t2; strt: while(!kbhit()) { flushall(); VOLT = read_ADC(0); x1 = VOLT * 5; y1 = x1 / 255; setcolor(WHITE); gotoxy(13, 8);printf("Input voltage = %.1f volts",y1); //delay(10); if(y1 <= 0.4 ) { buz_sts = 0; gotoxy(30,19);printf(" "); gotoxy(30,22);printf(" SYSTEM NORMAL CONDITION "); delay(10); } else { // gotoxy(30,19);printf(" SYSTEM ABNORMAL CONDITION "); if((y1 >= 0.8) && (y1 <= 1.5)) { if (ct2 >= 8) { buz_sts = 0xC0; gotoxy(30,22);printf(" SYSTEM OVERLOAD "); delay(10); ct2=0; } ct2++; } if((y1 >= 1.6) && (y1 <= 2.5)) { if(ct3 >= 8) { buz_sts = 0xC0; gotoxy(30,22);printf(" TEMPERATURE HIGH "); delay(10); ct3=0; } ct3++; } if((y1 >= 2.8) && (y1 <= 4.3)) { buz_sts = 0xC0; gotoxy(30,22);printf("HIGH VOLATAGE delay(10); } "); } if(y1>=4.8 ) { buz_sts = 0; gotoxy(30,19);printf(" "); gotoxy(30,22);printf(" SYSTEM DISCONECT delay(1); "); } } ch=bioskey(0); if(ch!='x'&&ch!='X')goto strt; } int read_ADC(int cnt) { int temp, ct1; temp= cnt<<3; send_byte(ADC_CONTROL,buz_sts & HIGH);delay(1); send_byte(ADC_CONTROL,(buz_sts & HIGH)|temp);delay(0); send_byte(ADC_CONTROL,(buz_sts & HIGH)|temp|ALE);delay(0); send_byte(ADC_CONTROL,(buz_sts & HIGH)|temp|ALE|STC);delay(0); send_byte(ADC_CONTROL,(buz_sts & HIGH)|temp|STC);delay(0); send_byte(ADC_CONTROL,(buz_sts & HIGH)|temp);delay(0); while(read_sts()==0) { if(kbhit()!=0)break; } delay(10); send_byte(ADC_CONTROL,((buz_sts & HIGH)|temp)|OE); delay(0); ct1=read_byte(); return ct1; } int read_byte() { int lb,hb; outport(CPRT,LOWER_NIBBLE); delay(1); lb=inp(IPRT); delay(1); outport(CPRT,RESET); delay(1); outport(CPRT,UPPER_NIBBLE); delay(1); hb=inp(IPRT); delay(1); outport(CPRT,RESET); delay(1); return (hb&0xf0)^0x80+((lb&0xf0)>>4)^0x08; } int send_byte(int addr,int dat) { int x; outp(OPRT,dat); delay(1); outp(CPRT,addr); delay(1); outp(CPRT,RESET); delay(1); } int read_sts() { int lb; lb=inp(IPRT); delay(1); return ((lb&0x08)>>3); } FABRICATION DETAILS The fabrication of one demonstration unit is carried out in the following sequence: 1. Finalizing the total circuit diagram, listing out the components and their sources of procurement. 2. Procuring the components, testing the components and screening the components. 3. Making layout, preparing the inter connection diagram as per the circuit diagram, preparing the drilling details, cutting the laminate to the required size. 4. Drilling the holes on the board as per the component layout, painting the tracks on the board as per inter connection diagram. 5. Etching the board to remove the un-wanted copper other than track portion. Then cleaning the board with water, and solder coating the copper tracks to protect the tracks from rusting or oxidation due to moisture. 6. Assembling the components as per the component layout and circuit diagram and soldering components. 7. Integrating the total unit inter wiring the unit and final testing the unit. 8. Keeping the unit ready for demonstration. PCB FABRICATION DETAILS: The Basic raw material in the manufacture of PCB is copper cladded laminate. The laminate consists of two or more layers insulating reinforced materials bonded together under heat and pressure by thermo setting resins used are phenolic or epoxy. The reinforced materials used are electrical grade paper or woven glass cloth. The laminates are manufactured by impregnating thin sheets of reinforced materials (woven glass cloth or electrical grade paper) with the required resin (Phenolic or epoxy). The laminates are divided into various grades by National Electrical Manufacturers association (NEMA). The nominal overall thickness of laminate normally used in PCB industry is 1.6mm with copper cladding on one or two sides. The copper foil thickness is 35 Microns (0.035mm) OR 70 Microns (0.070 mm). The next stage in PCB fabrication is artwork preparation. The artwork (Mater drawing) is essentially a manufacturing tool used in the fabrication of PCB’s. It defines the pattern to be generated on the board. Since the artwork is the first of many process steps in the Fabrication of PCBs. It must be very accurately drawn. The accuracy of the finished board depends on the accuracy of artwork. Normally, in industrial applications the artwork is drawn on an enlarged scale and photographically reduced to required size. It is not only easy to draw the enlarged dimensions but also the errors in the artwork correspondingly get reduced during photo reduction. For ordinary application of simple single sided boards artwork is made on ivory art paper using drafting aids. After taping on a art paper and phototraphy (Making the –ve) the image of the photo given is transformed on silk screen for screen printing. After drying the paint, the etching process is carried out. This is done after drilling of the holes on the laminate as per the components layout. The etching is the process of chemically removing un-wanted copper from the board. The next stage after PCB fabrication is solder masking the board to prevent the tracks from corrosion and rust formation. Then the components will be assembled on the board as per the component layout. The next stage after assembling is the soldering the components. The soldering may be defined as process where in joining between metal parts is produced by heating to suitable temperatures using non-ferrous filler metals has melting temperatures below the melting temperatures of the metals to be joined. This non-ferrous intermediate metal is called solder. The solders are the alloys of lead and tin. REFERENCES: The following are the references made during the development of this project work. Text Books: (1) Linear Integrated Circuits – : D. Roy Choudhury, Shail Jain (2) Power Electronics - By: SEN (3) Relays and their applications - By: M.C.SHARMA (4) Op-Amps Hand Book - By: MALVIND (5) Mechanical and Industrial Measurements - By: R.K. Jain (6) Computer Controlled System - By: Karl J.ASTROM (7) Programming and Customizing the 8051 Micro-controller - By: Myke Predko (8) The concepts and Features of Micro-controllers - By: Raj Kamal (9) C++ An Introduction to Programming By: JESSE LIBERTY . JIM KEOGH (10) ‘C’ ALL Clear - By: RAVINDRA (11) Basic Radio and Television. BY: S.P. SHARMA (12) Fundamentals of Radio Communication BY: A. SHEINGOLD (13) The IC 555 Timer applications source book By: HOWARD M.BERLIN Catalogs : (1) TEXAS - LINEAR IC’s manual (2) SIGNETICS - DIGITAL IC’s manual Journals: (1) Electronic Design (2) Electronics for you (3) Electronics Text. (4) Practical Electronics COMPLETE CIRCUIT DIAGRAM WITH LIST OF COMPONENTS