[Water Level] H ow to measure the water level?

Hello everybody,
I just finished configuring irrigation (OpenSprinkler);
The irrigation use the rain water in a tank (10.000lt) and when the water is finished we use the well to refill it.
The well pump now works with openhab thanks to a ZWave Relay.
Now i’d like to measure the water level in the tank.
I can use an ultrasonic sensor or also other sensors (like immersion sensor).
But i didn’t understand how to interface it with openhab.
Thanks in advance!

If your tank is in wifi range one of the cheapest solutions is:

It depends, whether you build one yourself or want to buy…

I did extensive research and figured that all sensors commonly used for water level sensing will either have flaws, inaccuracies or fail over time due to water vapour, etc.
I built mine with an MPX51xx series dual pressure sensor and an Arduino.
The same principle will be used to control the heat recovery ventilation to provide positive pressure, when the fire place is operating.

Thanks for your help.
Before to post this request i try to check other solution; for example i founded this:
http://www.practicalarduino.com/projects/water-tank-depth-sensor
(seems equal to @Max_G solution)
Seems a good solution but i’m not good to read scheme; i can use solder, i can program but i never read a scheme so isn’t easy for me :slight_smile:
I know the question will seem fool but, there is a way to interface a flood sensor with a Fibaro FIB_FGBS-001?
Otherwise I will ask for help to read the schema!
Eventually I could copy your Arduino?
Openhab reads data via xml?
Thank you and I’m sorry!

1 Like

I’ve also done the same thing with the pressure sensor. I used ultra sonic sensor initially, but after about a year it failed as it is difficult to environmentally seal. The pressure sensor is working well for the past 4 or 5 years :slight_smile:

It’s not possible to use something like the zwave flood sensor to measure water depth. You could possibly use it (with some small modification) to sense a specific depth - so it could tell you when the tank was nearly empty, but it can’t be used to give a variable water level.

Thanks for your suggestion; i just studied this scheme:
http://www.practicalarduino.com/projects/water-tank-depth-sensor
Do u think it’s a good project?
Do u have other suggestion?
Thanks :slight_smile:

It looks fine - it’s similar to what I did. I don’t recall exactly what I used, but it was a similar sort of pressure transducer with an opamp, and potentiometer to adjust the full scale value. I then used a piece of rubber tubing connected to the pressure transducer, and put this inside a 10mm diameter piece of alumniium to provide the rigidity where it goes down into the water tank.

1 Like

@chris Can you link to the type of sensor your used?

Probably not - I built it many years ago - maybe 5 or 6 years (and it’s still working fine). It was just a simple relative pressure sensor with analogue output, hooked back to a microcontroller…

I’ll see if I can open it and get some pictures and the part number.

It looks like the part I used is MPX5010DP.

This image shows the sensor on the PCB - I think it’s just a 5v regulator, filter capacitors and protection diode - this is mounted outside and a little bit away from the irrigation controller. It measures the amount of water in a 1200 litre bulk container so I can decide if I should water the garden at night…

The black flexi tube in the top of the sensor runs down to the bottom of the tank to measure the overall water pressure.

This image is the complete unit. The aluminium tube is just there to provide some rigidity and support for the plastic tube that is actually doing the sensing.

It ain’t so pretty :sunglasses:, but it’s been there for 5 or 6 (maybe 7 even!) years, where the ultrasonic version I had before this didn’t last a year before it corroded. Maybe there are better ultrasonic sensors out there than the one I used, but I’ve certainly been happy with this setup and I’ve had 0 problems with it since it was installed.

Thanks for the details. I am looking for a solution for a tank which stores drinking water so keen on using non-carcinogenic plastics.

Is your setup like this?

Yes - this looks pretty much the same as what I did - certainly the same concept.

I suppose the plastic hose needs to remain vertical in the tank. Can there be any bend in the pipe after it comes out of the tank?

Here is a picture from the internet which shows my kind of tank.

I don’t think it will matter too much - it’s the pressure that matters, and this will only be affected by the depth of water, not the pipe length. So long as the end of the hose is at the bottom of the tank, it shouldn’t matter.

My tank is 1.2 meters deep and that is why I have the 1/4 inch aluminium pipe. This provides the rigidity needed, but it’s not providing the pressure reading - the plastic hose is inside, and it’s only the plastic hose that connects to the pressure sensor.

Yes - I don’t expect this to matter. What matters is the pressure of the air inside the pipe, and this is directly related to the depth of the water in the tube. Bending the tube won’t affect this.

What microcontroller are you using? Can you post your code?

1 Like

Quick search found:

I’m using a PIC, but I’m not sure I can find the code. I would suggest to use the Arduino solution that @sihui posted. Ultimately, it’s quite simple - I have a simple calibration routine to measure the ADC level empty and full, and then scale that linearly with the actual level.

I bought this sensor. Unfortunately, the nozzle on the sensors are pretty small. Any idea where can I get the hose for this?

The datasheet has all dimensions listed.

In which part of the world? :laughing: