Water level sensor, comparator

Thread Starter

geoffers

Joined Oct 25, 2010
475
Hi all,

I've been looking for a simple circuit to sense if water is present at a steel probe (a bolt!).

I found a nice simple comparator based circuit that ties one input of the comparator high via a 1M resistor, this input is also connected to the probe, ground of the comparator is connected to a immersed probe.

The other input is set at 1/2 supply voltage, the idea being output changes when the water makes the circuit to ground and switches the comparator.

I'm going to use a pic with onboard comparator, thinking about it will use stainless bolts for probes.

Any problems apart from a tiny bit of plating? Seems to simple to be true compared to some other circuits I've seen?
Cheers Geoff
 

wayneh

Joined Sep 9, 2010
17,496
It can work, but in general, conductivity methods aren't so hot. Float switches, capacitance sensors, ultrasonics and so on tend to be more rugged and reliable. Probes foul, the conductivity of the 'water' varies with impurities, and no matter how small, the current needed to test for continuity can lead to corrosion. Again, it might work fine for your application, but there are concerns.
 

Reloadron

Joined Jan 15, 2015
7,501
It can work, but in general, conductivity methods aren't so hot. Float switches, capacitance sensors, ultrasonics and so on tend to be more rugged and reliable. Probes foul, the conductivity of the 'water' varies with impurities, and no matter how small, the current needed to test for continuity can lead to corrosion. Again, it might work fine for your application, but there are concerns.
That would also be my thinking. If this is just a simple hope application where detection is not a big deal it is one thing but for anything industrial or commercial I would be looking at a good commercial solution off the shelf. Really depends on what can go wrong if the detector fails to detect. :)

Ron
 

Thread Starter

geoffers

Joined Oct 25, 2010
475
Thanks everyone,
I'm just after a quick and dirty solution at the moment.....!

Basically I have sheep in the shed for lambing the next six weeks, when they've lambed they go in individual pens for one or two days to 'mother up' (you wouldn't believe the infant theft among sheep!)

Last couple years I've run a bit of four inch drain pipe down through then pens with holes cut in it in each pen, half fill the pipe with water and you have cheap easy drinkers in each pen.

The ball valves I have used are tricky to get set right and seem to under/over fill.

I thought a electronic solution maybe better, a float switch might work OK but I do need to be able to adjust the level if water in the pipe , hence the conductivity method.

I have pic's sat on my desk with a comparator and DAC on board so u only need a 1M resistor, very minimal.

Only has to work for six weeks twice a year!

Cheers Geoff
 

Reloadron

Joined Jan 15, 2015
7,501
With that known I would run with the sensor you mentioned or if it will fit in the pipe a simple level float switch which can be as simple as a lever actuated micro switch with a cork on a rod.

Ron
 

ebeowulf17

Joined Aug 12, 2014
3,307
Thanks everyone,
I'm just after a quick and dirty solution at the moment.....!

Basically I have sheep in the shed for lambing the next six weeks, when they've lambed they go in individual pens for one or two days to 'mother up' (you wouldn't believe the infant theft among sheep!)

Last couple years I've run a bit of four inch drain pipe down through then pens with holes cut in it in each pen, half fill the pipe with water and you have cheap easy drinkers in each pen.

The ball valves I have used are tricky to get set right and seem to under/over fill.

I thought a electronic solution maybe better, a float switch might work OK but I do need to be able to adjust the level if water in the pipe , hence the conductivity method.

I have pic's sat on my desk with a comparator and DAC on board so u only need a 1M resistor, very minimal.

Only has to work for six weeks twice a year!

Cheers Geoff
Agreed, sounds like a simple conductivity probe should be fine. I'd recommend cleaning/testing the probe at the start of each season, cause it will corrode over time, but in your use case it'll be easy to maintain.
 

dendad

Joined Feb 20, 2016
4,451
Why not use a toilet cistern as the water level supply and run pipes to the tanks from it. A mate of mine has used that for his fountain for some years. Just set all the troughs at the same height and the water will fill to the float level of the loo tank.
 

Thread Starter

geoffers

Joined Oct 25, 2010
475
That's not a bad idea, only problem I can think of is it would it stick freezing?

Not a problem now but we lamb again in February, this year it was nippy here!

I think I will go with the conductivity route for now, all I need is 3 m3 stainless bolts in the end cap :) & a solenoid which I have.

I could use two outputs of the pic to make 'ac' and only sample the comparator when I know which way up it is? Would that help reliability?

Worst that can happen is sheep get a bit wet feet
 

dendad

Joined Feb 20, 2016
4,451
I make an irrigation sensor and use an Arduino.
An output at 50% PWM generates the AC out, capacitivley coupled to one stainless steel screw, the other screw connects via another 100nF poly capacitor to a diode rectifier and filter cap feeding to an analog input.
First, set the analog port to output and low to make sure the filter cap is discharged (a 1K series resistor on the analog in for protection).
Then I switch back to analog in and measure the signal without any PWM running.
Next, start the PWM and after a short delay, measure the analog in again. If the difference is greater that a threshold, water is detected.
It works very well.
 

ArakelTheDragon

Joined Nov 18, 2016
1,362
Hi all,

I've been looking for a simple circuit to sense if water is present at a steel probe (a bolt!).

I found a nice simple comparator based circuit that ties one input of the comparator high via a 1M resistor, this input is also connected to the probe, ground of the comparator is connected to a immersed probe.

The other input is set at 1/2 supply voltage, the idea being output changes when the water makes the circuit to ground and switches the comparator.

I'm going to use a pic with onboard comparator, thinking about it will use stainless bolts for probes.

Any problems apart from a tiny bit of plating? Seems to simple to be true compared to some other circuits I've seen?
Cheers Geoff
It depends on the regulation type that you want (if you do not mind passing wiht 10%-20% the meter or do you need it accurate). The difference depends on the components used/ temperature/ physical environment. You can use high accuracy components to make it work better.
 

dendad

Joined Feb 20, 2016
4,451
And you can have a number of sensor screws around the center PWM screw. Each sensor screw is of different length and goes to a separate analog input so you can get a low, mid and high reading if that could be better.
 
Top