The Water Level Controller project, incorporating the 8051 Microcontroller, serves the purpose of automated water motor management by monitoring the water level within a tank. This guide provides an overview of how to effectively monitor and regulate the water level in an overhead tank or any other container. The system continuously tracks the water level in the tank and activates the motor when the tank is empty.
Conversely, when the overhead tank or container reaches full capacity, the motor is deactivated. Furthermore, the water level within the tank is presented on an LCD screen (Liquid Crystal Display), ensuring that water overflow is effectively prevented.
Previously, we explored the construction of a water level indicator circuit employing an AVR microcontroller. In this instance, we are opting for an 8051 microcontroller to establish a circuit capable of autonomously detecting and controlling water levels within an overhead tank.
The water sensing function in this system relies on a set of four wires positioned at different levels within the tank. At the tank’s base, a DC supply probe is strategically installed to facilitate the process.
- Construction and Output Video
- Water Level using 8051 Circuit Principle
- Water Level using 8051 Microcontroller Circuit Diagram
- Components Required for Water Level using 8051 Microcontroller
- How to Design Circuit for Water Level using 8051 Microcontroller?
- Algorithm for Water Level Controller Circuit
- Water Level Controller using 8051 Circuit Simulation Video
- DOWNLOAD PROJECT CODE
- How to Operate Water Level Controller Circuit using 8051 Microcontroller?
- Water Level Controller Circuit Advantages
- Applications of Water Level Controller Circuit using 8051
Construction and Output Video
Water Level Controller using 8051 Circuit Principle
This concept operates on the principle that “water conducts electricity.” It employs four wires immersed in the tank to detect and display varying water levels. The microcontroller interprets the data from these wires, presenting the water level on the LCD screen and governing the motor accordingly.
When the tank becomes empty, the LCD screen will exhibit the word “LOW,” prompting the motor to commence running automatically. As the water level reaches the halfway point, the LCD will indicate “HALF,” and the motor will remain operational.
Once the tank achieves full capacity, the LCD display will read “FULL,” leading to the motor’s deactivation. Subsequently, when the water level in the tank drops below a specific threshold, the motor is reactivated.
Water Level Controller using 8051 Microcontroller Circuit Diagram
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)
- 10µF 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 central component of the Water Level Controller project employing the 8051 Microcontroller is the AT89C51 Microcontroller. Water level probes are interfaced with transistors P0.0, P0.1, and P0.2, with each probe linked to the respective transistor base via current-limiting resistors. Specifically, P0.0 corresponds to a LOW water level, P0.1 signifies a HALF level, and P0.2 indicates a HIGH water level.
The collector terminals of the transistors are connected to the VCC supply, while their emitter terminals are linked to the PORT0 pins, namely P0.0, P0.1, and P0.2.
In the microcontroller setup, PORT1 is connected to the data pins of the LCD, whereas the control pins of the LCD—RS, RW, and EN—are connected to P3.6, GND, and P3.7, respectively.
For the purpose of this demonstration, a basic DC Motor Pump is utilized, with its connection routed through a relay. The relay, in turn, receives its input from P0.7 through the intermediary of a transistor.
Algorithm for Water Level Controller Circuit
- To begin, set P0.0, P0.1, and P0.2 as inputs and P0.7 as an output on the controller.
- Now it’s time to set up the LCD.
- Check the water level input pins P0.0, P0.1, and P0.2 on a regular basis.
- If all of the pins are low, the tank will be displayed as “EMPTY” on the LCD, and the P0.7 pin will automatically operate the motor.
- Display the water level as “LOW” and continue to run the motor if the level is low, i.e. if P0.0 is HIGH.
- A HIGH pulse on pin P0.1 indicates that the water level has dropped to half. So, on the LCD, show the same thing and run the motor normally.
- The water level in the tank is FULL if P0.2 is HIGH.
- To switch the motor off automatically, set the P0.7 pin to LOW.
Water Level Controller using 8051 Circuit Simulation Video
How to Operate Water Level Controller Circuit using 8051 Microcontroller?
- Write the Water Level Controller software in Keil Vision IDE and generate the.hex file first.
- Using an external programmer and Willar Software, burn the software (.hex file) to the microcontroller.
- Assemble the connections according to the circuit diagram.
- Make sure there are no common connections between the AC and DC supply while making the connections (if you are using an AC Motor)
- Place the four wires that indicate the water level in the tiny tank (3 probes for three different levels and fourth one for common supply)
- Turn on the power. Because there is no water in the tank, the motor will start automatically. (Even if the water level is LOW, it will turn on.)
- Pour the water in, and when it reaches the LOW level, the LCD will show LOW.
- On the LCD, it will say HALF for middle level.
- If you continue to pour water, the water level will approach full, the LCD will indicate FULL, and the engine will turn off automatically.
- Turn off the power to the engine and the board.
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.
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.