Bulid Your Own Leakage Detector?
I am looking for the possibility to monitor the level in a rainwater tank. It should be sufficient to monitor steps like "empty", "quarter", "half", three quarter" and "full".
There are loads of leakage detectors on the market- most of them bring their own control device which frequently has an 1-wire interface. Well, and all of them costs a fortune (usually around 70-150€).
Now I realized such leakage detectors are usually not more than just two cables which will use water as switching medium. So how about using the following circuit with 5V or 24V as power supply?
When water reaches two open wires the circuit gets closed and is recognized by the DI.
In this case, if all DIs are open, water is empty. If all are closed it has reached max.
Would this work?
In principle yes, it should work, but you may have to play with the voltage and current a bit.
Additionally depending on the liquid it may not be safe to run significant amount of electricity through it, though it should not be an issue with water as such.
Thanks a lot for confirmation. I was thinking of 5V or 24V.
What Resistor should I use?
Hi @knebb, did you look into other options of measuring water level? As @TomasKnot stated, it is not exactly safe option. Also the "test leads" suffer from oxidation, so the measured value can change in time and may not react to the threshold set by value of R .
I also needed to measure such value and decided to use non-contact sensors. Depends on your application, but e.g proximity sensors (capacitive, IR,...) or distance measurement (distance from top of the tank to the water level) can solve your problem...
- Buy a sensor, that gives 0-10V or 0-20mA depending on the level of the fluid...
- Get a sensor, that is designed for this named "Float switch". And use them instead of the stripped cables.
@tomas_hora It really depends on the actual application. I needed to measure 50mm difference in water level in tight space (approx. 30mm x 30mm). So for me, mechanical solution was a no-go, since there are no such small sensors.
But for @knebb's purpose, some set of float switches (at the bottom, 1/4, 1/2, 3/4 and at the top) could be easy and affordable solution. I would connect them to a resistor ladder and 10V power supply thus converting the 5 states into evenly spreaded 0-10V which can be directly measured by UniPi's AI input. This could be better than occupying 5 DI inputs, if the number of DI's is also an issue.