Capacitive sensing technology has become the primary technology underlying touch interfaces. However, capacitive sensing is not limited to creating dynamic buttons and sliders on different appliances for the user interface. There are numerous applications where capacitive sensing can replace traditional ways of implementing specific functions like liquid level sensing, humidity sensing, and sensing of metallic objects. This article will discuss how to implement liquid level measurement using capacitive sensing technology.
Point level measurement
To begin, liquid level measurement can be implemented in one of two ways. Using point level measurement, sensors placed at discrete levels within the tank are used for tank full detection, tank empty detection, and various fixed liquid levels. Point level measurements are generally low resolution. With continuous level measurement, the liquid level of the tank can be detected at finer levels for those applications, which need greater accuracy. Both these types of measurement require different implementation topologies. To illustrate how capacitive sensing can be used to monitor liquid levels, this article will concentrate on point level measurement implementations approaches and challenges.
Consider a coffee machine. Typically, such a machine has two reservoirs: a main reservoir for the water used to produce the coffee and another one serving as for a drip tray which is used to hold wasted water. A cappuccino machine will have a third reservoir for milk. Normal operation of the machine will be temporary interrupted whenever the water level in the main reservoir is below a predefined minimum level or when the level in the drip tray has reached its maximum capacity and not been emptied. For both of these situations, a single point level measurement is sufficient.
Engineers can implement point liquid level measurements in several ways:
Mechanical float: With this approach, a magnet is mounted on a float, which moves with the level of liquid changes in tank (Figure 1). The magnet in the float actuates a reed switch to control the system and provides high repeatability. However, due to its use of moving parts, floats have a shorter operating life and so are less reliable.
Figure 1: Mechanical float
Ultrasonic sensor: An ultrasonic transmitter and receiver can be mounted on top of the tank pointed towards the liquid. The system transmits ultrasonic pulses towards the liquid’s surface and observes the echo signal. The delay between the transmitted signal and the echoed signal indicates the liquid level in a given reservoir (Figure 2).
Figure 2: Ultrasonic liquid level sensor
Conductivity measurement: Two conductive electrodes are used to measure conductivity. This method is reliable, compared to mechanical and ultrasonic measurements, but it cannot be used for beverages or flammable liquids.
Capacitive measurement: A change in the liquid level results in a corresponding change in capacitance that can be measured directly. Using a capacitive sensor, there is no need for direct contact between the sensor and liquid. In addition, since there are no mechanical or moving parts, this approach has a long operating life with high reliability.
Basics of Capacitive Measurements
To understand how a capacitive-based liquid sensing measurement is made, let us first take a look at the basics of capacitance sensing. For a parallel plate capacitor, the capacitance is defined as:
From this equation, if there is a slight change to either εr, A, or d, the value of capacitance will change. By measuring this change in capacitance, the relation between the various parameters that caused the change in capacitance and the physical quantity with which the change occurs can be determined using Equation 1.
There are numerous methods by which capacitance can be measured. Some methods are based on absolute capacitance measurements and others are based on relative measurement. In relative capacitance measurement, only the change in capacitance, which respect to a reference capacitance value is measured. For absolute capacitance measurements, the actual sensor capacitance is used.
Capacitive sensing has evolved in the user interface domain where there are many choices of microcontrollers optimized for capacitive sensing applications. Although predominately used for user interface related features, these controllers can be used to implement other functions as well.
If we look at the capacitive sensing system, the sensor capacitance in the absence of the liquid (or any conductive object) is as shown in figure 3. This capacitance is called parasitic capacitance (Cp).
Figure 3: Sensor capacitance in the absence of any conductive object