Monday, 16 November 2015

A precise capacitive water level sensor

By Giovanni Carrera rev. 161115 -

This sensor is particularly suitable for punctual dynamic level measurements, and therefore for wave profiles.
This project is not new, but dates back to the mid-70s, when I studied with Professor Becchi, tested and designed it in the laboratories of Hydraulics of the University of Genoa. We also published the paper "A capacitive wave transducer for hydraulic measurements" [1].

I used these probes for years in towing tanks for the measurements of waves generated by the hull of the ship models. A few years ago I used this probe to measure the waves generated by a catamaran in the Lake Como, as shown in the following picture.
Operating principle
The probe can be represented as a thin insulated conducting wire with a layer of non-stick material such as Teflon, as seen in figure. A metal not isolated rod electrode serves as ground reference.
Because the not pure water is a conductor, especially at high frequencies, the system can be modeled as a cylindrical capacitor, whose capacity Cx is proportional to the part of the probe immersed in the water.
To avoid problems caused by the reversal of the meniscus, in correspondence with the change of the vertical motion of the liquid, it is necessary to use a probe with a very small diameter. For insulating liquids, the wire insulation is no longer essential but the ground electrode must be closer to the probe.
But when it comes to practice, I realize that it is not possible to seal the submerged end of the wire probe. After using special glue, specific for the Teflon, it was found that after some time the water has infiltrated into the probe. Furthermore the wire could not be too thin because it is not maintained rigidly straight-lined.
So I used an archway frame which tended a double wire, U shaped, returned at the submerged end by a small plastic pulley and a thin wire, PTFE insulated, as that utilized for electrical wiring, as shown in the following figure.

For what I remember of the many experiments that I made together with a colleague, I had noticed that by exciting the probe with positive signals, there were still residual charges on the thin film of water on the wire, this phenomenon produces a hysteresis, i.e. a small difference between the ascent and descent of the water on the insulated wire. For these reason a unipolar excitation is not suitable for dynamic measurements, even at low frequencies such as that of the waves.
In addition, also the frequency has great importance. From these experiences I have designed the electronic circuits in order to excite the probe with a bipolar signal at about 400 kHz.

The probe electronics
The probe electronics is mounted close to the end of the wire, the scheme is shown in the following figure.
U1 is a 400 kHz astable oscillator and its output is connected to the input of U2 that is configured as monostable multivibrator. The width of output pulses is proportional to the probe capacity, so the output is a PWM (Pulse Width Modulation) signal. The operational amplifier U3 has the function to smooth the signal with a weak filtering. I used a 4-wire shielded cable to connect it to the rest of the electronics. I used shielded cable with a length up to 30 m without problems.
The R4 resistor value depends on probe capacity, the indicated value (15k) is for a 30 cm probe.
The linearity of this system is very good, in my last calibration, the correlation coefficient was 0.999992 with an error of about 0.5 %.
This circuit was put in a cylindrical sealed case at the lower end of which is connected the probe wire with a coaxial connector (PL-259 female). On the upper end of tube there is a connector for the cable that connects the transducer to the rest of the instrumentation.
This capacitive transducer is powered by a +/-5 V supply, realized with common type regulators 7805/7905, as well as the main +/- 15V power supply that uses regulators 7815/7915.
The rest of electronic circuit is shown in the following figure.
The transistor Q1 works as analog switch that settles the PWM signal amplitude to a precise value. It is connected to a low-pass active filter (U1), followed by a summing amplifier (U2B), to remove the offset (using Rp2), then a power amplifier (U2A) with sufficient current to drive the galvanometers of the paper recorders that were used in the 70s. The cutoff frequency of the second order Sallen-Key filter is approximately 500 Hz. The output is bipolar +/-10V or less, adjusted by gain potentiometer Rp1. The potentiometers Rp1 and Rp2 are ten turns type for a better adjusting.
Some modification are now required to obtain a signal for a system like Arduino, with an unipolar input 0-5V.

1)      "A capacitive wave transducer for  hydraulic  measurements",  Ignazio Becchi,  Giovanni Carrera,  Hydraulik und  gewasserkunde,  Technische Universitat, Heft Nr.27 , pag.19 - Munchen 1978.