14

In a similar way to the question "best way to determine if a 5 gallon water jug is getting empty", I'm looking for a way to measure water in a container. This is so it can be connected to an Arduino for logging and reporting. But it's a very different container.

I have a home with the household water supplied from an underground concrete tank (around 3000 US gallons, 11000 litres). Although there is a float switch cutout when it gets empty (to protect the pump), I'd like to know it's gettting low long before that (as it takes a while before a tanker delivers a fresh load). Ideally something that measures exactly or in steps (at least in eights of a load), so software can predict when it'll run out based on average usage, and it can be monitored online when away.

The tank has a heavy concrete hatch, and a small hole that has an existing primitive dipstick, so access is limited. It's in a harsh desert environment, but the pump room and power are only a few feet away.

Some ideas I had:

  • suspend an array of float switches with strings of different lengths from a bar inside the tank, and wire them all back to a controller. Hard to install, ugly, low tech. Or something similar on a vertical pole.
  • contacts (like a US 2 pin plug) on a vertical pole that again are connected back to a controller (probably using a ribbon cable). Corrosion/anodes might be a problem, although power could just be a short pulse at times. Condensation, spiders webs and dead bugs may give false readings.
  • run a fully insulated cable vertically down it, and use as an antenna to send a pulse through, and use the difference between how it works as an antenna in air, and in water, (like an SWR meter) to calculate how far down the water is.
  • ultrasonic (or light?) distance finder mounted under the hatch. Range needs to be up to 2 metres (6 feet).
  • depth finder (sonar) on a float. Biggest challenge here is getting the signal out (long cable might get tangled when the tank fills).

The last two would be even better if they were wireless (to save running a cable that might get damaged) but I don't think I'd get the battery life I'd like (1 year or more).

Any other ideas? Has anybody ever done this?

10 Answers 10

12

I have a background working on ships where robust and workable tank level gauges are a huge part of instrumentation available to you. Water is the most forgiving and easiest liquid to measure - it's cool, not too viscous, not corrosive in itself, and easy to clean off. There are a lot of options available to you.

Personally I would avoid any system which involves immersing anything in liquid if at all possible. Waterproofing isn't easy. I would also try to stay with a tried and tested system.

So to run through your solutions:

  1. Multiple float switches - has poor resolution. Would be reliable. You can buy assemblies with LowLow, LowHigh, HighLow, HighHigh float limit switches already on them for maintaining tanks levels, but these are industrial quality with industrial prices.

  2. This would work, but corrosion is going to be an issue. Resolution limited by how many contacts you have.

  3. Interesting idea, but would likely require a lot of DSP work. Not a tried and tested method.

  4. An ultrasonic sensor would be my preferred method. Non-contact, high resolution, range of 2m is easy. Tried and tested system.

  5. Interesting idea, would require a lot of work. Easier to measure depth of air as per 4 and do the simple maths.

A few other methods come to mind:

  1. A pressure sensor at the bottom of the tank. This is often used on ships, works well but needs immersion which can be avoided.

  2. Inflow/outflow monitoring. A flow meter on the output can tell you how much you have used. Inferring level like this is prone to errors though.

There are a million other methods, but they get more and more complex.

The ultrasound would be a great way to do this. The commonly available Parallax Ping sensor would do the job. Realistically, you would only need to make measurements at most once every hour, so you could achieve great battery life. The concrete is likely to present a wireless range challenge. Most RF transceivers will get through concrete though, so place the receiver nearby.

If you want ideas on how it is done, google for ultrasonic oil level monitoring - there are loads of wireless commercial solutions.

5
  • 6
    I would concur with the ultrasonic sensor. Stick a length of PVC down the dipstick hole into the tank so the pipe fills from the bottom. Drop a ping pong ball or a float down the pipe so it rides up and down inside the pipe. Aim an ultrasonic sensor down the pipe and read the distance to the ball/float.
    – mikeY
    Feb 28, 2014 at 19:07
  • 1
    I've had no issues using the bare sensor onto water with a 5cm length of pipe over the end to reduce spurious reflections, but I do like the ping pong ball idea. Mar 1, 2014 at 9:22
  • 1
    @Mike Good idea but I don't know if most ultrasonic sensors would reach deep enough for a 3,000 gallon tank. Also, a sensor might be too wide to fit in a pipe that holds a ping-pong ball... Mar 1, 2014 at 18:40
  • 1
    Question states range would need to be about 2m, Parallax Ping does 3m. Mar 1, 2014 at 21:03
  • 1
    cybergibbons - nice list of for/against reasons, I agree with you that ultrasonic looks the simplest and most standard. I'll leave the question open for a few more days for other suggestions before accepting an answer. @mikeY - nice idea, simpler to mount, but the existing hole (through concrete) that the dipstick uses is (as Annonomus Person suggests) too narrow for a sensor (it's about 1/2", 12mm diameter). Looking at the dipstick, the depth might be nearer to 3m than 2m, but that's still enough (as it's never empty).
    – Rob Hoare
    Mar 1, 2014 at 21:56
17

http://playground.arduino.cc/Main/Waterlevel

The above link had a nice approach.

Water level detection using Pressure Transducer

