By sensing the water level in a tank, the Water Level Controller utilising 8051 Microcontroller project will assist in automatically managing the water motor. This article will show you how to monitor and manage the amount of water in an overhead tank or other container. This device keeps track of the tank’s water level and turns on the motor when the tank is empty.
When the overhead tank or container is full, the motor is turned off. On the LCD, the tank’s water level is displayed (Liquid crystal Display). Using this system, we can avoid the overflow of the water.
In a previous piece, we looked at how an AVR microcontroller may be used to make a water level indicator circuit. However, we are utilising an 8051 microcontroller to construct a circuit that detects and controls the water level in an overhead tank automatically.
Water sensing is accomplished in this system by a series of four wires placed at various levels in the tank. At the bottom of the tank, a DC supply probe is installed.
- 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 is based on the idea that “water conducts electricity.” The varying water levels will be shown by the four wires that are dipped into the tank. The microcontroller shows the water level on the LCD and regulates the motor based on the outputs of these wires.
When the tank is empty, the LCD will display the phrase LOW and the motor will begin to run automatically. When the water level hits half, the LCD indicates HALF and the motor continues to run.
When the tank is full, the LCD reads FULL and the motor turns off. When the water level in the tank falls below a certain level, the motor starts up again.
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 AT89C51 Microcontroller is at the heart of the Water Level Controller using 8051 Microcontroller project. The water level probes are coupled to the transistors P0.0, P0.1, and P0.2 (they are connected to the base of the transistors through corresponding current limiting resistors). P0.0 indicates a LOW level, P0.1 indicates a HALF level, and P0.2 indicates a HIGH level.
Transistors’ collector terminals are connected to VCC, while their emitter terminals are connected to PORT0 terminals (P0.0, P0.1 and P0.2).
The microcontroller’s PORT1 is connected to the LCD’s data pins, while the LCD’s control pins RS, RW, and EN are connected to P3.6, GND, and P3.7, respectively.
We used a basic DC Motor Pump for demonstration purposes. It’s wired to the relay, and the relay’s input is fed from P0.7 via 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.