Presentation is loading. Please wait.

Presentation is loading. Please wait.

WATER LEVEL controller using 8051

Similar presentations


Presentation on theme: "WATER LEVEL controller using 8051"— Presentation transcript:

1 WATER LEVEL controller using 8051
MADE BY MEHUL GIRNARI( ) MITAL VALA( )

2 Introduction From the last three days every time when I went to roof in the evening for fresh-air, I felt sorry to saw the overflowing water from the water-tanks of my neighbors. All of them switched off their Motor-Pumps but after the overflowing of water from the tank. I realized this is the total wastage of water and there must be an alternate to avoid this situation.  There must be a machine or device which tells us the status of water so that we can switch off the motor-pump before the overflowing took place. So, today I am here with the solution of this problem. The device I have made to tackle this problem is “Water Level Indicator”. This device can be installed in tall buildings water tanks where manual monitoring is very difficult. The indication unit can be placed at any desired location in the building or house.

3 Schematic Of The Project
Motor Relay

4 Basic Concept Of The Project:-
The device works on the principle that the water is capable of passing current through it. One wire which is connected to VCC is left in the bottom most part of the tank and the rest wires are set at different levels in the tank. Except the bottom most wire which provide VCC to the whole water, we have five wires set at different levels. Another terminal of these five wires are connected to the base of transistors and hence in turn to the microcontroller which is the heart of the device. When water starts rising, different levels touches the water and get some positive voltage. This positive voltage is given to the base of transistors to activate them and hence passing signal to the controller as shown in the figures below. The indicating component is LED. This component show the current status of the water in the tank.

5 Components Used AT89C51 Microcontroller Transistors LEDs Resistors
Capacitors Relay Diode

6

7 Working 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 of when the over head tank is filled. 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. The circuit diagram of the water level controller is shown below. 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.

8 Port pin P0. 5 is used to control the pump
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.

9 Program MOV P2,# B // initiates P2 as sensor input MOV P0,# B // initiates P2 as the output port MOV A,# B MAIN:ACALL SMPCK // checks the level of the sump tank MOV A,P2 // moves the current status of P2 tp A CJNE A,# B,LABEL1 // checks whether tank is full SETB P0.1 SETB P0.2 SETB P0.3 SETB P0.4 CLR P0.0 // glows full level LED SETB P0.5 LABEL1:MOV A,P2 CJNE A,# B,LABEL2 // checks whether tank is 3/4 SETB P0.0 SETB P0.2 SETB P0.3 SETB P0.4 CLR P0.1 // glows 3/4 level LED LABEL2:MOV A,P2 CJNE A,# B,LABEL3 // checks whether tank is 1/2 SETB P0.0 SETB P0.1 SETB P0.3 SETB P0.4 CLR P0.2 // glows 1/2 level LED

10 LABEL3:MOV A,P2 CJNE A,# B,LABEL4 // checks whether tank is 1/4 SETB P0.0 SETB P0.1 SETB P0.2 SETB P0.4 CLR P0.3 // glows 1/4 level LED JB P0.6,LABEL4 CLR P0.5 // switches motor ON LABEL4:MOV A,P2 CJNE A,# B,MAIN // checks whether tank is empty SETB P0.0 SETB P0.1 SETB P0.2 SETB P0.3 CLR P0.4 // glows EMPTY LED JB P0.6,MAIN // checks whether sump is low CLR P0.5 // switches motor ON SJMP MAIN SMPCK:JB P0.6,LABEL5 // checks whether sump is low SETB P0.7 // extinguishes the sump low indicator LED SJMP LABEL6 LABEL5:SETB P0.5 // switches the pump OFF CLR P0.7 // glows sump low indicator LED LABEL6:RET END

11 Components Details & Datasheet

12 AT89C51 Microcontroller AT89C51 is an 8-bit microcontroller and belongs to Atmel's 8051 family. ATMEL 89C51 has 4KB of Flash programmable and erasable read only memory (PEROM) and 128 bytes of RAM. It can be erased and program to a maximum of 1000 times.   In 40 pin AT89C51, there are four ports designated as P1, P2, P3 and P0. All these ports are 8-bit bi-directional ports, i.e., they can be used as both input and output ports. Except P0 which needs external pull-ups, rest of the ports have internal pull-ups. When 1s are written to these port pins, they are pulled high by the internal pull-ups and can be used as inputs. These ports are also bit addressable and so their bits can also be accessed individually.  Port P0 and P2 are also used to provide low byte and high byte addresses, respectively, when connected to an external memory. Port 3 has multiplexed pins for special functions like serial communication, hardware interrupts, timer inputs and read/write operation from external memory. AT89C51 has an inbuilt UART for serial communication. It can be programmed to operate at different baud rates. Including two timers & hardware interrupts, it has a total of six interrupts.

13 Pin Diagram

14


Download ppt "WATER LEVEL controller using 8051"

Similar presentations


Ads by Google