Adjusting the Detect Threshold of a QTouch® Sensor
Objective
Using QTouch® Analyzer you will monitor the touch delta of a sensor and adjust its detect threshold.
Reference Materials
ATmega328PB Xplained Mini Evaluation Kit
Atmel® Studio Integrated Development Environment
Procedure
Connect to QTouch Analyzer
Perform steps 1 through 7 from the Analyze Touch Data Using QTouch® Analyzer project.
Tabular View
Select Tabular View and touch the 'V' in the AVR symbol (see accompanying image) on your ATmega328PB Xplained Mini. Observe the maximum Delta shown in the Tabular View.
Open the QTouch Project Builder
In the Solution Explorer window, double-click on the .qtdgn file. Note that you may have named your project differently.
Change Button Settings
Select 'Button0' and click on the Settings icon.
In the 'Button0' settings, set detect threshold to 75.
Build and Program
Build the solution.
Program the application by clicking on the Start Without Debugging icon.
QTouch Analyzer
Open QTouch Analyzer.
In the QTouch Analyzer window, click ReConnect.
Click on Start Reading.
Use the 'Tabular View' to observe touch delta and state.
Touch the Sensor
Touch the sensor lightly (so that Delta is less than 75). You will notice that State is OFF.
Touch State will only change to ON whenever the Delta of Button0 is more than 75.
Detect threshold can be directly modified inside the touch_selfcap_sensor_config() function of the respective sensor in the touch.c file.
Results
You have learned how to configure and set the detect threshold value of a sensor.