Author Topic: Suggestions for water level sensing in pipe?  (Read 4217 times)

0 Members and 1 Guest are viewing this topic.

Offline Sensorcat

  • Regular Contributor
  • *
  • Posts: 203
  • Country: de
  • Independent Sensor Consultant
    • Sensorberatung
Re: Suggestions for water level sensing in pipe?
« Reply #25 on: June 17, 2026, 01:45:07 am »
I tried an experiment using copper foil and the same size pipe used for the pump inlet.   The pipe is US schedule 40, 1.5 inch PVC (48 mm OD, 41 mm ID).  The copper “plates” are 50 mm x 200 mm.  Setup is in the pic below.  Empty and dry, C = 12 pF.  Empty but with a wet interior wall, C = 14 pF.  For full vertical position, C = 31 pF.  Surprisingly, for full horizontal position, C = 55 pF.  Rotating the pipe in the horizontal position did not change C.  And surprisingly, pipe half full in horizontal position also had C = 55 pF.

So, is there a circuit schematic available that can operate a relay based on a capacitance change of only ~40 pF?  Would very much prefer a pure analog circuit … no microcontrollers.  Tried searching online without success.  When “capacitance” and “relay” are search terms, most of the results are about time delaying a relay.

 An off-the-shelf device would be even better if not too expensive.

Based on these results for capacitance, a circuit can be made according to my reply #3 above. But before I describe it, let me explain why I did not suggest a measurement device like the one gamelot suggested in reply #4. There are perhaps a dozen capacitive measurement ICs available, which have in common that you don't have to worry about measuring, but about the digital interface instead. So if you're a digital guy, have your MCU development system ready and know it, or if you need very good accuracy, this is the way to go. Otherwise, you loose a lot of time to get the MCU running, although the software will be quite trivial: Configuring the measurement IC, triggering, reading results back.

The approach I suggested can be easily implemented as a cheap one-chip solution with almost any quad opamp IC:

An oscillator Vosc feeds a series connection of a resistor Rref and the sensor capacitance Cs. The voltage at M will depend on Cs. Opamp U1 amplifies this voltage. It is connected non-inverting for high input impedance, because M should be loaded only lightly. The amplified signal is AM-demodulated by D1, Rd, Cd. This provides us with a DC voltage that depends on Cs at node 'demod'. But the two voltages for full/empty pipe have the same sign, which means we cannot yet feed this into a Schmitt trigger. The level shifter U2, which is actually a summing amplifier, corrects this by adding a negative voltage, such that the levels now have opposite signs. The Schmitt trigger U3, as usual, acts as a comparator with hysteresis, such that the output is not switched too often. That makes 3 opamps, the fourth in the package can be used to make the oscillator. Note that this generic schematic does not use a specific opamp type, because many will do, and that the stages U2, U3 will need a pot to adjust.
 
The following users thanked this post: calzap, vivi-d

Offline Terry Bites

  • Super Contributor
  • ***
  • Posts: 3174
  • Country: gb
  • Recovering Electrical Engineer
Re: Suggestions for water level sensing in pipe?
« Reply #26 on: June 18, 2026, 12:39:05 pm »
FDC1004? $3? I've been using them for bubble detection in IV lines. Very nice.
It can effectively reduce the effects of fringing capacitance which will ruin your day.
Thankfully TI gifted some EVALs with usb. $134, ouch.
 

Offline Doctorandus_P

  • Super Contributor
  • ***
  • Posts: 5368
  • Country: nl
Re: Suggestions for water level sensing in pipe?
« Reply #27 on: June 18, 2026, 12:50:32 pm »
A capacitive sensor can work, another way is to measure a temperature differential.

For example, use a TO220 BJT, and put it's copper tab "flat" inside the pipe, and then make it dissipate a bit of power. When there is no water, it will heat a lot, but when there is water present, it will heat up a very small amount. The Base-Emitter diode can be used as a temperature sensor.
 

Online calzapTopic starter

  • Frequent Contributor
  • **
  • Posts: 688
  • Country: us
Re: Suggestions for water level sensing in pipe?
« Reply #28 on: June 19, 2026, 04:48:07 pm »
A capacitive sensor can work, another way is to measure a temperature differential.

For example, use a TO220 BJT, and put it's copper tab "flat" inside the pipe, and then make it dissipate a bit of power. When there is no water, it will heat a lot, but when there is water present, it will heat up a very small amount. The Base-Emitter diode can be used as a temperature sensor.
Basically a good idea.  However, anything inside the pipe will be gradually coated with sticky biological material from pond water.  This will gradually change physical and electrical characteristics (electrical and heat conductivity through water, for example).  Not sure how much of a moving target  this will be for a decision point on primed or not.       Mike
 

