Shop by category
Shop all componentsSensors & MCUs
Inside a tank the sensor is in humid air, so use a waterproof sensor (JSN-SR04T or A02YYUW) for anything permanent and keep it away from the inlet and the walls. Average several readings to smooth out ripples, and add a float switch as a backup for the pump cut-off.
Water height = sensor height − readingRound tank: V = π × d² ÷ 4 × heightRectangular tank: V = length × width × height1 L = 1000 cm³% full = water height ÷ full heightA round tank 100 cm across, full at 120 cm, with the sensor 145 cm above the bottom. A reading of 70 cm means 145 − 70 = 75 cm of water: π × 50² × 75 = 589,000 cm³ = 589 L, 63% of the 942 L capacity.
An ultrasonic sensor fixed to the top of the tank measures the distance down to the water surface. Subtract that from the sensor’s height above the bottom and you have the water height; multiply by the floor area of the tank and you have the volume.
Each centimetre of height holds the same amount of water in a straight-sided tank, so the calculator also shows litres per cm, which makes it easy to set alarm points in code. Sloping or conical tanks need a lookup table instead of a single formula.
For a short project, yes, but humidity inside a tank corrodes it and condensation causes false readings. For permanent use, choose a waterproof sensor such as the JSN-SR04T, and mount it above its minimum range from the full level.
Litres = π × diameter² ÷ 4 × water height ÷ 1000, with all sizes in cm. A 100 cm wide tank holds about 7.85 L for every cm of water.
Ripples, the inlet stream, and echoes from the walls or pipes. Mount the sensor away from these, take the median of 5 to 10 readings, and ignore single readings that jump by more than a few cm.
Water height = sensor height − reading; Round tank: V = π × d² ÷ 4 × height; Rectangular tank: V = length × width × height; 1 L = 1000 cm³; % full = water height ÷ full height.
A round tank 100 cm across, full at 120 cm, with the sensor 145 cm above the bottom. A reading of 70 cm means 145 − 70 = 75 cm of water: π × 50² × 75 = 589,000 cm³ = 589 L, 63% of the 942 L capacity.
Geekobot builds that use it include Wi-Fi sump and tank float monitor, Water tank low-level float alarm, Sump pit overflow alarm and Aquarium low water alarm. Each has the full parts list, wiring and code.
Results are estimates for design and learning. Check critical designs against the component datasheet. Made by the Geekobot Learning Team. How we write our calculators