I need to make some water level probes and was wondering about supplying the common probe with a 50% PWM signal and simply adding a capacitor, and possibly resistor, to an analogue input.
I don't expect to measure level by resistance just probe wet or dry.
I will want 4 probes in total, obviously 4 inputs. The water is in a river so I expect dissolved solids and therefore conductivity to be high.
Has anyone tried this or anything similar?
I appreciate that I could buffer the inputs with op-amp's or any number of amplifiers but I was hoping for simple so that I avoid a strip-board build.
You can use plates (I coat them and apply ac to avoid electrolysis). Alternatively, you can use insulated wires: wind one loosely over another and put it to the bottom of your container sideways. As the water is filled up, its capacitance goes full quickly.
No corrosion to worry about and perfectly suitable for a digital device.
What is the input impedance of an analog pin? High, yes? Tens or hundreds of megohms? Given that, how big an issue is electrolysis?
I have a project that is similar to the rain or leak detector in that the probes are always dry unless there is a problem. I sample the probes once per second (which is a fair amount of overkill), but only turn the sense voltage on for a few milliseconds. Plus the probes are stainless steel. So I didn't worry about electrolysis at all.
Interesting folks thanks ....
I had wondered about capacitive sensing and dismissed it as unstable without close manufacturing tolerances, perhaps I shouldn't have, the adjacent wires idea is defiantly worth an experiment
Switches aren't going to cut it ... the environment is too harsh and the system is sensing the level over a weir so the middle switch / switches are constantly toggling so I would be worried about mechanical issues.
In have SS probes and I like the idea of turning them off, it hadn't occurred to me but makes sense, well all but the target probe.
I will be measuring the proportion of dry time to wet there, essentially if it is wet for 30s or more the level is high, dry for 30s or more the level is low, when it is bouncing we are just on the probe and correct.
Dyslexicbloke:
I will be measuring the proportion of dry time to wet there, essentially if it is wet for 30s or more the level is high, dry for 30s or more the level is low, when it is bouncing we are just on the probe and correct.
Using resistive sensors to measure moisture levels is simple and widely used. It's not easy to calibrate, but if you're only looking to detect the presence of water that would not be an issue. It wouldn't work well (perhaps not at all) with absolutely pure water, but river water would not be pure. My biggest concern with this type of sensor would be dirt and limescale being deposited on the sensor surface and eventually reducing its sensitivity so far that it became useless. If that was a problem you might need to go out and physically scrape the probe wires clean every few years.
Tom,
yes that would work when the weir is at or near the normal range and would be more accurate and easier to implement than other options.
However the river in question can, and often does, rise a metre or more over the weir when there is prolonged heavy rain.
That would completely submerge the unit and I doubt it would survive.
The 'propper' solution to this problem is a submerged pressure transmitter but I cant afford the £250-£300 that they cost.
Probes, provided that they aren't fed with DC which would electrolyse them, is probably the way to go I think, based on comments and suggestions.
That said I ran a couple of simulations and attempting to do it without any external amplification / isolation I think is a plan destined to yield an unstable result.
I have decided to go with the attached circuit ...
The probe current is symmetrical due to the capacitive decoupling.
The 100K on the right is the input impedance of the I/O pin.
The 50K and the switch represent the water.
The output is about 4.3V with about a 100mV ripple when the probe is wet and a few mV, after a short decay time, when the probe is dry.
A second comparator would get me to 5V and 0V respectively but I don't think it is necessary given the input characteristics of the Arduino
I would appreciate a critique if anyone thinks I have missed anything.
FWIW, here is the circuit I use to monitor my sump. Like I said earlier, the probes are dry under normal circumstances, so not a big worry about electrolysis anyway. I turn the sense voltage on for 10ms and sample once/second, so a 1% duty cycle. I figure the input impedance must be on the order of 500K, so around 7µA of current through the probes with a 3.3V supply. Not sure how much electrolysis that might cause, but I figured it was negligible in my scenario. It's quite sensitive as well.
Interestingly, I used an LM1830 fluid level detector many, many years ago that was designed to output an AC voltage to prevent electrolysis. It's not made any more, when I went looking for a replacement I came up empty. Wonder why that is.
In industry "bubbler" level indicators are often used, but they require a source of compresses air. For your budget setup, a float with a shaft attached, and put inside a tube might work. Use the shaft movement/position for level determination as the float moves the shaft up/down at the top of the tube.
edit: An ultrasonic distance measuring gizmo above the weir might also be a possibility.
I thought about ultrasonics, I was going to put a module in a tube but was advised that it wouldn't work ....
Ultrasonics over the weir though, I hadn't thought of doing that, wood for the trees I think, thanks, I will be trying that.
The water surface should be fairly flat at that point and it mat just work.