Offline floobydust

  • Super Contributor
  • ***
  • Posts: 9073
  • Country: ca
Re: Suggestions for water level sensing in pipe?
« Reply #29 on: June 19, 2026, 06:12:34 pm »
I have not yet compared a wet electrode with a slime covered one, as far as double-layer capacitance change.

Worth it to roll back and try measure motor current? Do you have a clamp-on meter to measure it? To see if it's usable, despite ignoring power factor. In paractice it would need a decent  time delay as well.
 

Online calzapTopic starter

  • Frequent Contributor
  • **
  • Posts: 688
  • Country: us
Re: Suggestions for water level sensing in pipe?
« Reply #30 on: June 20, 2026, 02:17:18 am »
I have not yet compared a wet electrode with a slime covered one, as far as double-layer capacitance change.

Worth it to roll back and try measure motor current? Do you have a clamp-on meter to measure it? To see if it's usable, despite ignoring power factor. In paractice it would need a decent  time delay as well.
Pump motor current does not run through the float switch.  Float switch position feeds into the pump controller logic along with several other parameters like output pressure and flow.  Pump motor is 240 VAC, single phase, 3 HP.

Mike
 

Offline Psi

  • Super Contributor
  • ***
  • Posts: 12653
  • Country: nz
Re: Suggestions for water level sensing in pipe?
« Reply #31 on: June 20, 2026, 02:38:08 am »
You could probably also use inductive coils to detect water in a pipe.
I suspect it will work better with non-metal pipes, but waters electrical conductive should induce eddy currents if present.

LDC3114 has 4 channels of inductive sensing intended for button press detection but you can put the chip in raw mode and use it for other things.
But keep in mind that inductive sensing can be a pain in the ass to fine tune. You need to optimize coil size/shape/turns and use a 2nd coil to reject external effects unrelated to what you're sensing.



Greek letter 'Psi' (not Pounds per Square Inch)
 

Online Circlotron

  • Super Contributor
  • ***
  • Posts: 3567
  • Country: au
Re: Suggestions for water level sensing in pipe?
« Reply #32 on: June 20, 2026, 03:35:37 am »
Depending on how high the supply water level is above the pump inlet, you could use a water level sensing switch from a top loading washing machine.

AI description - A washing machine's water level pressure sensor (or pressure switch) regulates how much water enters the tub. It works by measuring air pressure; as water fills the tub, it compresses trapped air in a connected hose. Once the correct pressure is reached, the sensor signals the control board to stop the water valve and start agitating
 

Offline mikerj

  • Super Contributor
  • ***
  • Posts: 3671
  • Country: gb
Re: Suggestions for water level sensing in pipe?
« Reply #33 on: June 20, 2026, 09:50:09 am »
Having the Tee branch is the real problem here, any area where water can stagnate and constantly accumulate algae and dirt etc. is going to make reliable sensing extremely difficult.  My suggestion would be to remove the Tee and use a capacitive sensor on the main inlet pipe where water flow should keep the pipe reasonably clear.  You can get capacitive sensors very inexpensively if you don't need a branded, industrial rated part e.g. search for the XKC-Y25 sensor. I have first hand experience with these and they are quite reliable once you set them up.  They need a 5-12v supply and have a maximum 100mA output, enough for a low current relay
 

Online calzapTopic starter

  • Frequent Contributor
  • **
  • Posts: 688
  • Country: us
Re: Suggestions for water level sensing in pipe?
« Reply #34 on: June 20, 2026, 07:24:06 pm »
Depending on how high the supply water level is above the pump inlet, you could use a water level sensing switch from a top loading washing machine.

AI description - A washing machine's water level pressure sensor (or pressure switch) regulates how much water enters the tub. It works by measuring air pressure; as water fills the tub, it compresses trapped air in a connected hose. Once the correct pressure is reached, the sensor signals the control board to stop the water valve and start agitating
Pump is sucking water from a pond.  Pond surface is about 1 m below the pump inlet.  That’s why the pump loses prime overnight.  The tiniest leak between the outlet check valve and the pond surface will suck-in air. Also, the water has biologically active things (bacteria, algae, larvae, etc.) in it.  These will generate carbon dioxide when the water isn’t moving (most nights).  Enough water backs into the pond that prime is lost.  There is a foot valve on the inlet pipe end which is deep in the pond.  It became clogged open years ago.  However, from time to time, other bad things happen on the suction side (cracks, loose fittings, etc.) that let in more air. 
 
Pump is cycling often enough when actively being used for irrigation that the small amount of air that leaks in doesn’t cause loss of prime.  It’s only inactivity at night that allows in too much air and allows generation of carbon dioxide in the water.

Monitoring prime is one of the protective ways to keep the pump from running dry which would destroy it.
We reprime the pump each morning.  Can usually do it in 2-4 minutes using the pump itself.  You might ask why not let the pump reprime itself automatically.  The pump can only prime itself if the outlet pressure is reduced to zero which we do by activating certain electric valves.  Once pump is primed, we set up the desired electric valves to begin irrigation.
Mike

 

Online Circlotron

  • Super Contributor
  • ***
  • Posts: 3567
  • Country: au
Re: Suggestions for water level sensing in pipe?
« Reply #35 on: June 20, 2026, 10:03:54 pm »
Pump is cycling often enough when actively being used for irrigation that the small amount of air that leaks in doesn’t cause loss of prime.  It’s only inactivity at night that allows in too much air and allows generation of carbon dioxide in the water.

Have a  timer so if pump hasn't started for x amount of time then power it up for a few moments to stabilise the situation?
 

Online calzapTopic starter

  • Frequent Contributor
  • **
  • Posts: 688
  • Country: us
Re: Suggestions for water level sensing in pipe?
« Reply #36 on: June 21, 2026, 03:59:51 am »
Pump is cycling often enough when actively being used for irrigation that the small amount of air that leaks in doesn’t cause loss of prime.  It’s only inactivity at night that allows in too much air and allows generation of carbon dioxide in the water.

Have a  timer so if pump hasn't started for x amount of time then power it up for a few moments to stabilise the situation?
Well, I’ve done something similar which is to leave one of the smaller irrigation systems on at night.  That causes the pump to cycle periodically.  But it is a waste of water, electricity, and pump longevity.  Can’t just have a timer that forces to pump to run regardless of output pressure.  When pump has generated cutout pressure, it must stop or be damaged.  We have to check on and do a number of things in the pump house each morning.  So, priming the pump is no big deal.            Mike
 

Offline Xena E

  • Super Contributor
  • ***
  • Posts: 1330
  • Country: gb
Re: Suggestions for water level sensing in pipe?
« Reply #37 on: June 21, 2026, 07:09:28 am »
RF Capacitive sensor is one approach that I had success with.
Best practice where contaminants are present would be to use the liquid as ground and differentially sense the outside of the plastic pipe, that way the build up of contaminants can be nulled.

If interested, I have some notes on a circuit to do the job, (somewhere!)  IIRC it's just a hex cmos schmitt inverter and a few passives.

It strikes me that differential sensing of the resistance of the liquid could also work well as you would also be able to null the build up of contaminants to a greater degree. It would be a matter of creating suitable sense electrodes.
« Last Edit: June 21, 2026, 07:19:19 am by Xena E »
 

Offline tautech

  • Super Contributor
  • ***
  • Posts: 31990
  • Country: nz
  • Taupaki Technologies Ltd. Siglent Distributor NZ.
    • Taupaki Technologies Ltd.
Re: Suggestions for water level sensing in pipe?
« Reply #38 on: June 21, 2026, 09:53:40 am »
Alternative solution I use is a suction side paddle type flow sensor combined with a adjustable timer for pump dry run protection.

Timer set to 2s of no flow which opens the pump mains supply relay/contactor coil windings when no flow is detected but allows for the pump to run for only 2s to prevent pump wet end damage.  :scared:
Cascading relays allow for LV operation for the flow sensor and timer.

In normal operation the flow sensor is triggered at pump ON but when the pump prime is lost the pump only runs for 2s.
We see this behavior if we watch the pump ON light up the supply pole and if the light shines for just 2s instead or remaining ON we know pump prime has been lost.

The first flow sensor was brass and got a few years from it before a wet side mechanical failure so now a stainless one has taken its place.

https://www.aliexpress.com/item/1005006826291989.html
These come in brass or stainless with COM, NO and NC contacts on a std micro-switch.

For the timer search Aliex for: 0~10S Adjustable Module DC 12V Delay Relay Shield Timer Switch.....lots to choose from and cheaper than you could ever consider making one.

Pics of the original install back in 2019 before the first brass flow sensor failed and the tiny timer in the control cabinet.

Further info on this installation here:
https://www.eevblog.com/forum/rf-microwave/antenna-project-log/
Avid Rabid Hobbyist
 

Online calzapTopic starter

  • Frequent Contributor
  • **
  • Posts: 688
  • Country: us
