You are on page 1of 29

Electronics Project Kits For Students Click Here

ELECTRONICS HUB
P R O J E C T S | T U T O R I A L S

HOME FREE PROJECT CIRCUITS MINI PROJECTS WATER LEVEL CONTROLLER USING 8051 MICROCONTROLLER

Water Level Controller using 8051 Microcontroller


AUGUST 28, 2017 BY ADMINISTRATOR 76 COMMENTS

Contents [hide]

1 Construction and Output Video


2 Water Level Controller using 8051 Circuit Principle
3 Water Level Controller using 8051 Microcontroller Circuit Diagram
4 Components Required for Water Level Controller using 8051 Microcontroller
5 How to Design Circuit for Water Level Controller using 8051 Microcontroller?
6 Algorithm for Water Level Controller Circuit
7 Water Level Controller using 8051 Circuit Simulation Video
7.1 DOWNLOAD PROJECT CODE
8 How to Operate Water Level Controller Circuit using 8051 Microcontroller?
9 Water Level Controller Circuit Advantages
10 Applications of Water Level Controller Circuit using 8051
11 Related Articles

Water Level Controller using 8051 Microcontroller project will help in automatically controlling
the water motor by sensing the water level in a tank. This article explains you how 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.

We have already seen How water level indicator circuit works using AVR Microcontroller in
the earlier post. But, here we are designing the circuit which is used to detect and control the
water level automatically in overhead tank using 8051 microcontroller.

In this system, water sensing can be done by using a set of 4 wires, which are placed at
different levels in tank. DC supply probe is placed at the base of the tank.
Construction and Output Video

Water Level Controller using 8051 Circuit Principle


This system mainly works on a principle that water conducts electricity. The four wires which
are dipped into the tank will indicate the different water levels. Based on the outputs of these
wires, microcontroller displays water level on LCD as well as controls the motor.

Initially when the tank is empty, LCD will display the message LOW and motor runs
automatically. When water level reaches to half level, now LCD displays HALF and still motor
runs.

When the tank is full, LCD displays FULL and motor automatically stops. Again, the motor runs
when water level in the tank becomes LOW.

Water Level Controller using 8051 Microcontroller Circuit


Diagram
Buy Step by Step Guide along with Code: Water Level Controller using 8051
Microcontroller

Components Required for Water Level Controller using 8051


Microcontroller
AT89C51 Microcontroller (or any 8051 based Microcontroller)
8051 Programmer (Programming Board)
11.0592 MHz Quartz Crystal
2 x 33pF Capacitor
2 x 10K Resistor (1/4 Watt)
10F Capacitor
Push Button
1K x 8 Resistor Pack (for Pull up)
16 x 2 LCD Display
5V Relay
4 x 2N2222 (NPN) Transistors
DC Motor (for demonstration)
10K Potentiometer
1N4007 PN Junction Diode
Programming cable
Connecting wires
Power Supply
Keil Vision IDE
Willar Software (for burning code)
Proteus (for circuit diagram)
How to Design Circuit for Water Level Controller using 8051
Microcontroller?
The heart of the Water Level Controller using 8051 Microcontroller project is the AT89C51
Microcontroller. The water level probes are connected to the P0.0, P0.1 and P0.2 through the
transistors (they are connected to the base of the transistors through corresponding current
limiting resistors). P0.0 for LOW level, P0.1 for HALF Level and P0.2 for HIGH Level.

The Collector terminals of the Transistors are connected to VCC and the Emitter terminals are
connected to PORT0 terminals (P0.0, P0.1 and P0.2).

PORT1 of the microcontroller is connected to the data pins of LCD and the control pins RS, RW
and EN of the LCD Display are connected to the P3.6, GND and P3.7 respectively.

For demonstration purpose, we have used a simple DC Motor Pump. It is connected to the
Relay and the input to the relay is fed from P0.7 through a transistor.


Related Post: Also read the interesting concept about How water level alarm
circuit works using 555 Timer.

Algorithm for Water Level Controller Circuit


First configure the controller pins P0.0, P0.1 and P0.2 as inputs and P0.7 as output.
Now, initialize the LCD.
Continuously check the water level input pins P0.0, P0.1 and P0.2.
If all the pins are low, then display tank as EMPTY on the LCD and make P0.7 pin HIGH
to run the motor automatically.
If the level is low i.e. if P0.0 is HIGH, display the water level as LOW and continue to run
the motor.
A HIGH pulse on the pin P0.1 indicates that water has reached half level. So, display the
same thing on LCD and run the motor normally.
If P0.2 is HIGH, then the water level in the tank is FULL.
Now, make the P0.7 pin as LOW to turn off the motor automatically.

