Configuring Adjacent Key Suppression™ (AKS™) Groups on the ATmega328PB Xplained Mini

Last modified by Microchip on 2023/11/10 11:18

Objective

In the projects leading up to this one, we've been using the 'V' in the AVR® symbol as our touch button. To demonstrate the Adjacent Key Suppression™ (AKS™) feature, we need more than one touch sensor. In this project, we will configure two additional touch buttons (the 'A' and the 'R' in the AVR logo on the ATmega328PB Xplained Mini) and observe the touch status when AKS is disabled. We will then add all three sensors to a single AKS group and observe the results.

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

Back to Top


Procedure

Stop Reading

If you've just completed the Changing the Detect Hysteresis project, you should click on Stop Reading.

'Stop Reading' button

Back to Top


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.

QTouch Project Builder

Back to Top


Add Button

Click on the Button icon

Sensor Selection tab Click on the Button icon

In the Add Sensors dialogue box, set the 'Number of Button' to 2 and click Add.

Add Sensors dialogue box

You'll see that two more buttons are added to the QTouch kit canvas.

Back to Top


Assign Pins

In the Project Builder Workflow window, click on the 'Pin Selection' tab.

Project Builder Workflow window

Based on the following table, select the pins that are connected to the QTouch buttons.

APE2Y6
VPE3Y7
RPC3Y3

Ensure that the order of pin assignments is similar to the one below. This would ensure that sensor numbering of your project is similar to the one followed in this tutorial.

Pin Assignment Window

Back to Top


Generate Project

Go to the 'Project Generation' section and click Generate Project.

'Project Generation' section.  Click Generate Project

Back to Top


Build and Program

Build the solution.

Build Icon

Program the application by clicking on the 'Start Without Debugging' icon.

Start Icon

Back to Top


QTouch Analyzer

Open the QTouch Analyzer window by clicking on the icon as shown below.

QTouch Analyzer Icon

In the QTouch Analyzer window, click ReConnect.

QTouch Analyzer window

Click on Start Reading.

Start Reading button

Use the 'Tabular View' to observe touch delta and state.

Tabular View

Back to Top


Touch Two Buttons

Touch the sensors so that contact is made with more than one sensor simultaneously as shown below.

Touch Sensors

Back to Top


Detect State

Multiple sensors are reported to be in detect state.

Sensors are reported to be in detect state

Back to Top

AKS Grouping

For the next part of this lab, we are now going to add all three sensors to a single AKS group and observe the difference in touch status.

Stop Reading

In the QTouch Analyzer window, click on Stop Reading.

Stop Reading Button

Back to Top


Open the QTouch Project Builder

In the Solution Explorer window, double click on the .qtdgn file.

Back to Top


Change Button Settings

Select 'Button0' on the QTouch kit canvas and click on the setting icon.

'Button0' on the QTouch kit canvas

Set the 'AKS Group' setting to AKS_Group_1.

'AKS Group' setting

Back to Top


Set AKS Group for Button1 and Button2

Similarly, set the 'AKS Group' as AKS_Group_1 for the rest of the buttons (Button1 and Button2).

Back to Top


Generate Project

Go to the 'Project Generation' section and click Generate Project.

'Project Generation' section

Back to Top


Build and Program

Build the solution.

Build Icon

Program the application by clicking on the 'Start Without Debugging' icon.

Start Icon

Back to Top


QTouch Analyzer

Open QTouch Analyzer.

QTouch Analyzer Icon

In the QTouch Analyzer window, click ReConnect.

QTouch Analyzer window

Click on Start Reading.

Start Reading Button

Use the to observe touch delta and state.

'Tabular View' of Buttons

Back to Top


Touch Two Buttons

Touch the sensors so that contact is made with more than one sensor simultaneously as shown below.

Touch Sensors

Back to Top


Touch Detect

Although multiple sensors may have a delta greater than their respective detect threshold, only one sensor will report touch detection.

One sensor reporting touch detection

When a group of sensors is in the same AKS group, only the sensor with the strongest delta will report detection. Using this parameter is important in designs where the sensors are close together or configured for high sensitivity as it will avoid multiple sensors to report a touch detection simultaneously.

Back to Top


Results

You have now learned how to configure the AKS parameter in a QTouch Project.

Back to Top