Water level indicator cum controller
by Ranjith | November 19th, 2008.The present concept implements controlling of pump which pumps water from the sump (underground tank) to the overhead tank, using 8951 microcontroller.
The control panel, i.e. the main control unit of the system which consists of the primary control switches, pump indicator, siren and level indicators. The visual example of how switches And the indicators can be placed as shown the figure below.

Front view of the model
In the figure shown above there are total of nine LEDs, four of which indicates the water level in the tank, another four indicates the water level in the sump and one LED indicates whether the pump is ON/OFF. It also consists of three switches.
- Switch 1 is the main power switch which is used to activate the system.
- Switch 2 is used to select whether to operate the pump in AUTO or MANUAL mode.
- Switch 3 comes to picture only when the system is operated in MANUAL mode. It controls the direct activation of the pump.
Description :
This system is built around an 8951 microcontroller and the circuit diagram is as given below.
As you can see in the above diagram, port 0 is exclusively used as an input port which takes the information regarding the water level in the sump as well as in the overhead tank.
Port 1 is used as output port which is connected to the indicator that indicates the water level in both the tanks.
Port 2 is used as in/out port, it takes the input from switch 2 and switch 3 and gives the output which is connected to pump indicator, siren and the relay which controls the switching of the pump.
Working of the system:
There are two modes of working for the system
- Manual mode
- Auto mode
Which is controlled by switch 2 (refer control panel diagram)
Manual mode:
When the system is active and in manual mode, it only indicates the water levels in the tanks and it doesn’t control any working of the pump. To activate the pump in manual mode switch 3 is used.
In this mode the operator should manually control the working of the pump. As in case if the tank is full, operator should switch of the pump which is not the case when compared to auto mode.
Auto mode:
When the system is active and in auto mode, it only indicates the water levels in the tanks and it controls the working of the pump.







December 18th, 2008 at 7:19 pm
Hi, I am Arindam .I have some question about this water level controller.
1. I cant find any firmware for 8951 chip.
2. can you add a LCD Or Seven segment display for status(HALF, FULL, EMPTY).
3. can you add motor dry run protector means when water not flow to overhead tank, motor must turned off.
4. amps rating of relay for 1 hp jet pump.
I have only overhead tank and 1 HP motor , so can you help me to implement this project for my case with above mentioned features.
I will be highly obliged if you spread your helping hand in this regard.
January 1st, 2009 at 11:17 pm
1. I cant find any firmware for 8951 chip.
2. can you add a LCD Or Seven segment display for status(HALF, FULL, EMPTY).
3. can you add motor dry run protector means when water not flow to overhead tank, motor must turned off.
4. amps rating of relay for 1 hp jet pump.
I have only overhead tank and 1 HP motor , so can you help me to implement this project for my case with above mentioned features.
I will be highly obliged if you spread your helping hand in this regard.
January 5th, 2009 at 9:32 am
sir i require the firmware and hex code for the water level controller project
please help me in this matter
January 11th, 2009 at 6:06 am
1.can you add a LCD Or Seven segment display for status(HALF, FULL, EMPTY).
2 please can i have an analysis of special function registers in 8951 microcontroller
January 14th, 2009 at 11:37 am
sir,
i am b.tech student and iam doing water level project so i need program of this project.
January 18th, 2009 at 12:53 pm
hi..i need d firmware n other details of this project..
im Third yr student.
January 20th, 2009 at 2:52 pm
Hi
I have given this project idea to help students to do project their own.
Here LCD or Seven segment display can be used for status using port 1 and 3
For “dry run protector”, there should be a condition in the program such that motor should stop when water touches to probe “E” of tank
200 amps relay is sufficient for 1 hp jet pump.
January 30th, 2009 at 9:50 am
i m kamalpreet , plese send the assembly language progamme and also the hex file for this project.
February 4th, 2009 at 8:43 pm
sir,
im doing my 8th sem project on water level indicator cum controller, iam trying to write the code can you please give the program for this.
February 22nd, 2009 at 4:59 pm
sir i require the firmware and hex code for the water level controller project,plese send the assembly language progamme and also the hex file for this project,and other details of this project.
March 1st, 2009 at 5:55 pm
sir i have require the firmware and hex code for the water level project.
please send it to me.
March 11th, 2009 at 10:18 pm
The project is very helpful. I need the code for the water level controller. Please help me out.
March 16th, 2009 at 9:06 pm
pls provide me the firmware and hex code…..needed urgently
March 19th, 2009 at 6:55 am
plz provide me the program n hex code for the same…
March 23rd, 2009 at 12:09 pm
hello…i dont hav much time to make this project..
or i shd say icant make it. lol.
no idea
so ..can ne1 gonna tell me..how much it wil cost?
if i jus buy it frm outside..
or if any one know place where i can get a cheap.do tell me..plz.
March 23rd, 2009 at 12:13 pm
hello…i dont hav much time to make this project..
or i shd say icant make it. lol.
no idea
so ..can ne1 gonna tell me..how much it wil cost?
if i jus buy it frm outside..
or if any one know place where i can get a cheap one .do tell me..plz.
March 26th, 2009 at 7:23 am
hi sir…i’m final year student..
I require the hex code for the water level controller project.please help me.
March 26th, 2009 at 8:58 pm
hi sir…i’m final year student..
I require the hex code for the water level controller project.please help me.
March 28th, 2009 at 6:45 pm
Sir,
i require a hex coding to burn on 8951. pl. send me via e-mail.
March 29th, 2009 at 9:16 am
i am biswajeet i just want a full description about this topic means the video clip . i just want to know
1. I cant find any firmware for 8951 chip.
2. can you add a LCD Or Seven segment display for status(HALF, FULL, EMPTY).
3. can you add motor dry run protector means when water not flow to overhead tank, motor must turned off.
4. amps rating of relay for 1 hp jet pump.
5.Here LCD or Seven segment display can be used for status using port 1 and 3
For “dry run protectorâ€, there should be a condition in the program such that motor should stop when water touches to probe “E†of tank
200 amps relay is sufficient for 1 hp jet pump.
April 1st, 2009 at 4:01 pm
Hi, I am Manoj .I have some question about this water level controller.
1.I require a hex coding to burn on 8951. Please send it immediately
2.I cant find any firmware for 8951 chip.
3. can you add a LCD Or Seven segment display for status(HALF, FULL, EMPTY).
4. can you add motor dry run protector means when water not flow to overhead tank, motor must turned off.
5. amps rating of relay for 1 hp jet pump.
I will be highly obliged if you spread your helping hand in this regard.
April 2nd, 2009 at 8:47 pm
sir i require the firmware and hex code for the water level controller project,plese send the assembly language progamme and also the hex file for this project,and other details of this project.
April 5th, 2009 at 9:03 pm
sir.please provide me with the assembly language code or the c language code of the water level indicator.
needed urgently.
April 13th, 2009 at 2:46 pm
dear sir,I want firmwire of 8951 and hexcode for the water level controller and the process to burn.
April 25th, 2009 at 12:32 pm
Sir, I need an assembly language program for the same, pls help me .
May 7th, 2009 at 1:12 pm
The projaect is very good excellent but I need the hex code of the Water level indicator cum controller. Without hex code the circuit is useless. Please, can you send to the hex code to my mail adderess.
May 7th, 2009 at 1:21 pm
I,m Providing u with d code,change it according 2 ur convenience.
;********************************************************************************************
;Objective : Water Level Indicater and Motor Protection
;Name of the Programmer : Prateek Kaura
;Hardware Used : CPU Board, Led Card, Power Supply, 8 pin connector
; Two pin connector
;Program Description ; Crystal=11.0592kHz
; Port0 is used as LCD
; Port1 is used for Motor
; Port2 is used for LED’s
; Port3 is used for RF Module
;Status :
;**********************Hardware declaration**************************************************;
lcd equ p0
RS BIT P2.5
EN BIT P2.4
buzzer bit p2.3
GREEN bit p2.0
YELLOW bit p2.1
RED bit p2.2
senser1 bit p3.0
senser2 bit p3.1
senser3 bit p3.2
senser4 bit p3.3
relay1 bit p1.0
key1 bit p1.3
;*********************************************************************************************;
ORG 0000H ;RESET OPERATION
SJMP POWERON ;GO TO POWERON LABEL
ORG 0003H ;EXTERNAL0 INTERRUPT
RETI ;RETURN FROM THE INTERRUPT
ORG 000BH ;TIMER0 INTERRUT
RETI ;RETURN FROM THE INTERRUPT
ORG 0013H ;EXTERNAL1 INTERRUPT
RETI ;RETURN FROM THE INTERRUPT
ORG 001BH ;TIMER1 INTERRUPT
; ljmp timer1
RETI ;RETURN FROM THE INTERRUPT
ORG 0023H ;SERIAL COMMUNICATION INTERRUPT
RETI ;RETURN FROM THE INTERRUPT
ORG 0030H
POWERON: MOV SP,#70H ; Move the stack pointer at 70h location
MOV IE,#00H ; Disable all the interrupts
MOV IP,#00H ; Disable the interrupt priority register
MOV P0,#0FFH ; Move 0FFH in in port 0
MOV P1,#0FFH ; Move 0FFH in in port 1
MOV P2,#0FFH ; Move 0FFH in in port 2
MOV P3,#0FFH ; Move 0FFH in in port 3
;*RAM variable declaration ,30h-7Fh
;……………………………………….
;……………………………………….
;*********************************************************************************************;
;*****************POWER ON *************************************************************** ;
;****************************RAM CLEARANCE**********************************************;
MOV R0,#7FH
RAM_CLR: MOV @R0,#00H ; Clear the RAM from 00 to 7FH
DJNZ R0,RAM_CLR
;;**********************************MAIN PROG******************************************************
setb red
setb yellow
setb green
clr relay1
mov lcd,#38h
acall command
mov lcd,#01h
acall command
mov lcd,#0eh
acall command
mov lcd,#80h
acall command
MOV DPTR,#DATA1
ACALL DISPLAY_
main1:
setb red
setb yellow
setb green
mov r2,#70d
main3:
setb green
setb RELAY1
acall delay
jnb senser1,check1
djnz r2,main3
mov r2,#50d
sjmp main5
main11:
jnb p1.3,main3
sjmp main11
main:
setb buzzer
setb green
setb red
setb yellow
jnb senser1,check1
sjmp main
main5:
clr relay1
acall delay
setb green
setb red
setb yellow
mov lcd,#0c0h
acall command
MOV DPTR,#level4
ACALL DISPLAY_
acall command
sjmp main11
check1:
clr green
setb red
setb YELLOW
jb senser1,main3
jnb senser2,check2
mov lcd,#0c0h
acall command
MOV DPTR,#level1
ACALL DISPLAY_
djnz r2,check1
mov r2,#20
sjmp main
check2:
clr YELLOW
clr green
setb red
;jnb p3.2,main3
jnb senser3,check3
jb senser2,main
mov lcd,#0c0h
acall command
MOV DPTR,#level2
ACALL DISPLAY_
sjmp check2
check3:
clr red
mov r3,#04
clr YELLOW
clr green
clr relay1
buzzer_on:
clr buzzer
acall delay
setb buzzer
acall delay
jb senser3,main
mov lcd,#0c0h
acall command
MOV DPTR,#level3
ACALL DISPLAY_
djnz r3,buzzer_on
check34:
setb buzzer
acall delay
clr red
clr YELLOW
clr green
clr relay1
jb senser3,main7
mov lcd,#0c0h
acall command
MOV DPTR,#level3
ACALL DISPLAY_
sjmp check34
main7:
ljmp main
DISPLAY_:
CLR A
MOVC A,@A+DPTR
MOV LCD,A
ACALL DATA
INC DPTR
JZ EXIT
SJMP DISPLAY_
EXIT:
RET
;****************command*************
command:
clr RS
setb EN
nop
nop
nop
nop
nop
clr EN
ACALL DELAY
ret
;*****************data***************
data:
setb RS
setb EN
nop
nop
nop
nop
nop
clr EN
ACALL DELAY
ret
;***************************delay***************************************
delay:
mov 33h,#50d
loop1: mov 34h,#50d
loop2: mov 35h,#20d
loop3: djnz 35h,loop3
djnz 34h,loop2
djnz 33h,loop1
ret
;**************************************data byte******************************************************************
ORG 300H
DATA1:
DB ‘ WATER LEVEL ‘,0
level1:
DB ‘Low Level ‘,0
level2:
DB ‘Medium Level ‘,0
level3:
DB ‘High Level ‘,0
level4:
DB ‘Input Line Fail ‘,0
June 4th, 2009 at 7:24 pm
sir i need the code 4 water level. plz help me n send me on my mail addres.thnx
June 15th, 2009 at 2:39 am
plz give me the hex code of water level indicator cum controller I am very thankful to u.
Naeem
solangi01@gmail.com
July 11th, 2009 at 8:44 am
sir pl sent mail ofsource code.dvsphani@gmail.com
August 23rd, 2009 at 10:55 am
any body can u send water level cum motor protector block diagram
September 4th, 2009 at 6:09 am
microcontroller is new to me…so my doubt may be a simple one..but i dont know thats why i am asking….
Where to connect a motor ?
& please telll me the function at P2.4…i am not getting it by reading…
the probes you are using for sensing are they copper probes ?
September 17th, 2009 at 2:32 pm
i need code in c language for water level cum controller please help me……
September 17th, 2009 at 2:38 pm
hi
can u give me the souce code for waterlevel indicator cum controller in c language….
September 17th, 2009 at 2:51 pm
Hi, i need a pressure measurement and controller circuit diagram and c program code using 8051 micro controller.
September 23rd, 2009 at 8:03 pm
please can you send the complete diagram of the water level monitor showing how the lcd is connected. i also need the firmware and the source code necessary to make the project perform to it’s expectation. thanks for your support. my mail is olaibilade@yahoo.com.
October 3rd, 2009 at 1:52 pm
can i get configured 8951IC and pcb lay out?
October 8th, 2009 at 5:41 pm
hey can i get the hex code file & pcb layout for this water level project.mail me soon. thnx
October 9th, 2009 at 7:05 am
Hello Sir,
With your design I have made my own water level controller with different code. The project runs good when kept outside water by touching the probes. By when keeping the probes in water it works for sometime and fluctuates making the motor on and off within some seconds. I dont think there is any problem with the hardware and software but with the probes. Suggest we a suitable and cheap probe yo be used.
October 21st, 2009 at 10:43 pm
hey can u pls xplain the xact working of the exp as in the uses of relay n the other components frm viva pt of view.
thanx
October 26th, 2009 at 5:59 pm
CAN ANYBODY SEND ME THE ENTITRE WORKING AND BLOCK DIAGRAM OF THIS PROJECT..THANK UUU
October 28th, 2009 at 4:03 pm
sir i need some innovations to be added to this water level indicater is it possible ?????
October 29th, 2009 at 9:32 am
i want pcb layout n block diagram of this project.plz help me…
November 4th, 2009 at 3:46 pm
hello sir…
actually i’ve never done any such project… can you please send me all the details, codes, etc on my mail… i’ll be highly obliged.
November 8th, 2009 at 7:28 pm
plzzzzzzzzz……send me water level controller programing….of 8085 microprocessor….i m in extreme need…..at mah ID priyaparrot29@gmail.com……i’l b very gr8full…..plz do not ignore this
November 10th, 2009 at 3:23 am
plz send the complete source code of water level indicator
to my mail id its urgent
November 10th, 2009 at 3:24 am
plz send me the complete source code of water level indicator
to my mail id ameerali.glb08@gmail.com
November 11th, 2009 at 12:01 am
sir plz send me the block diagram of water level indicator an motor controller..i need it very baddly..my email id is meenaamit.iiitm@gmail.com
November 12th, 2009 at 10:49 pm
hi every one I just wanna ask if the same project can be implemented using 16f877 and using lcd screen displayer instead of leds plus
please tell me what kind of detectors do we use ???????
PLEASE IF SOMEONE CAN ANSWER ME PLEASEDON4T HESITATE;THANKS
November 20th, 2009 at 9:46 pm
plzzzzzzzzzzz answer my questions cuz it’s a case of die or life
December 3rd, 2009 at 12:31 pm
Hi, i need a pressure measurement and controller circuit diagram and c program code using 8051 micro controller.
and also can you mention the kit specification used for this project
December 13th, 2009 at 7:15 pm
sir i need d complete details of water level indicator without using microcontroller…………..constrction ,circuit,evrythng wich u can guide me a successful one……………………
January 13th, 2010 at 9:57 pm
plz send me the complete programming of water level indicator
to my mail id chiragpansuriya90@gmail.com
January 21st, 2010 at 8:22 pm
sir i wish to know about the programing related to petrol level indicator using 10k pot based on microcontroller 8951 and also interfacing with LCD. please help me
January 28th, 2010 at 12:26 pm
is this program is automatic contolle of water . can you mail me complete detail to my mail id
February 2nd, 2010 at 5:10 pm
Please give me program & hex code for water level indicator cum controller using 8951 microcontroller
February 11th, 2010 at 10:13 am
Hi…
Thanks for this project… Its really a great one…
Pls can you hlp me with this one:
Remote industrial Monitoring of tank WAter Level, Converyor belt speed, using an 8951 microcontroller?
It should be interfaced to a computer via parallel or serial port… I hav already worked on interfacing the transducers via current sense amplifier and adc to the microcontroller… I just need a working connection, an Assembly language code, and a monitoring software (I intend using matlab 7.0 interface).
Thanks…
My email: uka.okoye@ieee.org
February 16th, 2010 at 12:40 pm
Dear Sir,
Good after noon, I am also trying to mak a water level controller, but now I am facing some problem in coding, I am using 89c51 MCu, is this is sufficent for my application, so I need your help in coding, please mail me the coding if you can, my mail id is: saurabh044@gmail.com.
Thanks & Regards
Saurabh Singh
+91 98975 79022
February 18th, 2010 at 1:00 am
i am a student at the durban university of technology, i am working on a water level project you guys help me with the pic coding .i will be using 4 switches as sensors
February 18th, 2010 at 1:02 am
my email: ayandalesetla@ymail.com
February 19th, 2010 at 9:17 pm
so ..can ne1 gonna tell me..how much it wil cost?
if i jus buy it frm outside..
February 20th, 2010 at 9:25 am
i wanna do this project in arm7tdmi
can anyone send me the code for the same???
March 6th, 2010 at 7:41 pm
there is a design fault..
you must provide an isolation between the uc ant he relay.. els the program will get flashed out..
recoment a optocoupler(pref. MCT2E) for isolation…
regards …magnatron…
magnatronelectronics@gmail.com
TC..!