Water Level Controller using 8051 Circuit Simulation Video

DOWNLOAD PROJECT CODE

How to Operate Water Level Controller Circuit using 8051


Microcontroller?
1. Initially, write the program for Water Level Controller in Keil Vision IDE and generate the
.hex file.
2. Burn the program (.hex file) to the microcontroller using external programmer and Willar
Software.
3. Now give the connections as per the circuit diagram.
4. While giving the connections, make sure that there is no common connection between
AC and DC supplies (if you are using an AC Motor)
5. Place the 4 water level indicating wires into the small tank (3 probes for three different
levels and fourth one for common supply)
6. Switch on the supply. Now, the motor will run automatically as there is no water in the
tank. (It will turn on even if the water level is LOW).
7. Now pour the water, when it reaches LOW level, then LCD displays LOW.
8. For middle level, it will display as HALF on the LCD.
9. Still if you pour the water, then the water level reaches full and the LCD displays FULL
and also the motor is turned OFF automatically.
10. Switch off the motor supply and board supply.

Get an idea about How to Interface 7 Segment Display with 8051 Microcontroller

Water Level Controller Circuit Advantages


Human effort is reduced as the system controls the motor automatically based on the
water level.
This system consumes less power.
Simple and more reliable.

[Also Read: How To Make an Adjustable Timer ]

Applications of Water Level Controller Circuit using 8051


Used in big buildings where the manual monitoring is difficult.
Used in industries to control the liquid level automatically.

Related Articles

Random Number Interfacing 162 LCD Water Level Indicator Digital Voltmeter using
Generator using 8051 with 8051 8051 Microcontroller

Celsius Scale Delay using 8051 Digital Clock Circuit Password Based Door
Thermometer using Timers using 8051 and Lock System using
AT89C51 and LM35 DS12C887 8051 Microcontroller
FILED UNDER: 8051 MICROCONTROLLER, ELECTRONICS, EMBEDDED, FREE PROJECT CIRCUITS, MINI PROJECTS

Comments

alif says
NOVEMBER 24, 2015 AT 8:42 AM

can i get the source code for this project ? please send me the source code to my email. I
want to make the same project like this using at89s52.

Reply

Ed says
DECEMBER 9, 2015 AT 4:36 PM

Hi, did you ever get the source code for this project? If so, please share I like this
project a lot too and want do it as well

Reply

sai says
MARCH 29, 2016 AT 7:48 AM

plz send simulation file

Reply

Katana says
JUNE 13, 2017 AT 12:50 AM

Does the project code in the link support only the LCD or the motor also?

Reply

yoganandham says
JANUARY 6, 2016 AT 11:59 AM

Click on above link downloard source code

Reply
abdullah says
APRIL 9, 2017 AT 5:50 AM

in this source code the working of lcd is fine but relay is not turning on. i think the
programming of motor is wrong. plzz help me.

Reply

Aishwarya K says
JANUARY 27, 2016 AT 1:18 PM

Im making the same project and i need the code for it. It is personally a very useful
product for me.

Reply

Ajith Kumar says


NOVEMBER 25, 2015 AT 12:52 AM

I like to make this project

Reply

ajay says
NOVEMBER 30, 2015 AT 1:08 AM

I wd like one for my house

I wd do the same one

Reply

Shivashankara says
DECEMBER 6, 2015 AT 3:54 PM

I want to do this nd want install I in my home.. Please give me source code and total project
cost.

Reply
Anusha says
JANUARY 2, 2016 AT 8:01 AM

That is great..Source code is already provided in the article.Please go through it..If you
have any further clarifications you can contact us..

Reply

wanii says
FEBRUARY 29, 2016 AT 7:04 AM

