Water Tank Level Controller Using Arduino

Water is very essential in our daily life. As we know the earth is made of 3 parts of water. But only 3% of this is fresh water. So we have to stop the wastage of water. There are many ways where water gets wasted. One of these is overflowing of tank or reserver of multiplexes, houses, flats, etc. We have an excellent solution to this problem. In this project, we are going to make an Arduino based Water Tank Level Controller System. This project is going to be very interesting.

Principle Behind Arduino Based Water Level Controller

The principle of the Arduino based water level controller is very normal. This project is based on Arduino and ultrasonic sensors.

Ultrasonic sensors are working on the basis of ECHO. We all know ultrasonic sensor works using sound waves. Sound waves get transmitted in the environment and received back to the sensor as ECHO.

We just need to calculate the time of both sound waves travelling time. When they strike obstacles and return to the sensor. After calculation, we have the distance in the result. We used this concept to control the water tank. The water pump is automatically turned on when the water level is low and turned off when the level is high.

Must Read Water Tank Overflow Alarm


Water Tank Level Controller Using Arduino

Circuit Diagram

Water Tank Level Controller Circuit Diagram
Water Tank Level Controller Circuit Diagram

Components Required

  • Arduino
  • Ultrasonic Sensor HC-SR04
  • 16×2 LCD Display
  • 5V Relay Module
  • BC547 NPN Transistor
  • Resistors (1K, 10K, 100 (x2))
  • Red LED
  • Green LED
  • 5V HI-Link AC-DC Converter (For PCB Use Only)
  • Veroboard
  • 5V Power Supply

About Parts

Arduino UNO

Arduino uno
Arduino UNO

Arduino Uno is a microcontroller board based on the ATmega328P chip. It has 14 digital I/O pins (of which 6 can be used as PWM outputs), 6 analog inputs, a 16 MHz crystal oscillator, a USB connection, a power jack, an ICSP header and a reset button. It contains everything needed to support the microcontroller, simply connects it to a computer with a USB cable or power it with a DC supply.

HC-SR04 Ultrasonic Sensor Module

Ultrasonic Sensor

This is a sensor that can measure the distance of an object from the sensor position by ultrasonic sound waves. It sends ultrasonic waves of 40 KHz in the medium. If the waves are reflected on the object and bounce back to the sensor, it calculates the distance by calculating the travelling 111time and speed of sound.

Circuit Connection of Water Level Controller using Arduino

The circuit is the same as the diagram. You just need to fix the ultrasonic sensor module at the top of the tank. So that the module can measure the water surface and collect the data from the tank. When the water level is low about 30 cm, the Arduino turns on the pump and the LCD display shows “LOW WATER LEVEL” and the Led starts glowing.

When the space in the tank is about 12cm the pump will turn off and the LCD display shows “TANK IS FULL“. The buzzer starts beeping at this time and the LED turns off at this moment.

PCB Design

For removing messy wiring and give a clean look, I designed a PCB prototype for this project. It is also helpful for troubleshooting that runs great without any errors. To design this PCB board, I used EasyEDA as it is too easy to use. For ordering PCB for this, I prefer PCBWay.

Gerber file for Water Tank Level Controller Gerber.

You can view the Gerber file from here Gerber File Viewer.

PCB View

Water Tank Level Controller Using Arduino 2D View
2D View
Water Tank Level Controller Using Arduino 3D View
3D View

Order PCB From PCBWay

There are so many forums or communities for electronics online in today’s technical world, and one of the famous ones for PCB manufacturing is the PCBWay. PCBWay is a place that brings manufacturers and customers together. They have more than a decade of experience in this field of fabrication, prototyping and assembling PCBs. PCBWay have proved their focus to their customers’ needs in terms of cost-effectiveness, delivery, and quality.

Monthly Submission for PCBWay

Great opportunity for showing your creativity in electronics right now. PCBWay’s Open Source Community is a platform for sharing creative electronic projects and insightful knowledge for global project makers.

You can express your own ideas about electronics and also receive feedback from the community that is ready for you! Whenever you have some useful and practical ideas on how to design or develop an electronic project, or anything that you think should be discussed at PCBWay. By writing articles on your own unique ideas, you can earn reward points basis on your project as well as earn money. You are always welcome to post articles about electronic projects in their community. For detailed information just check out this link and start a fresh beginning. Monthly Submission for PCBWay.

How PCB Manufacturing Process Done in PCBWay

Standard quality for any product needs to be maintained using some parameters. PCBWay gives that opportunity by quality control in designing and manufacturing. At first, they ensure accuracy, clarity, validity of the PCB files that we sent to them.

Then all the boards will go through the most stringent tests other than the basic visual check. They adopt most of the testing and inspecting equipment used in the industry, such as Flying Probe Tester, X-Ray Inspection Machine, Automated Optical Inspection (AOI) Machine. PCBWay are having 50+ new engineers on the daily basis around the world using PCBs for their work, who trust for their reliable quality. They produce high-quality pink, orange, grey, even transparent solder mask. Moreover, according to people’s needs, they can also provide Black core PCB. Check it out for a High-Quality PCB solder mask. There are some pictures below of the new colours of solder musks.

Features of PCBWay

PCB Prototyping & Manufacturing: PCBWay produces FR-4 and Aluminum boards and advanced PCBs like Rogers, HDI, Flexible and Rigid-Flex boards, at a very reasonable price. Just check this Instant Quote to order premium PCBs for your hobby projects.

PCB Assembly: It not only offers PCB Prototyping but also offers PCB Assembly service. You can order a full PCB board with attached components by uploading your file. SMT & THT assembly starts from only 30$ including free stencil and worldwide shipping. The components can be sourced and provided by PCBWay, or by clients themselves.

Open Source Community: It not only offers PCB Prototype & Assembly service but also gives opportunities to students for sponsorships. I think this is so great. They feature their projects on the website also.

3D Printing & CNC: It also produces Rapid Prototyping like 3D printing, CNC Machining, Sheet Metal Fabrication, and Injection Molding. The quality of the product is too premium and reliable. And also the best part is that you will receive your order within a minimum of 3 days.

PCBWay Store: More boutique gift modules are waiting for you to discover, giving your creativity wings. You can order all types of electronic equipment, components and many more with exciting offers. Go with the link and buy your needs, PCBWay Store.

Services: PCBWay offers great servicing of their products. It takes only 3 to 15 days according to courier service to deliver your products. Also, it has a live support facility. Whenever you have any problems, you can always reach a live customer service person to respond to your emails or messages. They have the “Return and Refund” principle, for every unusable board caused by PCBWay, they will rebuild and refund the order soon.

Guide for Ordering PCB From PCBWay

Working Principle of Water Tank Level Controller

The working of this circuit is very simple. We use an ultrasonic sensor that detects the reflection of sound waves from the water surface. At first, we trigger the ultrasonic sensor to transmit the signal and then wait for the ECHO. Arduino calculates the time between triggering and receiving ECHO. We know sound travels with a 340 m/s speed in the air. So we use,

Distance = (Travel time / 2) × Speed of Sound

Now we have the distance between the sensor and the water level in the tank. Now we need to calculate the length of the water tank. Then subtract the resulting distance. Now we have the water level. The Arduino converts it into a percentage. The LCD Display shows the percentage of water present in the tank every moment.

By this process, we can control the water level. The second part is when the water level is low and the relay activates the pump and the pump starts to fill up the tank. When the tank water level gets high the pump turns off automatically.

Arduino Code

10 thoughts on “Water Tank Level Controller Using Arduino”

Leave a Comment