CONTENTS

Page no. LIST OF FIGURES:..............................................................................................................ii LIST OF TABLES:...............................................................................................................iii CHAPTER 1...........................................................................................................................1 INTRODUCTION..................................................................................................................1
1.1 INTRODUCTION........................................................................................1 1.2. AIM ........................................................................................................1 1.3. METHODOLOGY .....................................................................................2 1.4. BLOCK DIAGRAM ....................................................................................2 1.5. SIGINIFICANCE OF THE WORK.................................................................3 1.6. DESCRIPTION ABOUT THE PROJECT ........................................................3 1.7. ORGANISATION OF REPORT .................................................................4 1.8. CONCLUSION..........................................................................................5

INDUCTION MOTOR..........................................................................................................5
2.1. INTRODUCTION.......................................................................................5 2.2. PRINCIPLE OF OPERATION.......................................................................6 2.3.1. TYPES OF STARTERS............................................................................7 2.4. GENERAL FAULTS IN INDUCTION.............................................................7 2.4.1. EFFECTS OF UNBALANCED SUPPLY......................................................8 2.5. APPLICATIONS.......................................................................................10 2.6. CONCLUSION........................................................................................10

MICRO CONTROLLER....................................................................................................10
3.1. INTRODUCTION.....................................................................................10 3.2. Features of AT89S52.............................................................................11 3.3. CENTRAL PROCESSING UNIT.................................................................11

3.4. TIMERS/ COUNTERS..............................................................................12 3.5. MEMORY ORGANIZATION......................................................................12 3.7. ADDRESSING MODES............................................................................15 3.8. ARCHITECHTURE OF MICROCONTROLLER AT89S52...............................15 3.9. PIN CONFIGURATION.............................................................................16 3.9.1. PIN DESCRIPTION OF AT89S52...........................................................17 3.11. INSTRUCTION SET OF MCS52..............................................................21 3.12. PROGRAMMABLE CLOCK OUT..............................................................21 3.13. CONCLUSION......................................................................................21

AUTO-PROTECTION OF INDUCTION MOTOR AGAINST VOLTAGE FLUCTUATIONS................................................................................................................22
4.1 INTRODUCTION......................................................................................22 4.2 REGULATOR...........................................................................................22 4.2.1 PIN CONFIGURATION...........................................................................22 4.3 DUAL COMPARATOR (LM393).................................................................23 4.3.1 FEATURES..........................................................................................23 4.3.2. PIN DIAGRAM OF LM393.....................................................................24 4.4 LIQUID CRYSTAL DISPLAY.......................................................................25 4.5 PCB LAYOUT..........................................................................................26 4.5.1 FABRICATION DETAILS........................................................................26 4.5.2 PCB FABRICATION PROCEDURE...........................................................27 4.6. FAULT DETECTION CIRCUIT...................................................................28 4.7. MAIN CIRCUIT DIAGRAM........................................................................31 4.8. FLOW CHART........................................................................................33 4.9. PROGRAM............................................................................................34

EXPERMENTAL RESULTS AND CONCLUSION.......................................................61

5.1RESULT...................................................................................................61 5.2 CONCLUSION.........................................................................................61 5.3 APPLICATION..........................................................................................62 5.4. FUTURE ENHANCEMENTS......................................................................62

The circuit was fully controlled by the microcontroller and the microcontrollers will continuously monitors the voltages of the three phases and if the voltage goes abnormal then it will switch off the motor until they are normal. The protection of induction motor with microcontroller has flexibility to switch off at required time. i . In our project we are using the popular 8 bit microcontroller AT89C52. All the conditions are displayed by it over the LCD display.ABSTRACT This Project aims at protection of the three phase Induction motors. This also protects induction motor from single phasing which is also a major fault. It is a 40 pin microcontroller. monitors phases of motor at every time and also every motoring action is known through LCD display. The circuit will take the full control of the motor and it will protect the motor from several faults such us over voltage and under voltage and the circuit will switch on the motor under safety conditions. It also protects motor from single phasing as its maintenance cost is also cheap.

8 Title Block diagram of automatic voltage control of IM using Microcontroller Architecture of Microcontroller AT89S52 Pin diagram of AT89S52 Regulator Dual comparator LM393 LCD Display PCB Layout Fault detection circuit Three phase fault detection circuit Circuit diagram of Automatic Voltage Control of IM using Microcontroller Flow Chart Page No.5 4.LIST OF FIGURES: Figure No. 1.1 3.2 4.7 4.3 4.2 4.4 4.1 3. ii .1 4.6 4.

LIST OF TABLES: Table No 3.3 Title Interrupt source service routine starting address Pin Description of AT89S52 Port 3 Alternate Functions Page No iii .1 3.2 3.

VCRs. AIM This Project aims protection of three phase Induction motors and to start and stop the motor automatically. 1 . A Microcontroller unit (MCU) uses microprocessor as its central processing unit (CPU) and it Incorporates memory. TVs. it also switch on the motor automatically when power comes without manual requirement and off the motor after predetermined time. microwave ovens.CHAPTER 1 INTRODUCTION 1. CD players. In our project the microcontroller is used to control the three phase induction motor. on same chip. Limited computational capabilities and enhanced I/O are special features.2.1 INTRODUCTION The manner in which the use of microcontrollers is shaping our lives in breath taking. The circuit was fully controlled by the microcontroller and the micro controllers will continuously monitors the voltages of the three phase and if the voltages goes abnormal then it will switch off the motor until they are normal. The circuit will take full control of the motor and it will protect the motor from several faults such as over voltage and under voltage and the circuit will switch on the motor under safety conditions. Its not only protect motor from transient voltages. I/O peripherals etc. Timing reference. 1. Today this versatile device can be found in a variety of control applications. This also protects Induction motor from single phasing which is also a major fault.. This motor is manually monitoring is difficult so automatic protection of induction motor has such an importance. automotive engines are some of these. The motor protection is required as day to day life induction motor usage increases a lot as it has some specific merits.

According to the program written into the microcontroller the circuit will automatically on/off the motor. METHODOLOGY In this project we are using dual comparator to compare over/under voltages with the present voltage and send signal to microcontroller if the voltage goes beyond the range. Here the motor will run automatically when auto on is set and it will start the motor automatically after a particular time if off is set.1. BLOCK DIAGRAM The main block diagram of automatic voltage control of Induction motor using microcontroller is shown in fig: 3 phase over/unde r voltage detector Micro Controller AT89S52 2 Start Relay Starter Stop Relay Inductio n Motor OFF Timer Switch LCD Display .4.3. Microcontroller send signal to the relay which is connected to starter of motor. Addition to this we are using two switches one for auto on and another one for auto off. Here we are using LM393 dual comparator. 1. The prime use of the microcontroller is to protect the motor from over and under voltage and to start/stop the motor automatically. According to the signal from the controller the relay will start/stop the motor.

The dual comparator LM393 is initially set to the range between 180V to 260V. and then relay stops the motor.5. SIGINIFICANCE OF THE WORK This project can be used to project the motor from undesired voltages .1 Block diagram of automatic voltage control of IM using microcontroller 1.3 phase over/unde r voltage detector Micro Controller AT89S52 Start Relay Starter Stop Relay Inductio n Motor OFF Timer Switch LCD Display Fig 1. All the conditions are displayed it over the LCD display. The circuit was fully controlled by the microcontroller and the microcontrollers will continuously monitors the voltages of the three phase and if the voltage goes abnormal then it will switch off the motor until they are normal. 1.6. 3 . DESCRIPTION ABOUT THE PROJECT Whenever over/under voltages occurs then the dual comparator LM393 will predict and sends the signal to the microcontroller . if the voltage goes beyond the specified range it will send the signal to the microcontroller .The main applications of the project is in industrial and agriculture fields to protect the motor and it also starts and stop the motor automatically.According to the program written into the microcontroller AT89S52 and it will send the signal to the relay.

