Author Topic: which sensor to use for salt water level  (Read 13920 times)

0 Members and 1 Guest are viewing this topic.

Offline mchrdkTopic starter

  • Newbie
  • Posts: 5
which sensor to use for salt water level
« on: August 17, 2014, 12:09:32 am »
Hi All,
Long time fan of the eevblog, i have been reading the forum for a while, while a lot of the answers here goes a lot over my head i thought i would like to ask the hivemind for a question that has been bugging me for a while.

i have a saltwater aquarium and want to measure the water level of the aquarium, theres a lot of water levels that i would like to measure:
the main tank.
the overflow chamber.
the sump.
the return champer of the sump.

i have a aquarium computer set up to alarm me when something goes wrong, right now the alarm points are:
temperature
ph
light level
and a bad solution to salinity.

right now im looking into getting data on the water levels, mostly for statistics and alarming, but also for automating water changes.

i have tried the following sensors:
ultra sonic sensors, they corrode in the salt environment within a month.
float sensors, algae and animals love ´em, they sit on them making them not trig when they should, and they make bad sensors for statistic data, they only trig when the water level goes up to it, or down below it.
ir sensors tcrt5000L, i haven't been able to make this work reliably, the return fluctuates a lot and the range is very limited.

i have been thinking about using the Etape sensor, but it will cost me around 50 dollars shipped per sensor, and i would need  4 of them(and its pretty ugly to have in the main tank)

do any of you have an idea of what sensor i could use, preferably one that could measure the water level from above the water.

Thanks for the help!
Michael
 

Offline miguelvp

  • Super Contributor
  • ***
  • Posts: 5550
  • Country: us
Re: which sensor to use for salt water level
« Reply #1 on: August 17, 2014, 12:17:22 am »
Wouldn't a DMM measuring resistance at a marked distance be a good sensor?

Edit: nevermind, bad Idea since it will probably create hydrogen/oxygen and cause some electrolytic effect from the anode to the cathode and depending what is on the anode and cathode it might contaminate the water.

« Last Edit: August 17, 2014, 12:21:39 am by miguelvp »
 

Offline mchrdkTopic starter

  • Newbie
  • Posts: 5
Re: which sensor to use for salt water level
« Reply #2 on: August 17, 2014, 12:20:22 am »
hm, can you elaborate on that?
 

Offline Richard Crowley

  • Super Contributor
  • ***
  • Posts: 4317
  • Country: us
  • KJ7YLK
Re: which sensor to use for salt water level
« Reply #3 on: August 17, 2014, 12:27:20 am »
Are these all in clear (transparent) enclosures (glass tank, plastic overflow chamber, clear poly tubing, etc.)?
I would experiment with reflective LED/sensor devices to see if you can discern between the reflectivity of air on the other side vs. water.

Putting any kind of metal electrode into the salt water seems to be just asking for trouble with rapid corrosion and decay.
 

Offline Cside

  • Regular Contributor
  • *
  • !
  • Posts: 105
Re: which sensor to use for salt water level
« Reply #4 on: August 17, 2014, 12:33:44 am »
I wonder if there is a pressure-based sensor. Sitting on the tank bed. What do car fuel tanks use?
 

Offline mchrdkTopic starter

  • Newbie
  • Posts: 5
Re: which sensor to use for salt water level
« Reply #5 on: August 17, 2014, 12:36:34 am »
after thinking about it, i think i understand what you mean about resistance measurement, it would require me to put a probe into the aquarium, i think it would corrode pretty quickly.

all the tanks are made of glass, but algae and other things will make it hard to read from the other side of the glass, and since the light is changing with sunlight, and the LED lights going on and off on an interval, i think it would be hard to get reliable data, but i sure love the way you're thinking, its out side the box(haha)


there is a way to do it with pressure, with a pressure sensor, a one way valve and an air pump, but as far as i can see, you need to get the airpump running at least 10-20 seconds before measuring. Its a complicated setup with many failure points. 

