Author Topic: Water Level Sensing for outdoor plastic water tubs?  (Read 440 times)

0 Members and 3 Guests are viewing this topic.

Offline victorhooiTopic starter

  • Contributor
  • Posts: 31
  • Country: au
Water Level Sensing for outdoor plastic water tubs?
« on: Yesterday at 04:39:46 am »
Hi,

I have some open white plastic tubs with carnivorous plants on my balcony, and I need to monitor the water level in them (photo attached):

2358391-0

I'm trying to keep the water level in them >= 30mm if possible. (At first, it will just be for alerting - later on, I'm going to try to link it to a drip irrigation and/or misting system)

This is an an exposed outdoor balcony - I can have a waterproof control box somewhere, with a Raspberry Pi/Arduino/NUC, but it may be some distance (e.g. 1.0 - 3.0 meters) to where the sensors are.

I'm looking at a few different types of water level sensors, and confused as to which would be best here:


Firstly, I'm not sure which of these would do best at these low water levels (e.g. 0mm up to 50mm).

Secondly, I'm not sure which of these will do best outdoors, exposed to the rain, UV, and possibly a bit of dirt?

Thirdly - although this may be surmountable - is the larger distances between the sensors and the waterproof control box.

The Grove sensor above looks pretty good - however, it's I2C - so I'm guessing I might hit some kind of distance limitations? I was thinking I could use the Qwiic Differential I2C boards to try to extend the distance? (But then I also need to figure out a way to waterproof those boards, and the both the JST-SH and RJ45 connectors, since it will all be outdoors).

