AD7151
Rev. 0 | Page 11 of 28
COMPARATOR AND THRESHOLD MODES
The AD7151 comparator and its threshold can be programmed
to operate in several different modes. In an adaptive mode, the
threshold is dynamically adjusted and the comparator output
indicates fast changes and ignores slow changes in the input
(sensor) capacitance. Alternatively, the threshold can be
programmed as a constant (fixed) value, and the output then
indicates any change in the input capacitance that crosses the
defined fixed threshold.
The AD7151 logic output (active high) indicates either a positive or
a negative change in the input capacitance, in both adaptive and
fixed threshold modes (see
Figure 23 and Figure 24).
POSITIVE
THRESHOLD
INPUT
CAPACITANCE
OUTPUT
OUTPUT ACTIVE
TIME
POSITIVE CHANGE
7086-013
Figure 23. Positive Threshold Mode
Indicates Positive Change in Input Capacitance
NEGATIVE
THRESHOLD
INPUT
CAPACITANCE
OUTPUT
OUTPUT ACTIVE
TIME
NEGATIVE CHANGE
7086-014
Figure 24. Negative Threshold Mode
Indicates Negative Change in Input Capacitance
Additionally, for the adaptive mode only, the comparator can
work as window comparator, indicating input either inside or
outside a selected sensitivity band (see
Figure 25 and Figure 26).
POSITIVE
THRESHOLD
NEGATIVE
THRESHOLD
INPUT CAPACITANCE
OUTPUT
OUTPUT ACTIVE
TIME
INPUT INSIDE THRESHOLD WINDOW
7086-015
Figure 25. In-Window (Adaptive) Threshold Mode
POSITIVE
THRESHOLD
NEGATIVE
THRESHOLD
INPUT CAPACITANCE
OUTPUT
OUTPUT ACTIVE
TIME
INPUT OUTSIDE THRESHOLD WINDOW
07086-016
Figure 26. Out-Window (Adaptive) Threshold Mode
ADAPTIVE THRESHOLD
In an adaptive mode, the thresholds are dynamically adjusted,
ensuring indication of fast changes (for example an object
moving close to a capacitive proximity sensor) and eliminating
slow changes in the input (sensor) capacitance, usually caused
by environment changes such as humidity or temperature or
changes in the sensor dielectric material over time (see
Figure 27).
THRESHOLD
INPUT CAPACITANCE
OUTPUT
OUTPUT ACTIVE
TIME
FAST CHANGE
SLOW CHANGE
07086-017
Figure 27. Adaptive Threshold
Indicates Fast Changes and Eliminates Slow Changes in Input Capacitance
DATA AVERAGE
The adaptive threshold algorithm is based on an average calculated
from previous CDC output data. The response of the average to an
input capacitance step change (more exactly, response to the change
in the CDC output data) is an exponential settling curve, which can
be characterized by the following equation:
)1()0()(
/TimeConstN
eChangeAverageNAverage −+=
where:
Average(N) is the value of average N complete CDC conversion
cycles after a step change on the input.
Average(0) is the value before the step change.
TimeConst can be selected in the range between 2 and 65,536, in
steps of power of 2, by programming the ThrSettling bits in the
setup register.
See
Figure 28 and the Register Descriptions section.
INPUT CAPACITANCE
(CDC DATA) CHANGE
DATA AVERAGE RESPONSE
TIME
07086-018
Figure 28. Data Average Response to Data Step Change