Im not sure how fuel tank gauges get their data, i will look into it
 

Offline miguelvp

  • Super Contributor
  • ***
  • Posts: 5550
  • Country: us
Re: which sensor to use for salt water level
« Reply #6 on: August 17, 2014, 12:37:50 am »
hm, can you elaborate on that?

http://www.waterboards.ca.gov/water_issues/programs/swamp/docs/cwt/guidance/3130en.pdf

But not sure on the range you need (might be immeasurable for very small salinity measurements)
Also the distance between the probes will change the reading so you will need a jig that makes the distance the same.

But the way DMM measure resistance is by applying voltage. So it will have an electrolytic effect in salt water. Not only releasing minute amounts of oxygen and hydrogen but making the materials in the probes detach from the positive and the negative depending on the composition. This is how electroplating works, but it does leave residues in the water so I wouldn't not use it for long periods.

Maybe collecting samples and measuring outside of the main tank, like some tubing that takes the sample via a valve. And a second drain valve to dispose of the sample after the measurement?

Still you will have to experiment to see if the digital multi-meter is accurate enough to measure the conductivity changes for the salt levels that you are interested in.


 

Offline mchrdkTopic starter

  • Newbie
  • Posts: 5
Re: which sensor to use for salt water level
« Reply #7 on: August 17, 2014, 12:43:52 am »
ahh, thats for salinity,
i have that covered with a probe that indeed measures connectivity/resistance.
i bought a probe dedicated to that, it has been running for a while with no issues.
 

Offline Richard Crowley

  • Super Contributor
  • ***
  • Posts: 4317
  • Country: us
  • KJ7YLK
Re: which sensor to use for salt water level
« Reply #8 on: August 17, 2014, 12:59:37 am »
I have seen systems where they ran a dry (air-filled) tube down to the bottom of the tank and used the resulting air pressure (out at the dry end of the tube) to measure the water pressure (which would be proportional to water level at a known volume/area.) But that may not provide enough delta pressure to be useful for small volume vessels.

An optical method could auto-compensate for slow algae growth, assuming you are running analog signals into a microcontroller, etc.

Putting a floating magnet inside a perforated tube would protect it from animals (and algae, given sufficient clearance). And you could put hall sensors outside the vessel to sense the height of the magnetic float.

There are also methods of thermally connecting resistors at intervals up the side if the vessel. You could heat each resistor and then measure how long it takes to cool back down.  That wold indicate whether there is water there (to more quickly sink the heat away).

 

Offline mchrdkTopic starter

  • Newbie
  • Posts: 5
Re: which sensor to use for salt water level
« Reply #9 on: August 17, 2014, 01:09:15 am »
the float sensors i have are all installed the way you are saying there, but algae growth are still messing with me :/

its a very interesting thought with the thermal measurement, do you know of any ready built sensors like that?
i will try to figure out a way to build it, at least as a proof of concept.

man, i don't regret asking you guys, you have already made a lot of points i haven't been able to think of myself.
 

Offline miguelvp

  • Super Contributor
  • ***
  • Posts: 5550
  • Country: us
Re: which sensor to use for salt water level
« Reply #10 on: August 17, 2014, 01:11:22 am »
I should have read past the "bad solution to salinity".

So a water kettle shows how full it is by using a smaller column pipe. If you could measure the capacitance in that column wouldn't it change with volume?

Maybe some rigid membrane connected to a tube on the bottom that is rigid enough so it's not too bulgie  but can push into a pressure sensitive element?

Or a piston that makes a device rotate based on pressure and you can read the accelerometer position?

Or shinning light straight to the glass wall, the pressure of the water will change the diffraction of the light bouncing between the walls and capturing it with a camera. (kind of what camera based touch screens do with IR led strips).

Actually just a webcam with some simple computer vision will do and less complicated :)

There has to be many ways to determine volume that doesn't require direct contact to the water.

Also don't forget sound, the volume will affect the resonance.
Edit: kind of a soft mallet that strikes the tank and capture the sound to determine the volume (not sure how annoying it will be to the fish :) )
« Last Edit: August 17, 2014, 01:16:32 am by miguelvp »
 

