|
|
This
CapSense CSDR Property driver configures the capacitive sensing algorithm
properties common to all CapSense CSDR drivers in a project. This driver implements the Capacitive Sensing Sigma-Delta Modulator (CSD) sensing algorithm.
Hardware Interface: All CSDR input drivers in your design will share an external modulation
capacitor (ModulatorCapPin) and a modulator feedback resistor FdbkResistorPin).
The capacitor can be connected between Vss ground and
the P0[5] or P0[7] port pin. The feedback resistor can
be connected between the capacitor pin and the P1[1],
P1[5], P3[1], P3[5], P5[1] or P5[5] port pin. The pins are selected during pin
assignment. Please do not use pins selected for modulator component connections
for any other purposes.
The Feedback resistor value depends
on the total sensor capacitance. The resistor value should be selected as
follows:
1. Monitor the raw counts for
different sensor touches.
2. Select a resistance value that
provides maximum reading with a finger present that is about 70% of the maximum
possible reading for the selected scanning resolution (for example 10 bit
resolution has a maximum possible reading of 1023). The raw counts increase as
the resistor value increases.
Typical values are 500 Ω 10 k
Ω depending on sensor capacitance.
The
recommended value for the Modulation capacitor is 4.7 47 nF. The optimal capacitance can be selected by
experiment to get maximum SNR. A value of 5.6 10 nF gives good results in the most cases. You can
experiment with several capacitor values to get the best SNR after selecting
the feedback resistor value. A ceramic capacitor should be used. The
temperature capacitance coefficient is not important.
Software Interface: There is no
software interface for this driver.
User
Configurable Properties:
·
NoiseThreshold: Used to determine if
the baseline update algorithm is run. When
the raw count value is above this level, the baseline value is not updated.
For slider sensors, this value sets the
raw count level below which a sensor element in not included in the calculation
of the centroid. The Noise Threshold
value can be from 5 to 255.
The Noise Threshold value for a project
must be set based on the amount of variation observed in the Raw Count values
of the CapSense drivers when no finger is present. All CSDR based capacitive sense drivers in a
project use this threshold value.
·
BaselineUpdateThreshold: Determines when
the Baseline count value will be updated. When the raw count value is above the current
baseline and the raw count/baseline count difference is below the noise
threshold, a running sum of the difference values is maintained. When this sum exceeds the BaselineUpdateThreshold
value, the baseline value is incremented and the running sum is cleared.
·
NegativeNoiseThreshold: The NegativeNoiseThreshold parameter adds
a negative difference count threshold. If the current raw count is below the
baseline and the difference between them is greater than this threshold, the
baseline will not be updated. However, if the current raw count stays in the
low state (difference greater than threshold) for the number of samples specified
by the LowBaselineReset parameter, the baseline will be reset.
·
LowBaselineReset: The NegativeNoiseThreshold parameter adds
a negative difference count threshold. If the current raw count is below the
baseline and the difference between them is greater than this threshold, the
baseline will not be updated. However, if the current raw count stays in the
low state (difference greater than threshold) for the number of samples
specified by the LowBaselineReset parameter, the baseline will be reset.
·
Sensors Autoreset: This parameter determines
whether the baseline update algorithm operates continually, or only when the
difference between the sensor raw count and the current baseline value is below
the Noise Threshold. The baseline is
updated constantly when this property is Enabled.
When
the parameter is set to Disabled, the baseline is updated only when raw
count and baseline difference is below the Noise Threshold property.
This setting limits the maximum time a
sensor can be active (typical values are 5 - 10s), but prevents the sensors
from being triggered and stuck in the on state by a sudden rise in the raw
count value when no contact is made with the sensor (due to a large power
supply fluctuation, high-energy RF noise source or rapid temperature change).
This
property should be set to Enabled unless there is a requirement for sensors to
be in the on state for extended periods.
·
Hysteresis: Controls the de bounce (button on transition) or button hold time (off
transition) of the sensors. The
hysteresis value adds or subtracts from the finger threshold value defined for
each sensor. If
the sensor is off, the difference count must overcome the finger threshold plus
hysteresis to be considered active. If
the sensor is on, the difference count must go below the finger threshold minus
hysteresis to transition to the off state.
The hysteresis value
can be 0 to 255. This value must be lower than the FingerThreshold property
value for any of the CSDR sensors in the project.
·
Debounce: This parameter adds a debounce counter to the sensor
active transition. In order for the sensor to transition from inactive to
active the difference count value must stay above the finger threshold plus
hysteresis for the number of samples specified. This parameter has effect on
the buttons touch detection only.
Possible values are 1 to
PRS Polynomial: This parameter sets the PRS polynomial. There
are two selection options:
Short - The
short polynomial setting yields better SNR, but due to the shorter repeat
period, the end device can be more susceptible to external noise sources.
Long - The long polynomial setting yields worse SNR, but the device is
more robust against noise signals.
This driver has no Non-Configurable properties
Components in this schematic support the
sensing for all CapSense CSDR sensors in a project.