- 2. Use MTOUCH_SAMPLES_PER_SCAN to increase the amount of oversampling.
All applications will want to oversample at least 8 times to ensure random noise cannot significantly affect the sensor's reading.
Most applications oversample between 30-50 times.
The diminishing returns on sensitivity when increasing this value occur at an exponential rate. This means there is only a small difference at 70 and 80 samples, while there is a very large difference between 10 and 20 samples.
- 3. Change MTOUCH_SCALING to 1 to eliminate resolution loss.
When the acquisition module has oversampled MTOUCH_SAMPLES_PER_SCAN number of times, the final sum must be moved from a 24-bit array to a 16-bit array. The reading value cannot be allowed to exceed the 16-bit limit of 65535. To prevent this from occuring, the framework will use MTOUCH_SCALING to determine what to divide the accumulation register by. This results in a slight loss in resolution. If this is a concern for your application, setting MTOUCH_SCALING value to 1 will eliminate this step.
It is your responsibility to ensure the CVD's reading cannot exceed 65535.
- 4. Check that the baseline is not becoming corrupted.
If your baseline is updating too quickly, you may be losing some sensitivity because the baseline is no longer equal to the sensor's unpressed value. To check this, uncomment MTOUCH_COMM_ASCII_BASELINE in the configuration file and view the baseline in real time with the reading.
If the baseline is updating too quickly, you can slow it down by increasing the value of MTOUCH_BASELINE_WEIGHT and MTOUCH_BASELINE_RATE.
If the baseline is becoming corrupted due to fast tapping on the sensor, use the MTOUCH_NEGATIVE_CAPACITANCE configuration option to adjust how the baseline behaves when the reading has fallen below the baseline. For fast-tapping systems, setting this value to 1 is recommended. Using the '2' value for this option is only recommended for systems that are not going to have any noise spikes.
- 5. Decrease the amount of parasitic capacitance affecting the sensor and its trace.
The amount of parasitic capacitance on the sensor will directly impact its maximum level of sensitivity. Eliminate ground planes near your sensor and make sure its trace path is not running near any high-current or digital lines. This is particularly important for proximity sensors and normal touch sensors with long traces.