Wcapacitive-touch controls for

Similar documents
Hello, and welcome to this presentation of the STM32 Touch Sensing Controller (TSC) which enables the designer to simply add touch sensing

Capacitive mtouch Sensing Solutions

Incorporating a Capacitive Touch Interface into Your Design

AS Channels Capacitive Touch Sensor IC From Santa Clara, United States of America

Using an Analog Devices AD774X Capacitance-to-Digital Converter for Differential Button Sensor Operation

Capacitive Touch Remote Control Reference Design User s Guide

APPLICATION NOTE 655 Supervisor ICs Monitor Battery-Powered Equipment

CY3280-BBM Universal CapSense TM Prototyping Module Kit Quick Start

A variety of ECONseries modules provide economical yet flexible solutions. Waveform Generation

AZC002-02N Low Capacitance ESD Protection Array For High Speed Data Interfaces Features IEC (ESD) ±15kV (air), ±8kV (contact)

AZC002-04S Low Capacitance ESD Protection Array For High Speed Data Interfaces Features IEC (ESD) ±15kV (air), ±8kV (contact)

DS1238A MicroManager PIN ASSIGNMENT PIN DESCRIPTION V BAT V CCO V CC

Basic Sample and Hold Element. Prof. Paul Hasler Georgia Institute of Technology

IEC (EFT) 40A

INTELLIGENT LOAD SWITCHING HELPS IMPLEMENT RELIABLE HOT SWAP SYSTEMS

Figure 1 Typical Application Circuit

Digital IO PAD Overview and Calibration Scheme

E3B USER'S GUIDE. for QT310 / QT320 QProx IC evaluation and development Overview. Fast Start

Capacitive Touch Based User Interfaces and Hardware-based Solutions

AZC099-04S 4 IEC (ESD)

TTP229-BSF TonTouch TM

AOZ8900. Ultra-Low Capacitance TVS Diode Array PRELIMINARY. Features. General Description. Applications. Typical Application

This Part-B course discusses design techniques that are used to reduce noise problems in large-scale integration (LSI) devices.

± 2g Tri-Axis Accelerometer Specifications

LED1 LED2. Capacitive Touch Sense Controller LED3 LED4

HL2430/2432/2434/2436

TTP229-LSF TonTouch TM

This Part-A course discusses techniques that are used to reduce noise problems in the design of large scale integration (LSI) devices.

MICROCONTROLLER AND PLC LAB-436 SEMESTER-5

KCX series. Electronic. Counters B-32

Chapter 2 On-Chip Protection Solution for Radio Frequency Integrated Circuits in Standard CMOS Process

Electromagnetic Compatibility ( EMC )

Lecture 20: Package, Power, and I/O

2 AA Cell to 3.3V USB On-The-Go Devices White LED Drivers Handheld Devices. The HM3200B is available in the 6-pin SOT23-6.

HX4002 HX1001. White LED Backlighting Li-Ion Battery Backup Supplies Local 3V to 5V Conversion Smart Card Readers PCMCIA Local 5V Supplies

Octagon Systems Corporation, the Octagon logo, the Micro PC log and Micro PC are trademarks of Octagon Systems Corporation.

Low Voltage, 10-Bit Digital Temperature Sensor in 8-Lead MSOP AD7314

PC-CARD-DAS16/12 Specifications

Isolated Current Output 5B39 FEATURES APPLICATIONS PRODUCT OVERVIEW

USB 1608G Series USB Multifunction Devices

Hello, and welcome to this presentation of the STM32L4 power controller. The STM32L4 s power management functions and all power modes will also be

EMI/ESD Filters for Cellular Phones

S12VR Hardware Design. Guidelines. 1 Introduction. 2 Hardware Design. Guidelines. 2.1 Voltage regulator. Freescale Semiconductor

TTP224-ASD 4 KEY TOUCH PAD DETECTOR IC

L Q. E411. User Manual. The New Vision of Touch TM

PC-CARD-DAS16/16 Specifications

AOZ8101. Ultra-Low Capacitance TVS Diode Array. General Description. Features. Applications. Typical Application

Advanced NI-DAQmx Programming Techniques with LabVIEW

RT54SX T r / T f Experiment

Section 30. In-Circuit Serial Programming (ICSP )

Today: Multi-touch capacitive touch screens How do they work?

Solid-State Counter/Timer

From mtouch to 1D/2D/3D gesture Технология mtouch для Бесконтактных кнопок Емкостной клавиатуры Распознавания жестов

