Patronics / poolPi

Raspberry Pi pool pump controller with GUI web interface and PICAXE depth sensor
MIT License
6 stars 0 forks source link

Question: How do you measure the water level? #1

Open OllisGit opened 6 years ago

OllisGit commented 6 years ago

I also need a solution to measure the water level of my "zisterne" and I am start thinking about a ultrasonic sensor attached to a ESP32 or 8266 uController.

What do you use? Olli

Patronics commented 6 years ago

I use a PICAXE microcontroller with capacitive “touch” input to a strip of copper tape on the outside of the pool. Note that for this method you need to be able to access the outside of the pool, and have a non-metal surface to put the copper tape on. (In my case I use an old opening in the metal sides of my vinyl pool where a pump used to be). The PICAXE then sends this (raw touch value) data over a serial connection to the Raspberry Pi. One downside I’ve encountered with this method is the copper tape tends to peel over time, leading to the output needing recalibration over time. I also only use it to measure a range of around 1 foot of water, the range of acceptable heights for the pool’s pump. I don’t think it would as work well if you needed to measure the entire height of the pool (if it’s likely to be filled over a large range of heights).

The “simplewatertest.bas” file is the PICAXE program to output this data.

You could also easily use some other microcontroller and sensor combination with little modification to the raspberry Pi’s code, just have the microcontroller of your choice read the pool level with its sensor, then output “UUU TouchValue: x“ (where ‘x’ is the analog reading from the sensor) over a 4800 baud UART connection. You’d also need to adjust the “maxlevel” and “minlevel” values (and the number divided by on the “poollevel = (touchval-minlevel)/100” line) in home.py. If you attempt this project, I’d love to see a fork with your modifications, with whatever microcontroller and sensor you use 😄.