Online IanB

  • Super Contributor
  • ***
  • Posts: 11859
  • Country: us
Re: which sensor to use for salt water level
« Reply #11 on: August 17, 2014, 01:37:11 am »
The common industrial way of measuring levels is to use hydrostatic pressure. A pressure transducer is exposed to the pressure of the liquid at the bottom of the tank and it produces a signal proportional to the pressure. Since the pressure is proportional to the height of liquid above the transducer, this allows the level to be measured.

The pressure transducer can either be fitted to a hole through the side of the tank, or if this is not convenient (e.g. risk of leaks) the transducer could be placed at the bottom of a pipe or tube that is inserted down inside the tank. The pipe would be sealed at the bottom where the pressure transducer is and open to the air at the top. The wires from the transducer would be brought up inside the tube.

Nothing touches the liquid except the outside of the pressure transducer (which can be protected with a plastic diaphragm if the liquid is corrosive).
 

Offline rs20

  • Super Contributor
  • ***
  • Posts: 2318
  • Country: au
Re: which sensor to use for salt water level
« Reply #12 on: August 17, 2014, 01:50:11 am »
You can buy cheap ready-to-go ultrasonic distance sensors that you can set up to fire down at the water's surface, accurate to at least 1cm I believe.

I have seen systems where they ran a dry (air-filled) tube down to the bottom of the tank and used the resulting air pressure (out at the dry end of the tube) to measure the water pressure (which would be proportional to water level at a known volume/area.) But that may not provide enough delta pressure to be useful for small volume vessels.

This is a really cool and elegant technique which avoids the need for the pressure transducer to be tolerant to water -- and a barometer chip which can measure a 1m change in elevation in air ($3 on ebay) can measure a 1mm change in water depth, so I think the delta pressure is plenty sufficient.

there is a way to do it with pressure, with a pressure sensor, a one way valve and an air pump, but as far as i can see, you need to get the airpump running at least 10-20 seconds before measuring. Its a complicated setup with many failure points. 

I don't know why you think you need a one-way valve; and fish tanks already have an air pump to bubble air through the water, right? So this idea boils down to what you already have + a $3 sensor in a pressure-sealed box.

Wouldn't a DMM measuring resistance at a marked distance be a good sensor?

Edit: nevermind, bad Idea since it will probably create hydrogen/oxygen and cause some electrolytic effect from the anode to the cathode and depending what is on the anode and cathode it might contaminate the water.

Measuring conductivity is fine as long as you use AC (which you can enforce by having a capacitor in series with your immersed sensor), and use a relatively cromulent metal wire.

By the way, look up "Endress + Hauser" on YouTube. They're a big company that does all sorts of fluid flow rate and pressure measurement gear for industry -- and they have these videos that explain the techniques they use. The number of different methods they describe is kind of mind-boggling, and might be a source of inspiration for you.
 

Online IanB

  • Super Contributor
  • ***
  • Posts: 11859
  • Country: us
Re: which sensor to use for salt water level
« Reply #13 on: August 17, 2014, 02:00:39 am »
I have seen systems where they ran a dry (air-filled) tube down to the bottom of the tank and used the resulting air pressure (out at the dry end of the tube) to measure the water pressure (which would be proportional to water level at a known volume/area.) But that may not provide enough delta pressure to be useful for small volume vessels.

This is a really cool and elegant technique which avoids the need for the pressure transducer to be tolerant to water -- and a barometer chip which can measure a 1m change in elevation in air ($3 on ebay) can measure a 1mm change in water depth, so I think the delta pressure is plenty sufficient.

It's also a really horrible and unreliable technique that should never be used. There are two problems: if there is any kind of micro-leak at the top of the tube then the water level will rise up the tube and cause the measurements to be wrong; secondly the air in the tube will dissolve in the water and the water level will rise up the tube regardless of leaks, giving a measurement drift as before.

