I'm making a project that will monitor the water level in my overhead water storage tank. I am currently using HC SR-04 ultrasonic sensor but I doubt that'll last long in that humid environment with vapors condensing over it. Dangling naked wires is feasible but won't show me the exact level of water. So obviously float switches are out too.
I got a DFrobots water pressure sensor but the damn thing is rated for 1-1600 KPa. The pressure in my tank ranges from 0-15KPa. For that tiny range the results aren't very granular, especially since it's an analog sensor and I've to run nearly 2 meters of wire from bottom of tank to arduino. The fluctuations are killing it.
So I'm thinking about either using an IR proximity sensor along with a styrofoam float above the water or putting a piezoelectric sensor inside a glass syringe, sealing it with petroleum jelly and using the movement of the plunger.
PS: Yes I know about JSN SR-04T. My tank is 1meter in height and that sensor has a blind spot of 25cm. That means I can measure only upto 75%.
I doubt that'll last long in that humid environment
A month or two at best.
External liquid pressure sensors can be purchased in any range, placed in the outlet pipe and are vastly more reliable than just about any other method of measuring water level. You need a gage (or gauge) sensor to account for changes in atmospheric pressure. Pressure measurements are not accurate if the liquid is flowing in the pipe, due to the Bernoulli effect.
For calibrated sensors with industrial reliability, I prefer the Omega PX309 series, but there are many, much cheaper options.
Problem is my required pressure range for monitoring is 0-15KPa and the sensor can do 0-1600KPa. So resolution is tiny. With the tank empty the voltage I get is 0.381V and with it nearly 60% full I get 0.410V. And this being analog sensor the value is fluctuating ~0.007V up and down. I suppose that is normal for the analog pin but it's wrecking havoc on my calculations even with averaging the value over 5 seconds.
Btw this is with the sensor suspended in the water from the top. I'm not gonna change the whole plumbing to fit it to the outlet before I know it can work.
You could use 3-4 foot switches mounted on a bar to give you an indication of level .
You could buy a suitable pressure transducer or how about a weighted float ( that still floats) with a wire attached Going up around a pulley , connected in turn to a potentiometer
what about a magnetic buoy? I saw a clever use of one to make a mechanical water level indicator:
You could use the magnet instead to trigger sensors either outside the tank, or in a sealed environment within the tank like a closed pipe. What sort of spatial resolution are you looking for?
I have been through this for the last 18 month trying nearly everything to measure water level in my tank reliably.
Herewith the experiments and findings:
MS5540C pressure sensor:
Cons: Difficult to understand the code
short cable range as it uses SPI
Difficult to insulate for submerged use. (mine lasted only a year) Pros: I got extremely precise measurement
pressure sensor on outlet: (side note: "I got a DFrobots water pressure sensor but the damn thing is rated for 1-1600 KPa." - They lie! It is rated 0-10 bar only! - Chinese marketing at it's best again?
Cons: Sudden outflow of tank will indicate a reduced pressure and therefore false reading of level. Pros: Cheap
Ultrasonic:
(yes - the waterproof one) fitted in a 3"(75mm) "stand pipe.
Cons: Blind area of 25CM -cannot read at a shorter distance. Has to be mounted "waaay above" the tank and "invited"
the baboons for some cable salad!
Unreliable readings due to temperature fluctuations Pros: Cheap
Float/Buoy:
Attached a steel cable with outside weight running over a 3D printed drum. This drum drives a 10-turn(10K) potentiometer via a 3 to 1 reduction.
Cons: None
Pros: Reliable
Throw-in-liquid level sensor:
This gave me a lot of headache in the beginning as it seemed unreliable, Buuuuut.... Now that I have refined the circuit it is probably the best way to go.
Cons: Need 24VDC(preferably - but bench test have worked with 12VDC)
Slightly more expensive.
That won't work. The linked sensor is a gage sensor and is not intended for submersion.
Thanks, I'm an electronics novice, so I had no idea.
You could use 3-4 foot switches mounted on a bar to give you an indication of level .
You could buy a suitable pressure transducer or how about a weighted float ( that still floats) with a wire attached Going up around a pulley , connected in turn to a potentiometer
That's something I could work with! Unfortunately no way to ship it to India. Maybe a DIY version! I'll look around for it!
You could use the magnet instead to trigger sensors either outside the tank, or in a sealed environment within the tank like a closed pipe. What sort of spatial resolution are you looking for?
My tank is 1m in height, I'm okay with 10% increments so 10cm resolution will work. The solution you gave is really neat! I had never seen it before and I'm definitely making the mechanical version of it but for the electronics version I'll need like 10 Hall effect sensors mounted outside. I have only 3 digital pins free on my arduino.
I have been through this for the last 18 month trying nearly everything to measure water level in my tank reliably.
Herewith the experiments and findings:
Man! Thanks for sharing your observations! I wish I had posted on the forums earlier instead of wracking my brain for the last week.
MS5540C pressure sensor:
Pretty costly. I had the idea to use a piezoelectric sensor in a glass syringe or maybe a balloon or something. Too tricky.
pressure sensor on outlet:
Oh my my! 1Mpa "only". I'm keeping this one as a failsafe if nothing else works out. I'm fine with wrong readings during water outflow. I can use a atmospheric pressure sensor to compensate for changes.
Ultrasonic:
I was actually thinking of going with it. First 75% of the tank can be measured with the US sensor. For the rest either the naked wire method of reed sensor.
JSN SR04 has that huge blind spot because it doesn't have separate transmitter and receiver like HC SR04. I actually found a waterproof one with separate transmitter and receiver on ebay (following a link from quora). It was just 10$ too, but for the love of God I can't find it again.
Float/Buoy:
Attached a steel cable with outside weight running over a 3D printed drum. This drum drives a 10-turn(10K) potentiometer via a 3 to 1 reduction.
This is what I'm gonna try next (given I can actually find some guidance on internet, I'm new to electronics and pretty clueless).
Throw-in-liquid level sensor:
Ah the big brother of the pressure sensor I got. I suppose if I go the pressure route, I'll just use the one I already have and hook it up to my supply line.
Also had you considered one idea I posted here: floating a styrofoam or some such material over water and using and IR proximity sensor? Honestly I'd try it if I could find a waterproof one.
Btw kudos for fixing your water level sensing problem. What kinda wildlife you got?
Ultrasonic:
(yes - the waterproof one) fitted in a 3"(75mm) "stand pipe.
Just found the ultrasonic sensor I mentioned. Waterproof and a blind distance of just 3cm. It's 27$ though, I swear the same stuff was for sale for 10-12$. Anyway, ships from China/HK. With the Chinese incursion into Indian borders since a couple of months customs is pretty tight with any package from China.
coldbreeze16:
... I actually found a waterproof one with separate transmitter and receiver on ebay (following a link from quora). It was just 10$ too, but for the love of God I can't find it again.
This is what I'm gonna try next (given I can actually find some guidance on internet, I'm new to electronics and pretty clueless)....
I would quite honestly stay away from ultrasonic. Same as with the IR proxy sensor you mentioned. The reason is simple: You WILL get corrosion trouble in a month or two or six as these sensors operate in close proximity to the surface level. (Been there done that :)) Even IF they claim to be waterproof... chinese waterproofing is...(insert you fav word here)
coldbreeze16:
Btw kudos for fixing your water level sensing problem. What kinda wildlife you got?
Wildlife... Kudu / Eland / Giraffe / Red Haartebeest / Impala / and a few others that come bother me in my backyard
coldbreeze16:
This is what I'm gonna try next (given I can actually find some guidance on internet, I'm new to electronics and pretty clueless)
Its pretty simple. It is just the same as hooking a 10K potentiometer to any analog port and getting a reading from 0 to 1023. Plenty of tutorial out there.
Once you got that under your belt, just map the value t0 0-100%.
easy!
for example: potentiometerReading= map(potentiometerReading, 0, 1023, 0, 100);
coldbreeze16:
My tank is 1m in height, I'm okay with 10% increments so 10cm resolution will work. ... for the electronics version I'll need like 10 Hall effect sensors mounted outside. I have only 3 digital pins free on my arduino.
That's few enough readings that you might use a ladder of parallel reed switches & resistors in series on the return route... then measure the voltage coming off the ladder and work back to the number of resistors in the circuit, and from that the depth of the closed switch.
A little late but I would run with a pressure sensor method. If you want reasonable accuracy I would consider a bubbler configuration. Regardless of configuration you mention tank height is 1 meter (39.37 inches). Looking at water column that's pretty low pressure at 9.796 Kilopascals. I would look for a sensor with a 0 to 10 kPa range. Even good temperature compensated sensors do not cost that much. If the daily changes in atmospheric pressure are a concern, then use a delta pressure gauge with one port open and vented to atmosphere. I doubt it will matter much but saw mention of it earlier. A sensor cost about $15 USD which really isn't much. They also are designed around applications using an A/D micro-controller most with full scale outputs with onboard amplification. The NXP manufacture MPX5010 series is a good example.
A simple Google of "Liquid Level Measurement Using the Bubbler Method" should get you plenty of results. An inexpensive aquarium pump would likely be adequate and unless you need or want real time readings just turn on the pump and take a reading every so many min.