com ) Chapter.com ) (Reference 5: www. Regulator and LCD includes the circuit operation of automatic voltages control of Induction motor using Microcontroller.8052.electronicsforyou.atmel. Types of faults in Induction motor. ORGANISATION OF REPORT Chapter -2 deals with Induction motor which includes construction and operation. D P KOTHARI) (Reference 2: www. which will be ON only until they are held at pressed state once they are released the switch gets opened. (Reference 1: Electrical machines by I J NAGRATH.com) (Reference 4: www.google.com) Chapter -3 Deals with micro controller which includes the pin description and instruction set to develop the program for automatic voltages control of induction motor.net ) (Reference 2: www.com) 4 .alldatasheets.com) (Reference 3: www.alldatasheets. The physical functioning of the auto on switch is that once the auto on switch is set and if the supply is provided and also voltages are in normal condition then the motor start automatically. 1. The function of auto switch is that when it is pressed and released the motor is turned off after providing a delay which is dictated by the positioning of the rotary switch.Auto ON and Auto OFF switches are push to on switches. (Reference 1: www.google. Here We are using the microcontroller AT89S52 for automatic voltages control of Induction motor.microcontroller.4 Deals with dual comparator.google. (Reference 1: www.com) (Reference 3: www. starting methods of Induction motor.7.com ) (Reference 2: www.

CONCLUSION This project can be used with the three phase Induction motor. Induction motors are widely used. There are several ways to supply power to the rotating part of the motor.com) (Reference 4: www.(Reference 3: www. An induction motor can be called a rotating transformer because the stationary (stationary part) is essentially the primary side of the transformer and the rotor (rotating part) is the secondary side.com) 1. Motor this power is induced in the rotating device.philipssemiconductors.1. INTRODUCTION Induction Motor is one kind of AC motor where power is supplied to the rotating device by induction.C. CHAPTER 2 INDUCTION MOTOR 2. which are frequently used in industrial drives. Induction motors are now the preferred choice for industrial motors due to their rugged construction. The circuit will take full control of the motor and it will protect the motor from several faults such as over voltage and under voltages and the circuit will switch on the motor under safety conditions.8. An electric motor converts electrical power to mechanical power in its rotor (rotating part). 5 . lack of brushes like in DC motors and they have ability to control the speed due to rapid developments in power electronics. In a DC motor this power is supplied to the armature directly from a DC source. But in an A. especially polyphase induction motors.com) (Reference 5: www.alldatasheets.electronicsforyou.

The rotating magnetic field of the stator will impose an electromagnetic torque on the still magnetic field of the rotor causing it to move (about a shaft) and rotation of the rotor is produced. the induction motor does not have any direct supply onto the rotor. high reliability and low maintenance cost.But it has high initial cost.2. 2. stator windings are arranged around the rotor so that when energized with a polyphase supply they create a rotating magnetic field pattern which sweeps past the rotor. for these currents to be induced. the speed of the physical rotor must be less than the speed of the rotating magnetic field in the stator. 2. By way of contrast. The rotor bars in squirrel cage induction motors are not straight but have some skew to reduce noise and harmonics Due to the flexibility in the slip ring induction motor to vary the rotor resistance it is used in the applications involving high starting torque and speed control . or else the magnetic field 6 . PRINCIPLE OF OPERATION The basic difference between an induction motor and a synchronous AC motor is that in the latter a current is supplied into the rotor (usually a DC current) which in turn creates a (circular uniform) magnetic field around the rotor. It is called synchronous because at steady state the speed of the rotor is the same as the speed of the rotating magnetic field in the stator. high maintenance cost. However. instead.There are two types of motors 1. a secondary current is induced in the rotor. Squirrel cage motor Slip ring motor Of the two the squirrel cage induction motor is most widely used because of its simple construction. This current interacts with the rotating magnetic field created by the stator and in effect causes a rotational motion on the rotor. This changing magnetic field pattern induces current in the rotor conductors. To achieve this.

will not be moving relative to the rotor conductors and no currents will be induced. but in our project we have protected the induction motor from the following faults only i. 7 . To avoid such effects. When the motor is started. If by some chance this happens. GENERAL FAULTS IN INDUCTION There are various faults occurring in 3 phase induction motor. This difference between the speed of the rotor and speed of the rotating magnetic field in the stator is called slip. 2. This high current can damage the motor windings and because it causes heavy line voltage drop. the slip is equal to 1 as the rotor speed is zero.3. which causes the primary coil to draw a high current is drawn by the stator. a very high current flows through the rotor. A starter is a device which limits the starting current by providing reduced voltage to the motor. TYPES OF STARTERS  Direct on line starter  Autotransformer starter  Star Delta starter  Stator Resistance starter 2. on the order of 5 to 9 times the full load current. This is similar to a transformer with the secondary coil short circuited.3. other appliances connected to the same line may be affected by the voltage fluctuation.e. STARTING OF INDUCTION In a three phase induction motor. the full rated voltage is given to it. As a result. 2. Due to this an induction motor is sometimes referred to as an asynchronous machine.1. so the induced emf in rotor is large. Once the rotor speed increases.4. the rotor typically slows slightly until a current is re-induced and then the rotor continues as before. the induced emf in rotor circuit depends on the slip of the induction motor and the magnitude of the rotor current depends upon this induced emf. the starting current should be limited. It is unit less and is the ratio between the relative speed of the magnetic field as seen by the rotor (the slip speed) to the speed of the rotating stator field.

To illustrate the severity of this condition. Voltage deviation from Avg. voltage x 100 Average voltage. Single phasing. The locked rotor current will be unbalanced to the same degree that the voltages are unbalanced but the locked rotor KVA will increase only slightly. 2. 215. Example: With voltages of 220. consequently. or 2.3 per cent 215. particularly since devices selected for one set of unbalanced conditions may be inadequate for a different set of unbalanced voltages. increasing the size of the overload device is not the solution in as much as protection against heating from overload and single phase operation is lost. an approximate 3. the percentage increase in temperature rise will be approximately two times the square of the percentage voltage unbalance. the maximum deviation from the average is and the percent unbalance is 5 x 100. the increase in average heating of the whole winding will be slightly lower than the winding with the highest current.1. Voltage imbalances.5 percent voltage unbalance will cause an approximate 25 per cent increase in temperature rise. "The currents at normal operating speed with the unbalanced voltages will be greatly unbalanced in the order of approximately 6 to 10 times the voltage unbalance. This negative sequence voltage produces in the air gap a flux rotating against the rotation of the rotor. The increase losses and.” 8 . "The voltage unbalance (or negative sequence voltage) in percent may be defined as follows: Per cent voltage unbalance = Max. 2. the average is 215.4. EFFECTS OF UNBALANCED SUPPLY The effect of unbalanced voltages on polyphase induction motors is equivalent to the introduction of 'negative sequence voltage' having a rotation opposite to that occurring with balanced voltages. A relatively small unbalance in voltage will cause considerable increase in temperature rise in the phase with the highest current. This introduces a complex problem in selecting the proper overload protective devices. tending to produce high current. and 210. A small negative sequence voltage may produce in the windings currents considerably in excess of those present under balanced voltage conditions.1.

Unequal transformer impedances (impedances can range from 1. the motor will heat up very quickly and it is essential that the motor be removed from service by the 9 . Transformer bank connected in configuration that inherently provides poor regulation. such as would be caused by Blown fuse on the primary of  the transformer serving the motor. derating and additional losses. causing overheating.2 SINGLE PHASING It is well known that a three-phase induction motor will continue to operate when a disturbance of some sort causes the voltages supplied to the motor to become single-phase. the next step is to find out what caused unbalanced condition.   Unequal Transformer tap settings. Voltage regulators out of step or calibration. shaft vibration.    Capacitor banks with fuse blown or with unequal capacity per phase.6 to 6 per cent}. noise.4. the most common items are 1 and 2. Even though the motor will continue to operate in this condition. Other possibilities include feeder or step-down transformer fuses blowing. and hence reduce its lifetime and performance. 2. the large-scale negative sequence currents in induction motor result from slight unbalanced voltage.If it is determined that the problem is one of voltage unbalance. In fact. These are some of the causes:  Unequal loading per phase on the transformer serving the motor. The single-phasing can occur as a result of a fuse blowing or protective device opening on one phase of the motor. such as open delta or T-T connection. Of these. Single phasing. in such cases. Item 2 (open phase) can be quite difficult to detect if a high percentage of the load connected to the transformer secondary is rotating equipment. the open phase may remain at approximately full potential.

256 bytes of RAM. APPLICATIONS The induction motor has wide applicability as a motor in industry and its single phase form in several domestic applications. 2. Watchdog timer. 32 I/O lines. three 16-bit timer/counters. CHAPTER 3 MICRO CONTROLLER 3. By combining a versatile 8-bit CPU with Flash on a monolithic chip. The device is manufactured using Atmel’s high-density nonvolatile memory technology and is compatible with the industry standard 80C51 instruction set and pinout.opening of a motor circuit breaker or some other type of protective device.1. 10 . high-performance CMOS 8-bit microcomputer with 8 Kbytes of Flash Programmable and Read Only Memory (PEROM). INTRODUCTION The AT89S52 is a low-power. the Atmel AT89S52 is a powerful microcontroller which provides a highly-flexible and cost effective solution to many embedded control applications. By having these advantages in agricultural and industrial fields we are protecting Induction Motor from over/under voltages and single phasing.6. two data pointers. 2. This paper will describe three different ways in which an induction motor will operate in a single-phase condition. For purposes of this paper "single-phase" will include any condition in which the three line-to-line voltage phasors appear on the same line. CONCLUSION The induction motor is an important class of electrical machine. Day to day it has more than 85% of industrial usage because of its simple construction and reliable.5. The on-chip Flash allows the program memory to be reprogrammed in-system or by a conventional nonvolatile memory programmer. A wide range of speed control is possible only by circuitry using silicon controlled rectifiers. The AT89S52 provides the following standard features: 8K bytes of Flash.

5V Operating Range  Fully Static Operation: 0 Hz to 33 MHz  Three-level Program Memory Lock  256 x 8-bit Internal RAM  32 Programmable I/O Lines  Three 16-bit Timer/Counters  Interrupt Recovery from Power-down Mode  Eight Interrupt Sources  Full Duplex UART Serial Channel  Low-power Idle and Power-down Modes 3. timer/counters. a full duplex serial port. Features of AT89S52  Compatible with MCS-51 Products  8K Bytes of In-System Programmable (ISP) Flash Memory  Endurance: 1. the AT89S52 is designed with static logic for operation down to zero frequency and supports two software selectable power saving modes. 3.3. CENTRAL PROCESSING UNIT 11 . The Power-down mode saves the RAM contents but freezes the oscillator.2. The Idle Mode stops the CPU while allowing the RAM. serial port. and interrupt system to continue functioning. In addition.a six-vector two-level interrupt architecture.0V to 5. and clock circuitry. disabling all other chip functions until the next interrupt or hardware reset. on-chip oscillator.000 Write/Erase Cycles  4.

Working counter. These timers can be used to measure time intervals. Apart from all the above. During execution. The ALU (Acc) performs arithmetic and logic functions on 8 bit input variables. Arithmetic operations include basic addition. TIMERS/ COUNTERS 8052 has three 16 bit Timers/ Counters capable of working in different modes. OR. Accumulator (Acc). Logical operations are AND. it can be used as another general purpose register. 12 . Program status word keeps the current status of the ALU in different bits. 536 counts). determine pulse widths or initiate events with one microsecond resolution up to a maximum of 65 millisecond (corresponding to 65. 3. stack pointer (SP). multiplication and division.4. clear. For other instructions. Use software to get longer delays. complement and etc. subtraction. 3. There is a mode control register and a control register to configure these timers/ counters in number of ways. B register is mainly used in multiply and divide operations. and provides a temporary place in data transfer operations within the device. they can accumulate occurrences of external events (from DC to 500 KHz) with 16 bit precision. B register. MEMORY ORGANIZATION The 8052 architecture provides both on-chip memory as well as off-chip memory expansion capabilities. Its primary elements are an 8-bit Arithmetic Logic Unit (ALU). few more 8 bit registers.5. Program Status Word (PSW) and 16 bit registers. Program Counter (PC) and Data Pointer Register (DPTR). It supports several distinctive ‘physical’ address spaces. B register either keeps one of the two inputs or then retains a portion of the result. Each consists of a ‘High’ byte and a ‘Low’ byte which can be accessed under software. LAU is responsible in conditional branching decisions. Exclusive OR as well as rotate.The CPU is the brain of the microcontrollers reading user’s programs and executing the expected task as per instructions stored there in.

the 8051 executes out of internal Program Memory unless the address exceeds 0FFFH and locations 1000H through FFFFH are then 13 . The program memory has a 16 bit address and any particular memory location is addressed using the 16 bit program counter and instructions which generate a 16 bit address. On chip Data Memory accesses need a single 8 bit value (may be a constant or another variable) to specify a unique location. Program Memory is used for information needed each time power is applied: Initialization values. read and write controls signals or both:  On chip Program Memory On chip Data Memory Off chip program memory Off chip Data Memory On chip Special Function Registers The Program Memory area (EPROM incase of external memory or Flash/ EPROM     in case of internal one) is extremely large and never lose information when the power is removed. Since 8 bits are more than sufficient to address 128 RAM locations. calibration data. The 64 Kbyte program memory space consists of an internal and an external memory portion. the On chip RAM address generating register is single byte wide. Different addressing mechanisms are used to access these different memory spaces and this greatly contributes to microcomputer’s operating efficiency. In contrast to the Program Memory.. If the EA pin is held high. along with the program itself.functionally separated at the hardware level by different addressing mechanisms. keyboard lookup tables etc. On chip RAM is used for variables which are calculated when the program is executed. On chip data memory is smaller and therefore quicker than Program Memory and it goes into a random state when power is removed.

they are accessed through different addressing modes. If the EA pin held low. then the program flow completes the execution of the current instruction and jumps to a particular program location where it finds the 14 . the 16 bit Program Counter is the addressing mechanism. The Data Memory address space consists if an internal and an external memory space. When an interrupt is activated. Higher 128 bytes are available only in 8032/8052 devices. two from the timers when overflow occurs and two come from the two input pins INT0. INTERRUPTS The 8052 has five interrupt sources: one from the serial port when a transmission or reception operation is executed. IE and IP. 3.6. Apart from On-chip Data Memory of size 128/256 bytes. In either case. the 8051 fetches all instructions from the External Program Memory. Even through the upper RAM area and SFR area share address locations. These options are selected by interrupt enable and priority control registers. Special Function Register space.fetched from external Program Memory. Each interrupt may be independently enabled or disabled to allow polling on same sources and each may be classified as high or low priority. Higher 128 bytes. total size of Data Memory can be expanded up to 64K using external RAM devices. A high priority source can override a low priority service routine. External Data Memory is accessed when a MOVX instruction is executed. Total internal Data Memory is divided into three blocks:     Lower 128 bytes. Direct addresses higher than 7FH access SFR memory space and indirect addressing above 7FH access higher 128 bytes (in 8032/8052). INT1.

the program flows return to back to original place. The 8052 supports five types of addressing modes:  Register Addressing  Direct Addressing  Register Indirect Addressing  Immediate Addressing  Index Addressing 3. INTERRUPT SOURCE External 0 Timer/counter 0 External 1 Timer/counter 1 Serial port SERVICE ADDRESS ROUTINE 0003H 000BH 0013H 001BH 0023H Table 3. Byte wide mnemonics like ADD or MOV use the Accumulator as a source operand and also to receive the result. In two byte instructions the destination is specified first.1 Interrupt source service routine starting address STARTING 3.8.interrupt service routine. 0003H is allocated to the first interrupt and next seven bytes can be used to do any task associated with that interrupt. ARCHITECHTURE OF MICROCONTROLLER AT89S52 15 . After finishing the interrupt service routine. The Program Memory Address. and then the source. ADDRESSING MODES 8052’s assembly language instruction set consists of an operation mnemonic and zero to three operands separated by commas.7.

9.1 Architecture of Microcontroller AT89S52 3. PIN CONFIGURATION 16 .Fig 3.

PIN DESCRIPTION OF AT89S52 Pin.9.7 Pin name Port 1 17 Pin description Input/output Pins .Fig 3.1. No 1.2 pin diagram of AT89S52 3.

2. Pin Description of AT89S52 18 .9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 RST RXD TXD INT0 INT 1 T0 T1 WR RD XTAL 2 XTAL 1 Vss A8 A9 A10 A11 A12 A13 A14 A15 PSEN (PROG)ALE (Vpp)/EA AD7 AD6 AD5 AD4 AD3 AD2 AD1 AD0 Vcc Reset Input Receive Data Transmit Data Interrupt 0 Interrupt 1 Timer 0 input Timer 1 input Write Strobe Read Strobe Crystal Input 2 Crystal Input 1 Ground Address 8 Address 9 Address 10 Address 11 Address 12 Address 13 Address 14 Address 15 Program Store Enable Address Latch Enable (EPROM Program Plus) External enable(EPROM Program voltage) Address/Data 7 Address/Data 6 Address/Data 5 Address/Data 4 Address/Data 3 Address/Data 2 Address/Data 1 Address/Data 0 +5v Table 3.

P1.10. When 1s are written to Port 1 pins. Port 1 Port 1 is an 8-bit bidirectional I/O port with internal pull-ups.1 can be configured to be the timer/counter 2 external count input (P1. Port 1 also receives the low-order address bytes during Flash programming and verification. respectively. In this application.1/T2EX).0 and P1. they are pulled high by the internal pull-ups and can be used as inputs. Port 2 Port 2 is an 8-bit bidirectional I/O port with internal pull-ups.3. The Port 2 output buffers can sink/source four TTL inputs. Port 2 emits the high-order address byte during fetches from external program memory and during accesses to external data memory that uses 16-bit addresses (MOVX @ DPTR). As inputs. as shown in the following table. The Port 1 output buffers can sink/source four TTL inputs. Port 0 can also be configured to be the multiplexed low-order address/data bus during accesses to external program and data memory. When 1s are written to port 0 pins.0/T2) and the timer/counter 2 trigger input (P1. PORTS Port 0 Port 0 is an 8-bit open drain bidirectional I/O port. Port 2 uses strong internal pull-ups when emitting 1s. External pull-ups are required during program verification. Port 2 pins that are externally being pulled low will source current (IIL) because of the internal pull-ups. In this mode. In addition. Port 0 also receives the code bytes during Flash programming and outputs the code bytes during program verification. As inputs. each pin can sink eight TTL inputs. they are pulled high by the internal pull-ups and can be used as inputs. During accesses to external data memory that uses 8-bit addresses (MOVX @ RI). Port 2 emits the 19 . As an output port. Port 1 pins that are externally being pulled low will source current (IIL) because of the internal pull-ups. When 1s are written to Port 2 pins. the pins can be used as high impedance inputs. P0 has internal pull-ups.

6 P3. When 1s are written to Port 3 pins.1 P3. Port 3 receives some control signals for Flash programming and verification.7 Alternate Functions RXD (serial input port) TXD (serial output port) INT0 (external interrupt 0) INT1 (external interrupt 1) T0 (timer 0 external input) T1 (timer 1 external input) WR (external data memory write strobe) RD (external data memory read strobe) Table 3. Port Pin P3. 20 .4 P3.3 Port3 Alternate Functions Port 3 also receives some control registers for Flash Programming and Programming verification. Port 3 pins that are externally being pulled low will source current (IIL) because of the pull-ups. they are pulled high by the internal pull-ups and can be used as inputs.contents of the P2 Special Function Register. as shown in the following table. Port 3 Port 3 is an 8-bit bidirectional I/O port with internal pull-ups. Port 3 also serves the functions of various special features of the AT89S52. The Port 3 output buffers can sink/source four TTL inputs. Port 2 also receives the high-order address bits and some control signals during Flash programming and verification.2 P3. As inputs.0 P3.3 P3.5 P3.

12. It is easy to develop the program for the protection of motor from over and under voltages.11. besides being a regular I/O pin. CONCLUSION The AT89S52 is a low-power. bit C/T2 (T2CON.13. ARITHEMATIC OPERATIONS 2. It can be programmed to input the external clock for Timer/Counter 2 or to output a 50% duty cycle clock ranging from 61 Hz to 4 MHz (for a 16MHz operating frequency).3. PROGRAMMABLE CLOCK OUT A 50% duty cycle clock can be programmed to come out on P1. DATA TRANSFER 4.0. INSTRUCTION SET OF MCS52 1. Bit TR2 (T2CON. To configure the Timer/Counter 2 as a clock generator. The clock-out frequency depends on the oscillator frequency and the reload value of Timer 2 capture registers (RCAP2H.1) must be cleared and bit T20E (T2MOD.2) starts and stops the timer. as shown in following equation. RCAP2L). 21 . LOGICAL OPERATIONS 3.1) must be set. The output of the microcontroller is applied to the relays to switch ON and OFF the motor. high-performance CMOS 8-bit microcomputer with 8 Kbytes of Flash Programmable and Read Only Memory (PEROM). 3. BOOLEAN VARIABLE MANIPULATIO 3. has two alternate functions. This pin.

1.2. Regulator 22 .1 PIN CONFIGURATION Fig 4.CHAPTER 4 AUTO-PROTECTION OF INDUCTION MOTOR AGAINST VOLTAGE FLUCTUATIONS 4. If adequate heat sinking is provided.2 REGULATOR The LM7805 monolithic 3-terminal voltage regulator employs internal currentlimiting. thermal shutdown and safe-area compensation. they can deliver over 1.0A output current. making them essentially indestructible. 4.1 INTRODUCTION The motor voltage control using the microcontroller mainly includes fault detection circuit to detect abnormal voltage conditions and the circuit was fully controlled by the microcontroller and the microcontroller will continuously monitors the voltages of the three phases and if the voltages goes abnormal then it will switch off the motor until they are normal. 4.

These comparators also have unique characteristics in that the input common-mode voltage range includes ground.3.1 FEATURES  Wide supply o --. The LM193 series was designed to directly interface with TTL and CMOS. pulse.3 DUAL COMPARATOR (LM393) The LM393 series consists of two independent precision voltage comparators with an offset voltage specification as low as 2. simple analog to digital converters.0 mV max for two comparators which were designed specifically to operate from a single power supply over a wide range of voltages. even though operated from a single power supply voltage.Voltage range: 2.Single or dual supplies: ±1. MOS clock timers. the LM193 series will directly interface with MOS logic where their low power drain is a distinct advantages over standard comparators 4. wide range VCO. When operated from both plus and minus power supplies. Input bypassing is needed only if the regulator is located far from the filter capacitor of the power supply.They are intended as fixed voltage regulators in wide range of applications including local (on-card) regulation for elimination of noise and distribution of noise and distribution problems associated with single-point regulation for elimination.0V to 36V o --. It is not necessary to bypass the output.4mA) --.0V to ±18V  Very low supply current drain (0. although this does improve transient response. In addition to use as fixed voltage regulators. these devices can be used with external components to obtain adjustable output voltages and currents. multivibrators and high voltage digital logic gates. 4.independent of supply voltage 23 . Considerable was expended to make the entire series of regulators easy to use and minimize the number of external components. square wave and time delay generators. Operation from split power supplies is also possible and the low power supply current drain is independent of the magnitude of the power supply voltage. Application areas include limit comparators.

MOS and CMOS logic systems  Available in the 8-BUMP(12 mil) micro SMD package 4.2. PIN DIAGRAM OF LM393 Fig 4. Low input biasing current: 25nA  Low input offset current: ±5nA  Maximum offset voltage: ±3mV  Input common-mode voltage range includes ground  Different input voltage range equal to the power supply voltage  Low output saturation voltage: 250mV at 4mA  Output voltage compatible with TTL. Pin Diagram of Dual Comparator LM393 24 .3.ECL.2.DTL.

4 LIQUID CRYSTAL DISPLAY The most commonly used Character based LCDs are based on Hitachi's HD44780 controller or other which are compatible with HD44580. Fig. programming. Most LCDs with 1 controller has 14 Pins and LCDs with 2 controller has 16 Pins (two pins are extra in both for back-light LED connections). To send data we simply need to select the data register. 4. In this tutorial. Following are the steps:  Move data to LCD port  Select data register  Select write operation 25 . 2 Line or 4 Line LCDs which have only 1 controller and support at most of 80 characters.3. LCD Display The most commonly used LCDs found in the market today are 1 Line. we will discuss about character based LCDs.4. whereas LCDs supporting more than 80 characters make use of 2 HD44780 controllers. various interfaces (8-bit/4-bit). special stuff and tricks you can do with these simple looking LCDs which can give a new look to your application. their interfacing with various microcontrollers. Everything is same as the command routine.

5 PCB LAYOUT Fig. 26 . listing out the components and their sources of procurement.1 FABRICATION DETAILS The fabrication of all the demonstration units is carried in the following sequence. 1. 4. Procuring the components and testing the components. The equivalent C code Keil C compiler. 4. PCB Layout. Similar code can be written for SDCC.5. 4. Finalizing the total circuit diagram.4. Send enable signal  Wait for LCD to process the data Keeping these steps in mind we can write LCD command routine as. 2.

Drilling the holes on the board as per the components layout. Removing the un-wanted copper other than track portion.2 PCB FABRICATION PROCEDURE The basic material in the manufacture of PCB is copper cladded laminate. cutting the laminate to the required size 4. It is not only easy to draw the enlarged dimensions but also the errors in the artwork correspondingly get reduced during photo reduction. 5. Then cleaning the board with water. 4. 6. The laminates are divided in to various grades by national electrical manufacturers association (NEMA). The laminates are manufactured by impregnating thin sheets of reinforced materials with the required resin. Assembling the components as per the components layout of the circuit diagram and soldering components 7. The nominal overall thickness of laminate normally used in PCB industry is 1. preparing the interconnection diagram as per the circuit diagram.5.3. Making layout. For ordinary application of simple single sided boards artwork is made on ivory art paper using drafting aids. The artwork (master drawing) is essentially a manufacturing tool used in the fabrication of PCB’s.6mm with copper cladding on one or two sides. The reinforced materials used are electrical grade paper or woven glass cloth. The next stage in the PCB fabrication is artwork preparation. It defines the pattern to be generated on the board. The laminate consists of two or more layers insulating reinforced materials bonded together under hat and pressure by thermo setting resins used are phenolic or epoxy. Keeping it ready for demonstration. Since the artwork is the first of many process steps in the fabrication of PCB’s. After taping on a art paper and photography the image 27 . in industrial applications the artwork is drawn on an enlarged scale and photographically reduced to required size. Integrating the total unit inter wiring the unit and final testing the unit. painting the tracks on the board as per the inter connection diagram. Normally. preparing the drilling details. and solder coating the copper tracks to protect the tracks from rusting or oxidation due to moisture.

the etching process is carried out. The solders are the alloys of lead and tin. FAULT DETECTION CIRCUIT Fig 4.6. Then the components will be assembled on the board as per the components layout. The next stage after assembling is the soldering the components. The next stage after PCB fabrication is solder making the board to prevent tracks from corrosion and rust formation. This is done after drilling of the holes on the laminate as per the components layout. 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. The center tapped step down transformer is supplied on the primary side from one of three 28 . The etching is the process of chemically removing unwanted copper from the board.5 Fault detection circuit The basic functioning of the fault detection circuit can be explained as follows.of the photo given is transformed on silk screen printing. This non-ferrous intermediate metal is called solder. 4. After drying the paint.

The output from the rectifier is fed to the two operational amplifiers through a capacitor. During the normal working conditions without any faults the zener diode connected to the inverting and non-inverting terminals of the operational amplifiers IC2a and IC2b respectively will be charged to a voltage of 4. The total fault detection circuit shown below. Similar circuits are used for other two phases. Similarly the opamp (IC2a) sends an error signal during under voltage condition. IC2b will be more than 4. This voltage across zener diode which remains constant is supplied to the two opamps as a reference voltage. 29 . the voltage at the non inverting terminal of the opamp. When the condition of over voltage occurs.phases of the supply and its output voltage is rectified by a full wave rectifier.2 volts as a result of this the output voltage of this opamp will be high and this error signal will be fed to the micro controller which trips the relay and thus disconnects the motor from the supply.2v and the output voltage of the two opamps will be zero. Of the two opamps one will be operating in inverting mode (IC2a) and the other in non-inverting mode (IC2b).

Three phase fault detection circuit 30 .6.Fig 4.

MAIN CIRCUIT DIAGRAM Fig 4.7. Circuit Diagram of Automatic Voltage Control of IM using Microcontroller 31 .4.7.

7.4. The secondary is connected to the diodes convert from 12V AC to 12V DC voltage. For driver the relay we are using NPN transistor is used as an current amplifier.  If the three phase voltage was normal  If all the phases are present The Three phase voltages are checked by dual opamp IC LM393. All the conditions are displayed over the LCD display. power supply circuit and the Microcontroller circuit. It should deliver constant output regulated power supply for successful working of the project. 32 . The Main part of the above circuit diagrams is the Microcontroller AT89S52. It checks the input voltage with the reference voltage. The off time was set by the rotary switch for ½ hr to 2hr. by using IC 7805. CIRCUIT EXPLANATION The Circuit diagram consists of three voltage sensor circuits and a relay driver circuit. The power supply section is the important one.1. The Microcontroller will control the whole circuit according to program burned on its ROM. The Microcontroller will switch on the motor only the following conditions are satisfied. An 0-12V/500mA transformer is used for our purpose the primary of this transformer is connected into main supply through on/off switch and fuse for protecting from overload and short circuit protection. Which is further regulated to +5v.

4. Flow Chart 33 .8. FLOW CHART START SWITCH OFF MOTOR AND ALL LEDs CHECK PHASE VOLTAGE S NORM AL ABNORMAL SWITCH ON MOTOR OFF RELAY CHECK AUTO ON NOT ABNORMA PRESSE CHECK PHASE VOLTAGE S NORMAL SWITCH ON MOTOR ON RELAY CHECK AUTO OFF NOT PRESSE CHECK ROTATOR SWITCH CALL APPROXIMATE DELAY Fig 4.8.

4. LCD ENABLE LINE 34 .0 AUTOON AUTOOFF EQU EQU P2.7 TIM1 TIM2 TIM3 TIM4 EQU EQU EQU EQU P2. AUTO OFF . ***LCD CONTROL*** LCD_RS LCD_E EQU EQU P0.2 P2. ONRLY OFFRLY EQU EQU P2.1 P2.1 P1.1 .2 LED1 LED2 LED3 EQU EQU EQU P1. INCLUDE REG_52.0 P1.5 .0 P0.4 P2.PDF PH1 PH2 PH3 EQU EQU EQU P3. MOTOR . PROGRAM The actual used for programming the micro controller is presented below. AUTO ON .0 P3.3 P2.9.6 P2.1 P3. LCD REGISTER SELECT LINE .2 .

4-BIT DATA. this is internal data memory .LCD_DB4 EQU LCD_DB5 EQU LCD_DB6 EQU LCD_DB7 EQU P0.2 LINES. FOR DATA . Bit addressable memory 35 . ---------==========----------==========---------=========--------DSEG ORG 20H .6 . ***SYSTEM INSTRUCTIONS*** CONFIG EQU 28H 6 . INCREMENT CURSOR DON'T SHIFT DISPLAY ENTRYMODE EQU . PORT 1 IS USED FOR DATA . ***CURSOR CONTROL INSTRUCTIONS*** OFFCUR EQU BLINKCUR EQU 0CH 0DH .3 P0. ***DISPLAY CONTROL INSTRUCTIONS*** CLRDSP ONDSP EQU EQU 01H 0CH . USED FOR DATA .5X7 MATRIX LCD . FOR DATA .4 P0.5 P0.

4 MOTT BIT NEW.---------==========----------==========---------=========--------- ORG JMP 00H MAIN . count for scr disp .0 NEW2 BIT NEW.2 NEW: DS NEW1 BIT NEW.3 NEW5 BIT NEW. scrolling display . Reset 36 .---------==========----------==========---------=========--------.1 NEW3 BIT NEW.1 MOT BIT FLAGS.FLAGS: DS 1 LD1 BIT FLAGS.5 1 TIM: SCRL: OFF_TIME: CSEG DS DS DS 1 1 1 . PROCESSOR INTERRUPT AND RESET VECTORS . Code begins here .0 LD2 BIT FLAGS.2 NEW4 BIT NEW.

#00H MOV NEW.#60H MOV FLAGS.#00H MOV OFF_TIME.#08H MOV TH1.ORG 001BH JMP SCROLL .#01H SETB ET1 MOV SCRL. Scrolling Display 37 . .#00H . ---------==========----------==========---------=========--------. Program execution starts here. Main routine.#00H CLR OFFRLY SETB LED1 SETB LED2 SETB LED3 CALL RESETLCD4 CALL INITLCD4 CALL TITLES SETB NEW2 MOV TMOD. Timer Interrupt1 .#11H MOV TL1. ---------==========----------==========---------=========--------MAIN: MOV SP.

chk auto off UP4: JNB AUTOON.MOV TIM. chk auto on .DEBOUNCE FOR AUTO ON KEY 38 . MOTOR_OFF JB PH3.$ CALL DELAY1 JNB AUTOON. Chk if motor is on JNB AUTOON.#120 SETB TR1 SETB EA UP: SETB PH1 SETB PH2 SETB PH3 SETB AUTOON SETB AUTOOFF . HJ1 JNB AUTOOFF. MOTOR_OFF JB PH2. . UP JNB PH1.$ SETB LED1 . MOTOR_OFF AJMP UP . HJ2 CALL DISP JNB MOT.

AUTO OFF 39 .UP3 JB PH3.$ CLR LED1 UP3: JNB AUTOON.$ CALL DELAY1 .UP4 SETB NEW4 CALL DISP JNB PH1.$ CALL DELAY1 JNB AUTOON. AUTO ON JNB AUTOON. UP .AJMP UP HJ1: JB MOT.UP3 SETB OFFRLY SETB MOT CLR LED3 CLR LD1 SETB MOTT AJMP UP .UP3 JB PH2.set motor bit HJ2: JNB AUTOOFF.

UP1 SETB NEW5 CLR LED2 CALL DELAY AJMP SET_TIMER UP1: AJMP UP MOTOR_OFF: JB LD1. chk motor status skip if motor is in off .JNB AUTOOFF.$ JNB MOT. UP1 SETB LED1 SETB LED2 SETB LED3 CLR MOT CLR TR0 CLR TF0 CLR OFFRLY SETB LD1 CLR NEW5 CLR NEW4 CLR MOTT AJMP UP .~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ SET_TIMER: SETB TIM1 40 .

#03H CALL HALF_HR_DELAY CALL HALF_HR_DELAY CALL HALF_HR_DELAY AJMP MOTOR_OFF VB3: JB TIM4.VB3 MOV OFF_TIME.VB2 MOV OFF_TIME.#04H 41 .SETB TIM2 SETB TIM3 SETB TIM4 SETB PH1 SETB PH2 SETB PH3 SETB AUTOOFF JB TIM1.VB1 MOV OFF_TIME.#02H CALL HALF_HR_DELAY CALL HALF_HR_DELAY AJMP MOTOR_OFF VB2: JB TIM3.#01H CALL HALF_HR_DELAY AJMP MOTOR_OFF VB1: JB TIM2. VB4 MOV OFF_TIME.

#0AAH MOV TH0. time delay for 1/2 hour . DFS JNB PH1.CALL HALF_HR_DELAY CALL HALF_HR_DELAY CALL HALF_HR_DELAY CALL HALF_HR_DELAY AJMP MOTOR_OFF VB4: AJMP UP .count for 1 min (60 FOR 1 MIN) FGD: JNB AUTOOFF. #11H MOV R5. #30 TP1: TP: MOV R6.~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HALF_HR_DELAY: MOV TMOD. count for 1/2 hour (30 for 1/2 Hour) . Start timer for 1 SEC (20 for 1 Sec (50ms X 20=1 sec) UP2: MOV TL0. MOTOR_OFF1 JB PH2. FGD CLR TR0 42 . MOTOR_OFF1 JB PH3. MOTOR_OFF1 JNB TF0. #3CH SETB TR0 .#60 CPL LED2 MOV R7.#20 .

UPP SETB LED3 SETB MOT CLR OFFRLY DFS: CLR TR0 CLR TF0 CLR MOTT RET . #0FFH NOP DJNZ R2. #0FFH RE1: RE: MOV R2. chk motor status skip if motor is in off 43 . RE DJNZ R1. TP DJNZ R5.~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ DELAY: MOV R1. RE1 RET . UP2 DJNZ R6.CLR TF0 DJNZ R7. TP1 RET UPP: AJMP UP MOTOR_OFF1: JB LD1.

#MSAG CALL LCD_MSG RET MSAG: DB 1H.********************************************************** . 81H.~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ TITLE1: MOV DPTR. #9FH REA1: MOV R2.########################################################## TITLES: MOV DPTR. DISPLAY ROUTINES . REA1 RET .'Protection @ LCD'.********************************************************** DELAY1: MOV R1. REA DJNZ R1. #0FFH REA: NOP DJNZ R2. 0C0H.'3 Phase Motor'..#MSAG1 CALL LCD_MSG RET MSAG1: 44 . 00H .########################################################## .

#MSAG3 CALL LCD_MSG RET MSAG3: DB 1H. 0C0H.'## R Phase: ##'. 0C1H.~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ TITLE3: MOV DPTR.~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ TITLE2: MOV DPTR.~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ TITLE11: MOV DPTR. #MSAG2 CALL LCD_MSG RET MSAG2: DB 1H.'## B Phase: ##'.DB 1H.'Voltage Normal'.'## Y Phase: ##'.'Voltage Normal'. 00H . 00H .'## R Phase: ##'.'Voltage Normal'.#MSAG5 CALL LCD_MSG 45 . 81H. 00H . 0C1H.~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ TITLE21: MOV DPTR. 00H . 81H. 0C1H.#MSAG4 CALL LCD_MSG RET MSAG4: DB 1H. 81H.'Voltage ABNormal'. 81H.

80H. 00H .#MSAG8 CALL LCD_MSG RET MSAG8: DB 1H.~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ TITLE31: MOV DPTR.#MSAG7 CALL LCD_MSG RET MSAG7: DB 1H. 80H. 81H.~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ AUTO_OFF_ON: 46 . 0C0H.0C0H. 81H.'Voltage ABNormal'.'@@@@@@@@@@@@@@@@'.'## B Phase: ##'.RET MSAG5: DB 1H.~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ MOT_ON: MOV DPTR. #MSAG6 CALL LCD_MSG RET MSAG6: DB 1H.~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ MOT_OFF: MOV DPTR.'@@@@@@@@@@@@@@@@'. 0C0H.00H .'## MOTOR OFF ##'.00H .'## Y Phase: ##'.'$$$ MOTOR ON $$$'.'Voltage ABNormal'. 00H .0C0H.

'## AUTO OFF ##'.~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ AUTO_OFF_OFF: MOV DPTR.0C2H.0C2H.'@@@ ON @@@'. 0C2H.#MSAG11 CALL LCD_MSG RET MSAG11: DB 1H.00H .'## AUTO ON ##'. 00H 47 .0C2H.'## AUTO ON ##'.00H .~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ AUTO_ON_ON: MOV DPTR.’@@@ OFF @@@’.'## AUTO OFF ##'.#MSAG10 CALL LCD_MSG RET MSAG10: DB 1H.00H .81H.81H. 81H.#MSAG12 CALL LCD_MSG RET MSAG12: DB 1H.'@@@ OFF @@@'.81H.#MSAG9 CALL LCD_MSG RET MSAG9: DB 1H.~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ AUTO_ON_OFF: MOV DPTR.MOV DPTR.'@@@ ON @@@'.

'OFF Timer: 1:30'.'OFF Timer: 30Min'.. 00H .#MSAG15 CALL LCD_MSG RET MSAG15: DB 1H. 80H. 80H.#MSAG16 CALL LCD_MSG RET 48 .#MSAG14 CALL LCD_MSG RET MSAG14: DB 1H.#MSAG13 CALL LCD_MSG RET MSAG13: DB 1H.~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ TIMER3: MOV DPTR.00H . 00H .~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ TIMER2: MOV DPTR.'OFF Timer: 1Hr'.~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ TIMER4: MOV DPTR.~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ TIMER1: MOV DPTR.80H.

INITIALIZE THE LCD 4-BIT MODE .DATA BITS.’Time: ‘00H . #ONDSP. #ENTRYMODE. 00H .********************************************************** INITLCD4: CLR CLR MOV LCD_RS LCD_E .'OFF Timer: 2:00'. INCREMENT CURSOR RIGHT. ENABLE LINE R4.~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ TIMER5: MOV DPTR. HOME CURSOR WRLCDCOM4 49 . LCD REGISTER SELECT LINE . DISPLAY ON WRLCDCOM4 R4.~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ . FUNCTION SET . . NO SHIFT R4.#MSAG17 CALL LCD_MSG RET MSAG17: DB 0C2H. FONTS CALL MOV CALL MOV CALL MOV CALL RET WRLCDCOM4 R4.********************************************************** . 80H. #CLRDSP. LINES. SET ENTRY MODE WRLCDCOM4. CLEAR DISPLAY.MSAG16: DB 1H. #CONFIG.

START ENABLE PULSE . SET BIT PATTERN FOR.. START ENABLE PULSE . ENABLE LINE . START ENABLE PULSE . DELAY 4 MILLISECONDS . END ENABLE PULSE . LCD REGISTER SELECT LINE . DELAY 1 MILLISECOND MDELAY LCD_DB4 LCD_E LCD_E .. SOFTWARE VERSION OF THE POWER ON RESET . #1 . #1 . END ENABLE PULSE . SPECIFY 4-BIT OPERATION . DELAY 1 MILLISECOND MDELAY LCD_E LCD_E A. . ********************************************************** RESETLCD4: CLR CLR CLR CLR SETB SETB SETB CLR MOV CALL SETB CLR MOV CALL SETB CLR MOV CALL CLR SETB CLR LCD_RS LCD_E LCD_DB7 LCD_DB6 LCD_DB5 LCD_DB4 LCD_E LCD_E A.. POWER-ON-RESET MDELAY LCD_E LCD_E A. ********************************************************** ... END ENABLE PULSE 50 . END ENABLE PULSE . . START ENABLE PULSE . #4 .

LOAD HIGH NIBBLE ON DATA BUS LCD_DB4. R4 . #CONFIG. COMMAND MUST BE PLACED IN R4 BY CALLING PROGRAM .4 . DISPLAY OFF WRLCDCOM4 R4. C C. SELECT SEND COMMAND . FUNCTION SET WRLCDCOM4 R4.. ACC. ACC. C . #08H . HOME CURSOR WRLCDCOM4 R4. #1 .MOV CALL MOV CALL MOV CALL MOV CALL MOV ACALL A. ACC. SAVE ACCUMULATOR .5 . SET ENTRY MODE WRLCDCOM4 JMP INITLCD4 . PUT DATA BYTE IN ACC C. ONE BIT AT A TIME USING.#ENTRYMODE . CLEAR DISPLAY. #1 . ********************************************************** .6 51 .. BIT MOVE OPERATOINS LCD_DB5. SUB WRITES A COMMAND WORD TO THE LCD . C. ********************************************************** WRLCDCOM4: CLR CLR PUSH MOV MOV MOV MOV MOV MOV LCD_E LCD_RS ACC A. DELAY 1 MILLISECOND MDELAY R4.

3 LCD_DB7. PULSE THE ENABLE LINE CALL MADELAY POP RET . C C. C LCD_E LCD_E C. C C. ACC. C LCD_E LCD_E LCD_E .2 LCD_DB6. ********************************************************** WRLCDDATA: CLR SETB LCD_E LCD_RS . ACC. SUB TO WRITE A DATA WORD TO THE LCD .1 LCD_DB5.0 . ********************************************************** . C C. LOAD LOW NIBBLE LCD_DB4. C C.MOV MOV MOV SETB CLR MOV MOV MOV MOV MOV MOV MOV MOV CLR SETB CLR LCD_DB6. SIMILARLY. PULSE THE ENABLE LINE .7 LCD_DB7. ACC. ACC. DATA MUST BE PLACED IN R4 BY CALLING PROGRAM . ACC. SELECT SEND DATA ACC 52 .

C C. PULSE THE ENABLE LINE . ACC.. C . C C. ACC.6 LCD_DB6. C. PULSE THE ENABLE LINE ACC 53 .4 . ACC. LOAD LOW NIBBLE LCD_DB4.0 . LOAD HIGH NIBBLE ON DATA BUS LCD_DB4. C LCD_E LCD_E C.3 LCD_DB7. C LCD_E LCD_E LCD_E . ACC.. PUT DATA BYTE IN ACC C. SAVE ACCUMULATOR .PUSH MOV MOV MOV MOV MOV MOV MOV MOV MOV SETB CLR MOV MOV MOV MOV MOV MOV MOV MOV CLR SETB CLR NOP NOP POP ACC A. BIT MOVE OPERATOINS LCD_DB5. C C. ACC. ACC. ONE BIT AT A TIME USING. C C. R4 .1 LCD_DB5. SIMILARLY. ACC.7 LCD_DB7. ACC.2 LCD_DB6. C C.5 .

STRING MUST BE TERMINATED WITH A . A CALL WRLCDCOM4 JMP Lcd_Msg_Data . . Check if is a Clear Command MOV R4. Point to the next byte .@A+DPTR INC DPTR JZ LCD_Msg9 .#001H.RET . Data or Address? If => 80h then is address. NULL (0).Lcd_Msg1 . #080h. FLL MOV R4. A CALL WRLCDCOM4 JMP LCD_MSG . write it as command to LCD . it is address . Go get next byte from strings Lcd_Msg1: CJNE A. A CALL WRLCDDATA JMP LCD_MSG FLL: CJNE A. Return if found the zero (end of strings) CJNE A. Carry not set if A=>80. . DISPLAYS ON THE LCD.$+3 JC Lcd_Msg_Data MOV R4. #0FFH. Get byte pointed by Dptr . Carry will be set if A < 80h (Data) . ********************************************************** LCD_MSG: CLR A MOVC A. ********************************************************** . SUB TAKES THE STRING IMMEDIATELY FOLLOWING THE CALL AND . Go get next byte from strings 54 . Check for displaying full character . Clear Index . If yes.

write it to LCDs . Go get next byte from strings RET . It was data. 1 MILLISECOND DELAY ROUTINE .Lcd_Msg_Data: MOV R4. A CALL WRLCDDATA JMP Lcd_Msg Lcd_Msg9: . ********************************************************** .#0A6H 55 . ********************************************************** MDELAY: PUSH MOV MD_OLP: INC NOP NOP NOP NOP NOP NOP NOP NOP JNZ NOP MD_OLP A ACC A. Return to Caller .

SCRL CJNE A.~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ SCROLL: DJNZ TIM. GAHJ1 CLR TR1 INC SCRL DCDF: MOV A.#01H.#036H A MAD_OLP ACC .DFV1 56 .POP RET MADELAY: PUSH MOV MAD_OLP: INC NOP NOP NOP NOP NOP NOP NOP NOP JNZ NOP POP RET ACC ACC A.

JB NEW1, DFF1 CALL TITLE1 AJMP GAG GAHJ1: AJMP GAHJ DFF1: CALL TITLE11 AJMP GAG DFV1: CJNE A,#02H,DFV2 JB NEW2, DFF2 CALL TITLE2 AJMP GAG DFF2: CALL TITLE21 AJMP GAG DFV2: CJNE A,#03H,DFV3 JB NEW3,DFF3 CALL TITLE3 AJMP GAG DFF3: CALL TITLE31 AJMP GAG

; CHK R VOL

; CHK Y VOL

;CHK B VOL

DFV3: CJNE A,#04H,DFV4 JB MOTT,DFF4 CALL MOT_OFF AJMP GAG DFF4: CALL MOT_ON AJMP GAG

;MOTOR NO/OFF

57

DFV4: CJNE A, #05H, DFV5 JNB NEW4, DFF5 CALL AUTO_ON_ON AJMP GAG DFF5: CALL AUTO_ON_OFF AJMP GAG

; AUTO ON

DFV5: CJNE A,#06H,DFV6 JNB NEW5, DFF6 CALL AUTO_OFF_ON AJMP GAG DFF6: CALL AUTO_OFF_OFF AJMP GAG

;AUTO OFF

DFV6: MOV SCRL, #00H

GAG: MOV TIM, #75 GAHJ: MOV TL1, #08H MOV TH1, #01H SETB TR1 RETI

DISP: SETB PH1

58

SETB PH2 SETB PH3

JNB PH1, DRE1 CLR NEW1 AJMP DEE1 DRE1: SETB NEW1

DEE1: JB PH2, DRE2 CLR NEW2 AJMP DEE2 DRE2: SETB NEW2

DEE2: JB PH3, DRE3 CLR NEW3 RET DRE3: SETB NEW3 RET END

4.10. CONCLUSION
Fault detection circuit is used for detection of the over and under voltages. From the fault detection circuit output is given to microcontroller, by the program stored in the microcontroller it activates the ON relay or OFF relay. The output of the microcontroller is applied to the relays to switch ON and OFF the motor.

59

60 .

Here the motor will run automatically when auto on is set and it will stop the motor automatically after a particular time if auto off is set.CHAPTER 5 EXPERMENTAL RESULTS AND CONCLUSION 5. the code is copied in to the microcontroller and we got the desired results. We have successfully completed the code required for the protection of the three phase induction motor from the faults of unbalanced supply voltages and signal phasing. The experimental is conducted by connecting wires form experimental kit to starter of the motor . 61 . According to the signal from controller the relay will start /stop the motor. The circuit is fabricated. Addition to this we are using two switches one for auto on and another for auto off. 5. According to the program written in to the microcontroller the circuit will automatically ON/OFF the motor . Microcontroller sends the signal to relays which is connected to the starter of motor.The prime use of the microcontroller is to protect the motor from over and under voltages and to start and stop the motor automatically.2 CONCLUSION In this project we are using LM 393 dual comparator to compare over/under voltage.our end result is the effective and reliable protection of three phase induction motor from the faults of unbalanced supply voltages and single phasing.1RESULT This project concerns with experimental studies on the protection of induction motor form over and under voltage and single phasing.

5. and the motor with any rating can be easily adopted by just connecting the relay connections to the starter of the motor.4. Wireless implementation by FM/RF. FUTURE ENHANCEMENTS  A real time clock can be added so that the ON time and the OFF time of the motor can be entered and the system will switch ON the motor and it will switch OFF at the predetermined time.  An electronic lock can be provided so that unauthorized persons can‘t use the motor. 62 . This project can be extend to protect the induction motor form phasor faults and phase reversal.  Agricultural motors  Industrial motors 5.    Higher application.3 APPLICATION This project can be used in any type of three phase motors.

www.omron.BIBLIOGRAPHY: 1.com 5.com 6. www.8051projects. P. www. Edition Seventh 2004 August 2. Electric Machinery.taylorandfrancis. Khanna Publishers. E-book -Networking and Internetworking with Microcontrollers 3.ia. Samsung.metapress.lmphotonics.com_protection techniques 7.com_relays 63 .S Bimbhra. www. www.info 4.

6. 8.Appendix 1 LM7805 Regulator LM78LXX SERIES 3-TERMINAL POSITIVE REGULATORS GENERAL DESCRIPTION The LM78LXX series of three terminal positive regulators is available with several fixed output voltages making them useful in a wide range of applications. the plastic SO-8 (M) package and a chip sized package (8-Bump micro SMD) using National’s micro SMD package technology. The LM78LXX is available in the plastic TO-92 (Z) package.0V.0V. the LM78LXX usually results in an effective output impedance improvement of two orders of magnitude. If internal power dissipation becomes too high for the heat sinking provided. eliminating the distribution problems associated with single point regulation. and other solid state electronic equipment. HiFi. When used as a zener diode/resistor combination replacement. Features • • LM78L05 in micro SMD package • • • • • Output voltage tolerances of ±5% over the temperature range Output current of 100mA Internal thermal overload protection n Output transistor safe Available in plastic TO-92 and plastic SO-8 low profile packages area protection n Internal short circuit current limit No external components Output voltages of 5. 15V n See AN-1112 for micro SMD considerations 64 . the thermal shutdown circuit takes over preventing the IC from overheating. 9.2V. instrumentation. 12V. With adequate heat sinking the regulator can deliver 100mA output current.2V. These regulators can provide local on card regulation. Safe area protection for the output transistors is provided to limit internal power dissipation. and lower quiescent current. The voltages available allow the LM78LXX to be used in logic systems. Current limiting is included to limit the peak output current to a safe value.

CONNECTION DIAGRAMS SO-8 Plastic (M) (Narrow Body) (TO-92) Plastic Package (Z) Bottom View Top View Micro SMD Orientation 8-Bump micro SMD Marking 00774424 Top View (Bump Side Down) 00774433 Top View 65 .

Typical Performance Characteristics Maximum Average Power Dissipation (Z Package) Peak Output Current 00774414 00774416 Dropout Voltage Ripple Rejection 00774417 00774418 Output Impedance Quiescent Current 66 .

load regulation (Lr) ≈ [(R1 + R2)/R1] (Lr of LM78L05) Current Regulator 00774410 IOUT = (VOUT/R1) + IQ >IQ = 1.TYPICAL APPLICATIONS Fixed Output Regulator 00774408 *Required if the regulator is located more than 3" from the power supply filter. Adjustable Output Regulator 00774409 VOUT = 5V + (5V/R1 + IQ) R2 3 IQ. **See (Note 4) in the electrical characteristics table. 500mA Regulator with Short Circuit Protection 00774411 67 .5mA over line and load changes 5V.

Load Regulation: 0.9 68 .5V-18V Solid tatalum VOUT = VG + 5V. R1 = (−VIN/IQ LM78L05) VOUT = 5V (R2/R4) for (R2 + R3) = (R4 + R5) A 0.*Solid tantalum. **Heat sink tON = 50ms Q1.5V output will correspond to (R2/R4) = 0.6% 0 ≤ IL ≤ 250mA pulsed with ±15V.1(R3/R4) = 0. ***Optional: Improves ripple rejection and transient response. 100mA Dual Power Supply Variable Output Regulator 0.

high-performance CMOS 8-bit microcontroller with 8K bytes of in-system programmable Flash memory. The AT89S52 provides the following standard features: 8K bytes of Flash. the Atmel AT89S52 is a powerful microcontroller which provides a highly-flexible and cost-effective solution to many embedded control applications. Watchdog timer. and interrupt 69 . In addition. 32 I/O lines. serial port.Appendix 2 THEORY OF MICROCONTROLLER FEATURES  Compatible with MCS®-51 Products  8K Bytes of In-System Programmable (ISP) Flash Memory –Endurance: 10. a full duplex serial port.0V to 5. and clock circuitry. two data pointers.5V Operating Range  Fully Static Operation: 0 Hz to 33 MHz  Three-level Program Memory Lock  256 x 8-bit Internal RAM  32 Programmable I/O Lines  Three 16-bit Timer/Counters  Eight Interrupt Sources  Full Duplex UART Serial Channel  Low-power Idle and Power-down Modes  Interrupt Recovery from Power-down Mode  Watchdog Timer  Dual Data Pointer  Power-off Flag  Fast Programming Time  Flexible ISP Programming (Byte and Page Mode)  Green (Pb/Halide-free) Packaging Option 1. DESCRIPTION The AT89S52 is a low-power. timer/counters. The Idle Mode stops the CPU while allowing the RAM. The device is manufactured using Atmel’s high-density nonvolatile memory technology and is compatible with the indus-trystandard 80C51 instruction set and pinout. By combining a versatile 8-bit CPU with in-system programmable Flash on a monolithic chip.000 Write/Erase Cycles  4. on-chip oscillator. the AT89S52 is designed with static logic for operation down to zero frequency and supports two software selectable power saving modes. a sixvector two-level interrupt architecture. three 16-bit timer/counters. 256 bytes of RAM. The on-chip Flash allows the program memory to be reprogrammed in-system or by a conventional nonvolatile memory pro-grammer.

The Power-down mode saves the RAM con-tents but freezes the oscillator.system to continue functioning. AUXR: Register AUXR Auxiliary Reset Value XXX00XX0B = Address = 8EH Not Bit Addressable – Bit 7 6 – 5 WDIDLE DISRTO 4 3 – 2 – 1 DISA LE 0 Reserved for – future expansion DISAL Disable/Enable E ALE DISAL Operatin E g Mode 0 1 DISRTO DISRTO 0 1 WDIDLE 0 1 WDT continues to count in IDLE mode WDT halts counting in IDLE mode Reset pin is driven High after WDT times out Reset pin is input only ALE is emitted at a constant rate of 1/6 the oscillator frequency ALE is active only during a MOVX or MOVC instruction Disable/Enable Reset out WDIDLE Disable/Enable WDT in IDLE mode Dual Data Pointer Registers: To facilitate accessing both internal and external data memory. The user should ALWAYS initialize the DPS bit to the appropriate value before accessing the respective Data Pointer Register. 70 . Bit DPS = 0 in SFR AUXR1 selects DP0 and DPS = 1 selects DP1. two banks of 16-bit Data Pointer Registers are provided: DP0 at SFR address locations 82H-83H and DP1 at 84H-85H. disabling all other chip functions until the next interrupt or hardware reset.

DP1H 71 . It can be set and rest under software control and is not affected by reset AUXR1: Auxiliary Register 1 AUXR 1 Address = A2H Not Bit Addressable -B i t ----Reset Value XXXXXXX0B = -- -- DPS 7 6 5 4 3 2 1 0 – DPS Reserved for future expansion Data Pointer Register Select DPS 0 1 Selects DPTR Registers DP0L. POF is set to “1” during power up.4) in the PCON SFR. DP0H Selects DPTR Registers DP1L.Power off Flag: The Power Off Flag (POF) is located at bit 4 (PCON.

This transition also sets the EXF2 bit. this bit allows Timer 2 to be configured as an up/down counter Figure 1 shows Timer 2 automatically counting up when DCEN = 0. The overflow also causes the timer registers to be reloaded with the 16-bit value in RCAP2H and RCAP2L.T2MOD – Timer 2 Mode Control Register T2MOD Address 0C9H Not Bit Addressable – Bit 7 – 6 = Reset Value = XXXX XX00B – 5 – 4 – 3 – 2 T2OE 1 DCEN 0 Symbol – Function Not implemented. If EXEN2 = 0. Both the TF2 and EXF2 bits can generate an 72 . Timer 2 counts up to 0FFFFH and then sets the TF2 bit upon overflow. If EXEN2 = 1. The values in Timer in Capture ModeRCAP2H and RCAP2L are preset by software. a 16bit reload can be triggered either by an overflow or by a 1-to-0 transition at external input T2EX. In this mode. reserved for future Timer 2 Output Enable bit T2OE DCEN When set. two options are selected by bit EXEN2 in T2CON.

Reserved. The underflow sets the TF2 bit and causes 0FFFFH to be reloaded into the timer registers. If EA = 0. no interrupt is acknowledged.5 IE.2 73 . the T2EX pin controls the direction of the count. If EA = 1. TH2 and TL2. EA IE. Timer 2 interrupt enable bit. EXF2 does not flag an interrupt. The timer underflows when TH2 and TL2 equal the values stored in RCAP2H and RCAP2L. Enable Bit = 0 disables the interrupt.7 – ET2 ES ET1 EX1 IE. In this operating mode. Logic 1 at T2EX makes Timer 2 count up. Timer 1 interrupt enable bit. Logic 0 at T2EX makes Timer 2 count down. as shown in Figure 10-2.6 IE. Symbol Position Function Disables all interrupts.3 IE. In this mode.respectively. Setting the DCEN bit enables Timer 2 to count up or down. External interrupt 1 enable bit. This overflow also causes the 16-bit value in RCAP2H and RCAP2L to be reloaded into the timer registers. Serial Port interrupt enable bit. Table 2 Interrupt Enable (IE) Register (LSB) – ET2 ES ET1 EX1 ET0 EX0 (MSB) EA Enable Bit = 1 enables the interrupt. The EXF2 bit toggles whenever Timer 2 overflows or underflows and can be used as a 17th bit of resolution. each interrupt source is individually enabled or disabled by setting or clearing its enable bit.4 IE. The timer will overflow at 0FFFFH and set the TF2 bit.interrupt if enabled.

1.ET0 EX0 IE. External interrupt 0 enable bit.Interrupt Sources 0 INT1 IE 0 1 TF0 0 INT1 IE 0 1 TF1 T1 R1 TF2 EXF 2 74 .0 Timer 0 interrupt enable bit. because they may be used in future AT89 products. User software should never write 1s to reserved bits.1 IE. Figure 13 .

Read back current status of the lock bits (a programmed lock bit reads back as a “1”) xxxx xxxx 0000 xxx A11A1 A9A8 A12 Read Program Memory 0011 A12 Read Signature 0010 Bytes 1000 xxx A11A10 A9A8 A 7 x x x xxx0 Signature Byte Read Signature Byte Byte 0 Byte 1. See Note (1). Read data from Program 75 ..Table 3. Serial Programming Instruction Set Instruction Format Instruction Byte 1 1010 Programming Enable 1100 Byte 2 0101 0011 Byte 3 xxxx xxxx Byte 4 xxx xxxx x 0110 1001 (Output on MISO) 1010 Chip Erase array 4A7A6A5A D3D2D1D0 A3A2A1A0 D7D6D5D4 1100 100x xxxx xxxx xxxx xxx xxxx x Chip Erase Flash memory Enable Programming while RST is high Serial Operation (Byte Mode) 0000 xxx A12 D3D2D1D0 LB2LB1 A7A6A5A4 D7D6 D5D4 Write Program Memory 0100 A3A2A1A0 A11A10 A9A8 Read Program Memory 0010 0000 xxx A12 Read data from Program memory in the byte mode Write data to Program (Byte Mode) Write Bits (1) Lock 1010 0010 Read Bits Lock 1100 0100 1110 00B 1B 2 xxxx xxxx xxxx xxxx xxx xxxx x xx x xx LB3 A11A10 A9A8 memory in the byte mode Write Lock bits..

28. SCK should be no faster than 1/16 of the system clock at XTAL1.1 External Program and Data Memory Characteristics Symbol Parameter 1/t t t t t t t t t t t t Min Max Min 0 Max 33 Units MHz ns ns ns CLCL Oscillator Frequency ALE Pulse Width Address Valid to ALE Low Address Hold After ALE Low ALE Low to Valid Instruction In ALE Low to PSEN Low PSEN Pulse Width PSEN Low to Valid Instruction In Input Instruction Hold After PSEN Input Instruction Float After PSEN PSEN to Address Valid Address to Valid Instruction In 75 312 0 59 t LHLL AVLL LLAX LLIV LLPL PLPH PLIV PXIX PXIZ PXAV AVIV 127 43 48 233 43 205 145 2tC LC L-40 tCLCL-25 tCLCL-25 4tCLCL-65 tCLCL-25 3tC LC L-45 3tCLCL-60 0 tC LC L-25 -8 CLCL ns ns ns ns ns ns ns ns 5tCLCL-80 76 . After the command byte and upper address byte are latched. For Page Read/Write. Then the next instruction will be ready to be decoded. the data always starts from byte 0 to 255. Byte 255 Write data to Program memory in the Page Mode (256 bytes) After Reset signal is high. and PSEN = 100 pF. each byte thereafter is treated as data until all 256 bytes are shifted in/out. load capacitance for Port 0. No pulsing of Reset signal is necessary.. 28.0 Byte 255 (Page Mode) memory in the Page Mode (256 bytes) A12 Write Program Memory (Page Mode) A11A10 A9A8 0101 0000 xxx Byte 0 Byte 1.. AC Characteristics Under operating conditions. load capacitance for all other outputs = 80 pF. SCK should be low for at least 64 system clocks before it goes high to clock in the enable data bytes. ALE/PROG.

t t t PLAZ RLRH WLW PSEN Low to Address Float RD Pulse Width WR Pulse Width RD Low to Valid Data In 0 Data Float After RD ALE Low to Valid Data In 200 203 23 433 33 400 400 10 6tCLCL-100 6tCLCL-100 252 0 97 517 585 300 3tC LC L-50 4tC LC L-75 tC LCL-30 7tCLCL-130 tCLCL-25 10 ns ns ns H t t t t t t t t RLDV RHDZ LLDV 5tCLCL-90 2tCLCL-28 8tCLCL-150 9tCLCL-165 3tC LC L+50 ns ns ns ns ns ns ns ns ns ns RHDX Data Hold After RD AVDV Address to Valid Data In LLWL ALE Low to RD or WR Low AVWL Address to RD or WR Low QVWX Data Valid to WR Transition QVWH Data Valid to WR High WHQX Data Hold After WR RLAZ t t t RD Low to Address Float 0 0 123 tCLCL-25 tC LC L+25 ns ns t WHLH RD or WR High to ALE High 43 77 .

Operation from split power supplies is also possible and the low power supply current drain is independent of the magnitude of the power supplyvoltage. MOS clock timers.Appendix 3 LM193/LM293/LM393/LM2903 Low Power Low Offset Voltage Dual Comparators General Description The LM193 series consists of two independent precision voltage comparators with an offset voltage specification as low as 2. wide range VCO. multivibrators and high voltage digital logic gates. the LM193 series will directly interface with MOS logic where their low power drain is a distinct advantage over standard comparators. Advantages  High precision comparators  Reduced VOS drift over temperature  Eliminates need for dual supplies  Allows sensing near ground  Compatible with all forms of logic  Power drain suitable for battery operation 78 . When operated from both plus and minus power supplies. The LM393 and LM2903 parts are available in National’s innovative thin micro SMD package with 8 (12 mil) large bumps.0 mV max for two comparators which were designed specifically to operate from a single power supply over a wide range of voltages. pulse. The LM193 series was designed to directly interface with TTL and CMOS. simple analog to digital converters. squarewave and time delay generators. Application areas include limit comparators. even though operated from a single power supplyvoltage. These comparators also have a unique characteristic in that the input common-mode voltage range includes ground.

MOS  and CMOS logic systems  Available in the 8-Bump (12 mil) micro SMD package  See AN-1112 for micro SMD considerations Squarewave Oscillator Non-Inverting Comparator with Hysteresis 79 .0V to 36V  Single or dual supplies: ±1. ECL.Features  Wide supply  Voltage range: 2.4 mA) — independent  of supply voltage  Low input biasing current: 25 nA  Low input offset current: ±5 nA  Maximum offset voltage: ±3 mV  Input common-mode voltage range includes ground  Differential input voltage range equal to the power  supply voltage  Low output saturation voltage.0V to ±18V  Very low supply current drain (0.: 250 mV at 4 mA  Output voltage compatible with TTL. DTL.

iagrams

Metal Can Package
micro SMD Marking

Dual-In-Line/SOIC Package

00570902

Metal Dual-In-Line/SOIC Package

S c h e m at ic a n d C o n n ec ti o n D

Miro SMD Micro SMD Maring

Top View

Top View

80

81

Typical Performance Characteristics

82

Simply socketing the IC and attaching resistors to the pins will cause input-output oscillations during the small transition intervals unless hysteresis is used. If the input signal is a pulse waveform. Reducing the input re-sistors to < 10 kΩ reduces the feedback signal levels and finally. hysteresis is not required.3 VDC (at 25˚C). can easily oscillate if the output lead is inadvertently allowed to capacitively couple to the inputs via stray capacitance. Many collectors can be tied together to provide an output OR’ing function. Power supply bypassing is not required to solve this problem.0 VDC to 30 VDC.0mV) allows the output to clamp essentially to ground level for small load currents. All input pins of any unused comparators should be tied to the negative supply.0 to 10 mV) of positive feedback (hysteresis) causes such a rapid transition that oscillations due to stray feedback are not possible. The output saturation voltage is limited by the approximately 60Ω rSAT of the output transistor.Application Hints The LM193 series are high gain. The bias network of the LM193 series establishes a drain current which is independent of the magnitude of the power supply voltage over the range of from 2. The amount of current which the output device can sink is limited by the drive available (which is independent of V+) and the β of this device. It is usually unnecessary to use a bypass capacitor across the power supply line. Standard PC board layout is helpful as it reduces stray input-output coupling. like most comparators. The output can also be used as a simple SPST switch to ground (when a pull-up resistor is not used). wide bandwidth devices which. the output transistor will come out of saturation and the output voltage will rise very rapidly. Protection should be provided to prevent the input voltages from going negative more than −0. An output pull-up resistor can be connected to any available power supply voltage within the permitted supply voltage range and there is no restriction on this voltage due to the magnitude of the voltage which is applied to the V+ terminal of the LM193 package. 83 . An input clamp diode can be used as shown in the applications section. The low offset voltage of the output transistor (1. adding even a small amount (1. The output of the LM193 series is the uncommitted collector of a grounded-emitter NPN output transistor. When the maximum current limit is reached (approximately 16mA). This shows up only during the output voltage transition intervals as the comparator change states. The differential input voltage may be larger than V+ without damaging the device (Note 8). with relatively fast rise and fall times.

Typical Applications (V+=5.0 VDC) Pulse Generator Crystal Controlled Oscillator Squarewave Oscillator Basic Comparator Non-Inverting Comparator with Hysteresis 84 .

0 VDC) (Continued) Inverting Comparator with Hysteresis Output Strobing AND Gate OR Gate Large Fan-in AND Gate Limit Comparator 85 .Typical Applications (V+=5.

0 VDC) (Continued) Comparing Input Voltages of Opposite Polarity ORing the Outputs Zero Crossing Detector (Single Power Supply) One-Shot Multivibrator Bi-Stable Multivibrator One-Shot Multivibrator with Input Lock Out 86 .Typical Applications (V+=5.

Zero Crossing Detector Comparator With a Negative Reference 87 .

0 VDC) (Continued) Time Delay Generator Split-Supply Applications (V+=+15 VDC and V−=−15 VDC) MOS Clock Driver 88 .Typical Applications (V+=5.