The kit configuration can be fine tuned by setting a number of configuration options. This section explains the different kit configuration options. These options will have kit-wide effect (all sensors will be affected by some of the settings).
Recalibration Threshold
Recalibration threshold is the level above which automatic recalibration occurs.
Recalibration threshold is expressed as a percentage of the detection threshold setting.
This setting is an enumerated value and its settings are as follows:
Setting of 0 = 100% of detect threshold (RECAL_100)
Setting of 1 = 50% of detect threshold (RECAL_50)
Setting of 2 = 25% of detect threshold (RECAL_25)
Setting of 3 = 12.5% of detect threshold (RECAL_12_5)
Setting of 4 = 6.25% of detect threshold (RECAL_6_25)
However, an absolute value of 4 is the hard limit for this setting.
For example, if the detection threshold is say, 40 and the Recalibration threshold value is set to 4.
This implies an absolute value of 2 (40 * 6.25% = 2.5), but this is hard limited to 4.
| Setting | Variable name | Data Type | Unit | Min | Max | Typical |
| Recalibration threshold | qt_recal_threshold | Enum | % | 0 | 4 | 1 |
Detect Integration
The QTouch Library features a detect integration mechanism, which acts to confirm detection in a robust fashion. The detect integrator (DI) acts as a simple signal filter to suppress false detections caused by spurious events like electrical noise.
A counter is incremented each time the sensor delta has exceeded its threshold and stayed there for a specific number of acquisitions, without going below the threshold levels. When this counter reaches a preset limit (the DI value) the sensor is finally declared to be touched. If on any acquisition the delta is not seen to exceed the threshold level, the counter is cleared and the process has to start from the beginning. The DI process is applicable to a release (going out of detect) event as well.
For example, if the DI value is 10, then the device has to exceed its threshold and stay there for 10 acquisitions in succession without going below the threshold level, before the sensor is declared to be touched.
| Setting | Variable name | Data Type | Unit | Min | Max | Typical |
| DI | qt_di | uint8_t | Cycles | 0 | 255 | 4 |
Drift Hold Time
Drift Hold Time (DHT) is used to restrict drift on all sensors while one or more sensors are activated. It defines the length of time the drift is halted after a sensor detection.
This feature is useful in cases of high density sensor pads where touching a sensor or floating a finger over the sensor pad would cause untouched sensors to drift, and therefore create a sensitivity shift, and ultimately inhibit any touch detection.
| Setting | Variable name | Data Type | Unit | Min | Max | Typical |
| Drift hold time | qt_drift_hold_time | uint8_t | 200ms | 1 | 255 | 20 (4s) |
Maximum ON Duration
If an object unintentionally contacts a sensor resulting in a touch detection for a prolonged interval it is usually desirable to recalibrate the sensor in order to restore its function, perhaps after a time delay of some seconds.
The Maximum on Duration timer monitors such detections; if detection exceeds the timer’s settings, the sensor is automatically re-calibrated. After a recalibration has taken place, the affected sensor once again functions normally even if it still in contact with the foreign object.
Max on duration can be disabled by setting it to zero (infinite timeout) in which case the channel never re-calibrates during a continuous detection (but the host could still command it).
| Setting | Variable name | Data Type | Unit | Min | Max | Typical |
| Maximum ON Duration | qt_max_on_duration | uint8_t | 200ms | 1 | 255 | 30 (6s) |
Positive / Negative Drift
Drift in a general sense means adjusting reference level (of a sensor) to allow compensation for temperature (or other factor) effect on physical sensor characteristics. Decreasing reference level for such compensation is called Negative drift & increasing reference level is called Positive drift. Specifically, the drift compensation should be set to compensate faster for increasing signals than for decreasing signals.
Signals can drift because of changes in physical sensor characteristics over time and temperature. It is crucial that such drift be compensated for; otherwise false detections and sensitivity shifts can occur. Drift compensation occurs only while there is no detection in effect. Once a finger is sensed, the drift compensation mechanism ceases since the signal is legitimately detecting an object.
Drift compensation works only when the signal in question has not crossed the ‘Detect threshold’ level.
The drift compensation mechanism can be asymmetric; it can be made to occur in one direction faster than it does in the other simply by changing the appropriate setup parameters.
Signal values of a sensor tend to decrease when an object (touch) is approaching it or a characteristic change of sensor over time and temperature. Decreasing signals should not be compensated for quickly, as an approaching finger could be compensated for partially or entirely before even touching the channel (negative drift).
However, an object over the channel which does not cause detection, and for which the sensor has already made full allowance (over some period of time), could suddenly be removed leaving the sensor with an artificially suppressed reference level and thus become insensitive to touch. In the latter case, the sensor should compensate for the object’s removal by raising the reference level relatively quickly (positive drift).
| Setting | Variable name | Data Type | Unit | Min | Max | Typical |
| Negative Drift | qt_neg_drift_rate | uint8_t | 200ms | 1 | 127 | 20 (4s) |
| Positive Drift | qt_pos_drift_rate | uint8_t | 200ms | 1 | 127 | 5 (1s) |