You are on page 1of 26

Mini Project 2011

ACKNOWLEDGEMENT

The project report entitled AUTOMATIC LIQUID LEVEL CONTROLLERR USING 8051 MICROCONTROLLER, has been undertaken under the table guidance of Sri. Retheep Raj, Lecturer, Dept of Instrumentation and Control Engineering. We are deeply grateful to him, without whose advice, guidance and encouragement, the venture would not have been successful.

We are grateful to Prof. Seethalekshmi Amma, HOD, IC Dept. for her timely support.

We are also thankful to all our classmates, friends and non teaching staff members who helped us immensely in the preparation of this project.

Project Team Remya Ramakrishnan Vishnu P Pavithra U Pretheesh Jose Athul P Kumar 1
NSS COLLEGE OF ENGINEERING PALAKKAD IC DEPARTMENT

Mini Project 2011

ABSTRACT
This Project presents a working model of an Automatic Liquid Level Controller using 8051 microcontroller. This controller makes use of a pressure sensor which senses the pressure of the liquid in the tank and then converts this pressure signal into a voltage signal that is picked up by the microcontroller.

Here the upper and lower limits can be set and there is also an LCD which will show the amount of liquid in the tank in liters. In this project the upper limit is set to a particular value of 1000 litres but the lower set point can be adjusted according to the need of the user. There is also a provision to detect the dry run of the pump and in such a situation will give a warning signal.

This liquid level controller employs an eight channel ADC in which only the first two channels are used. The first one is for the upper set point and the second one is for the lower set point.

This microcontroller gives the input to an on-off relay which then actuates the motor. When the liquid reaches the upper set point the motor is automatically cut off and when it reaches the lower set point the motor is automatically switched on thereby pumping the liquid from the sump into the tank.

2

NSS COLLEGE OF ENGINEERING PALAKKAD

IC DEPARTMENT

ADC c. Reference 3 NSS COLLEGE OF ENGINEERING PALAKKAD IC DEPARTMENT . Design and Development a. 8051 microcontroller b. Instrumentation Amplifier 3. Pressure Sensor b. Circuit Diagram b.Mini Project 2011 CONTENTS 1. Description 5. Level Sensing Unit a. Introduction 2. Controller Unit a. Relays 4.

Mini Project 2011 INTRODUCTION The control of the water level in the overhead tank is a serious problem usually encountered. The above problem is resolved by installing an automatic level controller in the tank at a position (level) at which the level of the water is said to be maintained. This pressure sensor senses the pressure and then converts it to a voltage signal which is then conveyed to the microcontroller. Here the sensing unit comprises of a pressure sensor rather than a mechanical float due to greater accuracy and a lesser tendency of errors since less mechanical parts are involved. The ADC used in this project is an eight channel ADC out of which only 2 channels are used here. 4 NSS COLLEGE OF ENGINEERING PALAKKAD IC DEPARTMENT . This problem leads to the overflow of water and in turn a drastic wastage of water and electricity.one for the upper set point and one for the lower set point and an additional feature is the LED screen which indicates the level of the liquid in litres and whether there is a dry run of the pipe in which case it makes the safety of the motor it s first priority.

The MPX10 series device is a silicon piezoresistive pressure sensor providing a very accurate and linear voltage output directly proportional to the applied pressure.Mini Project 2011 LEVEL SENSING UNIT a. low cost. 5 NSS COLLEGE OF ENGINEERING PALAKKAD IC DEPARTMENT . uncompensated sensor Permits manufacturers to design and add their own external temperature compensating and signal conditioning networks. Similarly. PRESSURE SENSOR The pressure sensor used in this project is the MOTOROLLA MPX10 Series. output voltage increases as increasing vacuum is applied to the vacuum side (P2) relative to the pressure side (P1). The output voltage of the differential or gauge sensor increases with increasing pressure applied to the pressure side (P1) relative to the vacuum side (P2). This standard.

Mini Project 2011 b. 0808 ADC 6 NSS COLLEGE OF ENGINEERING PALAKKAD IC DEPARTMENT .

