Changing the Detect Hysteresis of a QTouch® Sensor
Objective
In this lab, you will change the detect hysteresis of a button and analyze its impact. To explore this feature, you will tune the detect hysteresis value of the touch button and monitor the behavior.
This tutorial builds on the Intro to PTC and Analyze Touch Data Using QTouch® Analyzer projects. Make sure you've completed those before continuing with this hands-on exercise.
Reference Materials
ATmega328PB Xplained Mini Evaluation Kit
Atmel® Studio Integrated Development Environment
Procedure
Stop Reading
If you've just completed the Detect Threshold Project you should click on Stop Reading.
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 the detect hysteresis to HYST_50.
Note that the Detect Threshold is 75. We changed it from the original value during the Detect Threshold Project.
Build and Program
Build the solution.
Program the application by clicking on the 'Start Without Debugging' icon.
QTouch Analyzer
Open the QTouch Analyzer window by clicking on the icon as shown below.
In the QTouch Analyzer window, click ReConnect.
Click on Start Reading.
Use the 'Tabular View' to observe touch delta and state.
Detect State
Move a finger towards the sensor. When delta crosses the detect threshold (75), the sensor will go into the detect state.
Below Detect Threshold
Move the finger away from the sensor. The sensor will stay in the detect state even after the delta has fallen below the detect threshold.
Detect Hysteresis
The sensor goes out of detect only after the delta value has fallen below the detect threshold by a value of more than 50% of the detect threshold (~38).
Results
In this project, you observed that the touch button turns ON when the touch delta crosses the detect threshold, but it does not turn off until the touch delta falls below the detect threshold by the percentage value set in the Detect Hysteresis parameter.