Datasheet

34 Document No. 001-66271 Rev. *B CY8C21x34/B CapSense
®
Design Guide
raw count value in a no touch condition. Increasing R
b
also decreases the maximum capacitance value that can be
measured by the CapSense sensor.
Figure 4-5. CSD Measurement Range
RawCount
C
x
2
n
-1
RawCount
C
x
2
n
-1
Change in C
x
due
to finger touch
Change in C
x
due
to finger touch
Difference
count
Difference
count
70% (2
n
-1)
Measurement Range with
R
b
1
Measurement Range with
R
b
2 > R
b
1
20% (2
n
-1)
C
xmax1
C
xmax2
Consider the two raw count measurement range graphs in Figure 4-5. In the left graph, R
b
= R
b
1, the system can
measure capacitance up to C
xmax1
. The raw count is 20 percent of its maximum value. The difference count produced
due to the finger touch is very small, low sensitivity. In the right graph, the bleed resistor is increased, R
b
2 > R
b
1. The
raw count is now 70 percent of its maximum. The difference count in this case is much larger than in the first case,
which increases the sensitivity.
Typical values for R
b
are between 500 Ω and 10 kΩ. To find the optimal resistance:
1. Start with a 2-kΩ resistor for R
b
.
2. Monitor the raw count measurements for all sensors.
3. Adjust R
b
until the raw counts are 70 percent of the full-scale range at the selected scanning resolution. For
example, if 9-bit resolution is selected, the full-scale range is 511 counts. R
b
should be adjusted until the raw
data is 358 counts.
In designs with multiple sensors, it can be difficult to set all of the raw counts exactly to 70 percent. In this case, set
all of the raw counts between 60 and 70 percent of the maximum.
4.2.4 Set High-Level Parameters
Follow the recommendations given in High Level Parameter Recommendations.
4.3 Configuring SmartSense User Module
Here are the basic guidelines for configuring the SmartSense user module in a typical CapSense application:
1. Prepare the target board. Assemble the target application PCB and fix the overlay on it. Use nonconductive glue
or special adhesive tape to stick the overlay. Avoid air gaps between the PCB and the overlay, as it can reduce
the sensitivity substantially and cause multiple false button triggers because of the air gap shifting under the
touch.
2. Set up a real-time data charting tool such as Multi-Chart (Section 3.1.4 ) to monitor one or more data series in
real-time. The sensor rawcount (waSnsResult), baseline (waSnsBaseline), difference counts (waSnsDiff), signal
(baSnsSignal), and button finger threshold (baBtnFThreshold) must be observed during the tuning process. You
can use the UART-USB Bridge or the I2C-USB Bridge hardware to build an interface between CapSense
controller and PC via USB port. Do not use the LCD or any other numerical displays to monitor data, because
they are slow and do not allow visualizing the data dynamics.
3. The default configurations to start with are:
Set IMO = 24 MHz, CPU_Clock = SysClk/1
Place the SmartSense User Module configuration for IMO = 24 MHz
Disable "Sensor Autoreset". Set "Debounce" to 3, and set "Shield Electrode Out" to None.