Guide to Tuning Slider and Wheel for Atmel START QTouch Library

Last modified by Microchip on 2023/11/09 08:55

This page describes the procedure to tune slider and wheel sensors.

Slider/Wheel Operation

Sliders/Wheels are comprised of multiple buttons. When any of the buttons in a slider or wheel detects a touch, the slider state becomes active and the position is updated. From this state onwards, the slider state remains in the active state as long as the slider/wheel delta is higher than the slider/wheel detect threshold. The slider/wheel delta and slider/wheel detect threshold are operational until the touch is removed and processed again.

Back to top.

Tuning Procedure

In this example, two buttons and a three-channel self-cap slider are configured. The two buttons are named B0 and B1, while the button sensors that form the slider sensor are Slider0[0]Slider0[1], and Slider0[2]. The data for the buttons and the slider/wheel is displayed in the data visualizer control panel view as shown below.

Data Visualizer screencap showing data for buttons and slider segments on the left and the whole slider on the right

Touch each button of the slider/wheel sensor (Slider0[0]Slider0[1], and Slider0[2]) and note down the delta values. The delta observed on Slider0[0] in this example is shown below.

Screenshot of Data Visualizer data for a touch on each slider segment sensor

Configure the individual button's sensor threshold to half the value of the observed delta value. In this case, the button threshold should be configured to 60.

Configure the calculated button threshold in Step 1 above as the slider/wheel detect threshold and verify that the slider sensor detects when the individual sensors are touched, as shown below.

Screenshot of Data Visualizer data for a touch on each slider segment  and verification of position on the slider/wheel data

Scroll over the slider sensor (back and forth between start and end corners) and record the slider/wheel delta on a CSV file using the file logger utility.
To use the file logger, follow the instructions below:

Switch the slider/wheel to edit mode by checking the edit box at the bottom of the debug control panel.
Open the file logger element, Configurations > Utilities > File Logger.
Minimize the QTouch® Data Visualizer window by double-clicking on the title bar.
In the file logger view, click on the 'file browser' and select the file name to log data.
Click the slider/wheel Delta0 connector, drag it, and plug it into the file logger socket as shown in the figure below.
Click the start/stop button to log the data.

After the logging is complete, remove the SliderDelta0 connection, uncheck the edit mode check box, and close the file logger.

Data Visualizer window for enabling/configuring the file logger

Open the file log and identify the samples' lowest SliderDelta0 value. A few samples of the SliderDelta0 collected from the Slider_delta.csv file are listed below.

Configure the slider/wheel detect threshold to be less than (50~70%) of the identified minimal value "69". In this case, the slider/wheel threshold is set to 48. Repeat Step 3 and Step 4 several times and tune the slider/wheel detect threshold based on the logs.

The buttons and slider/wheel data after the tuning is provided below.

Data Visualizer screencap showing data for slider segments on the left and the whole slider on the right after tuning

Back to top.