View detail for Atmel AT03030: QMatrix Touchpad - 2D Position Tracking

APPLICATION NOTE
Atmel AT03030: QMatrix Touchpad – 2D Position Tracking
Atmel QTouch
Features
•
•
•
•
•
•
•
Two-dimensional position tracking using touch sensors
Single tap detection
Supports single finger operation
Sensor design guidelines
X-Y position reported in serial terminal
400dpi resolution
Status LEDs
Introduction
This reference design demonstrates techniques to use QMatrix touch sensors for 2D
position tracking application. ATxmega16D4 device is used in this touchpad design.
X-Y position determined is displayed in PC HyperTerminal through USART interface.
This design is suitable only for single-touch operation.
The firmware solution provided consists of QMatrix library, Touchpad library, USART
driver and status LED control code. Firmware is written in C and supports GCC
(Atmel® Studio) tool-chain.
This reference design can be used for low cost and low resolution touchpad
applications, up to a maximum resolution of 400dpi. Applications that require higher
resolution (more than 400dpi) and additional features like multi-touch can use the
Atmel maXTouch® solution.
For this reference design, the hardware design files (schematic, BOM and PCB
Gerber) and software source code can be downloaded from Atmel website. The
provided hardware documentation can be used with no limitations to manufacture the
reference hardware solution for the design.
42202A−QTOUCH−11/2013
Table of Contents
1. Abbreviations and Definitions .............................................................. 3 2. Hardware Design ................................................................................. 4 2.1 System Block Diagram ...................................................................................... 4 2.2 Sensor Design................................................................................................... 6 2.2.1 Design Guidelines ............................................................................... 7 2.2.1.1 Sensor Arrangement ......................................................... 9 2.3 LED Indication ................................................................................................... 9 2.4 Communication Interface .................................................................................. 9 2.5 Power Supply Considerations ......................................................................... 11 2.5.1 USB Supply ...................................................................................... 11 2.5.2 External Supply ................................................................................. 11 2.5.3 On-board Regulator .......................................................................... 11 2.6 Programming and Debugging ......................................................................... 11 2.6.1 PDI Interface ..................................................................................... 11 2.6.2 Touch Data ....................................................................................... 11 3. Firmware ............................................................................................ 12 3.1 Touchpad Library ............................................................................................ 12 3.1.1 touchpad.h – header file ................................................................... 12 3.1.2 Public functions ................................................................................. 12 3.1.2.1 qt_init_touchpad.............................................................. 12 Resolution …………................................................................................................... 13 Position Hysteresis .................................................................................................... 13 3.1.2.2 qt_get_xy ........................................................................ 13 3.2 QMatrix Library................................................................................................ 13 3.3 USART Module ............................................................................................... 14 3.4 LED Interface .................................................................................................. 14 3.5 Application Code ............................................................................................. 14 3.5.1 Single Tap Detection......................................................................... 16 4. Schematic Design .............................................................................. 17 5. PCB Layout ........................................................................................ 19 6. Bill of Materials (BOM) ....................................................................... 21 7. References ......................................................................................... 22 Appendix A. Sensor Pattern for Flooded-X (Two-Layer) Design ....... 23 Appendix B. Revision History ............................................................ 24 Atmel AT03030: QMatrix Touchpad – 2D Position Tracking [APPLICATION NOTE]
42202A−QTOUCH−11/2013
2
1.
Abbreviations and Definitions
Following is a list of terms which will be used throughout this document.
•
Acquisition: A single capacitive measurement process.
•
QMatrix (Mutual Capacitance): A type of capacitive touch sensing technology that measures the mutual
capacitance between two electrodes. Each channel has a drive electrode (X Electrode) and a receive electrode
(Y Electrode).
•
X Line: The Sense Line connected to the X Electrode used in QMatrix Technology.
•
Y Line: The Sense Line connected to the Y Electrode used in QMatrix Technology.
•
SMP: Sampling pin used in QMatrix Sensor Design.
•
AIN0: Analog ground Reference pin used in QMatrix Design.
•
Sensor: A channel or group of channels used to form a touch sensor. The three types of sensors are Buttons,
Sliders and Wheels.
•
Button (zero-dimensional sensor): It is a zero dimensional sensor used to implement On/Off digital sensors,
and is composed of a single channel. It is also known as a Key.
•
Coplanar (Single Layer) design: Both X and Y electrodes fabricated on the same layer of the PCB in QMatrix
sensor design.
•
Flooded-X (Two-Layer) design: Both X and Y electrodes are distributed in two layers of the PCB in QMatrix
sensor design.
•
Atmel QTouch® Library: The set of libraries for the touch sensing technologies offered by Atmel (QTouch,
QTouchADC and QMatrix).
•
Channel: A channel is a logical group of pins used to perform the touch acquisition measurement. It can be
composed of a single pin (QTouchADC), a pair of pins (QTouch) or a matrix of pins (QMatrix).
•
Sense Electrode: Electrodes are typically areas of copper on a printed circuit board. An electrode or a pair of
electrodes used to detect a finger touch.
•
Delta: Difference between Reference and Signal value of sensors.
•
Detection threshold: It defines how much the touch sensor’s signal value must drop below its reference level to
qualify as a potential touch detect.
•
2D: Indicates Two – Dimensional.
For more details refer to BSW Touch Sensor Design Guide and Atmel QTouch Library User Guide.
Atmel AT03030: QMatrix Touchpad – 2D Position Tracking [APPLICATION NOTE]
42202A−QTOUCH−11/2013
3
2.
Hardware Design
2.1
System Block Diagram
The generic block diagram of this reference design is provided in Figure 2-1.
Figure 2-1. System Block Diagram
Atmel AT03030: QMatrix Touchpad – 2D Position Tracking [APPLICATION NOTE]
42202A−QTOUCH−11/2013
4
Touchpad design comprises of 56 touch sensors organized using 8 X lines and 7 Y lines. Table 2-1 provides pin
configuration used in touchpad sensor design. QMatrix touch sensors require X + 2Y + 2 general-purpose I/O pins for
realization, as shown in Figure 2-2.
Figure 2-2. Typical QMatrix Circuit
Table 2-1.
Pin Configuration for Touchpad
ATxmega16D4 GPIO Pin
Pin Description
Comments
PD4
X0
Configurable I/O Pin
PD5
X1
Configurable I/O Pin
PD6
X2
Configurable I/O Pin
PD7
X3
Configurable I/O Pin
PE0
X4
Configurable I/O Pin
PE1
X5
Configurable I/O Pin
PE2
X6
Configurable I/O Pin
PE3
X7
Configurable I/O Pin
PC0
Y0A
Configurable I/O Pin
PC1
Y1A
Configurable I/O Pin
PC2
Y2A
Configurable I/O Pin
PC3
Y3A
Configurable I/O Pin
PC4
Y4A
Configurable I/O Pin
PC5
Y5A
Configurable I/O Pin
PC6
Y6A
Configurable I/O Pin
PA0
Y0B
ADC Port Pin
Atmel AT03030: QMatrix Touchpad – 2D Position Tracking [APPLICATION NOTE]
42202A−QTOUCH−11/2013
5
2.2
PA1
Y1B
ADC Port Pin
PA2
Y2B
ADC Port Pin
PA3
Y3B
ADC Port Pin
PA4
Y4B
ADC Port Pin
PA5
Y5B
ADC Port Pin
PA6
Y6B
ADC Port Pin
PC7
SMP
Sampling Pin
PA7
AIN0
Analog Ground Reference Pin
Sensor Design
Sensor design is very important for designing touchpad using zero-dimensional touch sensors (buttons), which is used
to determine 2D position. Accuracy and resolution of touch position is greatly dependent on Touch Sensor design.
The touchpad design consists of set of sensors arranged in rows and columns to form a matrix. The reference design
uses a sensor pattern of eight rows (X lines) and seven columns (Y lines) similar to 56 touch keys. Mutual capacitance
(QMatrix) method is used in this design. Sensor Design uses Coplanar (Single Layer) method and 1mm thick front
panel is used.
Coplanar design provides flexibility for controlling the sensitivity, by adjusting XY gap in sensor electrode. This allows
usage of thicker front panel. This method can be easily implemented on a flex PCB.
Refer Figure 2-3 for sensor pattern used in this reference design.
Figure 2-3. Coplanar (Single Layer) Sensor Design
Atmel AT03030: QMatrix Touchpad – 2D Position Tracking [APPLICATION NOTE]
42202A−QTOUCH−11/2013
6
2.2.1
Design Guidelines
Sensor Design guidelines specific to touchpad design is listed below:
•
•
•
Fundamental guideline is to place the sensors in close proximity as shown in Figure 2-4. To locate sensors
closely follow the below recommendation.
•
Sensors that share same X line, the X regions can be merged.
As shown in Figure 2-4, each row has seven sensors sharing same X line but uses different Y line and
so there is no gap between the sensors horizontally.
•
Sensors using different X lines need to have minimal separation, which should be maintained between
0.1mm to 0.5mm gap.
As shown in Figure 2-4, each column has eight sensors sharing same Y line but uses different X line. So
minimal gap is maintained between the sensors vertically.
Touchpad sensor pattern is formed using sensors arranged in rows and columns organized as a matrix.
Touchpad library implementation puts restrictions on the number of rows / columns in the design.
•
Minimum number of rows / columns that can be used is limited to two.
•
Maximum number of rows / columns that can be used is limited to eight.
Segment size of the sensor for a given X and Y line should be in the range 5mm to 8mm.
•
Segment size of sensor used beyond 8mm will not have proper linearity and have low resolution.
•
Touchpad designs that use small segment size say 5mm x 5mm, Flooded-X (Two-Layer) design is preferred.
Since it is difficult to realize Coplanar (Single layer) touchpad designs for small segment size.
Refer Figure 2-5 for spacing recommendations for Flooded-X (Two-Layer) design.
•
Shape of the touchpad sensor pattern should be rectangular or square. Other fancy shapes are not
recommended, as they may not provide expected results.
•
No additional touch sensor should be designed using same Atmel MCU used to design touchpad.
•
•
This is restricted by touchpad library implementation.
Resolution is mainly dependent on sensor size and number of sensors used to form sensor pattern.
•
Better resolution can obtained using many sensors of small segment size.
•
Designs using few sensors which are bigger in size, the resolution achieved will be low.
For general Sensor Design Guidelines refer to “BSW Touch Sensor Design Guide”.
Atmel AT03030: QMatrix Touchpad – 2D Position Tracking [APPLICATION NOTE]
42202A−QTOUCH−11/2013
7
Figure 2-4. Recommended Spacing for Coplanar (Single Layer) Design
™
‘T’ refers to Front panel thickness used in design.
Figure 2-5. Recommended Spacing for Flooded-X (Two Layer) Design
Atmel AT03030: QMatrix Touchpad – 2D Position Tracking [APPLICATION NOTE]
42202A−QTOUCH−11/2013
8
2.2.1.1 Sensor Arrangement
Sensors in touchpad should be connected sequential as shown in Figure 2-6.
In this reference design, 56 sensors are arranged in the below order for 8 X lines and 7 Y lines.
Figure 2-6. Sensor Arrangement
2.3
X0
X1
X2
X3
X4
X5
X6
X7
Y0
S0
S1
S2
S3
S4
S5
S6
S7
Y1
S8
S9
S10
S11
S12
S13
S14
S15
Y2
S16
S17
S18
S19
S20
S21
S22
S23
Y3
S24
S25
S26
S27
S28
S29
S30
S31
Y4
S32
S33
S34
S35
S36
S37
S38
S39
Y5
S40
S41
S42
S43
S44
S45
S46
S47
Y6
S48
S49
S50
S51
S52
S53
S54
S55
LED Indication
Two LEDs are used to indicate the single tap and touchpad state. These LEDs are driven by BC847B transistor. The
state of the transistor is controlled by connected ATxmega16D4 GPIO pin.
LED1 is configured for single tap indication. This is set to operate in toggle mode. The LED1 turns ON when single tap
event is detected first time and turns OFF in the subsequent single tap detection.
LED2 is configured to indicate touchpad active status. This LED will be in ON as long as there is a touch.
Table 2-2 details pin configuration used for LEDs.
Table 2-2.
2.4
Pin Configuration for LEDs
GPIO Pin
Pin Description
PD0
LED1
PD1
LED2
Communication Interface
Serial communication using USART interface is used to display the touchpad X-Y position on HyperTerminal of host
PC. Figure 2-7 shows the communication header available on the PCB. Table 2-3 details pin configuration of USARTD0
used in touchpad.
Table 2-3.
Pin Configuration for USART
GPIO Pin
Pin Description
PD3
USART_TX
PD2
USART_RX
Atmel AT03030: QMatrix Touchpad – 2D Position Tracking [APPLICATION NOTE]
42202A−QTOUCH−11/2013
9
Figure 2-7. Communication Header
Figure 2-8. Communication Signals – USART
Figure 2-9 shows PC HyperTerminal screenshot, with X-Y Position display and Single tap indication.
Figure 2-9. X-Y Position Display
Atmel AT03030: QMatrix Touchpad – 2D Position Tracking [APPLICATION NOTE]
42202A−QTOUCH−11/2013
10
2.5
Power Supply Considerations
The reference design can be powered by using any of the following power supply sources.
2.5.1
USB Supply
The reference board can be powered with the Mini-B USB header available on the board. This supply acts as a source
of power to the on-board voltage regulator and power indication LED.
2.5.2
External Supply
The reference board can be powered using +5V external supply. Power can be provided using J7 header available on
board. This also acts as source of power to the on-board voltage regulator and power indication LED.
2.5.3
On-board Regulator
A linear drop-out regulator, which is mounted on the board acts as a regulated power supply source for the Atmel
ATxmega16D4 device. This on-board regulator can be bypassed using zero Ohm resistor provision available. In such
case, external supply provided should be +3.3V.
Using external supply, which is not regulated by the on-board regulator, should adhere to the power supply
considerations mentioned in the application note Atmel AT02259: QTouch® Schematic and Layout Checklist.
2.6
Programming and Debugging
2.6.1
PDI Interface
The ATxmega16D4 device can be programmed using PDI interface. The on-board PDI header can be used for
programming the device. This can also be used for On-Chip Debugging (OCD). Figure 2-10 shows the programming
header available on the PCB.
Figure 2-10. Programming Header
2.6.2
Touch Data
Touch data is transmitted using QDebug protocol through Bit Bang SPI interface. QT600 USB Interface Bridge is used
to transmit touch data to QTouch Analyzer. The real time touch data can be used for debugging and analysis. Table 2-4
shows pins configured for QDebug in Touch Data Header available.
Table 2-4.
Pin Configuration for Touch Data Debug
ATxmega16D4 GPIO Pin
Pin Description
PB0
DBG_MISO
PB1
DBG_SS
PB2
DBG_MOSI
PB3
DBG_SCK
Atmel AT03030: QMatrix Touchpad – 2D Position Tracking [APPLICATION NOTE]
42202A−QTOUCH−11/2013
11
3.
Firmware
Figure 3-1. Firmware Block Diagram
3.1
Touchpad Library
Touchpad library (libtouchpad.a) is a software library which calculates X-Y position of the touchpad sensor for the given
resolution. This library is built for the Atmel ATxmega16D4 device and linked into application code to calculate the X-Y
position.
This library is available as part of firmware that can be downloaded along with this document.
The below sections provides details of touchpad library APIs and its usage.
3.1.1
touchpad.h – Header File
The touchpad.h header file which needs to be included in user’s application and it has the type definitions and function
prototypes of the API’s needs to be used for touchpad X-Y calculation.
3.1.2
Public Functions
This section provides details of touchpad library public functions and its usage.
3.1.2.1 qt_init_touchpad
Table 3-1.
qt_init_touchpad
Function
Description
uint8_t qt_init_touchpad(uint8_t num_x, uint8_t num_y, xy_resolution_t resolution, uint8_t position_hysteresis)
Initializes touchpad library with the input parameters provided
Input
num_x: Number of X lines of the touchpad sensor
num_y: Number of Y lines of the touchpad sensor
resolution: Number of positions to be reported per sensor area
position_hysteresis: Hysteresis of reported X-Y position value
Output
None
Return
Returns TRUE if successful or FALSE otherwise
Atmel AT03030: QMatrix Touchpad – 2D Position Tracking [APPLICATION NOTE]
42202A−QTOUCH−11/2013
12
Resolution
Resolution is the number of positions to be reported for each sensor area. It can have values from four to seven bits (16
to 128 positions).
The total resolution for X-axis = no. of X lines * no. of positions for one sensor.
The total resolution for Y-axis = no. of Y lines * no. of positions for one sensor.
Touchpad resolution (dpi) = no. of sensors available in 1 inch area * no. of positions for one sensor.
Where, no. of sensors available in 1 inch area = 1 inch area in mm / 1 sensor area in mm.
In this reference design, one sensor area is 8mm x 8mm and firmware uses seven bit position resolution. Using above
calculation, touchpad resolution for this design is 406 dpi.
Table 3-2, shows position and resolution possible with 8X x 7Y sensor configuration with one sensor area 8mm x 8mm
for different resolution inputs.
Table 3-2.
Touchpad Position Resolution
Resolution [bits]
Positions Per Sensor
X-axis Positions
Y-axis Positions
Touchpad Resolution [dpi]
7
128
1024
896
406
6
64
512
448
203
5
32
256
224
102
4
16
128
112
51
Resolution Range: 4 to 7bits.
Position Hysteresis
It is the number of positions the user has to move back, before the new X-Y touch position is reported when the
direction of scrolling is changed. This is used to avoid jittering in the reported X-Y position.
Hysteresis can range from 0 (1 position) to 7 (8 positions). Hysteresis setting can be used when the reported position
jitters due to noise effects.
Position Hysteresis Range: 0 to 7.
3.1.2.2 qt_get_xy
Table 3-3.
3.2
qt_init_touchpad Function
Description
touch_position_t qt_get_xy(void) Calculates X-Y position and returns it
Input
None
Output
None
Return
Updates the X and Y values computed in structure ‘touch_position_t’
QMatrix Library
QMatrix library is a software library which performs touch acquisition and post-processing. This reference design uses
ATxmega16D4 8X x 7Y sensor configuration library which supports up to 56 channels.
Refer QTouch Library User Guide for QMatrix Library API usage.
Atmel AT03030: QMatrix Touchpad – 2D Position Tracking [APPLICATION NOTE]
42202A−QTOUCH−11/2013
13
3.3
USART Module
USART Module consists of USART driver code and functions to convert integer to ASCII to display X-Y Position in
HyperTerminal of host PC using RS232 interface. This module is sending data using polling method. ATxmega16D4
USARTD0 peripheral is used and it is configured as below.
3.4
Baud rate
: 115200
Start bits
:1
Data bits
:8
Parity
: Disabled
Stop bits
:1
LED Interface
This module controls LED indication for the single tap and touchpad state.
3.5
Application Code
The application code implementation flow is provided in the Figure 3-2.
Atmel AT03030: QMatrix Touchpad – 2D Position Tracking [APPLICATION NOTE]
42202A−QTOUCH−11/2013
14
Figure 3-2. Application Flow Diagram
Measurement period depends on touch acquisition duration and USART transmission time. In this firmware solution,
measurement period is set to 30ms.
Note:
Things to be taken care while tuning the Touchpad sensor: QTouch Analyzer can be used for tuning purpose.
Atmel AT03030: QMatrix Touchpad – 2D Position Tracking [APPLICATION NOTE]
42202A−QTOUCH−11/2013
15
3.5.1
•
The delta for each sensor in the touchpad should be peaking at the same amplitude. This gives improved
linearity of reported X-Y position and also uniform sensitivity across the touchpad. Burst Length can be
adjusted to compensate for imbalance.
•
Make sure the delta for each sensor in the touchpad peak at around 25 counts and above. If touch delta is not
enough to calculate position, the reported X-Y position can be jittery.
•
Set the Detection Threshold for each sensor in the touchpad to report a touch when the finger lightly contacts
the touchpad surface.
Single Tap Detection
Firmware solution provides demonstration of single tap detection feature. This single tap detection is indicated using
LED and also indicated in PC HyperTerminal. The LED toggles for every single tap detection.
Note:
•
•
•
Below listed features also can be implemented in user application code.
Double-tap detection
Horizontal Scroll detection
Vertical Scroll detection
Atmel AT03030: QMatrix Touchpad – 2D Position Tracking [APPLICATION NOTE]
42202A−QTOUCH−11/2013
16
GND
2
4
6
8
10
TOUCH DATA
1
3
5
7
9
VCC
DBG_MISO
DBG_SS
DBG_MOSI
DBG_SCK
GND
GND
VCC
GND
VCC
YA0
YA1
YB5
YB6
AIN0
GND
C11
100nf
1
2
3
4
5
6
7
8
9
10
11
C8
100nf
PA5(ADCA5/ACA5)
PA6(ADCA6/ACA6)
PA7(ADCA7/ACA7)
PB0(ADCA8/AREFB)
PB1(ADCA9)
PB2(ADCA10)
PB3(ADCA11)
GND
VCC
PC0(SDA/OC0A)
PC1(SCL/OC0B)
GND
VCC
ATxmega16D4-AU
U1
YA2
YA3
YA4
YA5
YA6
SMP
VCC
YB4
YB3
YB2
YB1
YB0
44
43
42
41
40
39
38
37
36
35
34
(ADCA4/ACA4)PA4
(ADCA3/ACA3)PA3
(ADCA2/ACA2)PA2
(ADCA1/ACA1)PA1
(AREFA/ADCA0/ACA0)PA0
AVCC
GND
(XTAL1/TOSC1)PR1
(XTAL2/TOSC2)PR0
PDI_CLK/RESET
PDI_DATA
PC2(OC0C/RXD0)
PC3(OC0D/TXD0)
PC4(SS/OC1A)
PC5(MOSI/OC1B)
PC6(MISO)
PC7(SCK)
GND
VCC
PD0(OC0A)
PD1(OC0B/XCK0)
PD2(OC0C/RXD0)
GND
VCC
12
13
14
15
16
17
18
19
20
21
22
2
4
6
UART_RX
33
32
31
30
29
28
27
26
25
24
23
PIN HEADER 2x3
1
3
5
(OC0D)PE3
(OC0C)PE2
VCC
GND
(OC0B/SCL)PE1
(OC0A/SDA)PE0
(SCK)PD7
(MISO)PD6
(MOSI)PD5
(SS)PD4
(OC0D/TXD0)PD3
CLOCK
DATA
PDI
X7A
X6A
C9
100nf
1K
R26
1K
R24
VCC
GND
X5A
X4A
X3A
X2A
X1A
X0A
UART_TX
GND
VCC
GND
VCC
C13
LED2
GND
BC847B
NPN BEC
Q4
LED1
C14
Q3
NPN BEC
BC847B
1nf
C10
100nf
GND 1nf
GND
VCC
220R
R25
220R
R23
VCC
R2
R3
R4
R5
R6
R7
R8
X1A
X2A
X3A
X4A
X5A
X6A
X7A
YB6
YA6
YB5
YA5
YB4
YA4
YB3
YA3
YB2
YA2
YB1
YA1
YB0
YA0
R1
X0A
C7
22n
R15
C6
22n
R14
C5
22n
R13
C4
22n
R12
C3
22n
R11
C2
22n
R10
C1
22n
R9
1k
1k
1k
1k
1k
1k
1k
1k
470k
R22
470k
R21
470k
R20
470k
R19
470k
R18
470k
R17
470k
R16
X7
X6
X5
X4
X3
X2
X1
X0
1k
1k
1k
1k
1k
1k
1k
Y6
Y5
Y4
Y3
Y2
Y1
Y0
8
7
6
5
4
3
2
1
X7
X6
X5
X4
X3
X2
X1
X0
Touchpad
Y0
Y1
Y2
Y3
Y4
Y5
Y6
9
10
11
12
13
14
15
4.
Schematic Design
Figure 4-1. Schematic – Part 1
Atmel AT03030: QMatrix Touchpad – 2D Position Tracking [APPLICATION NOTE]
42202A−QTOUCH−11/2013
17
VCC-5V
1
3
J7
47uF/35V
C23
CAP-POL
0R
2
4
+
4u7
C33
GND
+
C30
CAP-POL
47uF/35V
TP1
VOUT
Farnell no: 1469032
LMS8117AMP-3.3
4
2
INVALID
R2OUT
R1OUT
T2IN
T1IN
TTL/CMOS
V-
V+
FORCEON
FORCEOFF
GND VOUT_PAD
VIN
U4
GND
1
3
7
10
11
9
8
6
2
12
19
Regulator Bypass
R45
0R
UART_RX
UART_TX
VOLTAGE REGULATOR
VCC-5V
UART_RX
UART_TX
GND
C28
100nF
100nF
C26
C24
100nF
13
VL
R48
GND
20
C29
C2+
C1C2-
C1+
+
CAP-POL
47uF/35V
14
15
16
17
4
3
5
1
VCC
RS232_RX
RS232_TX
100nF
C27
100nF
C25
U3
MAX3380
MAX3380ECUP+
Use J3 for power consumption
C32
C31
R2IN
R1IN
T2OUT
T1OUT
RS-232
4u7 100nf
GND
18
VCC
VCC
VCC
1K
R46
GND
10
LED_12
GND
QTLP650D5TR
D1
2
1
RS232_TX
RS232_RX
5
9
4
8
3
7
2
6
1
11
USB Mini B
VBUS
DD+
ID
GND
SHIELD1
SHIELD2
SHIELD3
SHIELD4
J1
09-66-152-7611
J3
1
2
3
4
5
6
7
8
9
GND
VCC-5V
Figure 4-2. Schematic – Part 2
Atmel AT03030: QMatrix Touchpad – 2D Position Tracking [APPLICATION NOTE]
42202A−QTOUCH−11/2013
18
4
3
2
1
7
8
10
10
6
9
6
7
8
9
10
11
1
2
3
4
5
3
4
5
6
2
2
1
1
2
1
2
2
1
1
3
2
1
1
2
1
1
1
2
1
2
2
1
2
2
1
2
4
1
1
1
2
2
2
1
2
9
10
1
8
7
6
5
4
3
2
1
1
2
33
31
4
30
29
5
2
1
6
28
2
7
27
1
2
2
8
26
1
9
25
1
2
10
24
11
23
2
1
2
1
2
18
19
20
21
22
1
2
1
2
1
2
2
2
2
1
1
1
2
2
2
2
2
2
13
43
12
14
42
44
15
41
1
1
1
1
1
1
1
1
2
16
3
1
1
2
17
2
32
1
2
40
1
1
1
39
38
37
36
35
34
2
2
1
2 1
2
1 2
2
1
1
1
1
1
1
2
2
2
2
2
2
1
1
1
1
1
1
2
2
3 3
2
2
2
1
2
2
1
5.
PCB Layout
Figure 5-1. Top Layer
Atmel AT03030: QMatrix Touchpad – 2D Position Tracking [APPLICATION NOTE]
42202A−QTOUCH−11/2013
19
1
1
2
2
2
4
4
3
2
1
10
10
3
5
6
8
7
9
10
4
6
1
3
5
2
1
1
2
2
1
1
2
1
2
3
1
1
2
2
1
2
Figure 5-2. Bottom Layer
Atmel AT03030: QMatrix Touchpad – 2D Position Tracking [APPLICATION NOTE]
42202A−QTOUCH−11/2013
20
Bill of Materials (BOM)
6.
Table 6-1.
BOM
Description
Designator
Qty.
Value
Ceramic capacitor, SMD 0603, X7R, 50V, ±10%
C1, C2, C3, C4, C5, C6, C7
7
22nF
Ceramic capacitor, SMD 0603, X7R, 50V, ±10%
C8, C9, C10, C11, C24, C25, C26, C27,
C28, C32
10
100nF
Ceramic capacitor, SMD 0603, NPO, 100V, ±1%
C13, C14
1
1nF
SMD tantalum capacitor, 35V
C23, C31, C33
3
47µF
Ceramic capacitor, SMD 0603, X7R, 16V, ±10%
C29, C30
1
4µ7
Yellow SMD LED
D1
1
Power indication
Yellow SMD LED
LED1, LED2
2
Single tap and touchpad
state indication
BJT Transistor, NPN
Q3, Q4
2
BC847B
Thick film resistor, SMD 0603, 1/10W, 1%
R1, R2, R3, R4, R5, R6, R7, R8, R9, R10,
R11, R12, R13, R14, R15, R24, R26, R46
18
1kΩ
Thick film resistor, SMD 0603, 1/10W, 1%
R16, R17, R18, R19, R20, R21, R22
7
470kΩ
Thick film resistor, SMD 0603, 1/10W, 1%
R23, R25
2
220R
Thick film resistor, SMD 0603, 1/10W, 1%
R45
1
0Ω
Thick film resistor, SMD 1206, 1/10W, 1%
R48
1
0Ω
AVR 8-bit RISC MCU
U1
1
ATxmega16D4-AU
RS232 Level Converter, 2.35V to 5.5V
U3
1
MAX3380ECUP
3.3V 1A Low Dropout Linear Regulator
SOT223_4
U4
1
LMS8117AMP-3.3
USB Mini-AB Connector, SMD
J1
1
MUSB-05-F-AB-SM-A
®
Atmel AT03030: QMatrix Touchpad – 2D Position Tracking [APPLICATION NOTE]
42202A−QTOUCH−11/2013
21
7.
References
[1]. Atmel QTouch Library User Guide
http://www.atmel.com/Images/doc8207.pdf
[2]. BSW Touch Sensor Design Guide
http://www.atmel.com/Images/doc10752.pdf
[3]. Atmel AT02259: QTouch Schematic and Layout Checklist
http://www.atmel.com/Images/Atmel-42094-QTouch-Schematic-and-Layout-Checklist_ApplicationNote_AT02259.pdf
[4]. AVR XMEGA® D4 Devices Datasheet
http://www.atmel.com/Images/Atmel-8135-8-and-16-bit-AVR-microcontroller-ATxmega16D4-32D4-64D4128D4_datasheet.pdf
[5]. Atmel AVR XMEGA D Manual
http://www.atmel.com/Images/Atmel-8210-8-and-16-bit-AVR-Microcontrollers-XMEGA-D_Manual.pdf
Atmel AT03030: QMatrix Touchpad – 2D Position Tracking [APPLICATION NOTE]
42202A−QTOUCH−11/2013
22
Appendix A.
Sensor Pattern for Flooded-X (Two-Layer) Design
Refer to Figure A-1 for Flooded-X sensor pattern that could be used in touchpad design.
Figure A-1. 8X x 7Y QMatrix Flooded-X (Two-Layer) Design
Atmel AT03030: QMatrix Touchpad – 2D Position Tracking [APPLICATION NOTE]
42202A−QTOUCH−11/2013
23
Appendix B.
Revision History
Doc. Rev.
Date
Comments
42202A
11/2013
Initial document release
Atmel AT03030: QMatrix Touchpad – 2D Position Tracking [APPLICATION NOTE]
42202A−QTOUCH−11/2013
24
Atmel Corporation
Atmel Asia Limited
Atmel Munich GmbH
Atmel Japan G.K.
1600 Technology Drive
Unit 01-5 & 16, 19F
Business Campus
16F Shin-Osaki Kangyo Building
San Jose, CA 95110
BEA Tower, Millennium City 5
Parkring 4
1-6-4 Osaki, Shinagawa-ku
USA
418 Kwun Tong Road
D-85748 Garching b. Munich
Tokyo 141-0032
Tel: (+1)(408) 441-0311
Kwun Tong, Kowloon
GERMANY
JAPAN
Fax: (+1)(408) 487-2600
HONG KONG
Tel: (+49) 89-31970-0
Tel: (+81)(3) 6417-0300
www.atmel.com
Tel: (+852) 2245-6100
Fax: (+49) 89-3194621
Fax: (+81)(3) 6417-0370
Fax: (+852) 2722-1369
© 2013 Atmel Corporation. All rights reserved. / Rev.: 42202A−QTOUCH−11/2013
Atmel®, Atmel logo and combinations thereof, AVR®, Enabling Unlimited Possibilities®, maXTouch®, QTouch®, XMEGA®, and others are registered trademarks or
trademarks of Atmel Corporation or its subsidiaries. Other terms and product names may be trademarks of others.
Disclaimer: The information in this document is provided in connection with Atmel products. No license, express or implied, by estoppel or otherwise, to any intellectual property right is granted by this
document or in connection with the sale of Atmel products. EXCEPT AS SET FORTH IN THE ATMEL TERMS AND CONDITIONS OF SALES LOCATED ON THE ATMEL WEBSITE, ATMEL ASSUMES
NO LIABILITY WHATSOEVER AND DISCLAIMS ANY EXPRESS, IMPLIED OR STATUTORY WARRANTY RELATING TO ITS PRODUCTS INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
CONSEQUENTIAL, PUNITIVE, SPECIAL OR INCIDENTAL DAMAGES (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS AND PROFITS, BUSINESS INTERRUPTION, OR LOSS OF
INFORMATION) ARISING OUT OF THE USE OR INABILITY TO USE THIS DOCUMENT, EVEN IF ATMEL HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. Atmel makes no
representations or warranties with respect to the accuracy or completeness of the contents of this document and reserves the right to make changes to specifications and products descriptions at any time
without notice. Atmel does not make any commitment to update the information contained herein. Unless specifically provided otherwise, Atmel products are not suitable for, and shall not be used in,
automotive applications. Atmel products are not intended, authorized, or warranted for use as components in applications intended to support or sustain life.