Case study

Water tank monitor v2

An HX710B at the tank bottom measures hydrostatic pressure through the trapped air column; Python on the server derives water level for the dashboard, using outdoor air temperature in the math (as air pressure depends on temperature) when that reading is available.

All gadgets

Tank board

HX710B pressure

Pressure

MQTT reading

Python preprocessor

pressure → level

Dashboard

tank widget

Why

Water tank v1 was unreliable when humidity in the tank was high or the water surface was disturbed. Pressure at the bottom tracks the water column above the sensor, including foamy or uneven surfaces where ultrasonic echoes struggled.

How

The ESP32 reads the HX710B and publishes pressure over MQTT.

A Python preprocessor converts pressure to water height and level for the dashboard and smooths noisy samples.

Refined level, over MQTT, goes to the dashboard and to another ESP32 with a small OLED, so tank level shows in both places.

For a precise reading, outdoor air temperature from the outdoor weather sensor is included in the calculation when it is online.

Where Python sits on the MQTT path — How it All Works.

ESP32 + HX710B pressure sensor