Latest News
|NewsletterThe methodologies vary, ranging from compressive resistive buttons to capacitive sensing.
The use of capacitive sensing is appearing in low-end applications, ranging from simple keypads to much higher end applications such as Indium Tin Oxide (ITO), which overlay LCD TFT displays, supporting single and multi-touch finger gesturing motions.
To suit the varied applications, capacitive sensing elements must be changeable upon application. Typically, these come in the form of single buttons, sliders and touch pads.
To achieve fully functional capacitive sensing, many designers have to consider the kind of overlay that should be used in their application.
The overlay typically comes in varying forms of plastic to rubber and glass. It is important to remember, that the dielectric constant εr varies for different materials, this can lead to differing impacts on the performance of your capacitive sensing system.
An example of a capacitive sensing technique is known as the CSD or Capsense Sigma Delta. Figure 1 shows the CSD configuration.
Figure 1: Capacitive Delta Sigma Circuit
The circuit can be simplified by considering the sensor capacitance being replaced by an equivalent resistor.
During operation C(mod) charges until its voltage reaches V(ref). The time to charge to V(ref) is determined by the equivalent resistance of R(cx) (which is the reciprocal of the product of the switching frequency and sensing capacitance). Once C(mod) reaches V(ref), the comparator toggles, its output is latched (synchronised to clock) and the switch closes allowing the capacitor C(mod) to discharge through the bleed resistor Rb.
Once the voltage on C(mod) falls below V(ref) minus the hysteresis level in the comparator, the comparator toggles and the switch opens stopping any further discharge of the capacitor.
The output of the latch is a serial bit stream, which is then passed to the back end of the circuit, where the PWM’s pulse width determines the measurement window in which the bit stream enables the counter. The data which is processed produces a set of ‘counts’, this data can then be used to determine if a finger is present or not.
The Capacitive Sense parameters used by the PSoC design tools are the baseline, the noise threshold, the finger threshold, the on threshold and the off threshold. The baseline is the reference level from which all capacitive sensing measurements are made; each capacitive sensor has its own baseline.
The baseline is a trend line for the raw counts seen for each sensor. The baseline is calculated using an Infinite Impulse Response (IIR) filter. Long term effects like parasitic capacitances in the PCB and short-term effects such as temperature and humidity changes affect the raw count level. A rise in temperature will inevitably cause the raw count level to rise.
The baseline is calculated as
Baseline (NEW) = ((n-1)xBaseline(OLD) + Raw Counts)/n
The value ‘n’ is the number of old baseline values that the new baseline is calculated on. As ‘n’ gets larger, the slower the update rate. The baseline update rate determines how quickly the baseline is able to respond to changes in average raw counts. The best methodology for calculating the baseline update rate is to do this empirically in the lab.
The tool allows an engineer to expose the tuning variables on the I2C interface of the PSoC after programming the device.
The active raw counts should be around 60%-70% of possible full range according to best practice. Lowering the ref value can increase the sensitivity of the sensor.
With 11 bits scanning resolution the full range is 2048. The update rate needs to be set at a level that allows for temperature effects to be compensated for. However, it is important to recognise that if the update rate is set too high, it is possible for a finger press to be cancelled out by a too rapid rise in the baseline level.
Once the base line level has been set the engineer can determine a level for the noise threshold. The noise threshold is again an empirical setting. It is set to be higher than the maximum excursion of the raw counts during a quiescent period.
Usually a small margin is added above this. The next stage is to then determine a level for the finger threshold. The finger threshold is set to about 80% of the average raw counts; this is when a finger is touching the sensor. Then an upper and lower hysteresis level is added to provide the ON and OFF condition for the sensor.
This tuning methodology clearly lends itself to designs where parasitic capacitances are not easily known and empirical methods have to be used.
David Hoskins is European field applications manager at Cypress Semiconductor (UK)