The principle is the same as traditional pneumatic level gauge, excepted that the dial indicator is replaced by a pressure transducer, and the manually-operated pump is replaced by an aquarium air pump.

When the pump is on, air flows through the weighted PVC pipe to the bottom of the tank, where bubbles appear. At this moment, the air pressure in the PVC pipe is equal to the hydrostatic pressure at the bottom of the tank. As the water pressure at the bottom of the tank is directly proportional to the water level, the same goes for the air pressure in the PVC tube. The air pressure is then converted to an analog voltage by the pressure transducer. This voltage can be read easily by the arduino.

A big advantage of this method with regards to other existing techniques is that no electronic or metallic parts needs to be placed in the tank, where the environmental conditions (mainly humidity) are not favorable. This avoids any risk of corrosion.

1
  • Please update your answer with some detail in case the link gets changed or removed.
    – sachleen
    Jul 11, 2014 at 5:28
6

It's tricky when you only have a small hole to work with, so trying to get inside to install a series of floats or contact pins on the side is not ideal. The ultrasonic is a good idea, but I don't know how that would be achieved. Personally, I would try the cable, as it is simple enough to drop it in the hole, and wait for your results.

If you wanted to try running a cable through it, you might want to use this Water Level Sensor, or at least base your own project on it.

It is non-corrosive, and has no moving parts, which is supposed to lead to a heightened accuracy, and less chance of it failing or breaking down. The enclosure is water-proof, and you can buy one with a relay attached to fit your monitoring needs. The only issue that I see is that it isn't wireless, but other than that, it seems to be pretty functional.

5

I know you asked this a few months ago .. but sometimes with something technical the project never gets completed, or at least not in short order.

So while you're building your new-world-order with an Arduino, can I suggest you put a pipe down the dip hole and insert a floating dip stick? 1.5" pipe. 1/4" dowel glued to a ping-pong ball. Flag on top of the dowel. Now you'll see the level any time you walk past.

3

I've been using the Ultrasonic method for close to a year and the biggest problem is the sensor failing due to water infiltration(condensation). My latest attempt lasted for about two weeks. I used plastic spray like the stuff you use on tool handles. I also used the wireless shield to make a website that displayed the level on any device connected to my router. I would like to get it to email me when the level is below 10% but can't get it to work....It's not bad but still needs work for stability...

1

Id go with an ultrasonic detector as Cybergibbons suggests together with a usage/flow monitor (http://www.ebay.com/bhp/water-flow-sensor) so as to understand if there are any losses through leaks etc. I'd use a YUN or Ethernet or shield to call or email you a monthly report / fill a datbase as well as place the order directly to the water supplier as well as cc'ing you.

1

The bubble tube method (http://dexautomation.com/?p=9) springs to mind.

Also capacitive measurement is doable (http://olimex.wordpress.com/2012/02/02/duinomite-project-tank-fluids-level-metering-by-capacitance-measurement/) but more tricky. If you can use the steel inside the concrete it can be made completely contactless.

Please note, that if the water is meant for consumption without filtering or purification you may want to refrain from direct-contact methods.

Googling for "tank level measurement arduino" yields lots of potentially useful results.

Also, is consumption so erratic that you can't predict when the tank needs filling?

1

The limited access issue is tough... If you were going to use the float idea, it would be hard to difficult to actually install the thing. The other issue is waterproofing components and making sure that they won't corrode and cause false readings, which defeats the purpose of installing the system. Although it is a different scenario, i use this Water Level Sensor to moniter my home aquarium. the sensor is totally insulated, and is thus waterproof. also the sensor itself is aproximately 1 mm in width,so it probably fit into your reservoir. From what i've seen so far from my use is that it is pretty accurate, and it works in both my salt water and fresh water tanks. Hope this helps!

1

I have used FM antenna cable successfully as soil moisture sensor and as fluid level sensor. Dip the bottom end into melted glue stick to insulate. For permanent installation in a water tank I would also dip the cable into a paint tin and hang it up to dry for extra insulation. Antenna cable without any extra waterproofing was used for soil moisture measuring for 3 years with no problems. The top end is connected to two parts of a LM393. The first one is a Schmitt trigger with 470K feeback and 1M series. The neg side is fed back with 220K. The second one is simply an inverter, and the output feeds back through a 220K. The two 220ks get connected to the sensor cable, and a parallel 100pf cap.The cable is thus excited differentially. The ciruit oscillates according to the capacitance of the sensor cable. The frequency is measured by your favourite micro. The extra 100pf is only there to keep the frequency in a range where the oscillations can be fed over a line. A bucket of water is enough to calibrate the setup.

1

You could take a piece of 2 conductor wire in a U shape that is weighted at the bottom of the "U" to rest at the bottom of the tank. (The reason to use a U shaped wire instead of a straight wire is to prevent having to insulate one end from the water). You would then measure the capacitance of the wire, where some baseline capacitance is the wire when dry and any wire that is wet would increase the capacitance proportional to the length that is wet. Any wire that is rated for outdoor operation, i.e. does not absorb water would do and actually the thicker the jacket the better as the baseline capacitance would be lower.

The capacitance could be measured in the same way as a capacitive touch sensor or a capacitance to frequency converter (Sometimes called an "Oscillator").

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.