Water level measurement using Ultrasonic sensor


Water level measurement using Ultrasonic sensor is a unique project, where level of water is converted into volume. Water level measurement is useful when users want to know the exact amount of water in a tank.

It is an essential things to follow, as it makes users work easier. People will get exact volume of water in a percentage calculation. Similarly, ultrasonic sensor helps to measure the distance from water tank to the water.

And when the distance is calculated, you have to insert a volume formula. This formula will calculate length, breadth and height and will provide an exact output.


This ultrasonic distance measurement sensor is use for measuring the distance from any range between cm to few meters. The cost of the sensor is around $3. Similarly, this kind of sensor easily adjust in environment, which makes it reliable and user-friendly.

Moreover, this sensor is use as Water Volume Measurement Sensor in Smart Aquarium project. Likewise, formula of Volume = Length * Width * Height, which will calculate the water level measurement.

ultrasonic sensor

ultrasonic distance measurement sensor

 From the above figure 9, there are altogether of four pins available. Here VCC denotes 5V, Trig denotes trigger, echo denotes echo and GND denotes Ground. Besides, there are two transducer- one is transmitting and another receiving.

Technology used:


  1. So, it measures the water level and distance of water tank from the sensor.
  2. Low power consumption.
  3. The cost of sensor is very cheap.

Things to know:

  1. Water level measurement using ultrasonic sensor needs 5Volt power for the running the device without data fluctuation.
  2. You need jumper cables for connection.
  3. You have to keep sensor in a low distance, so that exact data can be extracted.
  4. The distance from sensor must be calculate properly, else data will fluctuate.

Therefore, you can download the code below :


Thank you,



0 0 vote
Article Rating

You may also like...

Notify of
Inline Feedbacks
View all comments
Would love your thoughts, please comment.x