PI-41IntermediatePremium

Raspberry Pi Pico Water Tank Level Gauge and Automatic Pump (HC-SR04 + OLED + Relay)

A smart gauge that measures the water level without ever touching the water! An HC-SR04 measures the distance from the tank lid to the water, and the Raspberry Pi Pico turns it into percent and liters. At 20% the relay starts the pump and stops it at 95%; if no water comes or the tank overflows, the buzzer sounds an alarm. The OLED shows a rippling tank drawing, the flow rate and the time left to fill.

0.0(0)
Raspberry Pi Pico Water Tank Level Gauge and Automatic Pump (HC-SR04 + OLED + Relay)
Find out how much water is left in the rooftop tank without climbing a ladder: a distance sensor on the lid measures the level without ever touching the water. The small screen shows a drawing of the tank, the percentage and the liters; when the level drops, a relay starts the pump on its own and stops it once the tank is full. If no water comes in or the tank is about to overflow, the pump shuts off and an alarm beeps. Relay note: This board runs on 3.3 V. Use a relay module with an optocoupler that can be triggered by a 3.3 V signal; 5 V modules without an optocoupler may not switch off with a 3.3 V signal.

Source Code

Premium Content

The source code, block version and FAQ of this project are open to Premium members.

  • All Project Code
  • Block version
  • Frequently Asked Questions