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 %.

Components used in the probe circuit
26.7 kW ±1% metal film
C1, C2
1 µF,25V tantalum electrolytic capacitor
15 kW ±1% metal film
C3, C4, C7, C8, C11
100 nF, 50V ceramic capacitors
22 kW ±5%
1 nF, 50V ceramic capacitors
15 kW ±1% metal film
22 pF ceramic NPO or mica capacitor
220 W ±5%
330 pF polystyrene or mylar capacitor
R6, R7
100 kW ±1% metal film
10 nF mylar capacitor
U1, U2
Intersil ICM7555 timer IC
LF13741, LM741, TL081,  op amp

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.
The following images show the arrangement of the probe components.

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


  1. With reference to the circuit diagram. Can you explain why you have a pot Rp2 connected in paralel with another 50k pot between -15v and ground (0v) ?

    1. You can use the trimmer mounted on the board or, alternatively, a multi-turn potentiometer on the instrument panel. In the latter case you should not mount the trimmer.

  2. Nice post. I was checking constantly this blog and I am impressed! Extremely helpful information specially the last part I care for such info a lot. I was seeking this particular information for a very long time. Thank you and good luck.
    Liquid Level Sensor

  3. I'm glad of your appreciation and that my posts are useful to someone.

  4. This bog contain many information which is really helpfull for me. I will beck again for reading more posts.
    Liquid Level Probe

  5. This is really an important blog with many helpful information. I have been searching for a long time for this types of content. Keep up posting more and thanks for your great staff.
    Battery Operated Ultrasonic Level Sensor

  6. Thanks, You wrote awesome, I have learn lots of things from your article. It's really helpful for any readers.
    Battery Operated Flow Meter

  7. Brilltech Engineers Pvt. Ltd is known in the global market area for serving the industries with the excellent products and greater services.for more information vivist our official website:-

  8. Hello Glovanni
    I worked in a model ocean lab for about 35 years, it went bankrupt during the great depression in 2008 .. The Offshore Model basin in Escondido, CA. USA. I often built small "Micro Oceans" over the years... and have been working on such a project for the last 4 years. (see YouTube under Micro Oceans - Random Sea) I managed to get the first wave probe we used in 1970 to work for the very small waves i make in the tank to illustrate simple ocean physics, and micro marine engineering with shore models, and floating structures. I would like to build your design .. I'm rather good with electronics... any chance you sell finished circuit boards?
    Regards, Michael Lambert

  9. Hello Michael,
    I am happy to communicate with a person who has had similar experiences to me as a scientific researcher.
    I am an electronic engineer but I have worked for more than 35 years in the Department of Ships Engineering in Genoa. For at least ten years I was taking measurements on board of ships, putting a Waverider buoy in the sea to measure sea keeping.
    I designed the level probe to measure the waves in the naval tanks to see the behavior of the regular wave models produced by an wave generator. The measurement is precise but not perfectly punctual because the wires are two, but can be approached up to about 5 mm.
    As for your question, many years ago a company has made a few dozen of these systems, but now I have only some prototypes. I can send you some pictures of the probe circuits so it can help you in the arrangement of the components.
    Best regards

  10. Hi again.. Thanks for the reply. Wonderful life working with science, electronics and the oceans. I noticed the pictures above the posts, they look rather good for showing circuit design. Methinks it would be fun to build it .. I'll give it a try and will credit you in the youtube video's I must make to show what you can do with a small model ocean ... now that it's finally working. I had to try several control systems, because the only linear actuator worthy of such a project is LinMot's magnetic linear motor. Unfortunately, by the time you have a working system using today's state-of-the-art automation equipment, you've built a machine that no museum or educational institution could afford. All my stuff (everything you see on youtube) came from eBay .. I'm using Dataq's analog acquisition system via USB for a PC .. which is quite awesome for low budget data analysis.. so the probe output must be a ±10 V .. and it is! .. I love how you were using galvanometers on chart paper .. those were the good ol' days. Thanks for your help..:-) Regards,

  11. Great post.Thanks for sharing this article with us.Keep posting!!!
    Water level sensor in chennai

  12. Hello,
    I'm studying electrical and electronics engineering. I have a project assignment. Measure the wave height at sea. Is this circuit appropriate?
    and how can I show the measured values ​​on the LCD? I would be glad if you help.

    1. Hi Dogan.. This is probably the best circuit out there for measuring rapidly changing water height very accurately. I built it with awesome help form Giovanni when I mistakenly chose 555 chips that couldn't function in the 400khz range.

      Here's a video of it working on a project of mine:

      The output of the probe is a varying DC voltage as a function of water height. You will need a simple and inexpensive data acquisition system such as "DataQ" to present the wave data on a PC which is then available for analysis by LabView or similar.

      Or any simple oscilloscope with "strip chart" feature will work...

    2. Hi,I have to quantify the sea wave height in cm, in cm. and I have to show this measurement result in lcd.
      But I couldn't find a circuit like that. I don't know how to measure the sea wave height with capacitive measurement.

    3. Dogan .... OK you want to use an LCD display to indicate wave height in centimeters. Look... The Giovanni circuit outputs the wave height in real time, continuously as a DC voltage .. always changing as a function of the water height. If you watched my video, you could see the actual measurement in real time. I can't imagine how an LCD system, measuring varying DC voltage, modified by a scaling adjustment, calibrated to display centimeters .. would be of any use... even if it worked perfectly. The readout would be changing quickly, and continuously, positive to negative, referenced to calm water ..the only time the readout was not changing.. and you would call that "zero". Your assignment is ridiculous, as I understand it.

      Perhaps you could design the LCD circuit to display "maximum" wave height (+VDC) or minimum wave height .. over a time period? Much like a digital temperature unit might do. But, that is of little value.

      What is generally done is to input the changing DC signal into something like LabView .. which will process the wave form into digital data which it analyses for specific desired information... like maximum wave height, or wave height versus wave period ... which tells you something about the character of the ocean, which is scientifically useful when it comes to designing ships or boats that must perform well in that environment.

      Perhaps, you really have no interest in measuring an ocean. And, what you really want is to measure water height using a capacitance probe. You are going to have to be much more specific as to what you really want to .. as far as I can tell, all of your questions have been answered... :-) Regards, Michael

      What is

  13. Hi Dogan,
    I used this probe, modified to increase the range to 1 m on a lake, as you can see from the first figure. For the sea the waves are of greater amplitude and the measure is disturbed by the shallow sea bottom. I used wave buoys with a vertical accelerometer, integrated twice in the time domain.