Quote
there is a way to do it with pressure, with a pressure sensor, a one way valve and an air pump, but as far as i can see, you need to get the airpump running at least 10-20 seconds before measuring. Its a complicated setup with many failure points. 

I don't know why you think you need a one-way valve; and fish tanks already have an air pump to bubble air through the water, right? So this idea boils down to what you already have + a $3 sensor in a pressure-sealed box.

This method is much more reliable. With a constant (slow) bubbling of air out the bottom of the tube the pressure at the top of the tube will be proportional to the water depth. Therefore measure the air pressure and you know the depth. However, you need an open ended tube (no sparger), and a slow air flow to eliminate flow friction effects. As a result this could not be combined with an existing air bubbler without compromising accuracy.
 

Offline rs20

  • Super Contributor
  • ***
  • Posts: 2318
  • Country: au
Re: which sensor to use for salt water level
« Reply #14 on: August 17, 2014, 03:10:39 am »
I have seen systems where they ran a dry (air-filled) tube down to the bottom of the tank and used the resulting air pressure (out at the dry end of the tube) to measure the water pressure (which would be proportional to water level at a known volume/area.) But that may not provide enough delta pressure to be useful for small volume vessels.

This is a really cool and elegant technique which avoids the need for the pressure transducer to be tolerant to water -- and a barometer chip which can measure a 1m change in elevation in air ($3 on ebay) can measure a 1mm change in water depth, so I think the delta pressure is plenty sufficient.

It's also a really horrible and unreliable technique that should never be used. There are two problems: if there is any kind of micro-leak at the top of the tube then the water level will rise up the tube and cause the measurements to be wrong; secondly the air in the tube will dissolve in the water and the water level will rise up the tube regardless of leaks, giving a measurement drift as before.

I had assumed a pump was implied, to handle these issues. I agree that trying this without a pump would be a bad idea.

This method is much more reliable. With a constant (slow) bubbling of air out the bottom of the tube the pressure at the top of the tube will be proportional to the water depth. Therefore measure the air pressure and you know the depth. However, you need an open ended tube (no sparger), and a slow air flow to eliminate flow friction effects. As a result this could not be combined with an existing air bubbler without compromising accuracy.

Would accuracy be compromised by 1mm or by a metre? It would be interesting to quantify these effects -- the pressure gradient in even a small body of water is quite dramatic, and I've got no good intuition how uncertain/variable the pressure drop in the sparger would be.

In any case, even if you did need a separate open-ended tube and slow air flow, this could be achieved by teeing off from the same pump with a small tube (think pneumatic flow-limiting "resistor"). So we're still talking just a tee, some tubing, and a $3 sensor, and great reliability.
 

Offline theatrus

  • Frequent Contributor
  • **
  • Posts: 352
  • Country: us
Re: which sensor to use for salt water level
« Reply #15 on: August 17, 2014, 03:29:16 am »
I use a very coarse system of two IR level sensors - water is either there or it's not. Even with this setup, if the water level is not cycling the salt buildup on the dry sensor (or in bright environments) coralline buildup messes with it.

Floats are really reliable, if you can find a way to keep the algae in check. No sensor is infallible sadly.
Software by day, hardware by night; blueAcro.com
 

Offline theatrus

  • Frequent Contributor
  • **
  • Posts: 352
  • Country: us
Re: which sensor to use for salt water level
« Reply #16 on: August 17, 2014, 03:31:13 am »
Also, air bubblers, unless you have an old style protein skimmer, are never use in a salt system. Bubbles remain tiny and foam like crazy in salt.
Software by day, hardware by night; blueAcro.com
 

Offline SL4P

  • Super Contributor
  • ***
  • Posts: 2318
  • Country: au
  • There's more value if you figure it out yourself!
Don't ask a question if you aren't willing to listen to the answer.
 

Offline AndreasF

  • Frequent Contributor
  • **
  • Posts: 251
  • Country: gb
    • mind-dump.net
