water level controller using 8051

5
Water level controller using 8051. A water level controller using 8051 is shown in this article. A lot of water level controller projects have been published in this website but this is the first one based on a microcontroller. This water level controller monitors the level of the over head tank and automatically switches on the water pump when ever the level goes below a preset limit. The level of the over head tank is indicated using 5 LED’s and the pump is switched OFF when the over head tank is full. The pump is not allowed to start if the water level in the sump tank is low and also the pump is switched OFF when the level inside the sump tank goes low during a pumping cycle. Note:- We are selling a Project Kit for this Water Level Controller which can be bought from our Online Store . The project kit is a modified version of the project shown above. This Water Level Controller project kit uses 4 float switches to measure water level. The status of water level in the tank and status of the motor is displayed using an LCD module. This system monitors the water level of the tank and automatically switches ON the motor whenever tank is empty. The motor is switched OFF when the overhead tank or container is FULL. The use of float switches makes the circuit rugged and ensures a maintenance free operation over a very long period of time.The project kit is available in plug and play form and do it yourself form. A 12-0-12 mains transformer is also available with the kit and it is not shown in

Upload: zarashah

Post on 14-Nov-2015

16 views

Category:

Documents


2 download

DESCRIPTION

water level controller using 8051 is a project for students of Electrical engineering. It guides the students in 4th semester. It contains description, preview, components , schematic diagrams , and the code. As it contains source code hence students will not suffer any difficulty in this project. They just have to burn the microcontroller .

TRANSCRIPT

Water level controller using 8051.A water level controller using 8051 is shown in this article. A lot of water level controller projects have been published in this website but this is the first one based on a microcontroller. This water level controller monitors the level of the over head tank and automatically switches on the water pump when ever the level goes below a preset limit. The level of the over head tank is indicated using 5 LEDs and the pump is switched OFF when the over head tank is full. The pump is not allowed to start if the water level in the sump tank is low and also the pump is switched OFF when the level inside the sump tank goes low during a pumping cycle.Note:- We are selling a Project Kit for this Water Level Controller which can be bought from our Online Store. The project kit is a modified version of the project shown above. This Water Level Controller project kit uses 4 float switches to measure water level. The status of water level in the tank and status of the motor is displayed using an LCD module. This system monitors the water level of the tank and automatically switches ON the motor whenever tank is empty. The motor is switched OFF when the overhead tank or container is FULL.The use of float switches makes the circuit rugged and ensures a maintenance free operation over a very long period of time.The project kit is available in plug and play form and do it yourself form. A 12-0-12 mains transformer is also available with the kit and it is not shown in the figure below. Discriptio of this kit or overview (This system monitors the water level of the tank and automatically switches ON the motor whenever tank is empty. The motor is switched OFF when the overhead tank or container is FULL. Here the water level of the tank is indicated on LCD (Liquid crystal Display). Using this system, we can avoid the overflow of the water.)

The intention of this project is to detect and control the water level in an overhead tank or any other container. This system monitors the water level of the tank and automatically switches ON the motor whenever tank is empty. The motor is switched OFF when the overhead tank or container is FULL. Here the water level of the tank is indicated on LCD (Liquid crystal Display). Using this system, we can avoid the overflow of the water. The water level is measured by placing float switches at different levels of the tank. The output of each switch is connected to the input port of microcontroller. The controller will check the status of float switches and displays appropriate messages on the LCD module. There are four float switches, that is, five levels are possible. Float switches are a kind of magnetic switches that makes a contact when its ring is floating. When it fixed in a tank the body becomes stationary but the ring can move if some force applied. So when water comes over it due to the force the ring goes upward and makes contact. Thus the microcontroller pin get grounded. The five levels are empty, low, medium, high, full. When tank is empty the motors turns on through onboard relay and when the tank get full it turns off. Main article continues.The level sensor probes for the overhead tank are interfaced to the port 2 of the microcontroller through transistors. Have a look at the sensor probe arrangement for the overhead tank in Fig1. A positive voltage supply probe goes to the down bottom of the tank. The probes for sensing 1/4, 1/2, 3/4 and FULL levels are placed with equal spacing one by one above the bottom positive probe. Consider the topmost (full level) probe, its other end is connected to the base of transistor Q4 through resistor R16. Whenever water rises to the full level current flows into the base of transistor Q4 which makes it ON and so its collector voltage goes low. The collector of Q4 is connected to P2.4 and a low voltage at P2.4 means the over head tank is not FULL. When water level goes below the full level probe, the base of Q2 becomes open making it OFF. Now its collector voltage goes high and high at P2.4 means the tank is not full. The same applies to other sensor probes (3/4, 1/2, 1/4) and the microprocessor understands the current level by scanning the port pins P2.4 ,P2.5, P2.6 and P2.7. All these port pin are high (all sensor probes are open) means the tank is empty.Port pin P0.5 is used to control the pump. When ever it is required start pumping, the controller makes P0.5 low which makes transistor Q6 ON which in turn activates the relay K1 that switches the pump. Also the LED d6 glows indicating the motor is ON. LED D7 is the low sump indicator. When the water level in the sump tank goes low, the controller makes P0.7 low which makes LED D7 to glow. The circuit diagram of the water level controller is shown in the figure below.Circuit diagram:

Program.MOV P2,#11111111B // initiates P2 as sensor inputMOV P0,#11111111B // initiates P2 as the output portMOV A,#00000000BMAIN:ACALL SMPCK // checks the level of the sump tankMOV A,P2 // moves the current status of P2 to ACJNE A,#11110000B,LABEL1 // checks whether tank is fullSETB P0.1SETB P0.2SETB P0.3SETB P0.4CLR P0.0 // glows full level LEDSETB P0.5LABEL1:MOV A,P2CJNE A,#11111000B,LABEL2 // checks whether tank is 3/4SETB P0.0SETB P0.2SETB P0.3SETB P0.4CLR P0.1 // glows 3/4 level LEDLABEL2:MOV A,P2CJNE A,#11111100B,LABEL3 // checks whether tank is 1/2SETB P0.0SETB P0.1SETB P0.3SETB P0.4CLR P0.2 // glows 1/2 level LEDLABEL3:MOV A,P2CJNE A,#11111110B,LABEL4 // checks whether tank is 1/4SETB P0.0SETB P0.1SETB P0.2SETB P0.4CLR P0.3 // glows 1/4 level LEDJB P0.6,LABEL4CLR P0.5 // switches motor ONLABEL4:MOV A,P2CJNE A,#11111111B,MAIN // checks whether tank is emptySETB P0.0SETB P0.1SETB P0.2SETB P0.3CLR P0.4 // glows EMPTY LEDJB P0.6,MAIN // checks whether sump is lowCLR P0.5 // switches motor ONSJMP MAINSMPCK:JB P0.6,LABEL5 // checks whether sump is lowSETB P0.7 // extinguishes the sump low indicator LEDSJMP LABEL6LABEL5:SETB P0.5 // switches the pump OFFCLR P0.7 // glows sump low indicator LEDLABEL6:RETEND