Re: Suggestions for water level sensing in pipe?
« Reply #39 on: June 21, 2026, 06:01:33 pm »
First, thanks for all the replies and advice.   Folks did bring up debris accumulation in the sidearm several times … this does not occur.  The sidearm gets coated with the same level (2-3 mm) of bioslime as the main pipe.  Float switch also gets coated with bioslime, which has been the problem in addition to simple failure of the float per se.  The side arm is level with the main line and short enough that it gets thoroughly washed via eddy currents every time the pump runs.

Second, here’s what will happen.  I discovered a larger float switch made by Thomas Industries that will still fit inside the side arm.   See pic.  I bought one.  Hopefully, it will be more robust than the current troublesome float switch made by Sensata.  This is a simple swap requiring only a slightly larger mounting hole.  However, I will continue to work on an external capacitance-based fluid level detector.  Having everything outside the pipe gets completely away from the bioslime problem.

Mike
 

Online calzapTopic starter

  • Frequent Contributor
  • **
  • Posts: 688
  • Country: us
Re: Suggestions for water level sensing in pipe?
« Reply #40 on: June 21, 2026, 06:29:19 pm »
Alternative solution I use is a suction side paddle type flow sensor combined with a adjustable timer for pump dry run protection.

Timer set to 2s of no flow which opens the pump mains supply relay/contactor coil windings when no flow is detected but allows for the pump to run for only 2s to prevent pump wet end damage.  :scared:
Cascading relays allow for LV operation for the flow sensor and timer.

In normal operation the flow sensor is triggered at pump ON but when the pump prime is lost the pump only runs for 2s.
We see this behavior if we watch the pump ON light up the supply pole and if the light shines for just 2s instead or remaining ON we know pump prime has been lost.

The first flow sensor was brass and got a few years from it before a wet side mechanical failure so now a stainless one has taken its place.

https://www.aliexpress.com/item/1005006826291989.html
These come in brass or stainless with COM, NO and NC contacts on a std micro-switch.

For the timer search Aliex for: 0~10S Adjustable Module DC 12V Delay Relay Shield Timer Switch.....lots to choose from and cheaper than you could ever consider making one.

Pics of the original install back in 2019 before the first brass flow sensor failed and the tiny timer in the control cabinet.

Further info on this installation here:
https://www.eevblog.com/forum/rf-microwave/antenna-project-log/
Actually, there is already a very nice Johnson Controls flow switch on the inlet side of the pump.  Mostly it’s used for a flashing light indicator that flow is occurring.  However, under circumstances requiring a very high flow, control of the pump can be assigned to the flow switch by flipping a manual switch.  Pump will run then as long as flow occurs.  High flow situations are for diagnostic testing and fire hydrants.  Fortunately, the latter have never needed to be used for fire.  It’s actually a bit more complicated than described above, involving pressure switches on storage tanks.

I’ve thought of using the flow switch and a delay timer as a means of indicating prime.  However, one problem is that the water goes into pressure tanks, and as the pressure approaches cutout level, flow drops too low to activate the flow switch.

In any case, I much prefer to have a monitor that directly indicates water level in the intake pipe.

Mike
 

Offline tautech

  • Super Contributor
  • ***
  • Posts: 31990
  • Country: nz
  • Taupaki Technologies Ltd. Siglent Distributor NZ.
    • Taupaki Technologies Ltd.
Re: Suggestions for water level sensing in pipe?
« Reply #41 on: June 21, 2026, 10:35:07 pm »
...............
I’ve thought of using the flow switch and a delay timer as a means of indicating prime.  However, one problem is that the water goes into pressure tanks, and as the pressure approaches cutout level, flow drops too low to activate the flow switch.
Yup, a flow switch would not be suitable for your application.

Mine is open line into a 15kL header tank 55M above the pump so always at full flow.
Avid Rabid Hobbyist
 

Offline Terry Bites

  • Super Contributor
  • ***
  • Posts: 3174
  • Country: gb
  • Recovering Electrical Engineer
 
The following users thanked this post: PCB.Wiz

Offline PCB.Wiz

  • Super Contributor
  • ***
  • Posts: 3365
  • Country: au
Re: Suggestions for water level sensing in pipe?
« Reply #43 on: June 23, 2026, 09:15:13 pm »
https://www.edn.com/simple-circuit-interfaces-differential-capacitance-sensor/

That's a classic 4046 oscillator topology, of S-RS latch and open drain.

Someone wanting a smaller solution these days, might choose a 1G58 & 1G18 single gate pairing, for the same waveforms.

If you want a lower output frequency, easier to transmit and sense than a direct 50pF oscillator, you can use 1G98 as a muxed schmitt oscillator, and 74AHC1G4215 (etc) divider.
High time is one cap arm, and low time is the other cap arm.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf

 

-->