Hello,
Do you have a specific application for this?
I ask because that often matters.
Very good question.
Lately, I had somehow a silly idea to test. I liked to monitor the water height linearly (not just at certain levels) in my reservoir/tank. But where I live, I can't get any special component which suits this job (pressure sensors, ultrasonic transceivers... etc.).
First, I had the thought of immersing two long electrode to sense the gradual variation of their capacitance while the water height varies. I couldn't find a practical way to do it.
The alternative, I thought of, since it will not be a NASA project, was to use a narrow long closed loop of enameled wire instead. It will play the L of an LC oscillator (around 400 kHz, I am not sure). Its construction is simpler than of the two previous electrodes. I supposed that L, hence the frequency, will change gradually while the water height rises. This may be wrong. But I have the impression that the frequency will change though not necessarily because of L inductance. The LC resonant tank will likely be disturbed by the change of the electromagnetic wave speed (water/air) in its two parts (below and above the water surface).
Even if the test will let me realize that the alternative solution is also not practical, I am curious to know what I can get from the measured data at different frequencies.
In case it will be practical, the function, height versus frequency, will be adjusted in software with the knowledge it is sensitive to temperature and the water characteristic (I guess even the drinkable water of the city network is likely not the same always). And I am afraid that the function's algorithm has to be somehow intelligent to adjust itself by learning (mainly the frequencies of the upper and lower limits). After all, the accuracy is not too important. The most important is to know if water is filling the tank (when a pump is activated) or the tank loses water because of a fault, before it is too late.
Ok, so how deep is the water normally and how deep can it get as a maximum?
The inductance idea probably isn't a good one because it's too hard to measure these quantities. A better idea is to force the situation.
Maybe you can work this next idea out. One way is to measure the temperature of the water and use that as a reference. Then have the other temperature sensors be heated to something above the reference temperature. When the water touches one of the heated sensors, it's temperature will be reduced, and in that way you know the water is up to that level so far. If it touches the next sensor up, it reduces the temperature of that sensor also so you know it's even higher now.
The reference temperature is needed so you know how much to heat the sensors. Once a sensor is under water, it will stay cool until the water level falls again and then it will heat up again.
This idea assumes the at least the following:
1. There is enough water so that the needed power delivered to the sensors does not heat the water too much, but if it does heat a little then it's not enough to cause an extreme temperature rise.
2. The water is allowed to vary in temperature naturally, but the sensor logic has to allow enough time between readings so none of them are falsely reported as submerged.
3. The needed water level resolution does not have to be too small so that you don't need 100 sensors, unless you care to do that.
4. Resistors can be used along with some self heating, but you'd have to work out the details for how much to heat and a decent way to measure the resistance changes (like with a microcontroller). If not, resistors can be used as the heat elements along with good temperature sensors. Thermistors may work also, with a little forced self heating.
Something like this has to be fully tested of course in the same environment that it will actually be used in or at least a reasonable facsimile. Be aware of all possible changes that can occur naturally in the environment.