the 256R network does not cause load variations on the reference voltage. When the ADC is done with the conversion. The Converter The heart of this single chip data acquisition system is its 8-bit analog-to-digital converter. but it only acts as an output if the output pin is enabled (active high). the upper set point is fixed in the program and the lower set point can be adjusted. and the comparator. The converter s digital outputs are positive true. The first channel is used to set the upper set point of the tank and the 2nd channel is used to set the lower set point. The 256R ladder network approach (Figure 1) was chosen over the conventional R/2R ladder because of its inherent monotonicity. The difference in these resistors causes the output characteristic to be symmetrical with the zero and full-scale 7 NSS COLLEGE OF ENGINEERING PALAKKAD IC DEPARTMENT . it gives an end of conversion signal (EOC) which is taken to be the interrupt sent out by the ADC and when that interrupt is received by the microcontroller then it sends an interrupt acknowledge. which guarantees no missing digital codes. The address latch enable pin of the ALD is short circuited to the start pin of the control and tuning block. Monotonicity is particularly important in closed loop feedback control systems. Once the interrupt has been read and the data has been outputted. the successive approximation register. and repeatable Conversions over a wide range of temperatures. accurate. The tristate buffer is used to output the value from the ADC in the digital form. When you apply 000 to the ALD then the first channel is selected and when 001 is applied to the ALD then the 2nd channel is selected. the output pin again goes low. In this project. Additionally. This ADC has 8 channels and out of these 8 multiplexer channels this level controller uses the first two channels using the address latch and decoder (ALD). The converter is partitioned into 3 major sections: the 256R ladder network. A non-monotonic relationship can cause oscillations that will be catastrophic for the system. The bottom resistor and the top resistor of the ladder network in Figure 1 are not the same value as the remainder of the network. The converter is designed to give fast.Mini Project 2011 The ADC is the analog and digital converter and this particular project uses the 0808 ADC as shown in the figure above.

For any SAR type converter. Continuous conversion may be accomplished by tying the endof-conversion (EOC) output to the SC input. This technique limits the drift component of the amplifier since the drift is a DC component which is not passed by the AC amplifier. The most important section of the A/D converter is the comparator. It is this section which is responsible for the ultimate accuracy of the entire converter. End-of-conversion will go low between 0 and 8 clock pulses after the rising edge of start conversion.Mini Project 2011 points of the transfer curve. The first output transition occurs when the analog signal has reached +1 2 LSB and succeeding output transitions occur every 1 LSB later up to full-scale. If used in this mode. ADC0809. the approximation technique is extended to 8 bits using the 256R network. The conversion is begun on the falling edge of the start conversion pulse. This makes the entire A/D converter extremely insensitive to temperature. n iterations are required for an n-bit converter. It is also the comparator drift which has the greatest influence on the repeatability of the device. 8 NSS COLLEGE OF ENGINEERING PALAKKAD IC DEPARTMENT . an external start conversion pulse should be applied after power up. The chopper-stabilized comparator converts the DC input signal into an AC signal. Figure 2 shows a typical example of a 3-bit converter. The A/D converter s successive approximation register (SAR) is reset on the positive edge of the start conversion (SC) pulse. This signal is then fed through a high gain AC amplifier and has the DC level restored. In the ADC0808. long term drift and input offset errors. A conversion in process will be interrupted receipt of a new start conversion pulse. The successive approximation register (SAR) performs 8 iterations to approximate the input voltage. A chopper-stabilized comparator provides the most effective method of satisfying all the converter requirements.

5V (LM336) voltage reference y On-chip clock generator y 0V to 5V analog input voltage range with single 5V y supply y No zero adjust required y 0. or operates stand alone y n Differential analog voltage inputs y n Logic inputs and outputs meet both MOS and TTL y voltage level specifications y Works with 2. In addition.3" standard width 20-pin DIP package y 20-pin molded chip carrier or small outline package y Operates ratiometrically or with 5 VDC. or y analog span adjusted voltage reference y Key Specifications y n Resolution 8 bits y n Total error ±1 4 LSB. ADC0804 and ADC0805 are CMOS 8-bit successive approximation A/D converters that use a differential potentiometric ladder similar to the 256R products. These converters are designed to allow operation with the NSC800 and INS8080A derivative control bus with TRI-STATE® output latches directly driving the data bus. ADC0803. Differential analog voltage inputs allow increasing the common-mode rejection and offsetting the analog zero input voltage value.5 VDC.Mini Project 2011 ADC 0804 General Description The ADC0801. the voltage reference input can be adjusted to allow encoding any smaller analog voltage span to the full 8 bits of resolution. ADC0802.135 ns n Easy interface to all microprocessors. These A/Ds appear like memory locations or I/O ports to the microprocessor and no interfacing logic is needed. 2. Features y n Compatible with 8080 P derivatives y no interfacing logic needed y access time . ±1 2 LSB and ±1 LSB 9 NSS COLLEGE OF ENGINEERING PALAKKAD IC DEPARTMENT .

Mini Project 2011 10 NSS COLLEGE OF ENGINEERING PALAKKAD IC DEPARTMENT .

Mini Project 2011 11 NSS COLLEGE OF ENGINEERING PALAKKAD IC DEPARTMENT .