A0021. Overview. Features. Ordering Information. HSS Touch Signature IC 6 Input - I 2 C. Part Number Format: A X Y Z

CARDINAL COMPONENTS, INC.

MS BA Micro Barometric Module

2:1 MULTIPLEXER CHIP FOR PCI-EXPRESS ICS Description. Features. Block Diagram DATASHEET

TECHNICAL NOTE. VS1000: Evaluation Kit EVBA_2.0. Contents. EVBA_2.0 is a plug and play Evaluation Kit for Colibrys VS1000 accelerometers line.

SSD1322. Product Preview. 480 x 128, Dot Matrix High Power OLED/PLED Segment/Common Driver with Controller

A0061. Overview. Features. Ordering Information. HSS Touch Signature IC 15 Input - I 2 C. Part Number Format: A X Y Z

INPAQ Global RF/Component Solutions

Single Event Latchup Power Switch Cell Characterisation

SCA620-EF1V1B SINGLE AXIS ACCELEROMETER WITH ANALOG INTERFACE

2 keys Touch Pad Detector IC

AIC1520. Ferrite Bead GND. *33µF, 16V Tantalum, or 100µF, 10V Electrolytic Bold line indicate high-current traces. USB High-Side Power Switch

4. Hot Socketing & Power-On Reset

ILI2303. ILI2303 Capacitive Touch Sensor Controller. Specification

Surface Mount Micromachined Accelerometer

Operating Requirements

William Stallings Computer Organization and Architecture 8th Edition. Chapter 5 Internal Memory

TVW MSOP 04 AD0 Engineering Specification

WI-076 Issue 1 Page 1 of 7

PSEC-4: Review of Architecture, etc. Eric Oberla 27-oct-2012

CARDINAL COMPONENTS, INC.

Overvoltage Protection in Automotive Systems

Chapter 1 Introducing the OM-USB-1608FS-Plus... 6 Functional block diagram... 6

USB 1608G Series USB Multifunction Devices

Getting Started. 1.3 X-MWsystem Vocabulary. X-MWprobe X-MWanchor X-MWjumper. X-MWblock RF. X-MWblock Bias and Control. X-MWprotoplate X-MWwall X-MWlid

2:1 MULTIPLEXER CHIP FOR PCI-EXPRESS ICS Features

ESD Protection Circuits: Basics to nano-metric ASICs

4 keys Touch Pad Detector IC

Surface Mount Micromachined Accelerometer

DS1233A 3.3V EconoReset

VT-820 VT-820. Temperature Compensated Crystal Oscillator Previous Vectron Model VTM3. Description

DS1830/A Reset Sequence Pushbutton

APPLICATION NOTE. Atmel AVR3005: Low Power QTouch Design. Atmel QTouch. Features. Introduction

Preliminary 16 KEYS OR 8 KEYS TOUCH PAD DETECTOR IC

Overcome the Top 4 Challenges of Capacitive Sense Design

E401. User Manual. The New Vision of Touch

Addressable Bus Buffer Provides Capacitance Buffering, Live Insertion and Nested Addressing in 2-WireBus Systems

MP6500 Stepper Motor Driver, Digital Current Control

DS1821 Programmable Digital Thermostat and Thermometer

TS04. 4-Channel Self Calibration Capacitive Touch Sensor SPECIFICATION V2.0

Multiple Switch Detection Interface with Suppressed Wake-up

System Monitoring Oscillator with Watchdog and Power Fail

Section 28. WDT and SLEEP Mode

TS2043 Preliminary CMOS IC

Digital Thermometer and Thermostat

INPAQ. Specification TEA10402V15A0. Product Name. ESD Guard TM TEA Series (Thin Film Air Gap) Size EIA Global RF/Component Solutions

Sample. Pearson BTEC Levels 4 Higher Nationals in Engineering (RQF) Unit 15: Automation, Robotics and Programmable Logic Controllers (PLCs)

Transcription:

