Measuring water level in a tank

Mas01

Member
Join Date
Oct 2020
Location
Leicester, England
Posts
1,109
In our water cooling tank, I've installed and successfully wired up 4 float switches & updated the PLC (big thanks to @parky for that).
As a visual of tank water depth, at the moment, I've got 4 'stacked rectangles' on the HMI (PC), which turn Blue when the float switch goes closed-circuit.
This is fine, but does not give a "live" reading of water depth.


We do, however, have a water pressure gauge near the bottom of the tank. I was wondering if that could be used for giving us a live reading of water level, or is the maths involved in calculating the water level going to be tricky [?].


Thanks
 
What feedback signal does the water pressure gauge give? If the pressure changes with depth is measureable, a PLC scaling sub-routine will give you what you want. If the relationship between change in water pressure and change in depth is linear, the math is pretty easy. Those with direct experience in solving this logic will jump in soon.
 
Sure. Just scale the pressure to inches or feet what ever you what to show the level in.

1(Psi) of water equals 2.31 feet of water column (Don't forget the sensor offset) this means how far from the bottom of the tank is the sensor?
 
If the gauge at the bottom is just a gauge then add a tee and a pressure transducer. If it has an analog output all you have to do is wire it.

As the water level increases the pressure transducer will increase its signal to the PLC and a fairly accurate level can be computed with the Scale instruction or the scaling formula in a Compute instruction.
 
Well it's me again lol, When you say a pressure sensor I assume you mean hydrostatic measurement of the tank level.
The values for 1 foot of Water at 4 Deg. C. = 0.43356 PSI
so for example 3 ft of water = 1.30068 psi so assuming your pressure sensor has a range of 0-2 psi (or the equivalent max pressure = tank full). then yes.
Obviously there are variations for example if the tank is not open top (vented) then you would need a differential pressure transmitter). the temperature will also effect the pressure a little but for indication purposes this can be ignored.
All you need to do is see what the raw value is in the PLC when the tank is empty and again when full, this gives you the range (assuming this pressure transmitter is there for measuring the level) so for example lets say the reading was 200 when empty and 1000 when full then if for display purposes i.e. 0-100% and not actual litres then you either re-scale the raw value to 0-100%
First subtract the min level (200) from the Max Level i.e. 1000 - 200 = 800 and store this in a register we will call "A" .
Then sub the min level from the actual (assume 600 for half full) = 400 and call this "B"
Divide the span "A" by 100 ( = 8) and call this C
Then divide "B" by "C" will give you 50 so it equals 50%
This will scale it 0-100 then on your HMI you have a bar graph element and you scale it to 0-100%
Or if GTWorks allows it scale it to the raw min & max levels of the analogue values i.e. 200-1000.
Or just a simple variable showing the 0-100%
 
Another option is an off the shelf level sensor if you have an analog input to spare.
We use the Keyence FL-001. Works great and is extremely rugged. Ours are in an extremely harsh environment, and we have zero issues with them. We used to use a Banner model, but had constant issues due to the environment. Switched to the Keyence, and haven't touched them since.
 
Some more info...the tank is outside and open-topped. It's approx 6ft deep when full. Not sure how far off the bottom the pressure sensor is, but I can find out. It's an AI into the PLC and is displayed in units of bars at the PLC. How important is the water temperature in the depth calc or is its effect negligible? Outside air temp can be say -5 to +30 (on a roasting day in the UK, unlikely I know).

Edit....in my first post, I meant 'pressure transducer', not 'pressure gauge'. Sorry.
 
Last edited:
[Update: most of these queries have been answered; our posts crossed]


...or is the maths involved in calculating the water level going to be tricky [?].


Not at all tricky, but it could involve a fair bit of bookkeeping.

  • Is the pressure tap into the side of the tank?
    • Is it below any possible low level in the tank?
    • Is it on the outflow piping from the tank?
  • What is the elevation of the pressure gauge itself
  • Can the pressure gauge send a signal either to the PLC or to the HMI?
  • Is the water surface open to the atmosphere, or is the top of the tank under pressure?
    • If the latter,
      • Is there a measure of the air/gas/vapor pressure above the water,
      • OR
      • Does the pressure gauge near the bottom of the tank measure pressure difference between the lower tap and a tap at the top of the tank?
A sketch of the tank and pressure gauge would help.
 