Its two-op-amp design provides excellent performance with very low quiescent current.Mini Project 2011 Instrumentation Amplifier INA122 FEATURES y y y y y y y y y y y LOW QUIESCENT CURRENT: 60mA WIDE POWER SUPPLY RANGE Single Supply: 2.1V below negative rail (single supply ground). Both are specified for the 40°C to +85°C extended industrial temperature range. The INA122 can be operated with single power supplies from 2.2V to 36V Dual Supply: 0.2V to 36V and quiescent current is a mere 60mA. offset voltage drift (3mV/°C max) and excellent common-mode rejection. By utilizing an input level-shift network. 12 NSS COLLEGE OF ENGINEERING PALAKKAD IC DEPARTMENT . low noise differential signal acquisition.3V to ±18V COMMON-MODE RANGE TO (V ) 0.1V RAIL-TO-RAIL OUTPUT SWING LOW OFFSET VOLTAGE: 250mV max LOW OFFSET DRIFT: 3mV/°C max LOW NOISE: 60nV/ÖHz LOW INPUT BIAS CURRENT: 25nA max 8-PIN DIP AND SO-8 SURFACE-MOUNT DESCRIPTION The INA122 is a precision instrumentation amplifier for accurate. It can also be operated from dual supplies. Package options include 8pin plastic DIP and SO-8 surface-mount packages. and is ideal for portable instrumentation and data acquisition systems.9/+1. A single external resistor sets gain from 5V/V to 10000V/V. Laser trimming provides very low offset voltage (250mV max). input commonmode range extends to 0.

Mini Project 2011 13 NSS COLLEGE OF ENGINEERING PALAKKAD IC DEPARTMENT .

Mini Project 2011 14 NSS COLLEGE OF ENGINEERING PALAKKAD IC DEPARTMENT .

Mini Project 2011 CONTROLLER UNIT a. AT89S52 MICROCONTROLLER Features Compatible with MCS-51® Products 8K Bytes of In-System Programmable (ISP) Flash Memory Endurance: 1000 Write/Erase Cycles 4. By combining a versatile 8-bit CPU with insystem programmable Flash on a monolithic chip. the Atmel AT89S52 is a powerful microcontroller which provides a highly-flexible and cost-effective solution to many embedded control applications The AT89S52 provides the 15 NSS COLLEGE OF ENGINEERING PALAKKAD IC DEPARTMENT .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 Description The AT89S52 is a low-power. high-performance CMOS 8-bit microcontroller with 8K bytes of in-system programmable Flash memory.standard 80C51 instruction set and pinout. The device is manufactured using Atmel s high-density nonvolatile memory technology and is compatible with the industry. The on-chip Flash allows the program memory to be reprogrammed in-system or by a conventional nonvolatile memory programmer.0V to 5.

two data pointers. serial port. and clock circuitry. a full duplex serial port. PIN CONFIGARATIONS 16 NSS COLLEGE OF ENGINEERING PALAKKAD IC DEPARTMENT . a six-vector twolevel interrupt architecture.Mini Project 2011 following standard features: 8K bytes of Flash. the AT89S52 is designed with static logic for operation down to zero frequency and supports two software selectable power saving modes. three 16-bit timer/counters. timer/counters. on-chip oscillator. In addition. The Idle Mode stops the CPU while allowing the RAM. Watchdog timer. The Power-down mode saves the RAM contents but freezes the oscillator. and interrupt system to continue functioning. 256 bytes of RAM. disabling all other chip functions until the next interrupt or hardware reset. 32 I/O lines.

NSS COLLEGE OF ENGINEERING PALAKKAD IC DEPARTMENT 17 . Having detected the fault. Through the individual or relative changes in thse two quantities. fault signals presents type and location to the protective relay. the relay trip circuit which results in the opening of the circuit breaker and hence in the disconnection of the faulty line.Mini Project 2011 Relays Most of the relays used in the power system operate by the virtue of the current and / or voltage supplied by the current and the voltage transformer connected in various combinations to the system that is to be protected.

Such relays may be activated by DC or AC quantities. 1. Without reliability the protection would be rendered largely ineffective and could even become a liabilty. Electro-magnetic attraction. y Sensitivity: it is the ability of the relay system to operate with low value of actuating quantity. Electro-magnetic induction. y Reliabity: it ks the ability of the relay system under the pretermined conditions. Fundamental Requirements of Protective relay y Selectively: It is the ability of the protective system to select correctly that part of the system in trouble and disconnect the faulty part without disturbing the rest of the system. They work on the following two main operation principles. Principle Most of the realys in service on electrical power systemtoday use of electro-mechanical type. 18 NSS COLLEGE OF ENGINEERING PALAKKAD IC DEPARTMENT . since cost may depending on size and capability from about 10$ to 100$. Electro-magnetic attraction relay operate by virtue of an armature being attracted to the poles of an electro-magnet or a plunger being drawn into a solenoid. y Simplicity: the relaying system should be simple so that it can easily be maintained. y Economy: It is the most important factor.Mini Project 2011 1. 1. 2. 2. They are not used with the DC quantities owing to the principle of operation. 2. Electro-magnetic induction relays operate on the principle of induction motor and are widely used for protecting relay purpose involving AC quantities.

4. Current Setting: Its often desirable to adjust the pickup current to any required value. Pick Up Current: It is the minimum current in the relay coil at which the relay starts to operate. Static relays. Time setting dial is calibrated from 0 to 1 in steps of 0. Types of Relay 1. Electro thermal relays. 2. If the relay coil current is greater than the pickup current the relay operates to energise the trip coil which open the circuit breaker. This is known as current setting and usually achived by the use of tapings on the relay-operating coil. Ordinary electro-magnetic relays. Physico electrical relays. This is known as TSM. 19 NSS COLLEGE OF ENGINEERING PALAKKAD IC DEPARTMENT . 2. Electro magnetic induction or simply induction relays. 6.Mini Project 2011 3.05. 3. Time Setting Multiplier (TSM): Adjust the time of the operation. 5. Electro dynamic relays. So long as the current in the relay is less the relay does not operate and breaker controlled by it remains in the closed position. 3. 4. 4. Plug Setting Multiplier (PSM): It is the ratio of the fault current in relay coil to the pickup current PSM = Fault current in relay coil/ pickup current. Important Terms 1.

Backup protection: Second line of defence in case of failure of when backup relay functions.Mini Project 2011 5. Protection scheme divided into two classes. it must be cleared quickly in order to avoid damage and interference with rest of the system. Primary protection: To protect the component part of the power system it is called primary or main protection. a larger part is disconnected than when primary relaying functions correctly. Circuit Description and development 20 NSS COLLEGE OF ENGINEERING PALAKKAD IC DEPARTMENT .Types of Protection When fault occurs on any part of the electrical power system.

pdf 21 NSS COLLEGE OF ENGINEERING PALAKKAD IC DEPARTMENT .Mini Project 2011 MINI PROJECT-ACTUAL.

Mini Project 2011 SPECIFICATION SHEETS 22 NSS COLLEGE OF ENGINEERING PALAKKAD IC DEPARTMENT .

over the temperature range of 0 to 85°C.0 kPa (kiloPascal) equals 0. Accuracy (error budget) consists of the following: Linearity: Output deviation from a straight line relationship with pressure. 4. relative to 25°C. 8. over the temperature range of 40°C to +125°C. when this pressure is cycled to and from the minimum or maximum rated pressure. Operating the device above the specified excitation range may induce additional error due to device self heating. 3. at 25°C. TcOffset: Output deviation with minimum rated pressure applied. over the specified pressure range. using end point method. Offset (Voff) is defined as the output voltage at the minimum rated pressure. 6. TcSpan: Output deviation at full rated pressure over the temperature range of 0 to 85°C. with zero differential pressure applied. Temperature Hysteresis: Output deviation at any temperature within the operating temperature range. relative to 25°C. 1.Mini Project 2011 NOTES: 1. Exposure beyond these limits may cause permanent damage or degradation to the device. 7. Pressure Hysteresis: Output deviation at any pressure within the specified range. Device is ratiometric within this specified excitation range. Full Scale Span (VFSS) is defined as the algebraic difference between the output voltage at full rated pressure and the output voltage at the minimum rated pressure. Temperature Cycling with Bias Test 23 NSS COLLEGE OF ENGINEERING PALAKKAD IC DEPARTMENT . Response Time is defined as the time for the incremental change in the output to go from 10% to 90% of its final value when subjected to a specified step change in pressure. 5. 2. after the temperature is cycled to and from the minimum or maximum operating temperature points. relative to 25°C. TCR: Zin deviation with minimum rated pressure applied. 9. Common mode pressures beyond specified may result in leakage at the case to lead interface.145 psi. Offset stability is the product s output deviation when subjected to 1000 hours of Pulsed Pressure.

Mini Project 2011 0808 24 NSS COLLEGE OF ENGINEERING PALAKKAD IC DEPARTMENT .

Mini Project 2011 INA122 25 NSS COLLEGE OF ENGINEERING PALAKKAD IC DEPARTMENT .

Mini Project 2011 26 NSS COLLEGE OF ENGINEERING PALAKKAD IC DEPARTMENT .