Adding a Capacitive-Touch User Interface With Resources Already Present In Your System JONATHAN DILLON, MICROCHIP TECHNOLOGY INC. For many systems, the building blocks for implementing capacitive sensing, as either a proximity sensor or a button, are already present in the peripherals of a microcontroller, and these resources may currently be unused. This Article will discuss the methods for adding a capacitive-touch user interface with resources already present in your system: ith your embedded system already containing a microcontroller, you may be able to replace buttons and proximity sensors with Wcapacitive-touch controls for minimal expense, or even cost savings. Capacitive-touch user interfaces have become popular for modern applications because of their aesthetically pleasing, sleek controls; the fact that they do not have moving parts, allows the system to be sealed from the elements; and because they enable high tech control panels. However, the implementation of capacitive-touch user interfaces has been regarded as a mysterious art. For many systems, the building blocks for implementing capacitive sensing, as either a proximity sensor or a button, are already present in the peripherals of a microcontroller, and these resources may currently be unused. This Article will discuss the following methods for adding a capacitive-touch user interface with resources already present in your system: 1. Capacitive sensing using just the MCU s internal Analog-to-Digital Converter () 2. Measuring capacitance using an internal precision current source and the 3. Using the capacitive-sensing circuitry embedded into the I/O pins of a number of microcontrollers and onboard counter/timers. The Article will also explain the software handling required to overcome noise and other environmental issues, as well as methods for lowering power consumption when capacitive touch is used to turn systems on and off. Some of the design techniques required for implementing reliable capacitive touch sensing will also be covered. Introduction Capacitive-touch-sensing user interfaces have grown in popularity, due to the fact that they offer sleek, single-panel controls which, beyond their stylish design aspects, offer increased reliability and robustness. The lack of moving parts in capacitivetouch-sensing user interfaces prevents contact wear or corrosion and mechanical failure of push buttons, which improves product life. The ability to sense touch through materials allows panels to be sealed, protecting internal electronics from harsh environments and with greater durability than membrane technology. However, capacitive touch is not a purely binary signal, unlike a mechanical button; but instead, capacitive touch is an interpretation of an analog signal. As capacitive-touch technology does not require a direct electrical connection, but instead senses through material, it can also be used as a proximity sensor for user interfaces that react to users approaching the interface, rather than touching it. With many systems and user-interface control circuits already containing a microcontroller, implementing a capacitive user interface may lower system costs and component count. Buttons, sliders and dials can be replaced by capacitive sensors, which may be simple as conductive pads on the circuit board. These can essentially cost nothing while bringing far greater reliability. Capacitive touch functions when the user presses the surface of the panel, creating a capacitor to ground, where one plate is a conductive pad on the circuit board and the other is the user s finger. The conductive pad also has parasitic capacitance, as

Fig. 1. Sensor Capacitance do the circuit traces that connect it to the microcontroller. This parasitic capacitance can vary due to environmental changes, such as those associated with temperature and humidity. As these two capacitances are in parallel, as seen in Figure 1, we cannot simultaneously measure them. The capacitance created by a user s finger is dependant upon the area of the plate and finger, as well as the thickness and dielectric of the panel material, as given in Equation 1. C f = å å A 0 r d Equation 1: Capacitance of Parallel Plates C f is the capacitance created by the user s finger e0 is the permittivity of free space, 8.85 10-12 er is the dielectric constant of the material between the two plates A is the overlapping area of the two plates d is the separation between the two plates The larger the capacitance created, the easier it is to detect a touch or sense proximity. From Equation 1, we can discern that the key factors in the capacitance created are the material selected for the user-interface panel and its thickness. The material choice determines the dielectric, and the thickness determines the separation between the user s finger and the conductive pad. Enlarging the area of the conductive pad on the board is only effective up to the area of the user s finger, since it is the overlapping area that is important. However, for proximity sensing, the conductive pad may be sized to couple with a user s hand, and the increased area improves the sensing range. For mechanical reasons, such as bracing ribs on the interface panel, it may not be possible to adjacently mount the circuit board. This can be overcome by mounting a spring on the circuit board instead of a conductive pad. The spring should press tightly against the button area on the interface panel, bridging the gap between it and the circuit board. The user s finger then couples to the spring through the panel. This method minimizes the capacitive-plate separation and avoids an airgap, which can significantly diminish responsiveness. A capacitive-touch interface continually measures the capacitance of the conductive pad and tracks the gradual environmental changes in parasitic capacitance, thus keeping an internal estimate for use in determining when a touch has occurred, which induces a frequency change in capacitance. Measurement Methods Methods suitable for a microcontroller to measure the capacitance of the conductive pad are: Capacitive Voltage Divider Charge Time Measurement Capacitive Sensing Module All three methods require no external components; however they do place some requirements on the microcontroller to measure and interpret the capacitance. Capacitive Voltage Divider This method requires a microcontroller with an internal Analog-to-Digital Converter (), which is already a common requirement for many systems, and no other features of the microcontroller. This method uses the internal holding capacitor of the with the capacitance of the conductive sensing pad on the circuit board to create a voltage, which is dependant upon the capacitance of the sensor. This voltage is then measured using the and handled by software. In normal operation, when performing an analogto-digital conversion, the analog mux in Figure 2-1 is used to select and measure the voltage on the pin of the microcontroller, referred to as the selected channel. The holding capacitor is allowed to charge to the voltage on the pin the acquisition I/O or Analog inputs Analog mux Sampling switch VCHOLD CHOLD - Holding capacitor Fig. 2-1. Analog Channel and Circuitry in a

time, and then the sampling switch is opened and the creates a digital representation of the voltage across the holding capacitor. The pins of the microcontroller can also be configured as digital I/O while they are selected by the analog mux, which allows us to charge and discharge the holding capacitor to the power rails. This measurement method requires a number of steps. The timing of some steps can be critical, as capacitors exhibit leakage and delay will cause readings to drift. i) To initialize the system for a measurement, we need to appropriately charge and discharge the capacitors in our system. By using the analog mux to select an unused pin and configure it as an output driven high, we can charge the internal holding capacitor. Meanwhile, we need to ensure that the sensor is uncharged. Thus, we configure the connected pin as an output driven low, which grounds the sensor. The states of the analog mux and outputs can be seen in Figure 2-2. ii) Once the sensor capacitance has been discharged and the holding cap has charged to the positive supply voltage, the output drive on the pin VCHOLD CHOLD - Fig. 2-2: CVD Measurement Initialization State connected to the sensor is disabled, as shown in Figure 2-3. At this time, the line to the capacitor is floating, and the capacitor may acquire some charge through pin or board leakage. As a result, this stage needs to be kept as short as possible. iii) The pin connected to the sensor is selected using the analog mux, which places the holding capacitor in parallel to the sensor. The holding capacitor was charged to VDD, while the sensor is CHOLD Fig. 2-3: Sensor no longer discharged - VCHOLD completely discharged. As a result, current flows from the holding capacitor to the capacitive sensor. The analog mux allows for bi-directional current flow, though its impedance does cause some losses. iv) After allowing sufficient time for the system to stabilize, an analog-to-digital conversion is initiated that opens the sampling switch, as seen in CHOLD - VCHOLD Fig. 2-4: Sensor Capacitance and Holding Capacitor in Parallel Figure 2-1. The voltage across the holding capacitor is then measured. This stabilization time is very short, and a conversion can usually be started on the following instruction. The voltage across the holding capacitor is dependant upon the capacitance of the sensor, which is the sum of its parasitic capacitance and of the user s finger, if present. This leads to the below relationship, with the voltage measured by the. C Equation 2-1: hold V Chold = X V C hold C p C dd Voltage across f Holding Capacitor VChold is the voltage measured by the is the supply voltage to the microcontroller Chold is the capacitance of the holding capacitor, which is 10pF for the device tested Cp is the parasitic capacitance of the sensor Cf is the capacitance created by a finger press From the equation, we can see that the additional capacitance of a finger press will cause a reduced voltage on the holding capacitor. This translates as a lower result from the. The resolution of the readings is governed by the s resolution. For this reason, a 10-bit is recommended. A lower-resolution can be used, but it will require a greater change in capacitance, which typically requires less plate separation and a thinner interface panel. To increase the resolution, conversions can be performed using a lower reference than the power rails, since the voltage measured is typically much