Last edited:
...Outside air temp can be say -5 to +30 (on a roasting day in the UK, unlikely I know).




That's the air temperature; if the water temperature is in the range -5C to 0C*, having a measure of water level is not going to be the first concern. ;)


* and not super-cooled
 
Last edited:
Maximum error due to temperature variation will be less than a quarter of an inch.

TL;DR
xxx.png

Max temperature variation ~ 30degC/2 = 15degC


thermal expansion over 15degC = 210E-6 degC**-1 x 15degC = 3.15E-3 Beta.

3.15E-3 x 6 feet x 12 inch/foot = 0.23 inch < 1/4 inch


Pressure scaling:


1bar = 14.50377 (lbf/in**2) * 144 in**2/ft**2 = 2089 lbf/ft**2


1 = 2089 (lbf/ft**2)/bar


62.43 lbf* water = 1ft**3 water



1 = 0.016 ft**3/lbf


1 = 1 x 1 = 2089 (lbf/ft**2)/bar x 0.016 ft**3/lbf = 33.45 ft/bar


1 bar change in pressure gauge = 33.45 ft change in water level





* at 1g; this is Leicester for Pete's sake ;)


Caveats/Assumptions

  • no temperature effect on pressure sensor.
  • coefficient of thermal expansion of water is constant with temperature
  • air density ignored
 
Last edited:
Is the tank open to atmosphere? If the tank is pressurized (ie. pressurized air space above water level) then you need to use a differential pressure transmitter measure between top and bottom of tank. If the tank is open to atmosphere then you just need a single gauge pressure reading from the bottom of the tank.
 
We always use a simple pressure sensor mounted as low as possible in a static line or directly into the tank. I scale the analog input to feet where 1 psi = 2.31 feet. I include an offset to account for the difference in elevation between the senor and the floor of the tank. I try to standardize on 100psi sensors for tanks over 30' tall, and will use lower ranges for shorter tanks. I recently did a job for some tanks that were only 10' tall and used 100inH2O sensors scaled to inches rather than feet. I never have bothered to compensate for temperature, but we are always dealing with water for/from treatment plants with a relatively consistent temperature and accuracy within 1-2% is adequate.

I prefer the ProSense sensors with 4 pin DC micro cables. They're weather resistant and easy for a water system operator to replace when they fail (and they do fail.)

https://www.automationdirect.com/ad...-_m12_cable_connection#start=0&sort=price asc
 
Reading the thread, it is only going to be used for indication and as it will probably be used to fill to a level the accuracy does not have to be exact, from what I gather it is a holding tank for cooling water (or heated water but only a small range of temperature). I'm sure Mas will correct me if I'm wrong, as I suggested he could scale it to 0-100% or even in litres (he is in the UK) if the tank is not some weird shape or on its side (S correction would be needed).
I don't think it needs to be too accurate and I suspect the tank is not that large.
Assuming the gauge has an analogue output (or the gauge could be replaced by a level transmitter) although it is "near" the bottom of the tank will give a reasonable indication of level. He needs to select the correct sensor as it would be no good selecting something that is capable of reading 5 metres of head if the tank is only a metre tall. IFM have a number of sensors that can be adjusted to give 4-20ma at the head height required as per calculation.
 
What kind of accuracy are you looking for with regards to tank level? If you don't need much, then your pressure transducer can do the job. But if you need more accuracy, you can look to the Keyence one mentioned by dploof23. TBH, I don't think it will work on a cold rainy night in Stoke, but luckily you in Leicester!!!
 

Similar Topics

I try to find sensor for measuring ethanol in water in search engines. But there are little topics involve. Does anyone know which sensor can...
Replies
3
Views
5,098
Hi everyone, I don't know much of PLCs but it happened that i need to connect Leuze AMS358i Ethernet laser measurement to Productivity 1000...
Replies
0
Views
1,062
Hello everyone! Firstly I'd like to say that I'm new to this forum and also new to PLC programming world altogether, that said I really would...
Replies
27
Views
4,840
I am looking for a way to determine level in a silo. The material is called Perilite which has a very light density. Bulk density could be...
Replies
10
Views
2,748
Hello, I have an application where I need to measure the salt level/volume in a salt saturator. This is a fairly large tank where we load bulk...
Replies
21
Views
6,509
Back
Top Bottom