Modbus (RS485) might be better for the distances - however, most of the Modbus sensors are quite expensive (e.g. > USD 100 per sensor), and seem more designed for every larger tanks full of petrol, oil, or other harsh chemicals (i.e. they're over-engineered for just water - and also I assume for very large volumes, and so may not do well at 30mm of water in a small plastic tub).

What do you guys think would be a good solution here?

Thanks,
Victor
 

Offline inse

  • Frequent Contributor
  • **
  • Posts: 687
  • Country: de
Re: Water Level Sensing for outdoor plastic water tubs?
« Reply #1 on: Yesterday at 05:09:35 am »
If you only need to maintain a certain level range (which I assume is sufficient for your application), I would suggest the first solution with the float switch.
If you take two of them you can distinguish three levels: too low - OK - too high.
They surely would be the simplest and most reliable solution.
If you’re into DIY, you could experiment with a hydroponics water level indicator and photo interruptors…
« Last Edit: Yesterday at 05:16:33 am by inse »
 

Offline tooki

  • Super Contributor
  • ***
  • Posts: 12367
  • Country: ch
Re: Water Level Sensing for outdoor plastic water tubs?
« Reply #2 on: Yesterday at 07:25:42 am »
You got most of the important measurement methods. The one major measurement method that you left out is pressure sensing, which is one of the most widely used. (You also didn’t mention ultrasonic and optical distance measurement, which are less common.)

When I was finishing up my electronics technician education, my class worked on a project about water level regulation, and I was in the group that did the level sensing. We ended up going with pressure sensing. If you use one with an analog output, you can have the sensor at a distance with no problem.

We tried the eTape, too, and while it’s actually really neat, it is delicate, and the top of the tape is not waterproof (water must not get into the opening at the top, but air needs to be able to move in and out). In a sense, they’re actually a really weird shaped pressure sensor.

But as inse said, if you only need binary sensing, a float or that dfrobot optical sensor would likely be easier. There are also pressure switches commonly used in household appliances, maybe one of those is for the 30mm depth you need.
 

Offline victorhooiTopic starter

  • Contributor
  • Posts: 31
  • Country: au
Re: Water Level Sensing for outdoor plastic water tubs?
« Reply #3 on: Today at 04:52:09 am »
@inse - Got it, I can try with float switches. You're right in that I just need to make sure the water level isn't too low (i.e. binary output is fine).

Can I ask why you'd prefer float switches here? Are they just more reliable than the other methods?

Would a simple stainless steel float switch like this one work well?

https://atlas-scientific.com/float-switches/short-vertical-metal-float-switch/

(I'll still need to find a way to fix these to the corner of the container - not sure if waterproof duct tape would do it...lol. Maybe some kind of right-angle bracket?)

Also, if I'm going to be reading these from say the GPIO pins on a Raspberry Pi or Arduino - I've read I'm going to need some kind of protection, right? (e.g. here or here).

What sort of pull-up resistors would I need to add for the above float switch? And how would I handle the issue that the long leads act as an antenna?

I might have 2-3 meters between the waterproof box and the white tubs - and also, there's maybe 5-10 tubs:

2359475-0

@tooki - Ah, I didn't realise about pressure sensing. Do you think that might be worth trying here? If so, what sort of pressure *switch* would you suggest?

I think I already had optical sensors (DFRobot SEN0205), and I added a short link to the TI paper on ultrasonic sensing (but I don't know of any good recommended sensors here).

And thanks for the note about eTape - I thought it looked pretty nifty - however, I didn't realise about the top not being waterproof, but also needing airflow - so it might not be suitable for this sort of exposed/outdoor application.
 

Offline inse

  • Frequent Contributor
  • **
  • Posts: 687
  • Country: de
Re: Water Level Sensing for outdoor plastic water tubs?
« Reply #4 on: Today at 05:16:12 am »
I would simply prefer the most simple solution - no over engineering.
Fix the level switch to the container with a right angle bracket, duct tape does not last long in sun light.
Using a 1k pull up should deliver a robust signal and two serial diodes to Vcc and GND protect against ESD.
Check first if the level switch meets your demands before going into series production.
« Last Edit: Today at 05:23:49 am by inse »
 

Offline wobbly

  • Regular Contributor
  • *
  • Posts: 84
  • Country: gb
Re: Water Level Sensing for outdoor plastic water tubs?
« Reply #5 on: Today at 07:23:45 am »
Just make sure the plants don't grow too close to the float switches and jam them in the wrong state.
 

Offline Irilia

  • Regular Contributor
  • *
  • Posts: 50
  • Country: de
    • My YouTube channel
Re: Water Level Sensing for outdoor plastic water tubs?
« Reply #6 on: Today at 08:21:14 am »
This type is possibly the most simple for this application

Level Sensor, Non-contact Water Detection Sensor
https://a.aliexpress.com/_EyhCVjL
 

Offline inse

  • Frequent Contributor
  • **
  • Posts: 687
  • Country: de
Re: Water Level Sensing for outdoor plastic water tubs?
« Reply #7 on: Today at 11:45:34 am »
I had such a capacitive sensor fail when it got wet on the sensing side and would not turn off.
 

Offline Doctorandus_P

  • Super Contributor
  • ***
  • Posts: 3728
  • Country: nl
Re: Water Level Sensing for outdoor plastic water tubs?
« Reply #8 on: Today at 03:12:26 pm »
Another option is to simply measure it's weight with a loadcell.

A float switch is also a simple option. This can either be combined with a timer, or the switch can have a fixed hysteresis.

There are also a bunch on:
https://hackaday.com/blog/?s=water+level+sensor

I like the latest, in which the arm of a float switch is used with an angle sensor. All electronics can be put in conformal coating or putty.

Also, if you ever go full automatic, then also consider what happens if a sensor, pump or a valve fails. At a minimum I would have two valves in the main water supply, or have an inherently limited amount of water such as from a rain water barrel. (You can top off such a barrel with water from another source of course).
 

Offline tooki

  • Super Contributor
  • ***
  • Posts: 12367
  • Country: ch
Re: Water Level Sensing for outdoor plastic water tubs?
« Reply #9 on: Today at 06:30:07 pm »
Would a simple stainless steel float switch like this one work well?

https://atlas-scientific.com/float-switches/short-vertical-metal-float-switch/

(I'll still need to find a way to fix these to the corner of the container - not sure if waterproof duct tape would do it...lol. Maybe some kind of right-angle bracket?)
Duct tape? LOL no. (There do exist tapes for outdoor use. But they're not to ghetto-rig things, and require clean surfaces that mate properly.)

You need a bracket, and understand that one half of the float switch shown has to be in a dry enclosure. You can't just have the wires floating in the wind!

This style of float switch needs to be perpendicular to the water, so the float moves only up and down along the shaft. Other kinds exist that move in different ways, like the angle-sensor based one mentioned above.





@tooki - Ah, I didn't realise about pressure sensing. Do you think that might be worth trying here? If so, what sort of pressure *switch* would you suggest?
As I said, pressure sensing is extremely widespread. (Your dishwasher and washing machine are practically guaranteed to contain one or more of them each.) In older appliances they mostly used on/off pressure switches, while newer ones use pressure sensors that let the microcontrollers control fill level dynamically.

Pressure sensors are very sensitive (in the good sense), and have the cool property that you can mount them a bit away from the water itself, with the sensing hose connecting the sensor to the water.

For water level sensing, IIRC you want a differential pressure sensor so that changes in ambient air pressure don't affect the measurement, so you just get the pressure increase caused by the water. (Basically, the water traps a column of air in the hose between the sensor and the water. As the water level rises, it compresses said column of air, increasing its pressure relative to ambient.) I don't have the part number at hand of the sensor I used, but I can dig it up if need be.


I don't have any specific recommendations for pressure switches since I've never actually used one in a project. You'd want one intended as a replacement part for a washing machine; industrial pressure sensors are quite expensive.
 

Offline inse

  • Frequent Contributor
  • **
  • Posts: 687
  • Country: de
Re: Water Level Sensing for outdoor plastic water tubs?
« Reply #10 on: Today at 07:07:30 pm »
The type mentioned seems to be completely sealed at the electrical side and as it’s only operated at 3.3/5V the wires surely can be left dangling around.
Heat shrink tubing provides more than sufficient isolation for the extension wires.
 

Offline tooki

  • Super Contributor
  • ***
  • Posts: 12367
  • Country: ch
Re: Water Level Sensing for outdoor plastic water tubs?
« Reply #11 on: Today at 07:16:50 pm »
The type mentioned seems to be completely sealed at the electrical side and as it’s only operated at 3.3/5V the wires surely can be left dangling around.
Heat shrink tubing provides more than sufficient isolation for the extension wires.
I wouldn't want to rely on the insulation (especially the woven kind, even if it is impregnated) for long-term outdoor use.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf