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

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:

@sihui Thanks for the datasheet. On page 7 it mentions the minimum diameter to be 0.110 inch and on page 9 the dimension T is 0.115 inch.

USA is where i want to buy it. Wonder if this would work.

Yours is case 1351, so page 7 should be correct.
I always found stuff like that in my local Home Depot.

Thanks @sihui and @chris I had built capacitive level sensor. The accuracy was really good even with diesel. But humidity in the cylindrical probe caused a lot of trouble. With careful design, capacitive can also give long life. And it takes no fancy parts, just Arduino 10mm stainless steel rod (outer -ve electrode), and coaxial TV cable (inner electrode).
I also had optimized Arduino capacitive sensor library for 8bit, so that resolution stays good at 2 MHz. I can share code if people are interested. I used MySensors for communication.

How much does MXP51 pressure sensor cost?

It’s around $16 at Digikey. Maybe there are cheaper ones out there if you look around, but I can certainly say it works well, and has done for many years now…