* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download Automatic Submersible Pump OFF with LCD Display Voltage and
Radio transmitter design wikipedia , lookup
Regenerative circuit wikipedia , lookup
Electronic paper wikipedia , lookup
Integrated circuit wikipedia , lookup
Oscilloscope history wikipedia , lookup
Analog-to-digital converter wikipedia , lookup
Integrating ADC wikipedia , lookup
Valve RF amplifier wikipedia , lookup
Transistor–transistor logic wikipedia , lookup
Index of electronics articles wikipedia , lookup
Current source wikipedia , lookup
Operational amplifier wikipedia , lookup
Resistive opto-isolator wikipedia , lookup
Schmitt trigger wikipedia , lookup
Immunity-aware programming wikipedia , lookup
Voltage regulator wikipedia , lookup
Surge protector wikipedia , lookup
Power MOSFET wikipedia , lookup
Power electronics wikipedia , lookup
Network analysis (electrical circuits) wikipedia , lookup
Current mirror wikipedia , lookup
LCD television wikipedia , lookup
Switched-mode power supply wikipedia , lookup
Rectiverter wikipedia , lookup
AITS DS - Rajkot “Transforming Live, Inventing Future” A Project Report On Automatic Submersible Pump OFF with LCD Display Voltage and Current Using Microcontroller By 1. Mayank R. Kamani (106030311085) 2. Maulik D. Panchani (106030311097) 3. Ghanshayam N. Umretiya (106030311098) DEPARTMENT OF ELECTRONICS & COMMUNICATION ENGINEERING ATMIYA INSTITUTE OF TECHNOLOGY AND SCIENCE FOR DIPLOMA STUDIES, RAJKOT- 360005. [2012 – 2013] A Project Report On Page No. .1 AITS DS - Rajkot Automatic Submersible Pump OFF with LCD Display Voltage and Current Using Microcontroller Diploma of Engineering In EC Engineering Submitted By: 1.Mayank Kamani - 106030311085 Under the Guidance of Mr. M.C.PATEL 2. Maulik Panchani - 106030311097 3.Ghanshyam Umaretiya - 106030311098 DEPARTMENT OF ELECTRONICS & COMMUNICATION ENGINEERING ATMIYA INSTITUTE OF TECHNOLOGY AND SCIENCE FOR DIPLOMA STUDIES, RAJKOT- 360005. [2012 – 2013] CERTIFICATE This is to certify that the project entitled “AUTOMATIC SUBMARSIBLE PUMP OFF WITH LCD DISPLAY VOLTAGE AND CURRENT USING MICROCONTOLLER” has been carried out by the team under my guidance in partial fulfillment of the Diploma of Engineering in Electronics & Communication in GTU during the academic year 2012-2013 (Semester-5). Team: 1. Maulik D. Panchani 2. Mayank R. Kamani 3. Ghanshayam N. Umretiya Page No. .2 AITS DS - Rajkot Date: Place: RO-TEC Pumps PVT. LTD.-Rajkot Guide (Mr. M.C.PATEL) Principal (Mr. G.C.JOSHI) Head, EC Department (Mr. D.M.JETHLOJA) External Guide (Mr. RAKESH PATEL) Page No. .3 AITS DS - Rajkot ACKNOWLEDGEMENT I greatly thank my faculty guide of the college Mr. Mayur Patel. I m also thankful to my external guide and chair person of the industry I visited Mr. Rakesh Patel is a very genuine person and gave me training giving time from his busy schedule. Lastly I heartily thank all my friends and parents who guided and Motivated me to complete my project successfully. Maulik D. Panchani Mayank R. Kamani Ghanshayam N. Umretiya Page No. .4 AITS DS - Rajkot INDEX Abstract ........................................................................................................................................................ I List Of Figures.............................................................................................................................................. II (1) Introduction .......................................................................................................................................... 1 1.1 Industry Visited ................................................................................................................................. 1 1.2 Analysis ......................................................................................................................................... 2 (2) Project Plan ........................................................................................................................................... 3 2.1 To Detect The Problem In pump Motor ............................................................................................ 3 2.2 OFF the Motor through Relay ...................................................................................................... 3 (3) Feasibility .............................................................................................................................................. 4 3.1 Financial feasibility ........................................................................................................................... 4 3.2 resource feasibility ...................................................................................................................... 4 3.3 Technical feasibility ................................................................................................................. 5 (4) Block Diagram Of Project & circuit details & Component Description ............................................... 6 4.1 Description Of Block Diagram ........................................................................................................... 7 4.2 Hardware Description ................................................................................................................... 8 4.2.1 Register…………………………………………………………………………………………… …………………………………………..8 4.2.2 Capacitor………………………………………………………………………………………… …………………………………………10 4.2.3 Transistor …………………………………………………………………………………………………… ……………………………..12 4.2.4 P89V51RD2……………………………………………………………………………………… …………………………………………14 4.2.5 IC7805…………………………………………………………………………………………… ………………………………………….17 4.2.7 ADC0808………………………………………………………………………………………… …………………………………………19 4.2.8 LCD……………………………………………………………………………………………… …………………………………………..22 4.2.9 Page No. .5 Relay……………………………………………………………………………………………… …………………………………………25 4.3.1 Circuit Diagram……………………………………………………………………………………..27 AITS DS - Rajkot (5) Software Implementation ................................................................................................ 36 5.1 Dip Trace ....................................................................................................................... 37 5.2 Layout Of Project ...................................................................................................... 38 (6) Programming .................................................................................................................... 39 (7) Advantages and Limitations ............................................................................................. 46 Advantages ......................................................................................................... 46 Limitations.......................................................................................................... 46 (8) Daily Schedule .................................................................................................................. 47 Conclusion ........................................................................................................ 47 Bibliography ...................................................................................................... 48 Page No. .6 AITS DS - Rajkot List of figure 1.1 RO –tech pumps PVT.LTD rajkot .................................................. 1 2.1 pumps motor .................................................................................... 3 4.0 block diagram of project ................................................................. 6 4.2.1 register ........................................................................................ 10 4.2.2 capacitor ..................................................................................... 1o 4.2.2.1 parallel plates of capacitor ...................................................... 12 4.2.3 transistor ..................................................................................... 14 4.2.3.1 transistor ............................................................................... 14 4.2.4.1 P89V59RD2 block diagram .................................................... 16 4.2.4.2 pin diagram P89V59RD2 ...................................................... 17 4.2.5 7805 ........................................................................................... 18 4.2.5.2 7805IC ..................................................................................... 18 4.2.7.1 block diagram of ADC ............................................................ 21 4.2.7.1 pin diagram of ADC ............................................................... 22 4.2.8.1 LCD ......................................................................................... 23 4.2.8.2 interfacing of LCD .................................................................. 24 4.2.9.1 relay interfacing ....................................................................... 25 4.3.1.1 circuit diagram ........................................................................ 27 4.3.1.2 LCD interfacing ...................................................................... 29 4.3.1.3 ADC interfacing ..................................................................... 31 4.3.1.4 relay ......................................................................................... 32 3.3.2.1 power supply ........................................................................... 33 4.3.2.2 Block Diagram Of 7805……………………………………………………………35 I Page No. .7 AITS DS - Rajkot ABSTRACT Using this circuit we can give the protection to the submersible pump’s. n this circuit we are using the microcontroller. It is used for the measurement of the water level in the tank. When the water level is decrease compare to the motor that time pump will be OFF and level of the water will be displayed on the given LCD. Due this all process using relay we can OFF the motor automatoically. II Page No. .8 AITS DS - Rajkot Chapter-1 Introdu ction 1. Introduction The project we have done is Automatic Submersible Pump OFF with LCD Display also Voltage & Current Using Micro Controller. This is an industrial Page No. .9 AITS DS - Rajkot defined project i.e. IDP. And the title is so given from the problem definition “In The Submersible’s Motor can damage due To HEAT”. We got the above mentioned problem definition from our industrial visit to Ro-Tech Pumps Pvt. Ltd. 1.1 Industry visited For the industrial defined project I visited Ro-Tech Pumps Pvt. Ltd. The industry is located in Rajkot. The best part of this industry is the Beautiful Environment and Friendly Atmosphere. The people working in this industry are very genuine and down to earth. They co-operated on my visit to this industry. And Helped in every possible manner. 1.1 Ro-Tech Pumps Pvt. Ltd. Rajkot 1.2 Analysis After visiting Ro-Tech Pumps Pvt. Ltd. and interacting with the industry persons I discovered following problems: The Motor Of The Pump Can Be Damage It Can Damages Due To Heat. Out of these problems the major problem according to my point of view is If we are not controlling the heat of the motor due this chances of the damages of motor is high. Page No. .10 AITS DS - Rajkot After detailed analysis of the problem on the damages of Motors Of The Pumps Chances on internet and reference books we decide to make our efforts to solve this problem if possible. Chapter 2 PROJECT PLAN 2. Project Plan :The problem can be solved if the water level is empty in the water source than using this circuit the pump’s motor is automatically OFF we can reduces the chances of damages. Due to this the motor is not damages. Page No. .11 AITS DS - Rajkot 2.1 To Detect The Problem In Pump Motor To detect the problem of the speed of motor this circuit we are used. Here available the photograph of the Pump Motor. 2.1 Pumps Motor 2.2 OFF The Motor through Relay We can OFF the PUMP MOTOR through the relay it is given on the main Circuit. Chapter 3 Feasibility 3.1 Financial feasibility:- Page No. .12 AITS DS - Rajkot The resources used in this project are quite feasible financially. Components list: Resisters Transistor Capacitor Switch IC Relay Crystal Oscillators LCD Display The list of components given above shows that all the components are cheap and feasible. The company will not have any problem in using this simple project circuit. 3.2 Resource feasibility:- All the resources used in this project are easily available. The P89V51RD2 used in this project. It is not difficult to find in the market. 3.3 Technical feasibility:- After I gave my idea to the industry person, the industry person told that my idea was quite feasible technically and promised to try it on his machines. Page No. .13 AITS DS - Rajkot Thus the project is feasible technically but cannot be used on motor directly because it needs some specifications and data of the motor to make the project fit for any type of motor. But the industry I visited didn’t share the data of the motors and kept them personal. They had some terms and conditions according to which I had to work. And they didn’t give any detailed specifications about his product and they even didn’t allow working on their motors. Chapter 4 Block Diagram of the Project & Circuit Details & Component Details 4.0. Block Diagram of the project:Page No. .14 AITS DS - Rajkot POWER SUPPLY +5 V D.C. REGULATOR POTENTIO METER 10K LCD DISPLAY CONTR OLLER RELAY 230 V A.C. SUPPLY ADC 0808 COMPARATOR CIRCUIT + 12 V A.C. SUPPLY MOTOR 4.0 Block Diagram 4.1 Description of Block Diagram :- Page No. .15 AITS DS - Rajkot Now in this method a linear resistive element is used as a linear devise to detect exact level of any fluid. In this method we need a linear resistive element and a floating wire which can slide across the resistive element according to the water level. One end of the resistive element is connected to the battery and the other end of the element is grounded. A floating element is there sliding across the resistive element according to the level of the water and according to the position of the sliding element on the length of the resistive element we got an exact voltage for every different position of the slider. This voltage is then converted to the appropriate water level using a ADC and a controller. Thus using very simple circuitry we can measure the water level as well as using a controller we can also maintain the level too. And using an LCD display we can display the water level on it and using a motor interface with the controller we can control the water level too. Using a wireless transmitter we can also transmit it to the other LCD display. 4.2 Component details:- List of components SR NO. Component NAME Quantity 1 Resister 1 2 IC 4 Page No. .16 AITS DS - Rajkot 3 Switch 6 4 Motor 2 5 Capacitor 3 6 Transistor 2 7 LCD Display 1 8 Crystal 1 9 Relay 1 4.1 List of components 4.2.1 Resistor A linear resistor is a linear, passive two-terminal electrical component that implements electrical resistance as a circuit element. The current through a resistor is in direct proportion to the voltage across the resistor's terminals. Thus, the ratio of the voltage applied across a resistor's terminals to the intensity of current through the circuit is called resistance. This relation is represented by Ohm's law: Resistors are common elements of electrical networks and electronic circuits and are ubiquitous in most electronic equipment. Practical resistors can be made of various compounds and films, as well as resistance wire (wire made of a high-resistivity alloy, such as nickel-chrome). Resistors are also implemented within integrated circuits, particularly analog devices, and can also be integrated into hybrid and printed circuits. Page No. .17 AITS DS - Rajkot The electrical functionality of a resistor is specified by its resistance: common commercial resistors are manufactured over a range of more than nine orders of magnitude. When specifying that resistance in an electronic design, the required precision of the resistance may require attention to the manufacturing tolerance of the chosen resistor, according to its specific application. The temperature coefficient of the resistance may also be of concern in some precision applications. Practical resistors are also specified as having a maximum power rating which must exceed the anticipated power dissipation of that resistor in a particular circuit: this is mainly of concern in power electronics applications. Resistors with higher power ratings are physically larger and may require heat sinks. In a high-voltage circuit, attention must sometimes be paid to the rated maximum working voltage of the resistor. Practical resistors have a series inductance and a small parallel capacitance; these specifications can be important in high-frequency applications. In a low-noise amplifier or pre-amp, the noise characteristics of a resistor may be an issue. The unwanted inductance, excess noise, and temperature coefficient are mainly dependent on the technology used in manufacturing the resistor. They are not normally specified individually for a particular family of resistors manufactured using a particular technology. A family of discrete resistors is also characterized according to its form factor, that is, the size of the device and the position of its leads (or terminals) which is relevant in the practical manufacturing of circuits using them. Page No. .18 AITS DS - Rajkot 4.2.1 Resistors 4.2.2 Capacitor 4.1.2 Capacitor A capacitor (formerly known as condenser) is a passive two-terminal electrical component used to store energy in an electric field. The forms of practical capacitors vary widely, but all contain at least two electrical conductors separated by a dielectric (insulator); for example, one common construction consists of metal foils separated by a thin layer of insulating film. Capacitors are widely used as parts of electrical circuits in many common electrical devices. When there is a potential difference (voltage) across the conductors, a static electric field develops across the dielectric, causing positive charge to collect on one plate and negative charge on the other plate. Energy is stored in the electrostatic field. An ideal capacitor is characterized by a single constant value, capacitance, measured in farads. This is the ratio of the electric charge on each conductor to the potential difference between them. The capacitance is greatest when there is a narrow separation between Page No. .19 AITS DS - Rajkot large areas of conductor; hence capacitor conductors are often called "plates," referring to an early means of construction. In practice, the dielectric between the plates passes a small amount of leakage current and also has an electric field strength limit, resulting in a breakdown voltage, while the conductors and leads introduce an undesired inductance and resistance. Capacitors are widely used in electronic circuits for blocking direct current while allowing alternating current to pass, in filter networks, for smoothing the output of power supplies, in the resonant circuits that tune radios to particular frequencies and for many other purposes. The simplest capacitor consists of two parallel conductive plates separated by a dielectric with permittivity ε (such as air). The model may also be used to make qualitative predictions for other device geometries. The plates are considered to extend uniformly over an area A and a charge density ±ρ = ±Q/A exists on their surface. Assuming that the width of the plates is much greater than their separation d, the electric field near the centre of the device will be uniform with the magnitude E = ρ/ε. The voltage is defined as the line integral of the electric field between the plates. Solving this for C = Q/V reveals that capacitance increases with area and decreases with separation . The capacitance is therefore greatest in devices made from materials with a high permittivity, large plate area, and small distance between plates. We see that the maximum energy is a function of dielectric volume, permittivity, and dielectric strength per distance. So increasing the plate area while decreasing the separation between the plates while maintaining the same volume has no change on the amount of energy the capacitor can store. Care must be taken when increasing the plate separation so that the above assumption Page No. .20 AITS DS - Rajkot of the distance between plates being much smaller than the area of the plates is still valid for these equations to be accurate. 4.1.2.1 parallel plates of capacitor 4.2.3 Transistor A transistor is a semiconductor device used to amplify and switch electronic signals and power. It is composed of a semiconductor material with at least three terminals for connection to an external circuit. A voltage or current applied to one pair of the transistor's terminals changes the current flowing through another pair of terminals. Because the controlled (output) power can be much more than the controlling (input) power, a transistor can amplify a signal. Today, some transistors are packaged individually, but many more are found embedded in integrated circuits. The transistor is the fundamental building block of modern electronic devices, and is ubiquitous in modern electronic systems. Following its release in the early 1950s the transistor revolutionized the field of electronics, and paved the way for smaller and cheaper radios, calculators, and computers, among other things. Page No. .21 AITS DS - Rajkot The essential usefulness of a transistor comes from its ability to use a small signal applied between one pair of its terminals to control a much larger signal at another pair of terminals. This property is called gain. A transistor can control its output in proportion to the input signal; that is, it can act as an amplifier. Alternatively, the transistor can be used to turn current on or off in a circuit as an electrically controlled switch, where the amount of current is determined by other circuit elements. There are two types of transistors, which have slight differences in how they are used in a circuit. A bipolar transistor has terminals labeled base, collector, and emitter. A small current at the base terminal (that is, flowing from the base to the emitter) can control or switch a much larger current between the collector and emitter terminals. For a field-effect transistor, the terminals are labeled gate, source, and drain, and a voltage at the gate can control a current between source and drain. The image to the right represents a typical bipolar transistor in a circuit. Charge will flow between emitter and collector terminals depending on the current in the base. Since internally the base and emitter connections behave like a semiconductor diode, a voltage drop develops between base and emitter while the base current exists. The amount of this voltage depends on the material the transistor is made from, and is referred to as VBE. Page No. .22 AITS DS - Rajkot 4.2.3 Transistor 4.2.3.1 Transistor 4.2.4 P89V51RD2 The AT89S52 is a low-power, high-performance CMOS 8-bit microcontroller with 8K bytes of in-system programmable Flash memory. The device is manufactured using Atmel’s high-density non-volatile memory technology and is compatible with the industrystandard 80C51 instruction set and pin out. The on-chip Flash allows the program memory to be reprogrammed in-system or by a conventional non-volatile memory programmer. By combining a versatile 8-bit CPU with in-system programmable Flash on a monolithic chip, the Atmel AT89S52 is a powerful microcontroller which provides a highly-flexible and costeffective solution to many embedded control applications. The AT89S52 provides the following standard features: 8K bytes of Flash, 256 bytes of RAM, 32 I/O lines, Watchdog timer, two data pointers, three 16-bit timer/counters, a sixPage No. .23 AITS DS - Rajkot vector two-level interrupt architecture, a full duplex serial port, on-chip oscillator, and clock circuitry. In addition, the AT89S52 is designed with static logic for operation down to zero frequency and supports two software selectable power saving modes. The Idle Mode stops the CPU while allowing the RAM, timer/counters, serial port, and interrupt system to continue functioning. The Power-down mode saves the RAM contents but freezes the oscillator, disabling all other chip functions until the next interrupt or hardware reset. Features 1. Compatible with MCS-51® Products 2. 8K Bytes of In-System Programmable (ISP) Flash Memory 3. 4.0V to 5.5V Operating Range 4. Fully Static Operation: 0 Hz to 33 MHz 5. Three-level Program Memory Lock 6. 256 x 8-bit Internal RAM 7. 32 Programmable I/O Lines 8. Three 16-bit Timer/Counters 9. Eight Interrupt Sources 10. Full Duplex UART Serial Channel 11. Low-power Idle and Power-down Modes 12. Interrupt Recovery from Power-down Mode 13. Watchdog Timer 14. Dual Data Pointer 15. Power-off Flag Page No. .24 AITS DS - Rajkot Fig 1.7 BLOCK DIA OF 89S52 Page No. .25 AITS DS - Rajkot Pin out of 89S52 controller Fig 1.8 PIN-OUT OF 89S52 4.2.5 IC 7805:This IC is used for voltage regulator. Page No. .26 AITS DS - Rajkot 4.22.5 IC7805 4.2.5.2 IC 7805 Voltage Regulator IC It is a member of 78xx series of fixed linear voltage regulator ICs. The voltage source in a circuit may have fluctuations and would not give the fixed voltage output. The voltage regulator IC maintains the output voltage at a constant value. The xx in 78xx indicates the fixed output voltage it is designed to provide. 7805 provides +5V regulated power supply. Capacitors of suitable values can be connected at input and output pins depending upon the respective voltage levels. Page No. .27 AITS DS - Rajkot Pin Functions Of Voltage Regulator IC Pin No Function Name 1 Input voltage (5V-18V) Input 2 Ground (0V) Ground 3 Regulated output; 5V (4.8V-5.2V) Output 4.2.6 Photo Coupler PC817:- 4.2.7 ADC 0808:General Description The ADC0808, ADC0809 data acquisition component is a monolithic CMOS device with an 8-bit analog-to-digital converter, 8-channel multiplexer and microprocessor compatible control logic. The 8-bit A/D converter uses successive approximation as the conversion technique. The converter features a high impedance chopper stabilized comparator, a 256R voltage divider with analog switch tree and a successive approximation register. The 8-channel multiplexer can directly access any of 8-single-ended analog signals. The device eliminates the need for external zero and full-scale adjustments. Easy interfacing to microprocessors is provided by the latched and decoded multiplexer address inputs and latched TTL TRI-STATE outputs. The design of the ADC0808, ADC0809 has been optimized by incorporating the most desirable aspects of several A/D conversion techniques. The ADC0808, ADC0809 offers high speed, high accuracy, minimal temperature dependence, excellent long-term accuracy and repeatability, and consumes minimal power. These features make this device ideally suited to applications from process and machine control to consumer and automotive applications. For 16-channel multiplexer with common output. Page No. .28 AITS DS - Rajkot Features 1. Easy interface to all microprocessors 2. Operates ratio metrically or with 5 VDC or analog span adjusted voltage reference 3. No zero or full-scale adjust required 4. 8-channel multiplexer with address logic 5. 0V to VCC input range 6. Outputs meet TTL voltage level specifications Key Specifications 1. Resolution 8 Bits 2. Total Unadjusted Error ±½ LSB and ±1 LSB 3. Single Supply 5 VDC 4. Low Power 15 mW 5. Conversion Time 100 μs Page No. .29 AITS DS - Rajkot Fig 4.1.7.1 BLOCK DIA OF ADC 0808 Page No. .30 AITS DS - Rajkot FIG. 4.1.7.2 PIN-OUT OF 0808 4.2.8. LCD Display:A liquid crystal display (LCD) is a flat panel display, electronic visual display, or video that uses the light modulating properties of liquid crystals (LCs). LCs do not emit light directly. LCDs are used in a wide range of applications, including monitors, television, instrument panels, aircraft cockpit displays, signage, etc. They are common in consumer devices such as video players, gaming devices, clocks, watches, calculators, and telephones. LCDs have replaced cathode ray tube(CRT) displays in most applications. They are available in a wider range of screen sizes than CRT and plasma displays, and since they do not use phosphors, they cannot suffer image burn-in. LCDs are, however, susceptible to image. Page No. .31 AITS DS - Rajkot TWISTED PNEUMATIC (TN) Twisted pneumatic displays contain liquid crystals that twist and untwist at varying degrees to allow light to pass through. When no voltage is applied to a TN liquid crystal cell, polarized light passes through the 90-degrees twisted LC layer. In proportion to the voltage applied, the liquid crystals untwist changing the polarization and blocking the light's path. By properly adjusting the level of the voltage almost any grey level or transmission can be achieved. IN-PLANE SWITCHING (IPS) In-plane switching is an LCD technology that aligns the liquid crystals in a plane parallel to the glass substrates. In this method, the electrical field is applied through opposite electrodes on the same glass substrate, so that the liquid crystals can be reoriented (switched) in the same plane. This requires two transistors for each pixel instead of the single transistor needed for a standard thin-film transistor (TFT) display. Fig 1.9 A GENERAL PURPOSE ALPHANUMERIC LCD, WITH 16x2 CHARACTERS Page No. .32 AITS DS - Rajkot Fig 1.10 INTERFACING OF LCD TO CONTROLLER Pin Details: RS P0.0 RW GND ENB P0.1 D0 Not Connect D1 Not Connect D2 Not Connect D3 Not Connect D4 P0.2 D5 P0.3 D6 P0.4 D7 P0.5 Page No. .33 AITS DS - Rajkot 4.2.9. relay:RELAY • A relay is an electrically operated switch. • Relays are used where it is necessary to control a circuit by a low-power signal (with complete electrical isolation between control and controlled circuits), or where several circuits must be controlled by one signal. • Relays use an electromagnet to operate a switching mechanism mechanically. Fig 1.15 RELAY CONFIGURATION Page No. .34 AITS DS - Rajkot • Normally-open (NO) contacts connect the circuit when the relay is activated; the circuit is disconnected when the relay is inactive. It is also called a Form A contact or "make" contact. NO contacts can also be distinguished as "early-make" or NOEM, which means that the contacts will close before the button or switch is fully engaged. • Normally-closed (NC) contacts disconnect the circuit when the relay is activated; the circuit is connected when the relay is inactive. It is also called a Form B contact or "break" contact. NC contacts can also be distinguished as "late-break" or NCLB, which means that the contacts will stay closed until the button or switch is fully disengaged. • Change-over (CO), or double-throw (DT), contacts control two circuits: one normally-open contact and one normally-closed contact with a common terminal. It is also called a Form C contact or "transfer" contact ("break before make"). If this type of contact utilizes a "make before break" functionality, then it is called a Form D contact APPLICATION OF RELAY • Control a high-voltage circuit with a low-voltage signal, as in some types of modems or audio amplifiers, • Control a high-current circuit with a low-current signal, as in the starter solenoid of an automobile, • Isolate the controlling circuit from the controlled circuit when the two are at different potentials, for example when controlling a mains-powered device from a low-voltage switch. The latter is often applied to conserve energy. Page No. .35 AITS DS - Rajkot 4.2 Circuit details 4.3.1 Circuit diagram The circuit diagram that I used in this project is given below with the values of each component. 4.2.1 Circuit diagram of A.C. & D.C. Motor 4.3.2 Description of the circuit A liquid crystal display (LCD) is a flat panel display, electronic visual display, or video that uses the light modulating properties of liquid crystals (LCs). LCs do not emit light directly. LCDs are used in a wide range of applications, including monitors, television, instrument panels, aircraft cockpit displays, signage, etc. They are common in consumer devices such as video players, gaming devices, clocks, watches, calculators, and telephones. LCDs have replaced cathode ray tube(CRT) displays in most applications. They are available in a wider range of screen sizes than CRT and plasma displays, and since they do not use phosphors, they cannot suffer image burn-in. LCDs are, however, susceptible to image. Page No. .36 AITS DS - Rajkot TWISTED PNEUMATIC (TN) Twisted pneumatic displays contain liquid crystals that twist and untwist at varying degrees to allow light to pass through. When no voltage is applied to a TN liquid crystal cell, polarized light passes through the 90-degrees twisted LC layer. In proportion to the voltage applied, the liquid crystals untwist changing the polarization and blocking the light's path. By properly adjusting the level of the voltage almost any grey level or transmission can be achieved. IN-PLANE SWITCHING (IPS) In-plane switching is an LCD technology that aligns the liquid crystals in a plane parallel to the glass substrates. In this method, the electrical field is applied through opposite electrodes on the same glass substrate, so that the liquid crystals can be reoriented (switched) in the same plane. This requires two transistors for each pixel instead of the single transistor needed for a standard thin-film transistor (TFT) display. Fig 1.9 A GENERAL PURPOSE ALPHANUMERIC LCD, WITH 16x2 CHARACTERS Page No. .37 AITS DS - Rajkot Fig 1.10 INTERFACING OF LCD TO CONTROLLER Pin Details: RS P0.0 RW GND ENB P0.1 D0 Not Connect D1 Not Connect D2 Not Connect D3 Not Connect D4 P0.2 D5 P0.3 D6 P0.4 D7 P0.5 Page No. .38 AITS DS - Rajkot The Conversion The heart of this single chip data acquisition system is its 8-bit analog-to-digital converter. The converter is designed togive fast, accurate, and repeatable conversions over a wide range of temperatures. The converter is partitioned into 3 major sections: the 256R ladder network, the successive approximation register, and the comparator. The converter's digital outputs are positive true. The 256R ladder network approach (Figure 1) was chosen over the conventional R/2R ladder because of its inherent monotonicity, which guarantees no missing digital codes. Môn tonicity is particularly important in closed loop feedback control systems. A non-monotonic relationship can cause oscillations that will be catastrophic for the system. Additionally, the 256R network does not cause load variations on the reference voltage. 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 difference in these resistors causes the output characteristic to be symmetrical with the zero and full-scale points of the transfer curve. The first output transition occurs when the analog signal has reached +½ LSB and succeeding output transitions occur every 1 LSB later up to full-scale. The successive approximation register (SAR) performs 8 iterations to approximate the input voltage. For any SAR type converter, n-iterations are required for an n-bit converter. Figure 2 shows a typical example of a 3-bit converter. In the ADC0808, ADC0809, the approximation technique is extended to 8 bits using the 256R network. The A/D converter's successive approximation register (SAR) is reset on the positive edge of the start conversion start pulse. The conversion is begun on the falling edge of the start conversion pulse. A conversion in process will be interrupted by receipt of a new start conversion pulse. Continuous conversion may be accomplished by tying the end-ofconversion (EOC) output to the SC input. If used in this mode, an external Start conversion pulse should be applied after power up. End of- conversion will go low between 0 and 8 clock pulses after the rising edge of start conversion. 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. It is also the comparator drift which has the greatest influence on the repeatability of the device. Page No. .39 AITS DS - Rajkot A chopper-stabilized comparator provides the most effective method of satisfying all the converter requirements. The chopper-stabilized comparator converts the DC input signal into an AC signal. This signal is then fed through a high gain AC amplifier and has the DC level restored. This technique limits the drift component of the amplifier since the drift is a DC component which is not passed by the AC amplifier. This makes the entire A/D converter extremely insensitive to temperature, long term drift and input offset errors. Fig 1.13 CONNECTION DIAGRAM OF 0808 TO CONTROLLER Page No. .40 AITS DS - Rajkot Relay:• Normally-open (NO) contacts connect the circuit when the relay is activated; the circuit is disconnected when the relay is inactive. It is also called a Form A contact or "make" contact. NO contacts can also be distinguished as "early-make" or NOEM, which means that the contacts will close before the button or switch is fully engaged. • Normally-closed (NC) contacts disconnect the circuit when the relay is activated; the circuit is connected when the relay is inactive. It is also called a Form B contact or "break" contact. NC contacts can also be distinguished as "late-break" or NCLB, which means that the contacts will stay closed until the button or switch is fully disengaged. • Change-over (CO), or double-throw (DT), contacts control two circuits: one normally-open contact and one normally-closed contact with a common terminal. It is also called a Form C contact or "transfer" contact ("break before make"). If this type of contact utilizes a "make before break" functionality, then it is called a Form D contact Interfacing of relay with microcontroller Page No. .41 AITS DS - Rajkot POWER SUPPLY Fig 1.17 Power supply block diagram Transformer This article is about the electrical device. For the toy line franchise, see Transformers. For other uses, see Transformer (disambiguation).Pole-mounted distribution transformer with center-tapped secondary winding. This type of transformer is commonly used in the United States to provide 120/240 volt "split-phase" power for residential and light commercial use. Note that the center "neutral" terminal is grounded to the transformer "tank", and a grounded conductor (right) is used for one leg of the primary feeder. A transformer is a device that transfers electrical energy from one circuit to another through inductively coupled conductors—the transformer's coils. A varying current in the first or primary winding creates a varying magnetic flux in the transformer's core and thus a varying magnetic field through the secondary winding. This varying magnetic field induces a varying electromotive force (EMF), or "voltage", in the secondary winding. This effect is called inductive coupling. Page No. .42 AITS DS - Rajkot If a load is connected to the secondary, current will flow in the secondary winding, and electrical energy will be transferred from the primary circuit through the transformer to the load. In an ideal transformer, the induced voltage in the secondary winding (Vs) is in proportion to the primary voltage (Vp) and is given by the ratio of the number of turns in the secondary (Ns) to the number of turns in the primary (Np) as follows: By appropriate selection of the ratio of turns, a transformer thus enables an alternating current (AC) voltage to be "stepped up" by making Ns greater than Np, or "stepped down" by making Ns less than Np. In the vast majority of transformers, the windings are coils wound around a ferromagnetic core, air-core transformers being a notable exception. Transformers range in size from a thumbnail-sized coupling transformer hidden inside a stage microphone to huge units weighing hundreds of tons used to interconnect portions of power grids. All operate on the same basic principles, although the range of designs is wide. While new technologies have eliminated the need for transformers in some electronic circuits, transformers are still found in nearly all electronic devices designed for household ("mains") voltage. Transformers are essential for high-voltage electric power transmission, which makes long-distance transmission economically practical. LM785 (POWER SUPPLY REGULATOR) The LM78XX series of three terminal positive regulators are available in the TO-220 package and with several fixed output voltages, making them useful in a wide range of applications. Each type employs internal current limiting, thermal shut down and safe operating area protection, making it essentially indestructible. If adequate heat sinking is provided, they can deliver over 1A output current. Although designed primarily as fixed voltage regulators, these devices can be used with external components to obtain adjustable voltages and currents Page No. .43 AITS DS - Rajkot Fig 1.18 BLOCK DIAGRAM OF 7805 Fig 1.19 CONNECTION DIAGRAM 7805 Page No. .44 AITS DS - Rajkot Chapter 5 Software Implementation 5.1 Software Design I found my dew sensor circuit and heater circuit from the internet as I said in the above chapter. I have made my complete project on a special purpose PCB. I prepared the layout of both of these circuits using dip trace software. I learned dip trace software in my college. Then I installed the software from the internet and started working on it. Given below is he detailed description on dip trace software. 5.2 Dip trace Dip Trace is EDA software for creating schematic diagrams and printed circuit boards. The first version of Dip Trace was released in August, 2004. The latest version as of September 2011 is Dip Trace version 2.2. Interface has been translated to many languages and new language can be added by user. There are tutorials in English, Czech, Russian and Turkish. Starting from February 2011 Dip Trace is used as project publishing standard by Parallax. Modules Schematic Design Editor PCB Layout Editor Component Editor Pattern Editor Shape-Based Auto router 3D PCB Preview Page No. .45 AITS DS - Rajkot Freeware and Non-Profit versions A version of Dip Trace that is freely available with all the functionality of the full package except it is limited to 300 pins and 2 signal layers. Other sources Dip Trace at Seattle Robotics Society meeting Dip Trace at Nuts and Volts – October 2006 Review at C Net Some hobby and educational groups such as the PICAXE forum members have developed libraries specific to the PICAXE range of microcontroller as produced by Revolution Education including many of the frequently used associated integrated circuits. PICAXE related libraries can be found here: DIP TRACE Libraries by and for PICAXE microcontroller users External links Dip Trace official Website in English Dip Trace Website in Italian Dip Trace Website in Turkish Novara Ltd. Official Website in English 5.3 Layout Of The Project:The layout of the our circuit is shown in the below diagram. Page No. .46 AITS DS - Rajkot 5.3 Layout Of Circuit Soldering Side Page No. .47 AITS DS - Rajkot Chapter 7 Programming 7.1 Program #include <reg51.h> #include <stdio.h> // printf #include <string.h> #include <intrins.h> // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= // -=-=-=-=- Hardware Defines -=-=-=-=-=-=-= // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= #define DEVICE_ID 0xA0 #define LCD_DATA P0 sbit RS = P0^0; sbit ENB = P0^1; //--------------------------------#define ADC_DATA P2 sbit ALE=P3^3; //address latch enable sbit OE=P0^7; //output enable sbit SC=P3^4; //start conversion sbit EOC=P3^2; //end of conversion sbit CLK=P0^6; // clock sbit ADDR0=P3^7; //address Selection sbit ADDR1=P3^6; //address Selection sbit ADDR2=P3^5; //address Selection //--------------------------------sbit RELAY = P1^5; sbit sw=P1^6; sbit sw1=P1^7; //--------------------------------unsigned char i,j; unsigned char disp_buffer[34]; unsigned char Channel_raw_data[8]={0,0,0,0,0,0,0}; unsigned int WaterQuantity=0; unsigned char us_50000=0; unsigned char TempArray[8]={0,0,0,0,0,0,0}; //-----------------------------------------void Init_LCD(void); void data_lcd(unsigned char); void command_lcd(unsigned char); void disp_val(void); void delay(unsigned int); //-----------------------------------------unsigned char Convert_ADC0808(unsigned char); //-----------------------------------------void chartostr(unsigned int,unsigned char*,unsigned char); void opchar(unsigned char); Page No. .48 AITS DS - Rajkot // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= // -=-=-=-=- Main Program -=-=-=-=-=-=-= // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= void main(void) { SP = 0xA0; //============================================= RELAY = 0x01; //relay=0; IT0=IT1=1; EX0=EX1=1; EA=1; sw1=0; // IE = 0x95; //For Serial Communication -----------------------------SCON = 0x50; // 8-bit UART mode TMOD = 0x21; // timer 1 mode 2 auto reload TH1= 0xFD; // 9600 8-n-1 TR1 = 1; // run timer1 //============================================= EOC = 1; ALE = 0; SC = 0; OE = 0; ADC_DATA = 0xFF; // -=-=- Intialize variables -=-=-= Init_LCD(); // -=-=- Welcome LCD Message -=-=-= strcpy(&disp_buffer[0], " RF LEVEL "); strcpy(&disp_buffer[16]," CONTROLLER TX "); disp_val(); delay(60000); // -=-=- Program Loop -=-=-= while(1) { // Read ADC -----------------------------------Channel_raw_data[0]=Convert_ADC0808(0); WaterQuantity=(float)Channel_raw_data[0] * 3.92; //-------------------------------------------Channel_raw_data[1]=Convert_ADC0808(1); //-------------------------------------------Channel_raw_data[2]=Convert_ADC0808(2); //-------------------------------------------- Page No. .49 AITS DS - Rajkot strcpy(&disp_buffer[0],"TANK LEVEL= F"); change any types of fault name in apostropic strcpy(&disp_buffer[16]," CONTROLLER TX "); chartostr(WaterQuantity,&disp_buffer[11],3); //You can opchar(0xA1); opchar(disp_buffer[11]); opchar(disp_buffer[12]); opchar(disp_buffer[13]); delay(500); disp_val(); if(disp_buffer[11]>=0x35) { RELAY=0x01; } else { RELAY=0x00; } if(sw==0) { if(sw1==1) { strcpy(&disp_buffer[0], " VOLTAGE = V "); strcpy(&disp_buffer[16]," CURRENT = A "); disp_val(); delay(60000); delay(60000); } else { strcpy(&disp_buffer[0], " VOLTAGE = 000 V "); strcpy(&disp_buffer[16]," CURRENT = 00 A "); disp_val(); RELAY = 0X00; delay(60000); delay(60000); } } } } void opchar(unsigned char str) { SBUF = str; while(!TI); TI=0; Page No. .50 AITS DS - Rajkot delay(10); } void chartostr(unsigned int value,unsigned char *buffer,unsigned char bytes) { buffer+=(bytes-1); while(bytes) { *buffer = (value%10)+0x30; value/=10; buffer-bytes--; } } //******************************************************************************** ******************** // ADC0808 ROUTINS //******************************************************************************** ******************** unsigned char Arrange(unsigned char datum) { unsigned char final=0; if(datum & 0x01) final |= 0x01; if(datum & 0x02) final |= 0x02; if(datum & 0x04) final |= 0x04; if(datum & 0x08) final |= 0x10; if(datum & 0x10) final |= 0x20; if(datum & 0x20) final |= 0x40; if(datum & 0x40) final |= 0x08; if(datum & 0x80) final |= 0x80; return final; } unsigned char Convert_ADC0808(unsigned char Channel) { unsigned char temp=0; switch(Channel) { case 2: ADDR2 = 0; case 1: ADDR2 = 0; case 0: ADDR2 = 0; ADDR1 = 0; ADDR1 = 0; ADDR1 = 1; ADDR0 = 0; ADDR0 = 1; ADDR0 = 0; break; break; break; } delay(4); ALE = 1; SC = 1; Page No. .51 AITS DS - Rajkot ALE = 0; SC = 0; while(EOC); while(!EOC); OE = 1; temp = ADC_DATA; OE = 0; temp = Arrange(temp); return temp; } //******************************************************************************** ******************** // LCD ROUTINS //******************************************************************************** ******************** void delay(unsigned int cnt) { while(cnt--); } //--------------------------------------------------------------------------------------------------void command_lcd(unsigned char datum) { RS=0; LCD_DATA &= 0xC3; LCD_DATA |= ((datum >> 2) & 0x3C); ENB=1; ENB=0; LCD_DATA &= 0xC3; LCD_DATA |= ((datum << 2) & 0x3C); ENB=1; ENB=0; delay(200); } //--------------------------------------------------------------------------------------------------void data_lcd(unsigned char datum) { RS=1; LCD_DATA &= 0xC3; LCD_DATA |= (datum >> 2) & 0x3C; ENB=1; ENB=0; LCD_DATA &= 0xC3; LCD_DATA |= ((datum << 2) & 0x3C); ENB=1; Page No. .52 AITS DS - Rajkot ENB=0; delay(50); } //--------------------------------------------------------------------------------------------------void Init_LCD(void) { for(i=0;i<3;i++) { command_lcd(0x30); delay(300); } command_lcd(0x20); delay(300); command_lcd(0x28); command_lcd(0x0c); //display cntrl for display ON command_lcd(0x06); //entry mode for increment and no display shift command_lcd(0x01); //clear display delay(5000); } //--------------------------------------------------------------------------------------------------void disp_val(void) { command_lcd(0x02); for(j=0;j<32;j++) { if(j==16)command_lcd(0xC0); if((disp_buffer[j]<0x20)||(disp_buffer[j]>0x7a))disp_buffer[j]=0x20; data_lcd(disp_buffer[j]); } } Page No. .53 AITS DS - Rajkot Chapter 8 Advantages and Limitations 7.1 Advantages: By the use of this project there will be no risk of the damage of the pums motor. This project can also be used in pums. Motor. This project can directly used Farmer. No any Higher Cost is required. Easy to detect the water level. More power save.. 7.2 limitation: This project is used in only in water tank. It can not be used in borewell. Installation cost is very high. Page No. .54 AITS DS - Rajkot Chapter 9 Daily schedule MONTH WORK DONE July Made our visit to Ro-Tech Pumps. Found the problem in Speed Of The MOTORs. August Found the solution in the web sites and other reference book and decided to use Controller September Found block diagrams and start making circuits. October prepared layout, started mounting and fabricated device November Successfully completed the model and started preparing report November Completed the report and prepared the presentation 9.1 Time Table Schedule Per Month Page No. .55 AITS DS - Rajkot CONCLUSION Thus at last by using this project we can provide the safety to the submersible pump’s motor and we control the chances of the damage. Page No. .56 AITS DS - Rajkot BIBLIOGRAPHY Circuit reference taken from www.circuitstoday.com www.electronicsforu.com www.google.com Reference from www.alldatasheets.com Reference From www.wikipedia.com Reference from the book Page No. .57 AITS DS - Rajkot Page No. .58