You are on page 1of 71

Introduction to Microchip’s mTouch™

Capacitive Sensing
Class Objectives
When you complete this class, you will be
able to:
Explain the physical operation of capacitive
touch sensors
Use hardware design considerations to design
a robust touch sensing solution
Explain the fundamental operation of
projected capacitance touchscreen solutions
Implement the correct firmware for your
capacitive touch application

© 2011 Microchip Technology Incorporated. All Rights Reserved. Slide 2


Agenda
Brief Review of Human Interface Technology
Capacitive Touch Physics
Hardware Design Considerations for keys and sliders
Software Processing
Acquisition
Processing/Filtering
Decoding
Projected Capacitive Touchscreen Fundamentals
Development Tools
Summary

© 2011 Microchip Technology Incorporated. All Rights Reserved. Slide 3


Human Interface Technology
Typical Human Interface
System Features
Input features
Keypad, Switches, Buttons
Touch sensitive keys
Touch-screen

Output features
Segmented or Graphical LCD
LEDs
Buzzers, Speakers

Communication Protocols
USB, RF Wireless, IrDA, CAN, RS-232

© 2011 Microchip Technology Incorporated. All Rights Reserved. Slide 5


mTouch™ Solutions
Capacitive Touch Touchscreen Controllers
Keys, Sliders & Proximity Resistive and Capacitive

Integrated USB, LCD & Graphical Display options

© 2011 Microchip Technology Incorporated. All Rights Reserved. Slide 6


Why Use
Touch Sense Buttons?

Sleek, stylish user interface


Reliable alternative to switches
Requires no mechanical movement
Enables a completely sealed design
Designer flexibility
Lower cost solution
Lower power consumption

Aesthetics Interactivity Simplicity


© 2011 Microchip Technology Incorporated. All Rights Reserved. Slide 7
mTouch™ Solutions
Buttons, Keys & Sliders

 Industry’s lowest power touch solution

 High robustness to noise & low emissions

 Works through most surfaces – glass,


plastic, metal etc.

 Industry’s broadest portfolio

© 2011 Microchip Technology Incorporated. All Rights Reserved. Slide 8


Capacitive Touch
How does it work?
Touch Sensor Construction

A
Protective overlay
Copper pad

d
Cs
Printed Circuit
Board (FR4 PCB)

Cs = Sensor Base Capacitance


© 2011 Microchip Technology Incorporated. All Rights Reserved. Slide 10
Capacitance

A
ε 0εr A
C= d

d
ε0Permittivity of Free Space (8.854 Pico-Farad/meter)
εr Relative Dielectric Constant (unit-less)

A Area of Plates (meters)

C Capacitance (Farads)

d Distance between©plates (meters)


2011 Microchip Technology Incorporated. All Rights Reserved. Slide 11
Quick Physics Review

Plate 1 = Sensor pad


Plate 2 = Finger/conductive or ionizable
substance

A CF
d

© 2011 Microchip Technology Incorporated. All Rights Reserved. Slide 12


Quick Physics Review

Plate 1 = Sensor pad


Plate 2 = Finger/conductive or ionizable
substance

A CF
d

Cs
© 2011 Microchip Technology Incorporated. All Rights Reserved. Slide 13
How Does it Work?
Introduction of finger produces a parallel
capacitance

CF

Cs
© 2011 Microchip Technology Incorporated. All Rights Reserved. Slide 14
Equivalent Circuit

Cs

Sensor Capacitance = Cs

Cs CF

Sensor Capacitance (CT) = CS + CF

© 2011 Microchip Technology Incorporated. All Rights Reserved. Slide 15


Capacitance

Parasitic and Δ Touch


Dependent on sensor and system

Item Capacitance

Electrode Parasitic 100 pF