i have burn the code into the software but why i cant run the circuit?the code
should be done in its software or we just can copy & paste in Dev C++? Pls answer
me. This project need to be done before wednesday :(((

Reply

Anusha says
MARCH 2, 2016 AT 4:49 AM

Try to copy paste the code in Keil Software and create a hex file then burn to
the controller..

Reply

bright says
APRIL 13, 2016 AT 10:06 PM

I have tried running it in keil but I still gives me error.can you please send
me the hex file?..my email is skuulfeez@gmail.com

Naina says
APRIL 28, 2016 AT 10:59 AM

The motor is not running with this source code. Please help!

Reply
Ashish Singh says
DECEMBER 8, 2015 AT 2:01 PM

I have to make project related to microcontroller. I like the idea of this project & I want to
make this project for my course.
So I need the source code of this project, plz send me the source code as soon as I start
my working in this project.

Reply

Anusha says
JANUARY 2, 2016 AT 8:39 AM

We have already provided project code in the article.Please go through the article..

Reply

sharmili says
DECEMBER 13, 2015 AT 1:27 AM

Will the Current pass into our body if we touch the water

Reply

Anusha says
JANUARY 30, 2016 AT 6:20 AM

No problem you will not get any shock

Reply

YOHANA TIJALA says


DECEMBER 15, 2015 AT 3:58 PM

I real need this source code because i have three simtank when the water is full in these
tank they tend to fall down plz help me

Reply
Muhammad Iddham Bin Shahlee says
DECEMBER 20, 2015 AT 11:57 PM

hello, iam iddham from Malaysia, an engineering student, as you can see , currently its the
monsoon period in Malaysia, which causing flood in certain area, most at the east side of
Malaysia, my objective here, to create a water indicator level detector so that it maybe can
help the people here to indicate the water level earlier and can make early move and
maybe save more lives.
so i see that this project maybe useful but i need your help to complete the project. i have
little knowledge in embedded system such as, runninglight, loop, adcon, timer .

so can you help me ? in theme of the hardware and program code?


email : iddhamshahlee@gmail.com

Reply

Jayesh says
DECEMBER 22, 2015 AT 5:01 AM

What about the electrolysis that takes place in water. that is one of the major problem
found which corrodes teh sensors.

Reply

Ayoade Abeel says


DECEMBER 29, 2015 AT 8:10 PM

Please I need the project code I want to make the same project for my industrial training
defense in schoolits urgently needed

Reply

Daniel says
JANUARY 1, 2016 AT 12:36 AM

Hi,
I want to do this project for my final year project. i see that this project is suitable for my
field of engineering i am doing now. Please email me the source codes for this project.
Your help is highly appreciated..

Reply

Anusha says
JANUARY 2, 2016 AT 4:45 AM
Please go through the article,we have already uploaded the code..

Reply

Ramakant Patil says


JANUARY 8, 2016 AT 3:20 AM

i just wants to show to my students how micro-controller is used in instrumentation


applications?

Reply

ndagijimana pascal says


JANUARY 16, 2016 AT 2:00 AM

why had nt you reply the email said that there is an electrolysis appears in the water
tank.can u give a good answer for that problem?

Reply

prashanth says
JANUARY 19, 2016 AT 12:44 AM

it is so nice but how can i install it in my home without any labour

Reply

omkar nath says


JANUARY 19, 2016 AT 3:48 AM

i want to do this project, so i want this project programe . so please send the code to my
mail.

Reply

mohit says
JANUARY 21, 2016 AT 1:35 AM

Sir send me code of water level indicater


Reply

Ndagijimana pascal says


JANUARY 23, 2016 AT 9:16 AM

i am intrested in this project and i need source code,should give me them so that i can do it
as my final work?

Reply

AVINASH GULERIA says


FEBRUARY 4, 2016 AT 8:35 AM

Hi sir i m persuing diploma in ECE. So i have to know about the source code for this
project.Because i m going to made my major project which is quite simillar to this pls giv
me source of this projct.THANKYOU

Reply

Bharati Yedave says


FEBRUARY 15, 2016 AT 3:10 AM

hello sir, m student of BE. I want source code of this PROJECT becuase i am make this
project .Send it to my email-id.

Reply

sameer says
FEBRUARY 16, 2016 AT 5:50 AM

i want to do the same project using 89s52 micro controller so please send me the code

Reply

shubham says
FEBRUARY 19, 2016 AT 2:51 PM

where is the 10K Pot used in the whole circuit

Reply
Anusha says
FEBRUARY 23, 2016 AT 3:25 AM

10 k pot is used for LCD display to adjust its brightness

Reply

JB says
FEBRUARY 22, 2016 AT 6:04 AM

can someone help me how to program the code into the mcu at89c51?? is there a
possibility that it can be programmed using pickit2?? thnx for the reply

Reply

nikhil says
FEBRUARY 22, 2016 AT 1:06 PM

can i please get source code for this project.i want to do same project .

Reply

Anusha says
FEBRUARY 23, 2016 AT 1:48 AM

Code is already Uploaded Please go through the article..U need to download keil to
open these files..

Reply

Muhammad Fauzi says


FEBRUARY 29, 2016 AT 1:57 AM

.Can I get source code for this project I am interested to do this project for my final year
project.
I would like to same project and add more function to it.
The application is same..

Reply
mellash dessalegn says
MARCH 4, 2016 AT 3:08 PM

it is a fantastic project i like it. would you send the source code for these project since i am
doing asimilar project using 8086 micro controller.

Reply

Anusha says
MARCH 5, 2016 AT 6:50 AM

Download the code from post..

Reply

Mike says
MAY 18, 2016 AT 9:15 AM

hi, i am trying to do this project using 89S51, never done this so please guide me
somehow , is the code different from 89c51 (gives me an error about header
missing) . what program should i use , i;ve tried with kel and arduino compliling
with errors .Thank you (mikem1907@yahoo,com) , also i use an aspusb 2.0
programmer

Reply

nil j says
MARCH 5, 2016 AT 1:17 PM

I am working on this project lcd does not show any msg why this error is obtain please help
mi

Reply

Fahima says
MARCH 7, 2016 AT 2:57 PM

Its a wonderful project. I am working on a project where I need to sensor the level of water.
I would like to know how those 4 wire inside the water works. Could you please explain?
Thank you in advance.

Reply
Lijo says
MARCH 8, 2016 AT 1:16 PM

please can i get the circuit diagram of water level controller which, the motor should run
when the motor switch is on. and it should be off automatically when the tank is full.

Reply

SRI says
MARCH 9, 2016 AT 4:13 AM

can i hav the code which is in assemby langauge plz

Reply

L Lalithesh says
MARCH 10, 2016 AT 9:30 AM

can i get source code using assembly level language for this project

Reply

Saukhya says
MARCH 21, 2016 AT 12:41 AM

I need assembly language code for this project..Cant find asm file here..

Reply

Vin says
MARCH 26, 2016 AT 2:32 AM

I am making the project for my household motor.


I have a query related to water tank sensors.
In water tank you have placed simple wires or sensors?
If it is sensors, Which sensors have you used?

Reply
Anusha says
MARCH 28, 2016 AT 8:13 AM

No sensors were used in this project.Only wires were used.

Reply

Farihan says
JUNE 28, 2016 AT 2:56 AM

can i have full report about this project?

Reply

Vinayak says
MARCH 29, 2016 AT 9:30 AM

I have prepared the circuit as explained by you. I am facing below problem.


My circuit works perfectly if my body part didnt have any contact with water.
When my body part touches the water whole circuit behaves strangely. It stops working,
then I have to press the reset of controller. I think when body part touches the water,
sensing probes creates the voltage fluctuations and whole circuit mechanism is failing.
Please provide the advice.to overcome this issue.

Reply

Ajit says
MARCH 30, 2016 AT 2:17 AM

Hello sir motor is not running in this project

Reply

Arub says
APRIL 3, 2016 AT 2:08 AM

i have pasted the code in keil software and built it but i have got 0 errors but 1 warning tell
me the solution of this problem ?

Reply
Knowledghub says
APRIL 3, 2016 AT 2:12 AM

i have pasted the same code in keil software i got 0 error but 1 warning so tell me about
the solution of this problem?

Reply

Ramyasree says
APRIL 12, 2016 AT 1:10 AM

hi, i am doing this as my lab project.we are doing the same thing in arduino .we are facing
the problem .its not working.can you help us how to write code in arduino

Reply

Bhagat ankita says


APRIL 13, 2016 AT 7:31 AM

It is very good project. I want to work this project please give the program and their code
my email addressed

Reply

Nagato says
APRIL 14, 2016 AT 6:23 PM

Hi can I get the proteus simulation for this project? Thanks a lot. Great project by the way

Reply

chirag says
APRIL 15, 2016 AT 2:24 PM

please send me source code of this project


I make same with different UC
through your code i will the idea about this

Reply
Tetea says
APRIL 19, 2016 AT 12:16 PM

i would be very glade if you could kindly send me the code

Reply

prem says
APRIL 22, 2016 AT 10:19 AM

which burner have you guys used????

Reply

ohida islam says


APRIL 23, 2016 AT 5:30 AM

Why motor is not running when the tank is empty ?

Reply

sanju says
APRIL 29, 2016 AT 3:42 AM

is that v1 (vsine wave) supply is really required between motor and relay???or will that
circuit works without that connection???whwt is the use of that??plz rply fast

Reply

Naina says
APRIL 30, 2016 AT 11:07 AM

Motor is not running with the above source code what changes do we have to make

Reply

Krishna prasanna varma says


MAY 11, 2016 AT 1:29 AM

Is the source code is correct are not while I m executing the project in Proteus all the
working but the relay switch is not changing its position why it happenes like that I want to
submit this project by Monday plzz tell me the solution for this problem as soon as
possible.

Reply

baniamin says
MAY 23, 2016 AT 7:04 AM

I got the source code but it doesnt have .hex file, i attempt to create a .hex file but i cant.
is any one who create or got a .hex file pls tell me , i need your help

Reply

M.Adil says
JUNE 18, 2016 AT 5:34 AM

Show the full connection wile simulating in protius motor is not running.
how to connect with power supply show it.

Reply

kaviya says
JULY 13, 2016 AT 8:01 AM

why are you using transistor? suppose transistor is replaced by a other component whats
going on?

Reply

zameer ahmad says


SEPTEMBER 30, 2016 AT 1:48 AM

could u plz help me in making my fyp with a further modification in above project by
controlling the voltage of water pump

Reply

muhammad aiman farhan bin hasnan says


DECEMBER 27, 2016 AT 11:00 AM

hello,
i want to know did the project used DC motor or AC motor to operate?
thanks you

Reply

shashi says
MARCH 6, 2017 AT 10:40 AM

Will I get the output by executing the circuit given in the article.Can u plzz tel me

Reply

BRIGHT STAR says


MARCH 10, 2017 AT 12:10 AM

this one is good project but i want wirless waterlevel controller if possibel then send me
on my email

Reply

Abdullah sarwar says


APRIL 21, 2017 AT 10:54 AM

Source code need some edition there are 2 lines which is unnecessary
LCD not work because this ckt diagram is not complete and proper
In my case I m able to run this project only on developer board but due to incomplete ckt
diagram I face difficulties in making of this project
Plzz help me

Reply

Anusha says
JUNE 20, 2017 AT 6:44 AM

Please go through this link for complete explanation of the project


http://courses.electronicshub.org/p/water-level-controller

Reply

bala says
MAY 3, 2017 AT 11:19 PM
hello,
This project is good.
I would like if there is any microcontroller based project based on solenoid valve closing
and opening for respective litres of water to fill the tank.
plz send me any link or source file.

Reply

Leave a Reply
Your email address will not be published. Required fields are marked *

Comment

Name *

Email *

Website

reCAPTCHA

Please upgrade to a supported browser


to get a reCAPTCHA challenge.

Alternatively if you think you are getting


this page in error, please check your
internet connection and reload.

Why is this happening to me?


POST COMMENT

Search this website

Suggest A Topic [or] Project

COMPLETE STEP BY STEP GUIDE


Ad

MA5D4 System on Module

Visit Site

Electronics Hub

YouTube 18K

Electronics Hub

Follow On

50 Free Advertising
Credits - Target &
Reach Your Audience

Electronics Hub

Suivre

SUBSCRIBE FOR FREE PROJECT CIRCUITS


Enter your email address:

SUBSCRIBE

Delivered by FeedBurner

Electronics Hub
667,245 likes

Like Page Sign Up

Be the first of your friends to like this

ads by media.net

Ways To Conserve Water

New Invention Ideas

Home Security Systems

Android App Development

Electronic Circuits Projects

Electronics Project Ideas

Electronic Project Kits

Simple Electronics Projects

Embedded Systems Projects

Engineering Projects 2017

Solar Power Systems

Motor Control Circuits

DIY Solar Panels

Basic Electronics Tutorial

Mini Science Project Ideas

PROJECTS BY CATEGORY

Arduino Projects (200+)


Electronics Projects (250+)
Mini Project Circuits (160+)
Mini Project Ideas (150+)
ECE Projects (150+)
EEE Projects (150+)
8051 Projects (110+)
Raspberry Pi Projects (101+)
Electrical Project Ideas (100+)
Embedded Projects (100+)
Latest Electronics Ideas (100+)
Microcontroller Mini Projects (100+)
Robotics Projects (100+)
VLSI Projects (100+)
Solar Projects (100+)
IOT Projects (100+)

Communication Projects (70+)


LED Projects (70+)
Power Electronics Projects (60+)
RFID Projects (60+)
Home Automation Projects (50+)
Matlab Projects (50+)
EIE Projects (50+)
Wireless Projects (50+)
LabView Projects (45+)
Zigbee Projects (45+)
GSM Projects (40+)
555 Timer Circuits (40+)
Sensor Projects (40+)
ARM Projects (60+)
DTMF Projects (30+)
PIC Projects (30+)
Electrical Mini Projects (25)

GENERAL

Tutorials

Symbols

Courses

Calculator

Contact

PROJECTS

Electrical

Electronics

Embedded

Power

Robotics

ARM
IOT
PROJECTS

Mini projects

Microcontroller

Aurdino

Solar

Free circuits

Home Automation

TUTORIALS

Capcitors

Resitors
Filters

Diodes

Transistors

TUTORIALS

Amplifiers

IO Devices

Thyristors

DC Circuits

Nummber System

FOLLOW US

Facebook
Youtube

Google Plus

Twitter

Copyright 2017 Electronicshub.org

You might also like