Building a reliable capacitive-sensor interface

As with traditional mechanical switches, a user's interface experience with a capacitive sensor is directly related to the way the sensor responds (sensitivity) upon contact under all operating conditions (reliability). This article takes an introductory look at some common capacitive-sensor analog front-end measurement techniques applied today to develop a high-quality and reliable capacitive-sensor interface.

The sensitivity of a capacitive sensor is determined by its physical design, the method used to measure the capacitance and the ability to precisely compare the capacitance change relative to preset contact threshold levels.

Capacitive sensors manufactured on traditional printed-circuit-board processes are usually in the range of 50 femtofarads to 20 picofarads, making it difficult to detect small changes accurately. Although there are several methods of measuring these small values, there are significant benefits in using a high-precision measurement technique that employs a 16-bit capacitive-to-digital converter.

Capacitive sensors designed on traditional low-cost printed-circuit boards. Capacitive sensors can be developed on standard printed-circuit boards or printed flex circuits using the same copper material as that used for routing signals. In both cases, the maximum sensitivity of the sensor is determined by the physical size of the sensor and a combination of the plastic overlay dielectric constant, including the dissipation factor, and thickness of the overlay material. For example, a 3-mm-diameter sensor with a 5-mm plastic overlay would be less sensitive than a 6-mm-diameter sensor with a 2-mm plastic overlay.

The goal is to develop a capacitive sensor that has the right response and meets ergonomic requirements. In some applications, the sensor may have to be small, resulting in small changes in capacitance levels upon user contact.
Figures 1 and 2 illustrate common methods of designing capacitive sensors on a printed-circuit board.

They show the behavior of the sensor with a stimulus applied during user contact. The way the sensor capacitance changes upon user contact varies between these methods, but the sensor performance is comparable in both cases.

Stimulating the capacitive sensor
The example in Figure 1 uses a continuous 250-kHz excitation square wave applied to the source (SRC) side of the sensor, to set up the electric field in the capacitive sensor. The stimulus creates an electric field in the sensor that partially protrudes through the overlay plastic. The capacitance-input side (CIN) is connected to the input of the capacitance-to-digital converter.

The alternative capacitive-sensor design example in Figure 2 applies a constant-current source to terminal A of the sensor, with terminal B grounded. Additional finger capacitance is added when the user makes contact with the sensor. The result is an increase in the RC-rise time during the charging cycle.

Measuring the capacitive sensor and detecting sensor contact
One traditional method of measuring capacitance is shown in Figure 3.

A constant-current source continuously charges the capacitive sensor to the reference threshold level on the comparator. The comparator will pulse high each time the capacitive sensor reaches the reference threshold level. This closes the switch, discharges the capacitor and resets the counter, Figure 4.

Determining when the user is in contact with a sensor is achieved by counting the number of clock cycles that it takes for the capacitive sensor to charge up to the reference level (REF) on the comparator. This value is then compared with preset threshold detection settings. For example, a count of 50 could indicate sensor contact, whereas a count value of less than 50 would indicate no contact. In this example, the accuracy and precision are related to the frequency of the reference clock and the repeatability of the current-source drive over a wide span of capacitive-sensor values as the user contacts the sensor.

The excitation source, a continuously running 250-kHz square wave, establishes the electric field in the capacitive sensor and the flux lines that penetrate the overlay material. The precision 16-bit ADC detects whenever the user is contacting the sensor, with one femtofarad of measurement resolution. No external tuning components are required, and automatic calibration ensures that no false or nonregistering touches occur because of changing temperature or humidity.

Once the capacitive-sensor output data is digitized, individual detection threshold levels can be easily programmed for each sensor by setting a corresponding 16-bit register. The threshold levels can be programmed between approximately 25 percent and 95.32 percent of the sensor full-scale (FS) output value, Figure 6.

About the authorWayne Palmer is an applications engineer for the Sensor Products Group at Analog Devices, Inc., Norwood, MA. He received a BSEE from Northeastern University in Boston, and can be reached at wayne.palmer@analog.com.