Strong Electrode Touch 0.5 to 1.0 pF
Weak Electrode Touch 0.05 pF
© 2011 Microchip Technology Incorporated. All Rights Reserved. Slide 16
Capacitive Touch
System Design Considerations
System Level
Factors to Consider
Environment
Heat, humidity
Indoor or Outdoor
Other sources of touch
Ketchup, water, dirt, etc…
Electrical Noise
Mechanics
Overlay material
Sensor size and spacing
Sensor proximity to metal
© 2011 Microchip Technology Incorporated. All Rights Reserved. Slide 18
Noise
Capacitive Touch Noise Behavior

Conducted Noise
Industry Standard :: IEC 61000-4-6
Radiated Noise
Industry Standard :: IEC 61000-4-3

Cover

PCB

© 2011 Microchip Technology Incorporated. All Rights Reserved. Slide 19


Noise
Capacitive Touch Testing

Test for ALL failure modes


Look for system level functionality
Capacitive Touch failure mechanisms
False Activation (aka False Trigger)
Sensor press is registered with no finger present
No Activation (aka Dead Sensor)
Sensor press is not registered when sensor is touched

© 2011 Microchip Technology Incorporated. All Rights Reserved. Slide 20


Noise
Capacitive Touch Noise Behavior

Conducted Noise
Industry Standard :: IEC 61000-4-6

150 kHz – 80 MHz Test Level


1 kHz, 80%
Amplitude Modulation Signal

Level 1 :: 1 Vrms :: Low Radiation Environments


Level 2 :: 3 Vrms :: Commercial Environments
Level 3 :: 10 Vrms :: Industrial Environments
Level X:: (Open) :: Custom

© 2011 Microchip Technology Incorporated. All Rights Reserved. Slide 21


Microchip Sensing Methods
Electronics
 Proper sensor design
 Clean board layout
 PIC Microcontroller with an Analog to Digital Converter (ADC)

PIC® Microcontroller

PIC

© 2011 Microchip Technology Incorporated. All Rights Reserved. Slide 24


Sensor Capacitance

Changes as CS is modified – environment


Changes as finger touches – user

CS + CF = CTOT
Watch for a change in CTOT

Sensor

© 2011 Microchip Technology Incorporated. All Rights Reserved. Slide 25


Signal Acquisition
Electronics
Voltage Based Measurement
Sensor is charged and discharged by PIC
Voltage is monitored using the integrated ADC
One ADC channel consumed per sensor
Sensor press shown by decrease in VADC

PRESS
VADC

TIME
SENSOR

© 2011 Microchip Technology Incorporated. All Rights Reserved. Slide 26


Signal Acquisition
CVD
Capacitive Voltage Divider
Algorithm that can be implemented in most PICs
Form a voltage divider between sensor and internal
ADC hold capacitor
Read voltage in ADC Results Register

CHOLD * VREF
VAVG = PRESS

VADC
(CHOLD + CSENSOR + CFINGER)

TIME
SENSOR

© 2011 Microchip Technology Incorporated. All Rights Reserved. Slide 29


Signal Acquisition
CTMU
Charge Time Measurement Unit (CTMU)
Available on many PIC24F and PIC18F devices
Charge sensor with constant current over known time
period
Read voltage in ADC Results Register

I = C · V
__
t PRESS

VADC
TIME
SENSOR

© 2011 Microchip Technology Incorporated. All Rights Reserved. Slide 30


Capacitive Touch
Key / Slider Design Considerations
Capacitance

A
ε 0εr A
C= d

d
ε0Permittivity of Free Space (8.854 Pico-Farad/meter)
εr Relative Dielectric Constant (unit-less)

A Area of Plates (meters)

C Capacitance (Farads)

d Distance between©plates (meters)


2011 Microchip Technology Incorporated. All Rights Reserved. Slide 32
Capacitive Touch Sense

User’s touch changes a parameter


in capacitive equation
ON OFF Change in parameter causes a
shift in capacitance
VOL + VOL - Software interprets that shift as a
press or a release
Capacitance Shift

PRESS RELEASE

Time
© 2011 Microchip Technology Incorporated. All Rights Reserved. Slide 33
Sensor Design - Area

Capacitive Sensors can be very simple

As a general rule, consider making the


sensor simply square and the size of a
fingertip

Too Small Good Excessively Large

© 2011 Microchip Technology Incorporated. All Rights Reserved. Slide 34


Sensor Design - Area

Finger-sized sensors are not always best!


Proximity

Fine sensors (require thin covering)

© 2011 Microchip Technology Incorporated. All Rights Reserved. Slide 35


Sensor Design
Spacing

Cross talk between sensors


Sensors too close
Magnified by cover thickness

68º
1
2.7 Cover Thickness
2.5
Sensor Separation

© 2011 Microchip Technology Incorporated. All Rights Reserved. Slide 36


Covering Materials
(Distance)
Complete product does not stop at sensor

Includes enclosure

Often covering material is plastic

Metal covering for wet environments

© 2011 Microchip Technology Incorporated. All Rights Reserved. Slide 37


The Dielectric Constant - εr
PCB Material
FR-4
CEM1 - 3
4.20 to 4.70
3.8 to 4.5 ε 0εr A
Glass C=
Iron-sealing glass 8.38 to 8.30 d
Soda-borosilicate 4.97 to 4.84
Fused quartz 3.78
Plastic
Acetate 3.48 to 3.30
Epoxy resin 3.67 to 3.52
Polycarbonate 3.02 to 2.96
Polyethylene 2.26
Other
Liquid water 78.20
Ketchup / Mustard 24.0
Ice 4.15
Snow 1.55

© 2011 Microchip Technology Incorporated. All Rights Reserved. Slide 38


Materials Chart
% Change to Finger, 0.5x0.5" pad - Differing Materials at Distance

14.0%

eA
12.0%
C
y = 0.1615x -0.9834
Percent Change (%)

10.0%
d
8.0%

6.0%

4.0%

2.0%

0.0%
0.0 2.0 4.0 6.0 8.0 10.0 12.0 14.0
d (mm)

Acrylic Polycarbonate ABS Glass

© 2011 Microchip Technology Incorporated. All Rights Reserved. Slide 39


“Traditional” Cap Touch Design

ε 0εr A
C=
d

PCB

Sensor Pad
© 2011 Microchip Technology Incorporated. All Rights Reserved. Slide 40
“Metal Over Cap” Principle

Capacitor
Front Panel

d d

Printed Circuit Board *

ε0εr A Microcontroller detects


C =
d the increase in capacitance

* Drawings not to scale


© 2011 Microchip Technology Incorporated. All Rights Reserved. Slide 41
mTouch™ Technology
Framework and mTouch Library
Software Starting Points
mTouch™ Technology
Framework & Library
Includes code to:
Customize Configuration
Scan
Decode
Filter

Greatly speeds up development Time!

mTouch CTMU Library


Included in Microchip Applications Library

mTouch CVD Framework


Added to Microchip Applications Library in June 2011
© 2011 Microchip Technology Incorporated. All Rights Reserved. Slide 43
3 Parts of Software
Acquisition – This deals with the hardware
reading the sensors

Processing – This software is used to


improve the performance of the raw data
collected from acquisition

Decoding – This is used as the software


interface to the rest of the application
software
© 2011 Microchip Technology Incorporated. All Rights Reserved. Slide 44
mTouch™ Technology
CVD Framework & CTMU Library
Sensor Acquisition
Scans the all sensors
Performs acquisition filtering
Reports ADC values (called “raw data”) to the
processing and decode modules

ΔV ΔV

t t
© 2011 Microchip Technology Incorporated. All Rights Reserved. Slide 45
mTouch™ Technology Libraries
Signal Processing:
Performs baseline normalization to track the environment when
the sensor is not touched
Transmits raw data via serial media to aid development and
debug efforts

Averaging
Measured Raw Value

Averaging

average

© 2011 Microchip Technology Incorporated. All Rights Reserved. Slide 46


mTouch™ Technology Libraries
Sensor Decoding:
Compares raw data to baseline to determine press or release
Threshold generally %shift from the average
Debounces the sensor (press and/or release) to improve robust
behavior
Returns a ‘0’ or ‘1’ to the application to indicate press or release
Measured Raw Value

average

Press
Release

© 2011 Microchip Technology Incorporated. All Rights Reserved. Slide 47


mTouch™ Technology
Framework/Library for PIC® MCUs
Two Microchip mTouch Software
Resources:

CVD Framework (PIC16F)


can be found at:
www.microchip.com/mtouch

CTMU Library (PIC18F/24F)


can be downloaded at:
www.microchip.com/mla

© 2011 Microchip Technology Incorporated. All Rights Reserved. Slide 49


mTouch™ Technology
Which PIC for keys?
Capacitive Touch MCU Portfolio
Overview
32-512 KB Flash
GP, USB, Ethernet, CAN
PIC32
Over 150 Up to 16 Cap Touch Ch.
64 – 121 pins
80 MHz
MCUs
System Integration

12 – 256 KB Flash
GP & CAN
PIC24H
18 – 100 pins
Up to 32 Cap Touch Ch.
40 MIPS

4 – 256 KB Flash
GP, USB & Graphics
PIC24F
14 – 100 pins
Up to 24 Cap Touch Ch.
16 MIPS

16 – 128 KB Flash
GP, USB & LCD
PIC18
18 – 80 pins
Up to 24 Cap Touch Ch.
12-16 MIPS

7 – 20 KB Flash
GP & LCD
PIC16
14 - 44 pins
Up to 32 Cap Touch Ch.
8 MIPS

General
Purpose
PIC10/12 0.75 - 2 KB Flash
6 – 8 pins
Coming soon
Up to 4 Cap Touch Ch.
(GP) 8 MHz Available now

© 2011 Microchip Technology Incorporated. All Rights Reserved. Slide 51


PIC MCU dedicated for Capacitive Touch
function
32-512 KB Flash
PIC32 64– 121 pins
≤ 16 Cap Touch Ch. 80 MHz

12 – 256 KB Flash
PIC24H 18 – 100 pins
≤ 32 Cap Touch Ch. 40 MIPS
Communicate to main processor:
System Integration

4 – 256 KB Flash
PIC24F 14 – 100 pins  I2C
≤ 24 Cap Touch Ch. 16 MIPS
 UART
PIC18 16 – 128 KB Flash  SPI
18 – 80 pins
≤ 24 Cap Touch Ch.
12-16 MIPS

PIC16 7 – 20 KB Flash
PIC®
mTouch Software
Up to 32 Cap Touch Ch. 14 - 44 pins
8 MIPS
MCU
Cap Touch Peripheral
0.75 - 2 KB Flash
PIC10/12
6 – 8 pins
Up to 4 Cap Touch Ch.
8 MHz

Touch sensors
Performance
© 2011 Microchip Technology Incorporated. All Rights Reserved. Slide 52
PIC® MCU integrating other
functions with Cap Touch
PIC32 32 – 512 KB Flash
64 – 121 pins
Up to 16 Cap Touch Ch. 80 MHz TXRX

PIC24H 12– 256 KB Flash


System Integration

18 – 100 pins
Up to 32 Cap Touch Ch. 40 MIPS
Graphic USB 2.0
SPI
LCD Drive or OTG

PIC24F 4 – 256 KB Flash


14 – 100 pins
Up to 24 Cap Touch Ch. 16 MIPS Graphics USB RF
Library Library Stacks

PIC18 16 – 128 KB Flash


18 – 80 pins
Up to 24 Cap Touch Ch. 12-16 MIPS
mTouch IrDA
CAN 2.0B
7Library
– 20 KB FlashStack
7 – 20 KB Flash
PIC16 14 - 44 pins
14 - 44 pins
Cap Touch Segmented
≤ 32 Cap Touch Ch. 8 MIPS 8 MIPS PWM
Peripheral LCD Drive

PIC10/12 0.75 - 2 KB Flash


6 – 8 pins
Touch
≤ 4 Cap Touch Ch. sensors
8 MHz

PIC® MCU
Performance
© 2011 Microchip Technology Incorporated. All Rights Reserved. Slide 53
mTouch™ Technology
Projected Capacitance Touchscreen

Introduction
Sensor Concepts
A basic projected capacitive sensor is:
 Two dielectrically separated layers…
 Of conductive bars…
 Oriented orthogonally to each other…
 Behind a protective front panel

Sometimes referred to as a “matrix” because


intersecting row and column bars form a matrix
or grid
Touch acquisition same as keys and sliders

© 2011 Microchip Technology Incorporated. All Rights Reserved. Slide 55


Sensor Concepts

Sensor cross sectional view

Top Bars (X-axis) Front Panel


(ITO ~30 nm) (Glass ~ 1.0mm)

Adhesive
(OCA, 0.06 mm)
Back Panel
Bottom Bars (Y-axis) (Glass ~ 0.4mm)
(ITO ~30 nm)

© 2011 Microchip Technology Incorporated. All Rights Reserved. Slide 56


Projected Capacitive Sensor

© 2011 Microchip Technology Incorporated. All Rights Reserved. Slide 57


Projected Capacitance

Scan along each axis,


identify high cap. lines

Position determined by
intersection of high
capacitance lines

Multi-touch capable

Many channels to decode

© 2011 Microchip Technology Incorporated. All Rights Reserved. Slide 58


Projected Capacitance
Scanning Method
Scan one axis to determine which bar was
touched
Measuring self capacitance

Scan along touched bar to determine exact spot


where touch occurred
Measuring mutual capacitance

Measurement scans currently use CTMU (CVD in


development) methods
Similar to keys and sliders

© 2011 Microchip Technology Incorporated. All Rights Reserved. Slide 59


Self Capacitance
 “SELF” capacitance of a bar is the capacitive load it
presents to the measuring circuit, relative to circuit ground

 Self capacitance of any X or Y axis bar can be measured

 Provides knowledge of which X and Y bars are touched

 Does not correlate multiple X and Y touched bars into (X,Y)


touch locations
© 2011 Microchip Technology Incorporated. All Rights Reserved. Slide 60
Mutual Capacitance
 “MUTUAL” capacitance is the capacitive coupling
between two bars, one on each sensor layer

 Mutual capacitance can correlate touched X & Y bars


 Providing (X,Y) coordinates for multi-touch conditions

© 2011 Microchip Technology Incorporated. All Rights Reserved. Slide 61


mTouch™ Technology
Projected Capacitance Software
mTouch™ Technology
Projected Capacitance Software
Includes source code to:
Customize Configuration
Self and Mutual Scans
Touch Decode
Filter

GUI based utility used for adjusting key parameters

Source currently decodes 2 discrete touch points for


dual touch support

pCap v1.0 supports sensors with up to 32 channels

© 2011 Microchip Technology Incorporated. All Rights Reserved. Slide 63


mTouch™ Technology
Which PIC for pCap designs?
Projected Capacitive

Larger Screen
Charge Time Charge Time
Support
Measurement Unit Measurement Unit
New Silicon
PIC18F45K22 PIC24FJ64GB106
28 CTMU Channels 16 Cap Touch Channel Advanced Features
35 I/O Pins 52 I/O Pins Multi-Chip Solution
16 MIPS, XLP, uQFN Pkg USB
Performance

3”-5” screens up to 7” screen size .


. .
~20 x 15 Sensor Channels ~16 x 25 Channel Sensor
Reference Platform for CTMU & CVD

Capacitive Sensing
Module
PIC16F707
32 Cap Touch Channels
35 I/O Pins
Mid 2011
368 RAM/14K ROM/5 MIPS

<4” screen size Available now


~13 x 11 Sensor Channels
In development
Limited by RAM/ROM/Acquisition Speed

Screen Size & Higher Pin Count


© 2011 Microchip Technology Incorporated. All Rights Reserved. Slide 65
Intro to PCap Modules 2011
Offer Standard Modules for 3.5” – 12.1”

Sold via Touch Sensor & Disti Partners


Combine electronics, sensor and possibly standard size LCD’s
AMT will introduce 7” & 10.4” module at SID in May 2011
FUTURE/AVNET offer multiple touch screens & LCDs

Simplify selling & reduce design time/risk AMT 7”


Easy selection of matched components Module –
Reduced integration variables demos
available
now

Chip-on-Tail LCD Module


Board
© 2011 Microchip Technology Incorporated. All Rights Reserved. Slide 66
mTouch™ Technology
Development Tools
DM183026-2 Enhanced Cap Touch Eval Kit

© 2011 Microchip Technology Incorporated. All Rights Reserved. Slide 68


mTouch™ Projected
Capacitive Development Kit
 Part # DM160211 contains:
• PCap Board with fully functional firmware on
PIC16F707
• Sensor Board with 3.5” PCap 12 x 9 Touch
Screen
• Software GUI Development Tool
• Dev Kit available now at
www.microchip.com/mtouch

Specification Description
Touch-Screen Support 3.5”, independent, real time XY tracking for up to 2 touches

Channels 12 x 9, 108 nodes software expandable to 24 channels,144 nodes

Response Time Typical <15 ms

Report Rate Single Point 65 pps, Two Points 55 pps

Power Consumption Operating 1.5 mA at 5V, sleep 20 µA typical

Resolution 128 bar-to-bar, scaled to 1024 x 1024

© 2011 Microchip Technology Incorporated. All Rights Reserved. Slide 69


Summary
Summary
Physical properties of capacitive touch sensors

Microchip’s capacitive touch methods

Design considerations for keys and sliders

Fundamentals projected capacitance


touchscreen operation

Software used for capacitive touch applications

Available development tools

© 2011 Microchip Technology Incorporated. All Rights Reserved. Slide 71


Reference Materials
 www.microchip.com/mtouch
 Capacitive Sensors by Larry K. Baxter
ISBN 0-7803-5351-X
 AN1101, AN1102, AN1103, AN1104 – Covers Basic Cap
Touch
 AN1171 – Cap Touch using CSM Module
 AN1202 – Cap Touch on PIC10F206
 AN1250 – Cap Touch with CTMU
 AN1268 – Cap Touch with CSM & Period Measurement
 White Paper: mTouch Projected Capacitive Touch
Screen Sensing Theory of Operation
 Webinars:
www.microchip.com/webinars
© 2011 Microchip Technology Incorporated. All Rights Reserved. Slide 72
Questions?

© 2011 Microchip Technology Incorporated. All Rights Reserved. Slide 73


Thank You!
Trademarks
• The Microchip name and logo, the Microchip logo, dsPIC, KeeLoq, KeeLoq logo,
MPLAB, PIC, PICmicro, PICSTART, PIC 32 logo, rfPIC and UNI/O are registered
trademarks of Microchip Technology Incorporated in the U.S.A. and other countries.
• FilterLab, Hampshire, HI-TECH C, Linear Active Thermistor, MXDEV, MXLAB, SEEVAL
and The Embedded Control Solutions Company are registered trademarks of
Microchip Technology Incorporated in the U.S.A.
• Analog-for-the-Digital Age, Application Maestro, CodeGuard, dsPICDEM,
dsPICDEM.net, dsPICworks, dsSPEAK, ECAN, ECONOMONITOR, FanSense, HI-TIDE,
In‑Circuit Serial Programming, ICSP, Mindi, MiWi, MPASM, MPLAB Certified logo,
MPLIB, MPLINK, mTouch, Octopus, Omniscient Code Generation, PICC,
PICC-18, PICDEM, PICDEM.net, PICkit, PICtail, REAL ICE, rfLAB, Select Mode,
Total Endurance, TSHARC, UniWinDriver, WiperLock and ZENA are trademarks of
Microchip Technology Incorporated in the U.S.A. and other countries.
• SQTP is a service mark of Microchip Technology Incorporated in the U.S.A.
• All other trademarks mentioned herein are property of their respective companies.
• © 2010, Microchip Technology Incorporated, All Rights Reserved.

© 2011 Microchip Technology Incorporated. All Rights Reserved. Slide 75

You might also like