Re: which sensor to use for salt water level
« Reply #18 on: August 17, 2014, 07:34:18 am »
What about capacitive sensing?

my random ramblings mind-dump.net
 

Offline PepeK

  • Regular Contributor
  • *
  • Posts: 62
  • Country: sk
Re: which sensor to use for salt water level
« Reply #19 on: August 17, 2014, 07:56:33 am »
A pipe or hose sensing an air pressure could be ok - the air pressure sensor can be installed far enough from the sea water, which causes problems.
Or you can connect the sea water tank with a demineralized water tank by a hose / pipe filled with air and use any technology on the 'clear water side'.
 

Offline rs20

  • Super Contributor
  • ***
  • Posts: 2318
  • Country: au
Re: which sensor to use for salt water level
« Reply #20 on: August 17, 2014, 08:29:02 am »
What about capacitive sensing?



So, that video isn't directly relevant because the water in a fish tank isn't going to be much of an insulator, so it isn't going to function (purely) as a dielectric if you introduce it between two plates. However, if you add a thin layer of insulation over the plates, the addition of water will nevertheless greatly increase the capacitance, because you're reducing the gap from gap-between-plates to thickness-of-insulator (think of the electrolyte in an electrolytic cap -- heck, maybe you could actually use aluminium/aluminium oxide).

However, keeping the salinity of the water from interfering could be very difficult, so this may work best as a binary water-is-over-the-sensor-or-not detector (see ).
« Last Edit: August 17, 2014, 08:32:59 am by rs20 »
 

Offline tautech

  • Super Contributor
  • ***
  • Posts: 28328
  • Country: nz
  • Taupaki Technologies Ltd. Siglent Distributor NZ.
    • Taupaki Technologies Ltd.
Re: which sensor to use for salt water level
« Reply #21 on: August 17, 2014, 09:16:00 am »
Try this:
Attached .doc

Edit
Doc edited
« Last Edit: August 17, 2014, 10:36:56 pm by tautech »
Avid Rabid Hobbyist
Siglent Youtube channel: https://www.youtube.com/@SiglentVideo/videos
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19494
  • Country: gb
  • 0999
Re: which sensor to use for salt water level
« Reply #22 on: August 17, 2014, 12:30:43 pm »
Try this:
Attached .doc
The problem with that is it involves a DC path for the current to flow though, which will cause electrolytic action and corrosion.

Use AC, rather than DC, that way there is no net flow of ions and less corrosion.
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 16607
  • Country: us
  • DavidH
Re: which sensor to use for salt water level
« Reply #23 on: August 17, 2014, 12:49:11 pm »
What about capacitive sensing?



So, that video isn't directly relevant because the water in a fish tank isn't going to be much of an insulator, so it isn't going to function (purely) as a dielectric if you introduce it between two plates. However, if you add a thin layer of insulation over the plates, the addition of water will nevertheless greatly increase the capacitance, because you're reducing the gap from gap-between-plates to thickness-of-insulator (think of the electrolyte in an electrolytic cap -- heck, maybe you could actually use aluminium/aluminium oxide).

However, keeping the salinity of the water from interfering could be very difficult, so this may work best as a binary water-is-over-the-sensor-or-not detector (see ).

The capacitive sensor is insulated from the fluid and can be as simple as a transmission line inside a glass tube making it easy to clean if neccessary.  It is more of a dielectric sensor then and compensating for a lossy dielectric like water or salt water is not a problem but signal conditioning is not trivial of course.

 

Offline sigxcpu

  • Regular Contributor
  • *
  • Posts: 64
  • Country: ro
Re: which sensor to use for salt water level
« Reply #24 on: August 17, 2014, 06:10:36 pm »
I did a capacitive sensor using two 1m parallel rods of Al inserted in a plastic tube (galvanic isolation from the water). I measure the capacitance bitbanging two pins on the MCU counting how many times I need to charge this Cx to fill another bigger capacitor (0.1u).

I didn't test it in real life (1m water) but it provides pretty repetable results with ~30cm of water.

 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf