I have a rainwater tank in my garden and I’m a tinkerer, so I decided to do some water level monitoring. For this I used a Raspberry Pi Pico W, which is small, cheap and has integrated Wi-Fi.
I used a water pressure sensor that I connected to a longer cable, watertight sealed and submerged in a tank of water. It leads to a Pico that reads the value on the analog pin. I measured the value on the pin at the very bottom of the tank, then the top, and adjusted the scale accordingly.
In addition to the amount of rainwater, I am also interested in whether my other (septic) tank is full. It is in a different location, but there is a sensor that detects whether it is full or not (and a 230V light bulb comes on). I put a conventional cell phone charger on that bulb and when it lights up, it sends a 5V signal to the Pico which I read on the digital pin.
The whole thing is housed in a professionally made electrician’s box, including its own circuit breakers and outlets (for the pump and pool filtration).
Pico also runs a webserver that returns JSON with water level and septic tank status.
I then made a progress bar on my local dashboard that shows me how much water is in the tank and if the septic tank is full.
Little helper.