SNOA993A June   2018  – July 2021 LDC2112 , LDC2114 , LDC3114 , LDC3114-Q1

 

  1.   Trademarks
  2. 1Introduction
  3. 2Scan Rate and Sampling Interval
    1. 2.1 Low Power Mode and Normal Power Mode
    2. 2.2 Button Sequencing and Error Handling
  4. 3Data Polarity and Timeout
    1. 3.1 Button Timeout
  5. 4Internal Algorithms Overview
  6. 5Baseline Tracking
    1. 5.1 Baseline Increment
    2. 5.2 Baseline Tracking Reset
    3. 5.3 Button Actuation Time
    4. 5.4 BTPAUSE
    5. 5.5 Fast Tracking Factor
  7. 6Gain, Hysteresis, and Threshold
    1. 6.1 Threshold and Hysteresis
  8. 7Multi-Button Algorithms
    1. 7.1 Max Win
    2. 7.2 Anti-Common Mode
    3. 7.3 Anti-Twist Factor
    4. 7.4 Anti-Deform Factor
  9. 8Summary
  10. 9Revision History

Baseline Increment

Button detection applications can be effectively implemented by looking at a high-pass filtered version of the input signal, due to the typical stimuli. Refer to Figure 5-1. In the LDC211x and LCD3114 devices, this high-pass filtering is implemented using a subtracted baseline tracking which outputs the shift from the nominal code. This baseline tracking is designed to ignore slow changes in the output code, as these are generally due to environmental shifts which occur over the span of seconds, while a user interaction typically occurs on the order of 50 ms.

The LDC211x and LDC3114 use a linear offset approach, which always drives the output code towards 0.

GUID-4C6E53B4-63D4-4B97-A71C-EDE80E897212-low.pngFigure 5-1 Baseline Increment produces a decaying output code

Each channel of the LDC211x has its own Baseline value, but the baseline increment is the same for all channels. The internal baseline setting of the LDC211x and LDC3114 is updated for each sample, using the following pseudo-code:

If raw_data[channel] > baseline[channel] then

baseline[channel] = baseline[channel] + base_increment

iIf raw_data[channel] < baseline[channel] then

baseline[channel] = baseline[channel] - base_increment

The net code is then calculated from the raw code with:

net[channel] = raw_data[channel] - baseline[channel]

Where the net code is the output code of the device. Note that this net value will be scaled by the Gain_Factorx and modified by other algorithms before storage in the output register. The baseline increment value can be adjusted across a range of 1 to 128, in 8 settings. A higher setting will bring the output code to 0 in less samples, as displayed in Figure 5-2.

GUID-65FE5CEC-BF48-47FE-AC81-8A19A133B380-low.pngFigure 5-2 Effect of different values of Baseline Increment

The baseline value is reset whenever the device changes modes (e.g. from Config Mode to Low Power Mode, or from Low Power Mode to normal power mode). Note that baseline tracking is applied for every sample. Faster sample rates have an effectively higher baseline tracking rate per unit time. The Baseline Increment for Normal Power Mode is:

Baseline Increment per Sample = Gain_Factorx × 1.827 ÷ 2(7-NPBI)

Where:

Gain_Factorx is the linear gain value selected for the channel based on the GAINx field setting, and

NPBI is the value programmed into the NPBI field

To compensate for the slower sampling interval used in low power mode, the Low Power mode Baseline Increment is effectively 8x larger for the same setting:

Baseline Increment per Sample(Low Power Mode) = Gain_Factorx × 1.827 ÷ 2(4-LPBI)

Where:

Gain_Factorx is the linear gain value selected for the channel based on the GAINx field setting, and

LPBI is the value programmed into the LPBI field

The effective Baseline Increment in either mode is not restricted to an integer value, as the LDC2114 has higher internal resolution than is represented by the output code.