Increasingly, I am being asked how to go about designing a touch application using Atmel's QTouch technology. I’ve also had a lot of people ask if it’s possible to develop such an application on a Nanoboard 3000. Well it certainly is, and I thought I would take a moment and map out the overall aspects and options of implementing an Atmel QTouch design, including development on a NanoBoard.
With Altium Designer 10, we introduced support for the automatic creation of Atmel QTouch sensor technology. This lets you easily, and literally within seconds, generate the complex PCB layout geometries required to implement the Buttons, Sliders, and Wheels of a QTouch touch panel PCB.
Simply place a configurable sensor symbol from the Atmel QTouch.IntLib and tailor the dimension settings to your design requirements. Furthermore, these shapes can be easily updated by simply changing dimensions or sensor type settings in either the Schematic or PCB, and then synchronizing the project in either direction. If you’ve ever had to manually create wheel and slider sensors, and then had to modify them to suit a change to the product spec, you’re going to find this magical!
Figure 1. Atmel QTouch wheel and slider sensor geometries
Firstly, you need to decide which type of acquisition technology you want to use as Atmel offers both a QTouch and a QMatrix touch technology. QTouch is a capacitive touch acquisition method best suited for general use and a small number of sensors (i.e. from one to 10 sensors). QMatrix is a scanned passive matrix acquisition method which is better suited for a larger number of sensors (i.e. greater than 10), consumes less power, and has better moisture tolerance. Your acquisition method decision will generally be based on the number of sensors needed, power budget, and intended environmental conditions of the product.
Next, you need to decide which type of controller device to use. Atmel offers a large number of options that are either fixed-function devices, or standard Atmel microcontroller devices. Atmel's fixed-function devices are dedicated purpose QTouch or QMatrix controllers that work in conjunction with any host processor to sense and capture touch information from the sensor layout. Atmel microcontroller devices are standard 8-bit or 32-bit MCUs from the AVR/AVR 32 and ARM7/ARM9 families - QTouch specific API routines enable touch functionality at the software application level to sense, capture, and process touch information. Your touch controller decision will generally be based on the number and type of sensors required as well as processor preference.
For developing a TSK3000A-based embedded system touch application on the NanoBoard 3000, Atmel's fixed-function devices work nicely and generally simplify the design and implementation. Fixed-function devices are supported in Altium's Atmel Touch Solutions.IntLib integrated library. Atmel AVRs and ARM devices can be found in Altium's wide range of Atmel Microcontroller 8-bit and 32-bit integrated libraries. Details regarding QTouch/QMatrix acquisition method can be found at the following Atmel website locations:
For mechanical considerations (and physical implementation flexibility), the touch controller and the touch sensors can be placed together on a single PCB, or separately on two PCBs and connecting the sensor layout to the controller via ribbon cable or flex connection. The QTouch or QMatrix sensors can be placed on the top layer of the PCB and covered with a panel material such as (but not limited to) Plexiglas, glass, or nylon. The sensors can even be placed on the bottom layer of the PCB, detecting touch through the PCB material itself. Touch sensitivity in all cases will depend on the external covering material's and/or PCB's thickness and dielectric properties. Touch panel thicknesses exceeding 10 mm are not uncommon.
The resistors and especially the capacitors associated with either the QTouch or QMatrix sensor circuits must be placed as close as possible to the physical controller device and on the same PCB. As each design is unique, the initial R and C values of the sensor circuits are based on typical values (as recommended in the device data sheets or QTouch design guidelines) and may need to be modified during the design process to fine tune the sensitivity of specific sensors as needed. A helpful design guideline for fixed-function devices can be found at:
If using a standard AVR or ARM device as the actual touch controller, your touch application SW development will require Atmel's royalty-free pre-compiled QTouch Library and either the IAR or GCC compiler. Configuration of the sensors, capturing and processing of touch information are all accomplished through use of the QTouch Library API routines in the application code.
For fixed-function devices, any type of host processor can be used and any software compiler can be used to develop the application code. Because the QTouch/QMatrix acquisition functionality is implemented within the fixed-function device, there is no requirement for the QTouch Library API routines. Sensor configuration and touch information capture are accomplished by read/write transactions through either a SPI or I2C interface between the host and the controller device. For internal register descriptions, interface, and transaction details, refer to the specific Atmel Fixed-Function device data sheet.
Additionally, the Atmel QTouch Studio (free to download from Atmel) can be used to analyze and view the characteristics and performance of a prototype PCB, enabling R/C value, panel thickness, and sensor layout modifications to be quantitatively analyzed and viewed at run time. QTouch Studio requires a USB connection from the host development PC to either an Atmel QT600 development board (or an AVRTS2080A or AVRTS2080B evaluation board) to serve as an interface for capturing the touch data in real-time from the controller device for analysis. Information regarding the QTouch Library, QTouch Studio and QTouch development boards can be found at:
Figure 2. My custom Atmel QTouch Peripheral Board for the NB3000
Recently I designed a custom QTouch peripheral board for the NB3000. The objective of the project was to gain firsthand knowledge regarding the QTouch related questions I am regularly asked. This board incorporates two Atmel AT42QT2100 fixed-function devices. The AT42QT2100 QTouch acquisition method device can support a total of seven buttons and either one wheel or one slider. Since I wanted support for both a wheel and a slider on the same board, I used two devices.
An FPGA project includes a TSK3000 core as the host processor communicating via SPI interface with the two AT42QT2100 devices to configure the sensors and to capture the touch data. The embedded C application code was developed within an Altium Designer Embedded project linked to the FPGA project. The QTouch sensors, which are all placed on the Bottom layer of the PCB, are working well in response to touch on the Top layer of the board. Ultimately, I plan to combine this general purpose touch panel with a multimedia application on the NB3000.
I uploaded a quick video demo of a prototype version of the board in action, which you can find at: http://www.youtube.com/watch?v=zDT1wOuRpCs&feature=related
About the AuthorMore Content by John Magyar