How to Make a Water Level Indicator with Arduino 6 11

Knowing the amount of water in an overhead tank can be one tedious task. Usually, you’ll end up climbing up the stairs to the tank and checking the level manually or you’ll you hear the water overflowing from the top. But these days electronic water level indicators are available to fix this problem, but they often come with a hefty price tag and are usually difficult to install. Most of the available systems use dipped electrodes or float switches, which can be a headache in the long run. We present a different approach to knowing the water level using an Ultrasonic module with Arduino. The advantage of this method is that it is contactless, so issues like corrosion of the electrodes won’t affect this system. Furthermore, this Arduino water level indicator it is much easier to install than regular systems.

How to Make a Water Level Indicator with Arduino

Required Materials

  1. ATMega328P microcontroller or Arduino board
  2. HC-SR04 Ultrasonic Ranging Module (aka PING sensor)
  3. 10K Resistor
  4. 16Mhz Crystal
  5. 22pf Disc capacitors: 2Nos
  6. Connecting wires
  7. LM7805 5V regulator
  8. 9V battery and connector
  9. 10uF electrolytic capacitor
  10. PCB or breadboard
  11. Wire stripper

Software needed: Arduino IDE

How Does it Work?

Sonar_Principle-min

This Arduino water level indicator uses an ultrasonic sensor or Ping sensor to determine the level of water in the tank. The Ping sensor measures distance using sonar. An ultrasonic (well above human hearing) pulse is transmitted from the unit and distance-to-target is determined by measuring the time required for the echo return. Output from the Ping sensor is a variable-width pulse that corresponds to the distance to the target. This is then fed to the microcontroller that determines the water level and displays it through a series of LEDs.
The following project can be interfaced to an Arduino board if you have one or directly to an ATmega 328 microcontroller on a breadboard. You can also check out the DIY Hacking tutorial from Jeff to learn to interface an ultrasonic sensor to Arduino.

Code for the Arduino Water Level Indicator

Copy-paste the provided sketch in the Arduino IDE and find the line “ int d=18;” and change ‘18’ to the depth of your tank in centimeters.

Read More:  How to Make a Water Level Indicator with Arduino


About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top