How capacitive turbosensing reduces noise & signal error in touchscreen apps

Libor Gecnuk

June 14, 2010

Libor Gecnuk

Resolution of the sense loop in the time domain is measured using the microcontroller's fBus clock. With a known execution time of the sense loop and the fBus, the time-measurement resolution can be calculated.

For example, with a sense loop ratio equal to nine and and fBus equal to 20 MHz (50-ns tick), the time-measurement resolution is 9 * 50 = 0.45 μs/LSB. The resolution may be viewed as a basic CTS quantization performance (it depends only on the fBus). Changing the fBus causes a change to the CTS-sensor's performance.

Resolution (in pF/LSB or pF) of the CTS-sensor in the capacitive domain is calculated from the sensitivity and the sense loop resolution in the time domain. For example, with a sensitivity of 0.9 μs/pF and a resolution of 0.45 μs/LSB, the CTS-sensor resolution is 0.45/0.9 = 0.5 pF/LSB or 0.5 pF.

The heart of the CTS algorithm is the Turbo-loop, which is a software loop during which the MCU enables an internal pull-up associated with the GPIO pin to speed-up the RC charging. This pull-up is typically in the range of 5 to 60 kΩ. One loop execution of the Turbo-loop is called Turbo-step, and the number of fBus clocks needed for the execution is called Turbo-loop ratio.

During the turbo-control, both pull-up resistors are applied so the total resistance can be calculated by as R=(iPE*eR)/(iPE+eR). For example, with internal pull-up around 24 kΩ, an external pull-up (eR) of about 1 milli-ohms, fBus equal to 20 MHz, and the Turbo-loop ratio equal to 4, each turbo-step eliminates roughly 8.5 pF of the parasitic capacitance (Equation 1).

When Turbo-control is optimized, the remaining capacitance is measured by using the eR-charge time only. This measurement is accomplished by another software loop called Sens-loop. With this example and standard conditions, the measurement of maximum remaining capacitance 8.5 pF takes a maximum of 8.5 microseconds.

This method guarantees a maximum conversion time of a single sample. In the typical implementation with Freescale HCS08 device running at fBus equals 20 MHz, the measurement typically takes 1 to 10 μs.

Accuracy of the CTS-sensor depends on physical and hardware parameters and the conditions. For example, an HCS08 MCU may have differing resistance RIH values, which are typically in range of 0.52 to 0.86, and wide range of leakage currents. Factors affecting accuracy should be added to the RIH equation. Calibration of the CTS-sensor should be done using the sensing software's upper layer.

Precision of capacitive sensing is generally low. Low precision requires high oversampling for better accuracy. Moreover, classical sensor precision is lower for higher parasitic capacitance, which requires higher oversampling. With Freescale's touch sensing solution (TSS), the oversampling is configurable.

For a CTS algorithm, the typical oversampling factor of eight can yield approximately eight times better sensitivity and resolution. For example, with a physical resolution of 0.45 pF/LSB and an oversampling factor of eight, the statistical resolution will be roughly 0.45 pF/8 = 56 fF/LSB, but the oversampling conversion time will consequently be eight times longer.

Using interrupt server routine (ISR) technology for the algorithm is a unique approach developed for a CTS-sensor, which provides the ability to recognize an interrupt occurrence automatically “ex-post” without any cooperation from the user code.

This feature is important because low-priority capacitive sensing integrated with custom embedded code should reliably recognize that the CTS loops (Turbo-loop and Sens-loop) are not interrupted and the capacitive sample is valid for future processing. Customers who use the Freescale TSS solution and CTS-sensor algorithms are not limited in terms of how interrupts are used in the application.

< Previous
Page 2 of 3
Next >

Loading comments...

Most Commented

  • Currently no items

Parts Search Datasheets.com

KNOWLEDGE CENTER