MAAPRO
MAAPRO
A PROJECT REPORT
ON
“Water level indicator with microcontroller 8051.”
DIPLOMA
IN
SECOND YEAR ELECTRONICS & COMPUTER ENGINEERING
SUBMITTED BY
CERTIFICATE
THIS IS TO CERTIFY THAT THE FOLLOWING STUDENTS OF SECOND YEAR
IN DIPLOMA IN ELECTRONICS & COMPUTER ENGINEERING OF INSTITUTE
SANT GAJANAN MAHARAJ RURAL POLYTECHNIC, MAHAGAON-(CODE)
416502 HAS COMPLETED MICRO PROJECT-“WATER LEVEL INDICATOR WITH
MICROCONTROLLER 8051” IN SUBJECT MICROCONTROLLER AND
APPLICATION SUBJECT CODE (22426).
1.1 Rationale
A water level indicator employing a microcontroller such as the 8051 offers a sophisticated yet
cost-effective solution for monitoring water levels in tanks or reservoirs. The rationale behind
utilizing a microcontroller lies in its ability to provide precise measurements with a high degree of
accuracy. Through automated processes, the microcontroller continuously evaluates water levels,
ensuring real-time updates without necessitating manual intervention. These updates can be
displayed on an LCD screen or communicated via UART or SPI interfaces for remote monitoring.
Furthermore, the flexibility of microcontroller-based systems allows for customization to suit
specific requirements, whether it involves setting alert thresholds or integrating additional sensors
for comprehensive monitoring. Additionally, the low-cost nature of microcontrollers coupled with
their low power consumption makes them an ideal choice for water level indicator projects,
particularly in scenarios where energy efficiency and affordability are paramount considerations.
Overall, a microcontroller-based water level indicator represents a reliable, efficient, and adaptable
solution for monitoring water levels across diverse applications.
1. Sensor Integration: Studies have explored the integration of various sensors with the 8051
microcontroller to measure water levels accurately. These sensors include ultrasonic, infrared,
and capacitive sensors, each offering unique advantages in terms of accuracy, range, and
environmental suitability.
3. Display and Communication: The 8051 microcontroller is commonly interfaced with display
modules such as LCD screens to provide real-time updates on water levels. Additionally,
studies have explored the integration of wireless communication protocols like Zigbee or
Bluetooth for remote monitoring, enabling users to access water level information from a
centralized location.
1.3 proposed methodology
✓ Select the topic i.e. Water level indicator with microcontroller 8051.
5 Button 1
6 power supply 5 volts 1
7 Bread board 1
8. Motor 1
9. Delay 1
annexure-II
Micro-Project Report
2. Sensor Integration: Learn how to interface sensors (like motion sensors or proximity
sensors) with the 8051 microcontroller to detect movement or presence near the door.
3. Timing and Delay: Learn how to use timers and delays in programming to control the timing
of the doorbell, ensuring it rings for an appropriate duration.
5. Troubleshooting and Debugging: Develop skills in troubleshooting common issues that may
arise during the project, such as incorrect sensor readings or programming errors.
1. 8051 Microcontroller: Understand the basics of the 8051 microcontroller, its architecture,
instruction set, and programming.
2. Sensor Technologies: Various sensor technologies have been explored for water level
measurement, including ultrasonic, infrared, capacitive, and float switches. Studies compare
the accuracy, reliability, and cost-effectiveness of different sensor types in
specific applications.
• Start the procedure for project and making soft copy of project report
• Show the soft copy of the project report to subject teacher and make corrections in it
• Submit the hard copy of the project report to the subject teacher.
5 Button 1
6 power supply 5 volts 1
7 Bread board 1
8. Motor 1
9. Delay 1
2.5 Outputs of the micro-project
• Circuit Design:
1. Connect the water level sensors to the microcontroller's input pins. These sensors
could be connected in a way that each sensor corresponds to a particular water level
(e.g., low, medium, high).
• Components Needed:
1. Microcontroller (8051)
4. Resistors
5. Power supply
1. You can add a buzzer to provide an audio indication of the water level.
2. Incorporate a display unit (LCD, 7-segment display, etc.) to show the exact water
level numerically.
The water level indicator with microcontroller 8051 comprises several essential components
working together seamlessly. At its core are the water level sensors, which come in various types
such as float switches, ultrasonic sensors, or capacitive sensors, providing accurate readings of the
water level in the tank. These sensors interface with the microcontroller 8051, which acts as the
brain of the system. The microcontroller processes the sensor data, converting analog signals to
digital, and controls the output indicators, such as LED lights or a digital display, to visually
represent the water level to the user. The input/output interface ensures proper communication
between the sensors and the microcontroller, while the power supply guarantees continuous
operation. Additionally, the system may feature an optional communication interface, enabling
remote monitoring or integration with other devices for enhanced functionality. Together, these
components create a reliable and efficient water level monitoring system suitable for
various applications.
5.0 Working of The System
• In this system we have two tanks which is Tank1 and Tank2. Tank1 is underground
tank and Tank2 is upper tank which is on building.
• Tank1 contains only one wire is which is at lower level. This wire is only for
checking whether there is water in Tank1 or not.
• Tank2 contains three wires at the different levels at lower , middle & upper level
.This wires are used for checking the level of tank2 to turn on off the submersible
pump(motor) .
• The both Tanks also contain one more wire which is the ground wire for
completing the circuit loop.
• When the water level of tank2 goes below the lower wire then the ground is
disconnected with which lower wire and high signal is send to the P1.2 port pin of
microcontroller and it also checks tank2 also has water or not.
• As per the program microcontroller send high signal to P3.0 pin and P3.0 is
connected to BC547 transistor. This transistor act as a switch for the relay. When
this transistor receive high signal it acts as close switch and turn on the motor. Then
LCD will display its message that “Tank is EMPTY”.
• When the water reaches the middle level ,Now LCD display “Tank is MIDDLE”
and still motor is on.
• When the tank is full, it send low signal to microcontroller P1.0 and as per program
microcontroller send it to P3.0 and then transistor is act as open switch . Relay id
disconnected with ground. Motor is turn off and LCD displays the message “Tank is
FULL” ,motor is “Tank is 100% Full”.
6.0 3D Model of The System
7.0 Program Flowchart:
8.0Program Algorithm:
Step 3 - If water in upper tank is below lower sensor, turn on the motor and display
the message ‘Tank is empty and Motor is on’.
Step 4 - If water in upper tank is above lower sensor and below the mid sensor, turn
on the motor and display the message ‘Tank is empty and Motor is on’.
Step 5 - If water in upper tank touches the upper sensor, turn off the motor and display
the message ‘Tank is 100% Full’.
ORG 0000H
START:MOV P3,#00H
SETB P2.7
LCALL A1
L2:JNB P3.3,L2
LCALL A2
L3:JNB P3.2,L3
LCALL A3
L4:JNB P3.1,L4
LCALL A4
L5:JNB P3.0,L5
CLR P2.7
LCALL A5
L6:JB P3.0,L6
LCALL A4
L7:JB P3.1,L7
LCALL A3
L8:JB P3.2,L8
LCALL A2
L9:JB P3.3,L9
LJMP START
A1:MOV A,#38H
ACALL CW
ACALL DELAY
MOV A,#0EH
ACALL CW
ACALL DELAY
MOV A,#01H
ACALL CW
ACALL DELAY
MOV DPTR,#MYBYTE1
D1:CLR A
MOVC A,@A+DPTR
JZ F1
ACALL Dr
INC DPTR
SJMP D1
F1:RET
Dr:MOV P1,A
SETB P2.0
CLR P2.1
SETB P2.2
ACALL DELAY
ACALL DELAY
ACALL DELAY
ACALL DELAY
CLR P2.2
RET
MYBYTE1: DB " EMPTY ",0
A2:MOV A,#38H
ACALL CW
ACALL DELAY
MOV A,#0EH
ACALL CW
ACALL DELAY
MOV A,#01H
ACALL CW
ACALL DELAY
MOV DPTR,#MYBYTE2
D2:CLR A
MOVC A,@A+DPTR
JZ F2
ACALL Dr2
INC DPTR
SJMP D2
F2:RET
Dr2:MOV P1,A
SETB P2.0
CLR P2.1
SETB P2.2
ACALL DELAY
ACALL DELAY
ACALL DELAY
ACALL DELAY
CLR P2.2
RET
MYBYTE2: DB " 25%,QUARTER ",0
A3:MOV A,#38H
ACALL CW
ACALL DELAY
MOV A,#0EH
ACALL CW
ACALL DELAY
MOV A,#01H
ACALL CW
ACALL DELAY
MOV DPTR,#MYBYTE3
D3:CLR A
MOVC A,@A+DPTR
JZ F3
ACALL Dr3
INC DPTR
SJMP D3
F3:RET
Dr3:MOV P1,A
SETB P2.0
CLR P2.1
SETB P2.2
ACALL DELAY
ACALL DELAY
ACALL DELAY
ACALL DELAY
CLR P2.2
RET
MYBYTE3: DB " 50%,HALF ",0
A4:MOV A,#38H
ACALL CW
ACALL DELAY
MOV A,#0EH
ACALL CW
ACALL DELAY
MOV A,#01H
ACALL CW
ACALL DELAY
MOV DPTR,#MYBYTE4
D4:CLR A
MOVC A,@A+DPTR
JZ F4
ACALL Dr4
INC DPTR
SJMP D4
F4:RET
Dr4:MOV P1,A
SETB P2.0
CLR P2.1
SETB P2.2
ACALL DELAY
ACALL DELAY
ACALL DELAY
ACALL DELAY
CLR P2.2
RET
MYBYTE4: DB " 75%, 3/4FULL ",0
A5:MOV A,#38H
ACALL CW
ACALL DELAY
MOV A,#0EH
ACALL CW
ACALL DELAY
MOV A,#01H
ACALL CW
ACALL DELAY
MOV DPTR,#MYBYTE5
D5:CLR A
MOVC A,@A+DPTR
JZ F5
ACALL Dr5
INC DPTR
SJMP D5
F5:RET
Dr5:MOV P1,A
SETB P2.0
CLR P2.1
SETB P2.2
ACALL DELAY
ACALL DELAY
ACALL DELAY
ACALL DELAY
CLR P2.2
RET
MYBYTE5: DB " 100%,FULL ",0
CW:MOV P1,A
CLR P2.0
CLR P2.1
SETB P2.2
ACALL DELAY
CLR P2.2
RET
END
11.0 Simulation Result:
State 1
• The basics need of human being is water and it is one of the most important
necessary for all living beings. But unfortunately a huge amount of water is being
wasted by uncontrolled use and due to our negligence. Some other automated water
level monitoring system is also offered so far but most of the method has some
shortness in practice. We tried to overcome these problems and implemented an
efficient automated water level monitoring and controlling system. Main intension
of this research work is to establish a flexible, economical and easy configurable
system which can solve water losing problems. In the near future as home
automation web based water level monitoring and controlling system can be
designed, through which the system can be controlled from any place via internet
through mobile phone. This could have a substantial benefit from this research work
for efficient management of water.
• Automatic water level monitoring system has a good scope in future especially for
agriculture sector. There are any areas where we need water level controller. It could
be agricultural fields, overhead tanks. We can make this project wireless by using
NRF transmitter and receiver.
• In this system, future modifications can also be done like interface of GSM module to
send SMS alerts to the user.
13.0 Conclusion
• This type of water level controller will reduce the human interference. The power
consumption of the motor and the wastage of water because of unwanted overflow can
be controlled.
• This is simple model water level indicator and controller which can be made at your
home.
• This project was intended to design a simple and low cost water level indicator and
controller . This is not only for water tank but also used for oil level and chemical lab.
To design this system, we used transistor as a platform and local materials for low cost.
We tried to design a system in such a way that its components will be able to prevent
the wastage of water.
• The whole system operates automatically. So it does not need any expert person to
operate it. It is not so expensive. This design has much more scope for future research
and development. Though it is a project, we hope some modification in this project
will lead to a reasonable diversity of usage.
14.0 References
➢ https://youtu.be/uVQPlRbAcvY?si=UrWGvKAZOtp2GjS_
➢ https://www.electronicshub.org/water-level-controller-using-8051- microcontroller
➢ http://www.circuitstoday.com/5v-power-supply-using-7805
➢ https://www.instructables.com/id/All-You-Need-to-Know-About-Relays/