![background image](http://html1.mh-extra.com/html/texas-instruments/430boost-sense1/430boost-sense1_user-manual_1095389018.webp)
LaunchPad Capacitive Touch BoosterPack User Experience Firmware
www.ti.com
4.3
Capacitive Touch Sense Library
The Capacitive Touch Sense Library (
CAPSENSELIBRARY
) is a configurable tool to abstract the various
peripheral settings from the application and perform several capacitive touch functions through API calls.
The following describes the configuration of the library to support the Capacitive Touch BoosterPack, the
methodology to calibrate the different elements, and how the API calls are used in the application to
create the user experience.
1. Configuration
The first step in the configuration process is identifying the methodology used to measure the
capacitance. For the Capacitive Touch BoosterPack, the goal is to highlight the new PinOsc feature;
therefore, an RO implementation is chosen, and the relaxation oscillator is implemented with the
PinOsc. The RO implementation requires two timers (hardware or software timers): an interval timer
(gate) and a frequency counter. The frequency counter is implemented with the Timer_A0 peripheral,
and the interval timer is implemented with the WDT+.
The Capacitive Touch BoosterPack is represented in the various structures defined in the file
structure.c. The element structures define the GPIO and the performance characteristics of each
element. The GPIOs are defined first, the appropriate sensor characteristics are defined, and the
performance characteristics are measured and added.
The sensor structure groups elements as appropriate and identifies the measurement characteristic for
that group, namely the interval period. For the RO method, increasing the interval time increases the
sensitivity; however, this is at the cost of response time, which is critical for supporting the PC GUI in
this application.
The proximity sensor uses an SMCLK of 125 kHz. For the button and wheel, the frequency is
increased to 1 MHz. The interval count is 8192: 8.192-ms gate time for the button and wheel elements
and 65.5-ms gate time for the proximity element. The wheel is a special kind of sensor in which each
element contributes to the sensor performance. The wheel is made up of four elements divided into 64
points or sections and requires that the cumulative response exceed 75 percent. This percentage is
based upon the normalized response where meeting the threshold would represent 0% and the
maximum response would represent 100%. This is to account for cases when the interaction is near
the edges of the wheel instead of the middle.
2. Calibration
The calibration of the middle button and the proximity sensor are relatively straight forward, because
the desired output is a binary indication of whether or not the threshold is exceeded. Using a controlled
test fixture to represent the minimum touch (distance in the case of the proximity sensor), the values
are recorded and input as the threshold value in the element structure.
The calibration for the wheel is more complicated, as several measurements are required at various
positions. See the "Sensor Arrays: Wheels and Sliders" section in the Capacitive Touch Sense Library
User's Guide (
SLAA490
) for a detailed explanation.
The calibration values for each element are recorded in the element structure in the file structure.c.
18
430BOOST-SENSE1 - Capacitive Touch BoosterPack for the LaunchPad
SLAU337A
–
April 2011
–
Revised September 2011
Submit Documentation Feedback
Copyright
©
2011, Texas Instruments Incorporated