APPLICATION NOTE Atmel QT4 Xplained Pro User Guide ATAN0114 Preface Atmel® QT4 Xplained Pro kit is an extension board that enables evaluation of self-capacitance mode proximity and touch using the peripheral touch controller (PTC) module. The kit shows how easy it is to design a capacitive touch board solution for the PTC without the need for any external components. Figure 1. QT4 Xplained Pro 9386A-AUTO-04/15 1. Introduction 1.1 Kit Contents ● 1.2 1 ATQT4-XPRO Features ● QTouch® ● Two proximity sensors ● ● ● One unshielded sensor ● One driven shield sensor with external op amp driver LEDs ● One LED indicator for each self-capacitive button ● One LED indicator for each proximity sensor ● Op amp supply jumper ● Xplained Pro hardware identification system(1) ● 1.3 Two buttons Supply current monitoring of the driven shield op amp Kit Overview Atmel® QT4 Xplained Pro is an extension board designed specifically for Xplained Pro MCU boards featuring an MCU with a built-in peripheral touch controller. The extension board can be used to explore the touch functions on the PTC module in self-capacitance (SC) mode only and includes both touch and proximity functionality. Two of the extension board sensors provide proximity detection. The first sensor is unshielded. This sensor consists of a single electrode on the top layer of the PCB. All copper shielding has been removed beneath the sensor electrode. This sensor is response to touch/proximity from both sides of the PCB, top and bottom. The second proximity sensor employs an active or driven shield which consists of two electrodes – a top-side sensor and a bottom-side shield. The shield is driven by the MCU (located on the Xplained Pro controller board) through an external op amp (Texas Instruments OPA357) on the extension board. The active shield provides two major benefits compared to the unshielded sensor. First, the active shield suppresses all touch and proximity detection from the bottom (shielded) side of the proximity sensor. Detection can only occur from the top side of the PCB (sensor side). Second, the active shield provides a modest increase in sensor detection range compared to the unshielded sensor of the same size. 2 ATAN0114 [APPLICATION NOTE] 9386A–AUTO–04/15 Figure 1-1. QT4 Xplained Pro Extension Board ATAN0114 [APPLICATION NOTE] 9386A–AUTO–04/15 3 2. Getting Started 2.1 Three Steps to Start Exploring the Atmel Xplained Pro Platform 2.2 1. Download and install Atmel® Studio. 2. Launch Atmel Studio. 3. Connect QT4 Xplained Pro to an Xplained Pro MCU board and connect a USB cable to the DEBUG USB port on the Xplained Pro MCU board. Connecting the QT4 Xplained Pro to the Xplained Pro MCU Board Atmel QT4 Xplained Pro has been designed to be connected to the header marked EXT1 on the Xplained Pro MCU board. Before touch application development, download and install the Atmel QTouch Library and Atmel QTouch Composer from the extension gallery in Atmel Studio. Once the Xplained Pro MCU board is powered, the green power LED lights up and Atmel Studio auto-detects which Xplained Pro MCU or extension board is connected. Relevant information such as datasheets and kit documentation is displayed. You also have the option to launch sample Atmel Software Framework (ASF) applications. The target device is programmed and debugged by the on-board embedded debugger. Note: 2.3 No external programmer or debugger tool is needed. Design Documentation and Related Links The following list provides lists for the most relevant documents and software for QT4 Xplained Pro. ● Xplained Pro products(1) – Atmel Xplained Pro is a series of small, easy-to-use evaluation kits for 8- and 32-bit Atmel microcontrollers. It consists of a series of low cost MCU boards for evaluation and demonstration of features and capabilities of different MCU families. ● ● ● ● ● Notes: 4 QT4 Xplained Pro User Guide(2) – PDF version of this User Guide. QT4 Xplained Pro Design Documentation(3) – Package containing schematics, BOM, assembly drawings, 3D plots, layer plots, etc. Atmel QTouch Library(4) – QTouch library to support Atmel AVR® and ARM®-based microcontrollers. Atmel QTouch Composer(5) – Tool for developing capacitive buttons, sliders and wheel applications. Atmel Studio(6) – Free Atmel IDE for development of C/C++ and assembler code for Atmel microcontrollers. 1. http://www.atmel.com/XplainedPro 2. http://www.atmel.com/Images/Atmel-9386-QT4-Xplained-Pro_User-Guide.pdf 3. http://www.atmel.com/Images/QT4-Xplained-Design-Documentation.zip 4. http://www.atmel.com/tools/QTOUCHLIBRARY.aspx 5. http://www.atmel.com/tools/atmel_qtouch.aspx 6. http://www.atmel.com/atmelstudio ATAN0114 [APPLICATION NOTE] 9386A–AUTO–04/15 3. Xplained Pro Xplained Pro is an evaluation platform that provides the full Atmel® microcontroller experience. The platform consists of a series of microcontroller (MCU) boards and extension boards that are integrated with Atmel Studio, have Atmel software framework (ASF) drivers and demo code and support data streaming and more. Xplained Pro MCU boards support a wide range of Xplained Pro extension boards that are connected through a set of standardized headers and connectors. Each extension board has an identification (ID) chip to uniquely identify which boards are mounted on an Xplained Pro MCU board. This information is used to present relevant user guides, application notes, datasheets and sample code through Atmel Studio. Available Xplained Pro MCU and extension boards can be purchased from The Atmel Store(1). 3.1 Hardware Identification System All Xplained Pro compatible extension boards have an Atmel ATSHA204 CryptoAuthentication™ chip mounted. This chip contains information that identifies the extension with its name and other additional data. When an Xplained Pro extension board is connected to an Xplained Pro MCU board, the information is read and sent to Atmel Studio. The Atmel kits extension, installed with Atmel Studio, provide relevant information, sample code and links to relevant documents. Table 3-1 shows the data fields stored in the ID chip with sample content. Note: Actual data may differ. Table 3-1. Xplained Pro ID Chip Content Data Field Data Type Example Content Manufacturer ASCII string Atmel’\0’ Product name ASCII string QT4 Xplained Pro’\0’ Product revision ASCII string 03’\0’ Product serial number ASCII string 2414030000000000’\0’ Minimum voltage [mV] uint16_t 3000 Maximum voltage [mV] uint16_t 3600 Maximum current [mA] uint16_t 100 ATAN0114 [APPLICATION NOTE] 9386A–AUTO–04/15 5 3.2 Standard Headers and Connectors 3.2.1 Xplained Pro Standard Extension Header All Xplained Pro kits have one or more dual-row, 20-pin, 100mil extension headers. Xplained Pro MCU boards have male headers while Xplained Pro extensions have their female counterparts. Note that all pins are not always connected. However, all of the connected pins follow the defined pin-out described in Table 3-2. The extension headers can be used to connect a wide variety of Xplained Pro extensions to Xplained Pro MCU boards and to access the pins of the target MCU on Xplained Pro MCU board directly. Table 3-2. Xplained Pro Extension Header Pin Number 3.2.2 Name Description 1 ID Communication line to the ID chip on the extension board 2 GND Ground 3 ADC(+) Analog to digital converter, alternatively positive part of differential ADC 4 ADC(–) Analog to digital converter, alternatively negative part of differential ADC 5 GPIO1 General purpose I/O 6 GPIO2 General purpose I/O 7 PWM(+) Pulse width modulation, alternatively positive part of differential PWM 8 PWM(–) Pulse width modulation, alternatively positive part of differential PWM 9 IRQ/GPIO Interrupt request line and/or general purpose I/O 10 SPI_SS_B/GPIO Slave select for SPI and/or general purpose I/O 11 TWI_SDA Data line for two-wire interface. Always implemented, bus type 12 TWI_SCL Clock line for two-wire interface. Always implemented, bus type 13 USART_RX Receiver line of universal synchronous and asynchronous serial receiver and transmitter 14 USART_TX Transmitter line of universal synchronous and asynchronous serial receiver and transmitter 15 SPI_SS_A Slave select for SPI. Should be unique if possible 16 SPI_MOSI Master-out-slave-in line of serial peripheral interface. Always implemented, bus type 17 SPI_MISO Master-out-slave-out line of serial peripheral interface. Always implemented, bus type 18 SPI_SCK Clock for serial peripheral interface. Always implemented, bus type 19 GND Ground 20 VCC Power for extension board J101 – Op Amp Supply The driven shield op amp is powered by VCC_TARGET (3.3V) from the Xplained Pro controller board. The jumper can be removed and replaced by a multimeter in order to monitor the op amp current consumption. 6 ATAN0114 [APPLICATION NOTE] 9386A–AUTO–04/15 4. Hardware User Guide 4.1 Headers and Connectors 4.1.1 QT4 Xplained Pro Extension Header QT4 Xplained Pro uses one Xplained Pro standard extension header marked with EXT1 in silkscreen. This header makes it possible to connect the board to an Xplained Pro MCU board with a MCU that includes a PTC module. See Table 4-1 for the pin-out definition of the extension header. Table 4-1. QT4 Xplained Pro Extension Header Pin Number Name Description 1 ID Communication line to the ID chip on the extension board 2 GND Ground 3 Y0 Unshielded proximity sensor 4 Y1 Driven shield proximity sensor 5 Y2 Self-cap sensor, B2 6 Y3 Self-cap sensor, B1 7 LED_0 LED indicator, unshielded proximity sensor 8 LED_1 LED indicator, B2 sensor 9 LED_2 LED indicator, B1 sensor 10 LED_3 LED indicator, driven shield proximity sensor 11 Unused Not connected 12 Unused Not connected 13 Unused Not connected 14 Unused Not connected 15 EN Op amp enable 16 Unused Not connected 17 Unused Not connected 18 Unused Not connected 19 GND Ground 20 VCC Power for extension board ATAN0114 [APPLICATION NOTE] 9386A–AUTO–04/15 7 4.1.2 Peripherals 4.1.2.1 LEDs There are 4 LEDs available on the QT4 Xplained Pro extension board that can be used to visualize the behavior of the touch and proximity sensors. Each sensor has its own indicator LED. All LEDs on the boards are active low, which means that the microcontroller needs to sink the corresponding IO lines to activate the LEDs. 4.1.2.2 Sensors The QT4 Xplained Pro has four sensors that can be used for touch/proximity demonstration: two touch buttons, one driven shield proximity sensor (using an op amp driver) and one unshielded proximity sensor. All four sensors are self-capacitive, copper PCB electrodes, each driven by a separate Y-line from the microcontroller. In this case, the self-capacitance of the sensor is measured to calculate touch. This kit is only supported by Xplained Pro MCU boards that have a MCU with a built-in PTC and a matching pin-out that connects all extension sensors. MCU boards currently supported are the SAMD20/21 and the SAMDA1 series of Xplained Pro controller boards. Table 4-2. 8 Sensors Sensor Dimensions (mm) Button 1 15x15 GND, internal plane, hatched Button 2 15x15 GND, internal plane, hatched Proximity – Unshielded 40x20 None Proximity – Driven shield 40x20 Actively driven by external op amp (Texas Instruments, OPA357). Solid plane copper plane, 60x40mm. ATAN0114 [APPLICATION NOTE] 9386A–AUTO–04/15 Shield Type 5. Hardware Revision History and Known Issues 5.1 Identifying Product ID and Revision The revision and product identifier of Xplained Pro boards can be accessed either through Atmel Studio or by looking at the sticker affixed to the bottom of the PCB. An information window pops up when connecting an Xplained Pro MCU board to a computer with Atmel® Studio running. The first six digits of the serial number listed under kit details contain the product identifier and revision. Information about connected Xplained Pro extension boards also appears in the Atmel kits window. The same information can be found on the sticker on the bottom of the PCB. Most kits print the identifier and revision in plain text as A09-nnnn\rr with nnnn the identifier and rr the revision. Boards with limited space have a sticker with only a QR code containing a serial number string. The serial number string has the following format: “nnnnrrssssssssss” n = product identifier r = revision s = serial number The kit identifier for QT4 Xplained Pro is 2414. 5.2 Revision 3 Revision 3 of QT4 Xplained Pro is the initial released version; there are no known issues. Please read the user guide for the supported kits or the datasheet of the devices for any known issues regarding the peripheral touch controller. ATAN0114 [APPLICATION NOTE] 9386A–AUTO–04/15 9 6. Important Notice and Disclaimer for the Atmel Evaluation Board/Kit This evaluation board/kit is intended for user's internal development and evaluation purposes only. It is not a finished product and may not comply with technical or legal requirements that are applicable to finished products, including, without limitation, directives or regulations relating to electromagnetic compatibility, recycling (WEE), FCC, CE or UL. Atmel is providing this evaluation board/kit “AS IS” without any warranties or indemnities. The user assumes all responsibility and liability for handling and use of the evaluation board/kit including, without limitation, the responsibility to take any and all appropriate precautions with regard to electrostatic discharge and other technical issues. User indemnifies Atmel from any claim arising from user's handling or use of this evaluation board/kit. Except for the limited purpose of internal development and evaluation as specified above, no license, express or implied, by estoppel or otherwise, to any Atmel intellectual property right is granted hereunder. ATMEL SHALL NOT BE LIABLE FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES RELATING TO USE OF THIS EVALUATION BOARD/KIT. ATMEL CORPORATION 1600 Technology Drive San Jose, CA 95110 USA 10 ATAN0114 [APPLICATION NOTE] 9386A–AUTO–04/15 XXXXXX Atmel Corporation 1600 Technology Drive, San Jose, CA 95110 USA T: (+1)(408) 441.0311 F: (+1)(408) 436.4200 | www.atmel.com © 2015 Atmel Corporation. / Rev.: 9386A–AUTO–04/15 Atmel®, Atmel logo and combinations thereof, Enabling Unlimited Possibilities®, QTouch®, AVR®, and others are registered trademarks or trademarks of Atmel Corporation in U.S. and other countries. ARM® is a registered trademark of ARM Ltd. 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. SAFETY-CRITICAL, MILITARY, AND AUTOMOTIVE APPLICATIONS DISCLAIMER: Atmel products are not designed for and will not be used in connection with any applications where the failure of such products would reasonably be expected to result in significant personal injury or death (“Safety-Critical Applications”) without an Atmel officer's specific written consent. Safety-Critical Applications include, without limitation, life support devices and systems, equipment or systems for the operation of nuclear facilities and weapons systems. Atmel products are not designed nor intended for use in military or aerospace applications or environments unless specifically designated by Atmel as military-grade. Atmel products are not designed nor intended for use in automotive applications unless specifically designated by Atmel as automotive-grade.