The Wired Woods: Measure For Measure

The thought of building and tweaking three of those vertical pipes didn’t appeal much.

Next, I found out about capacitive water level sensors, thanks to a cool marketing video on YouTube from a company that makes them. The company’s product was too expensive for me, but a bit of online searching showed that you could make something roughly equivalent (with much lower precision, which wasn’t a big problem for me) out of plastic pipe and two strips of tinfoil on either side, with wires attached. My homemade sensor works like a capacitor in an electronic circuit, but as the level of the water in the storage tank covers or exposes more of the pipe, the capacitance varies, which we can measure and interpret back to a change in water level.

That’s all well and good, but how do you measure capacitance?  For those of you playing along at home, there’s no capacitance setting on your $20 multimeter from Radio Shack.

A rough-and-ready way of doing it is to build this circuit, which has the following properties:

  • RC TimerFor any given combination of resistor value R ohms and capacitance value C farads, their product is a constant, called the time constant, T, measured in seconds.
  • At time constant T, the voltage Vc measured across the capacitor will be 63.2 percent of the input voltage Vin (because it charges up exponentially).

We can choose the values of Vin and R to be fixed.  C is going to be the variable capacitance of our water level sensor, which we can calculate as follows.

From property 2 above we can time how long it takes for Vc to reach 63.2% of Vin, which gives us the value of T.

And from property 1 above, dividing T by R, gives the value of  C!

Physics: it’s like magic, isn’t it?

Choosing the right value of R (so that T works out to maybe five or ten seconds for the full tank level capacitance) and calibrating C for full tank values (it should be close to zero for empty, of course) is all that remained to be done.

Here’s a video of a test version of the capacitive water level sensor. I’ve wired up some blinkenlights via the Arduino, which give my folks a taste of how it would work and aren’t part of the final system:

[yframe url=’www.youtube.com/watch?v=u01NUzHq60w’]

Great!

Now, all I had were the small problems of building three production versions of the capacitive water level sensor, installing a telemetry station with the electronics and solar panel and charge controller, and persuading that data to make its way out of the woods, a quarter of a mile back to the house, where a base station would display the water levels meaningfully.

So, of course I decided to try to talk to an Outback inverter instead.

Fluent in over six million forms of communication and RS-232 ain’t one of them. The next installment has me wishing that USB had been invented some time in the 1980s and equally cursing myself for throwing away my breakout box and RS-232 gender converters. Anyone who understands why this is a problem, make sure you’ve got some Kleenex nearby, because you know what a sad and lonely journey I’m setting out on …

, , , , , , , , ,


Comments are closed.
?>