Untouched Touched Sampled Fig. 2-5: Voltage across the Sensor lower. This reference change will increase the voltage resolved per bit, but care needs to be taken to avoid saturation. Saturation is when the voltage being converted exceeds the reference voltage, and the can only respond with its maximum output code. As capacitive measurements are very fast, typically 10-20 µs, the sensor can be oversampled to improve resolution. The prior text discussed charging the holding capacitor with an unused pin. However, if multiple capacitive-touch sensors are to be measured, the pin used for another sensor may temporarily be employed for charging the holding capacitor. The sensor for that input is not currently being measured and thus can be driven high, as the capacitances involved are small, and so is the output impedance of a digital output. Any internal references to the may also be used to charge the holding capacitor. Charge Time Measurement Some microcontrollers incorporate a constant current source that can be used to charge the sensor s capacitance for a fixed period and then measure the voltage developed, as shown in Figure 2-6. The additional capacitance of a user s finger coupling to the sensor will reduce the voltage being measured by the. V is the voltage measured by the i is the current from the constant-current source tcharge is the fixed time period that the sensor is charged Chold is the capacitance of the holding capacitor, which is 10pF for the device tested Begin Charge Sample Fig. 2-6: Charge Time Measurement Unit (CTMU) Voltage across Sensor V = Cp is the parasitic capacitance of the sensor Cf is the capacitance created by a finger press This implementation uses the analog channelselect mux of the, as shown in figure 2-7, to select different pins of the microcontroller. This allows it to scan multiple sensors, and the holding capacitor is charged in parallel to the sensor capacitance to avoid creating a capacitive voltage divider. Before the current source can be enabled, the capacitor s charge needs to be a known value. Thus, it is grounded through an internal gate in the microcontroller to ensure it is completely discharged. The current can be adjusted in software to give a fast charging time, thus allowing rapid measurements for the scanning of multiple sensors. The constant-current source is implemented on a number of Microchip higher pin count microcontroller, which have many analog channels allowing many capacitive sensors to be implemented. Sensor 0 Sensor 15 i x t E q u a t i o n 2-2 : charge Voltage Developed C hold C p C f across Sensor AN0 AN15 Current Source CTMU Fig. 2-7: Circuitry and Current Source A/D Conversion Trigger Capacitive Sensing Module Several newer general-purpose microcontrollers include a capacitive-sensing module that incorporates specific circuitry for capacitive sensing. It includes a large analog mux, which allows multiple capacitive sensors to be scanned for multi-button interfaces and uses a pair of internal counter timers, in addition to the CSM module. The module uses internal constant-current sources, and sinks to alternatively charge and discharge the sensor capacitance based off a lower and upper trip point, causing the waveform seen in Figure 2-9. The switching between the current source and sink is handled automatically by the module, and the

charge/discharge period is dependant on the sensor capacitance, where an increase in the capacitance will increase this time. To measure the frequency of the waveform, it is used to provide a clock signal for a digital logic counter/timer. By clearing and enabling the counter for a specific time window and reading its Sensor 0 Fig. 2-8: CSM Connections and Resources ending value, we know how many oscillations occurred in that time period. An increase in capacitance, such as from a press, lowers the oscillation frequency leading to less counts being recorded, as seen in Figure 2-10. The time window period can be controlled by another counter, which can also disable the oscillation count automatically to allow the processor to handle other tasks. The time window can also be provided using the V 2 V 1 CPS0 CPS15 Fig. 2-9: CSM Sensor Waveform Cap Sense Module (Oscillator) Frequency Capture TMR1 TMR0 TMR2 oscillator from the Watchdog supervisor timer, WDT, which is extremely low power. The microcontroller can be in a low-power sleep mode while the CSM is still running and incrementing the counter/timer. The WDT will periodically wake the microcontroller, where the oscillation can be read and handled by the software. To handle the changing parasitic capacitance of the circuit, we need to keep a baseline value for the current parasitic capacitance, which is typically handled using a moving average filter acting on the results of prior measurements of the sensor. Due to the limited memory available, it is common to employ an IIR-based moving average, to avoid t having to store multiple previous samples. To determine whether there has been a press, the result of the last measurement of the sensor s capacitance is tested against the baseline. If the variation is greater than a design threshold, then a touch is determined to have occurred and should be handled by the software. Instead of using the c a p a c i t a n c e m e a s u r e m e n t directly, a filtered o r a v e r a g e d m e a s u r e m e n t First Time Window Second Time Window time Fig. 2-10: Clock Signal to the Internal Counter/Timer About Author may be used i n s t e a d, depending upon the application. The Capacitive Sensing Module can be used for proximity sensing as well as touch, since they are effectively the same operation; but the separation of the two plates is much greater. By increasing the size of the measurement time window, smaller variations in capacitance can be seen and transient noise is also averaged out over the time window. However, this is only effective up to a point, as it can make the interface slow to respond due to the time lag. For proximity sensing, the resolution can be increased by using the counter timers to measure the period for a number of oscillations of the waveform. This configuration has increased resolution, which compensates for the increased plate separation. Discussion Capacitive sensing offers many advantages, and new practices in user interaction and styling. The lack of moving parts increases system reliability and the ability to seal the user interface from its operating environment. If a microcontroller is already used in the application, then additional switch gear can be replaced with a capacitive interface at effectively no cost, since it only requires a conductive sensor pad. However, capacitive touch sensing can place other requirements on the system namely, the mechanical mounting and material dielectric to ensure acceptable levels of capacitive coupling. Jonathan Dillon, Applications Engineer Security, Technology Development Division, Microchip technology Inc.