Skip to content
Adaptive AgroTech NetworkUniversity of Southern Denmark · SDU Drone Center
Cover for Arduino Automatic Tank Refill | Ultrasonic Level & Pump Control

Video by Adaptive AgroTech. If the embedded player is unavailable, open the original video ↗.

Arduino Automatic Tank Refill | Ultrasonic Level & Pump Control

An Arduino can use ultrasonic distance to a liquid surface to decide when a tank needs refilling. The air gap decreases as the tank fills.

Understand the concept

The key idea

The distance reading needs a known mounting reference to represent liquid level. Separate start and stop levels allow a refill cycle to finish without repeatedly switching the pump near a single threshold.

What to remember

  • Convert air gap to level using a fixed reference.
  • Treat invalid or missing echoes as a separate condition.
Pause & think

Check your understanding

If the measured air gap shrinks, what usually happened to the liquid level?

Show the explanation

It rose toward the sensor, assuming the mounting position stayed fixed.