Water level in a tank

If there is a 100 gallon tank at a height of 20 feet, is it possible to determine how much water is left in the tank by sensing the pressure on the ground? I think the delivery pressure will vary from full to empty, but I don’t know if it will vary enough to be useful.

I’d like to know how much water is left in the tank, but I’d rather not have to put sensors clear up there.

Is there a sensor that can handle the higher pressure of all this water and still have enough sensitivity to have a useful range between full and empty?

I tend to remember seeing where someone was doing this with an ultrasonic sensor. It would require putting the sensor at the top but it is by far the simplest solution if it can work.

Try the freescale mpx pressure sensors. They make 1000kPa sensors (10m) with 0-5V output: http://www.freescale.com/webapp/sps/site/taxonomy.jsp?nodeId=01126990368716

Most likely you're looking to do this the other way around. Use the pressure sensor, connected to a tube/hose (full of air) running down from the top of the tank to the bottom. Now it's a matter of determining how much the water level is compressing the column of air. Search Freescale's site for an app-note regarding this, there's a separate one where they describe using it in a washing machine too. You're likely looking for something like the MPXV5010, but you'll need to figure out how much pressure you need to measure. I've got a blog post about interfacing the MPXV*** to the Arduino. Actually, if you search the forums, I'm sure this topic was covered recently (last few months).

It’s not going to work to put anything at the tank. For this to work, I have to just be able to read a pressure at the bottom and make some sense out of that.

If the pressure sensor must remain dry, I wonder if a much shorter air tube would still work? Something like 4 feet instead of the full 20 feet?

I’ll look into the freescale sensor. I guess I need to do some physics math to determine what pressure range I’ll need.

I would think that you could run a tube from the bottom of the tank, down to the ground, then uturn and go up a few feet. Cap the end of the uturn. If you let water in to that tube slowly, it will fill upbut leave a pocket of air at the top of the uturn. Then you can put a sensor there... See thes terrible ascii art picture

| W | | A | | T | | E | | R | |_ | sensor goes here | | _* | | | | | L__| | L______|

OK, if I’ve done my physics right, each foot of height adds .44 psi. (depending on temperature, water purity, and local gravity)

So a tank at 20 feet would produce around 8.8psi. Lower than I expected, but believable.

Looks like at least some of the freescale sensors are designed to withstand getting wet, but I just read this in the datasheet for the MPXV5100 series “Media other than dry air, may have adverse effects on sensor performance and long-term reliability.”

I think the MPXV5100DP would fit the bill? Not surface mount, max pressure 14.5psi, differential reading. $11.29 at mouser. http://www.mouser.com/Search/Refine.aspx?FS=TRUE&Ntt=MPX5100D&N=4294951291+1323038&Ntx=mode%2bmatchall&Ns=P_SField&OriginalKeyword=MPX5100D&Ntk=Mouser_Wildcards Huh. Mouser says the output voltage is 4.587 to 4.813V. The data sheet says it’s 0.2 to 4.7V. I guess the datasheet would know?

I wonder if I want a sensor that reads absolute, differential, or gauge?

Looks like at least some of the freescale sensors are designed to withstand getting wet, but I just read this in the datasheet for the MPXV5100 series “Media other than dry air, may have adverse effects on sensor performance and long-term reliability.”

this is why you let the water compress air and air apply pressure (see the diagram, * is a tube). Freescale expands on allowable media

          ******<sensor here
          *
| ~~~~~~~~*~|
|         * |
|  Water  * |
|         * |
 ----------

I think the MPXV5100DP would fit the bill? Not surface mount, max pressure 14.5psi, differential reading.

The MPXV5100DP is indeed surface mount, the MPX5100DP is SIP style. It’s important to note that “differential” here refers to the pressure port setup, not the electrical interface. The MPX line all contain on-board signal amplifiers to give (roughly) 0 to 5V readings. Freescale makes a lot (most) of their sensors without the on-board amps, these give a (~40mV) differential output that requires some external signal conditioning.

I wonder if I want a sensor that reads absolute, differential, or gauge?

  • Absolute = absolute pressure applied relative to 0atm. This would require a recalculation of the set points every time the barometric pressure changed.
  • Differential = pressure difference between a high-side input and a low-side input. Also able to measure vacuum pressure by applying the vacuum to the low-side input. For your uses, you’d connect to the high-pressure side and leave the other side vented to atmosphere.
  • Gauge = pressure difference between applied pressure (high-side) and environment pressure on the low side. This should also work just fine for your task. Some gauge sensors have a port on the low-side to connect to an outside environment.
    Freescale has a FAQ with these details.

Thanks for the confirmation. I was thinking differential, but wasn't positive.

I can live with a short air tube to keep the sensor dry.

From the math (if I did it correctly), it looks like I can get a usable range from this arrangement. The difference in pressure from full to empty is a function of the height of the tank. I need to go measure, but I think the tank in question is around 4 feet from bottom to top. So the pressure will start at (20' + 4')*0.44psi = 10.56psi and decrease to 20'*0.44psi = 8.8psi. At that point all that is left is the water in the pipe which will get used so fast that 8.8psi will be the effective empty point. This is a range of 1.76 psi.

The sensor ranges from 0 to 14.5 psi. On an analog input, that will be 0.014 psi per step. (Actually a bit less than this since the output voltage range is less than 0-5V.) So 1.76/0.014 = 124 steps between full and empty. Enough to give a percent remaining or more than enough to drive a bar graph.

I imagine that the reading will only be useful with the water shut off or flowing very slowly, which is fine for this application. When the tank is being refilled, the reading will probably be all over the place. Also ok. Some data filtering/smoothing would take a lot of that out.

Hi,

taking a different tack (as I tend to do) if the tank is floor mointed what about putting a load cell under the tank?

Mike

How about a float on a multiturn pot, chain over a gear (lego?), diameter sized to tank height and pot 10 turn ?

Just another idea .....

It would be non-trivial to move or disturb the tank in any way. There are no access ports or covers, it is totally sealed except the inlet and outlet. All of which is what lead me to seek a solution that didn’t involve the actual tank.

Good ideas though, might help someone else with a more approachable tank.

Do you need to know the exact level? Or just if it is below a certain level and needs some water added?

This is an inexpensive and non-intrusive method for detecting fluid level at a certain spot. I used a tube for this application, but a vertical corner of an aquarium would deflect nicely too when filled with a fairly clear liquid.

Here is the setup: A 5v power supply, a LED laser, a 5/16 tube with a sample in it (gasoline in this case), a cds cell, and an ohmmeter. The tube is flat against the board and the laser had to be propped up a tiny bit in front to hit the CDS cell through the empty tube.

The tube is empty in front of the laser and the CDS cell is well illuminated. It is about 1.5K ohms here:

The board is tilted and the laser gets deflected by the fluid in the tube and misses the CDS cell. It is about 11K ohms here:

So there ya have it. One just needs to carefully drill a couple holes in a block of wood to organize this assembly. But with a jump from 1.5k ohms to 11k ohms it should be pretty easy to detect.

Here is a cheesey picture of what is going on. Note that you have to adjust for the empty tube when aligning the laser, it does not just go straight through! Also, the farther away the CDS cell is from the tube, the greater the deflection distance.