Introduction: Automated Water Motor With Level Indicator
Hi All, welcome to yet another Instructable. In this Project we will learn how to create Fully Automatic Water Tank Level Controller with water level Indicator feature using Arduino Nano.
Arduino is the brain of this project. It will take input from the sensors and control all other units according to the value received.
The second block is 16x2 LCD display. This unit will display the Water Level in percentage as well as in Diagram, it will also show the Pump status. This section will also notify us whenever the Sump tank is empty. The third block is the Sonar Sensor. This is used to measure the water level present on the overhead water tank.
So in this project I'll be using the HC-SR04 Ultrasonic Module to measure the Water Level and an I2C LCD to see the water level in cm.
JSN-SR04 Water Proof Ultrasonic Module
16X 2 LCD Display (Blue/Green)
230-5V Power Module
A Enclosure Box
Step 1: Getting Started With JSN-SR04
JSN-SR04 or an Water Proof ultra sonic sensor is a electronic device that works on the principle of transmission and reflection.This sensor has two pins named as TRIG and ECHO pin.
The function of ECHO pin is to emit the waves to the channel.These waves travel through the medium as a wave and reflects back when ever it hits an object or an obstacle ahead of its propagation.The time taken taken for the emission and reflection is calculated and using this value we decide the distance of the obstacle approaching us.
- The TRIG pin is connected to the digital pin 5 of nano.
- The ECHO pin is connected to the digital pin 5 of nano.
- The VCC pin is connected to the positive railing of the breadboard.
- The GND pin is connected to the negative of the breadboard.
Step 2: Working of Automatic Water Level Controller
Working of this project is very simple we have used Ultrasonic sensor module which sends the sound waves in the water tank and detects reflection of sound waves that is ECHO. First of all we needs to trigger the ultrasonic sensor module to transmit signal by using Arduino and then wait to receive ECHO. Arduino reads the time between triggering and received ECHO. We know that speed of sound is around 340 m/s. so we can calculate distance by using given formula:
Distance= (travel time/2) * speed of sound Where speed of sound is approximately 340m per second. By using this methods we gets distance from sensor to water surface. After it we need to calculate water level. Now we need to calculate the total length of water tank. As we know the length of water tank then we can calculate the water level by subtracting resulting distance coming from ultrasonic from total length of tank. And we will get the water level distance. Now we can convert this water level in to the percent of water, and can display it on LCD.
Step 3: Circuit Diagram and Explanation
As shown in the water level controller circuit given below, Ultrasonic sensor module’s “trigger” and “echo” pins are directly connected to pin 5 and 4 of arduino. A 16x2 LCD is connected with arduino in 4-bit mode. Control pin RS, RW and En are directly connected to arduino pin 3, GND and 2. And data pin D4-D7 is connected to 10, 9, 8 and 7 of arduino, and buzzer is connected at pin 6. 5 Volt relay is also connected at pin 12 of arduino for turning on or turning off the water motor pump.A 230-5V Power module using for power-up this unit.you can use 1000mA Phone charger for this.
n this circuit Ultrasonic sensor module is placed at the top of water tank for demonstration. This sensor module will read the distance between sensor module and water surface, and it will show the distance on LCD screen with message “Water Space in Tank is:”. It means we are here showing empty place of distance or volume for water instead of water level. Because of this functionality we can use this system in any water tank. When empty water level reaches at distance about 30 cm then Arduino turns ON the water pump by driving relay. And now LCD will show “LOW Water Level” “Motor turned ON”, and Relay status LED will start glowing
Now if the empty space reaches at distance about 12 cm arduino turns OFF the relay and LCD will show “Tank is full” “Motor Turned OFF”. Buzzer also beep for some time and relay status LED will turned OFF.
Step 4: Programming
To program Arduino for water level controller, first we define all the pin that we are going to use in the project for interfacing external devices like relay, LCD, buzzer etc.
Copy and paste the below code into the arduino IDE and select the arduino nano and the right port and then hit upload.
Step 5: Testing & Assembling
And after you have completed the project you should see the arduino display the water level on the LCD. You can an additional buzzer to let you know then the the water level reaches after certain threshold.
Step 6: Installing
This is a Basic implementation and did with limited resources. I'm planning to enhance this with SMS water level notification using SIM900A module as next step.
Thank you for watching.
Participated in the
Arduino Contest 2020