How to Build Your Own Water Tank Level Sensor

The JSN-SR04T and A02YYUW comparison is useful, especially the point about waterproofing since condensation inside a tank can ruin a plain HC-SR04 quickly. For a Blynk setup on ESP8266, I’d lean toward the A02YYUW for its simpler serial output and fewer false echoes off tank walls. One thing worth adding: mounting the sensor with a small offset from the fill inlet avoids spurious readings when water splashes. How stable are the readings over long periods with the JSN-SR04T in a closed tank?

Your point about the offset from the fill inlet is well taken, though splash disturbance depends a lot on how the tank is filled and how much headroom there is above the maximum level. On the question of long-term stability with the JSN-SR04T in a closed tank, I would expect the main concerns to be condensation on the transducer face and temperature drift affecting the speed-of-sound calculation, so temperature compensation and a periodic zero-level recalibration seem worth planning for. Have you compared averaging multiple samples against median filtering for suppressing spurious echoes?

On averaging versus median filtering: for occasional splash or wall echoes, a median over a short window tends to reject outliers more cleanly than a plain mean, which just smears them across the result. A trimmed mean can be a reasonable middle ground if you still want smoother level changes. For the JSN-SR04T in a closed tank, temperature compensation addresses the drift you mentioned, but condensation on the face still argues for mounting it slightly recessed or angled so droplets don’t pool. Periodic recalibration against a known empty level would catch slow offset creep either way.

When it comes to tank water level monitoring, ESP32 Dual Ultrasonic Water Level Monitoring System looks promising too. It’s a Two-Tank Monitor with Relay Control. It measures the water level in two tanks at the same time. It pairs two ultrasonic sensors with an ESP32, and uses the ESP32’s processing power and built-in wireless connectivity to monitor the levels and support automated water management.