SlideShare une entreprise Scribd logo
1  sur  7
Télécharger pour lire hors ligne
Capacitive Sensing 101
By (Jon Peterson, Applications Engineer, Cypress Semiconductor Corp.)



Executive Summary
Capacitive Sensing as a human-device interface is becoming increasingly popular. Capacitive sensing can be recognized in
many popular consumer products such as laptop trackpads, MP3 players, computer monitors and cell phones, but it is
certainly not limited to these applications. More and more engineers choose capacitive sensing for its flexibility, unique
human-device interface and cost reduction over mechanical switches.

Designs are likely to experience many different environmental changes, marketing requirement changes and user abuse;
choosing a device that is flexible, programmable, and upgradeable is necessary. Without question, the most flexible,
programmable and upgradeable device on the market is the Cypress Semiconductor Programmable System on a Chip
(PSoC). PSoC is a mixed-signal array which includes analog and digital resources as well as an integrated microcontroller all
on the same chip! Choosing a fixed-function device, such as an ASIC, seems like a good idea at first, but overcoming its
problems requires spending more money on hardware. A mixed-signal array device allows resolution of most issues with a
firmware change. One major advantage of having a flash-based device is that its firmware can be updated after the device
has shipped by including a bootloader. Bootloaders are valuable are worth considering on a new design.



Understanding Electric Fields
In order to understand capacitive sensing, it is first important to understand some basics about electric fields (E-Fields). It is a
fundamental fact that E-Fields take the path of least resistance. Figure 1 shows a general form of E-Fields in a capacitive
sensing design.



                                         Figure 1. E-Fields and Parasitic Capacitance

                                                         Capacitive Sensor


                 Ground Plane                                                                         Ground Plane




                                                               E-Field Lines




E-Fields form from the greatest potential to the least potential. Figure 1 shows E-Field lines from the capacitive sensor to
ground. Measuring the capacitance at this point yields the parasitic capacitance. Parasitic capacitance is the capacitance of
the sensor, without a conductive object present. Figure 2 shows the effect of a conductive object in the same system.




Capacitive Sensing 101                                                                                                   Page 1 of 7

Published in Elektronik                                                                                                October 2006



                                                                                                                                       [+] Feedback
Figure 2. E-Fields with a finger present




                 Ground Plane                                Button                                   Ground Plane

                                                             E-Field Lines




The conductive object allows an increased number of E-Field lines to travel between the sensor and ground. This greater
concentration of E-Field lines results in a greater capacitance measured at the sensor. In human interface devices, the
conductive object is typically a human finger, hand, foot, etc.



Measuring a Fixed Capacitance
It is important to understand how to measure a fixed capacitance. One of the most fundamental capacitor equations is shown
in Equation 1. Differentiating both sides with respect to time, results in Equation 2. Since a static capacitance is being
             dC                                                              dq
measured,          equals zero and the equation simplifies to Equation 3.         is more commonly called current, i, allowing one
             dt                                                              dt
final simplification to Equation 4. Equation 4 is another of the most important capacitor equations. Rearranging Equation 4
yields Equation 5 which bares a striking resemblance to the formula for a line, y = mx + b. Figure 3 shows capacitors being
charged by a constant current source.



                          dq      dC     dV              dq     dV                           dV                        i
q = C *V                     =V *    +C*                    =C*                      i =C*                   v(t ) =     *t
                          dt      dt     dt              dt     dt                           dt                        C
Equation 1
                          Equation 2                     Equation 3                 Equation 4               Equation 5




The slope, m, of the line is current divided by capacitance. Applying constant current to the capacitor yields a linear slope.
Changing the capacitance and keeping the source current constant causes the slope of the line to change. For the same
current, and an increase in capacitance, the slope of the line will become more gradual as shown in Figure 3.




Capacitive Sensing 101                                                                                                  Page 2 of 7

Published in Elektronik                                                                                                October 2006



                                                                                                                                      [+] Feedback
Figure 3. Voltage ramp on different capacitors


                                  v(t)
                                                                               C1



                                                                               C2



                                                                               C3


                                                                                                     t
                                                           C1 < C2 < C3

Measurement Methods
Two measurements are necessary to determine the presence or absence of a conductive object on a sensor: the parasitic
capacitance and the capacitance due to the conductive object. Taking Equation 4 and rearranging it results in Equation 6.

          ∆t
C = i*
          ∆V
Equation 6
If the supply current, i, and the time elapsed, ∆t, are known, it is possible to measure the voltage change, ∆V. Once a
measurement for ∆V has been made, solving for the capacitance is simple.

The method utilizing Equation 6 is simple; a more advanced solution is to use a relaxation oscillator [Figure 4].

                                           Figure 4. CapSense Relaxation Oscillator

            Isrc
                            Capacitive
                             Sensor
                      Bus




                                                    Triangle Wave                                   Pulse Train
                                                                            Co
                                                                               m   pa
                                                                                        rat
                                                                                            o   r

            Reset


                            Capacitive                                                                                  S Y SCLK
                             Sensor
                                                        Vref                                                                           16-Bit
                                                                                                          PWM
                                                                                                                                     COUNTER
                                                                                                             Compare               E nable
                                                                                                                 O ut




Capacitive Sensing 101                                                                                                              Page 3 of 7

Published in Elektronik                                                                                                            October 2006



                                                                                                                                                  [+] Feedback
The current source, Isrc, provides the constant current to charge the capacitor. Isrc is connected to a bus which allows one or
more capacitors to be connected at a time. The reset switch allows the capacitors connected to the bus to be drained. Each
capacitive sensor is connected to the bus one at a time. When a sensor is first connected, Isrc applies constant current to the
capacitor to generate the ramp shown in Figure 3. Once the voltage reaches a predefined reference level, Vref, the comparator
trips and restarts the charging sequence by draining the sensor capacitor to ground. Figure 5 shows the charging sequence
and comparator trip level.

                                Figure 5. Pulse train frequencies with different capacitors


     v(t)                                                              v(t)
 Com parator                                                       Com parator
    Out                                                               O ut

                                                               t                                                               t
     v(t)                                                              v(t)
        Vref                                                              Vref




                                                           t                                                               t
                               C1                                                             C2 > C1

The pulse train's frequency decreases with a greater capacitance. The pulse train is tied to the clock input of a PWM. For a
fixed duty cycle, the PWM is high longer when measuring a greater capacitance. The output of the PWM enables a 16-bit
counter. Figure 6 shows how the PWM enable affects the counter. The counter value is greater for C2 than C1.

                                            Figure 6. PWM Enable and Counter




After the PWM disables the counter, the counter value is stored for processing. Now that the counter value has been stored,
the circuit has undergone a full analog to digital conversion; the capacitance is stored as a digital value.



Processing the Data
Once the capacitance is stored as a digital value (raw counts), the next step is to process the data. In order for the
capacitance value to be meaningful, it must be compared to something else. Equation 7 shows the capacitance ratio.




Capacitive Sensing 101                                                                                              Page 4 of 7

Published in Elektronik                                                                                           October 2006



                                                                                                                                   [+] Feedback
Cconductive
∆C =
        C parasitic
Equation 7



The capacitance due to the conductive object, Cconductive, must be compared to the capacitance occurring naturally in the
system, Cparasitic. In order to keep track of the parasitic capacitance as it changes with time, its measured value is stored in a
variable called a baseline. A baseline keeps track of the slow changes in parasitic capacitance due to environmental effects
such as temperature changes. A baseline is analogous to analog ground; the baseline does not need to be zero, but it serves
as the reference for all capacitive measurements.

There are multiple methods for storing the measured value into the baseline variable; each method is essentially a low-pass
filter. An example is an Infinite Impulse Response (IIR) filter. The IIR filter follows the simple equation shown in Equation 8.
The CurrentMeasurement variable is equal to the present measured value for the raw counts.

                      3                    1
Baseline (n) =          * Baseline(n − 1) + * CurrentMeasurement
                      4                    4
Equation 8



Once a stable baseline has been established the next step is to define the level at which a finger press will be detected. The
best way to detect a finger press is to define two threshold values, one at which the signal is considered to be noise and the
other where the signal is considered to be a finger press (or presence of a conductive object). Figure 7 shows each of the
thresholds in a capacitive sensing system. Care should be taken to choose the correct levels of these thresholds as they
affect the sensitivity and performance of the system. The thresholds are relative to the baseline. To add hysteresis, detect a
finger press when the raw counts break above the finger threshold, and detect the off state when the finger press falls below
the noise threshold.

                                    Figure 7. Thresholds in a capacitive sensing system




PCB Design Basics
Capacitive sensors can be constructed from many different media, such as copper,ITO and printed ink. Copper capacitive
sensors can be implemented on standard FR4 PCBs as well as on flexible material. ITO allows the capacitive sensor to be up
to 90% transparent (for single layer solutions).

Capacitive Sensing 101                                                                                                 Page 5 of 7

Published in Elektronik                                                                                              October 2006



                                                                                                                                     [+] Feedback
The size and spacing of the capacitive sensor are both very important to the sensor's performance. Figure 8 shows the
recommended sensor spacing.

                                                            Figure 8.




                                              0.5mm
                                                              10mm
                 40% hatched Ground Plane                                              40% hatched Ground Plane
                                                        Capacitive Sensor




In addition to the size of the sensor, and its spacing relative to the ground plane, the type of ground plane used is very
important. Since the parasitic capacitance of the sensor is related to the E-Field's path to ground, it is important to choose a
ground plane that limits the concentration of E-Field lines without a conductive object present. Equation 7, shows decreasing
the parasitic capacitance increases the device's sensitivity (greater ∆C). The recommended ground plane for capacitive
sensors is a 40% fill, hatched ground plane. Leave some ground plane intact so that the conductive object is still able to
provide a low-resistance path to ground without affecting other circuit elements. For a more detailed description of capacitive
sensor layout, please refer to the Cypress Semiconductor Application Note AN2292.



Troubleshooting and Debugging
It is difficult to account for all environmental effects in the initial design phase. There may be some adjustments required for
the noise and finger thresholds. Care should be taken to test the system across the full operating temperature range and in
noisy environments.



Conclusion
Designing a capacitance sensing system is fairly straightforward. First, pick the type of sensing material (FR4, Flex, ITO, etc).
Second, understand the environment the device will operate in. Understand the full operating temperature range, what radio
frequencies are present and how the user will interact with the interface. Third, choose an integrated circuit that will be able to
handle the demands of a changing environment and is upgradeable. The Cypress Semiconductor Programmable System on
a Chip, Mixed Signal Array, is a configurable device which includes royalty-free source code for implementing a capacitive
sensing solution. Fourth, do not make compromises with your PCB design that will affect capacitance sensing performance.
Make sure to pay attention to the layout guidelines defined in Cypress application note AN2292. Fifth, spend the time to quot;tunequot;
your system. Make sure the design meets the environment requirements. Finally, be patient while troubleshooting. If you are
not familiar with capacitance sensing, take the time to understand it. Cypress Semiconductor makes several capacitive
sensing evaluation boards, such as the CY3212 and CY3214. Cypress also provides free source code examples that ship
with these evaluation kits. To view the source code online, please visit http://www.cypress.com/capsense/ and click on the
quot;Applicationsquot; link.




Capacitive Sensing 101                                                                                                  Page 6 of 7

Published in Elektronik                                                                                               October 2006



                                                                                                                                      [+] Feedback
References


                                                                                                                                                        Cypress Semiconductor
                                                                                                                                                           198 Champion Court
                                                                                                                                                      San Jose, CA 95134-1709
                                                                                                                                                          Phone: 408-943-2600
                                                                                                                                                              Fax: 408-943-4730
                                                                                                                                                        http://www.cypress.com

© Cypress Semiconductor Corporation, 2007. The information contained herein is subject to change without notice. Cypress Semiconductor Corporation assumes no responsibility for the
use of any circuitry other than circuitry embodied in a Cypress product. Nor does it convey or imply any license under patent or other rights. Cypress products are not warranted nor intended
to be used for medical, life support, life saving, critical control or safety applications, unless pursuant to an express written agreement with Cypress. Furthermore, Cypress does not authorize
its products for use as critical components in life-support systems where a malfunction or failure may reasonably be expected to result in significant injury to the user. The inclusion of
Cypress products in life-support systems application implies that the manufacturer assumes all risk of such use and in doing so indemnifies Cypress against all charges.

PSoC Designer™, Programmable System-on-Chip™, and PSoC Express™ are trademarks and PSoC® is a registered trademark of Cypress Semiconductor Corp. All other trademarks or
registered trademarks referenced herein are property of the respective corporations.

This Source Code (software and/or firmware) is owned by Cypress Semiconductor Corporation (Cypress) and is protected by and subject to worldwide patent protection (United States and
foreign), United States copyright laws and international treaty provisions. Cypress hereby grants to licensee a personal, non-exclusive, non-transferable license to copy, use, modify, create
derivative works of, and compile the Cypress Source Code and derivative works for the sole purpose of creating custom software and or firmware in support of licensee product to be used
only in conjunction with a Cypress integrated circuit as specified in the applicable agreement. Any reproduction, modification, translation, compilation, or representation of this Source Code
except as specified above is prohibited without the express written permission of Cypress.

Disclaimer: CYPRESS MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS MATERIAL, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. Cypress reserves the right to make changes without further notice to the materials described
herein. Cypress does not assume any liability arising out of the application or use of any product or circuit described herein. Cypress does not authorize its products for use as critical
components in life-support systems where a malfunction or failure may reasonably be expected to result in significant injury to the user. The inclusion of Cypress’ product in a life-support
systems application implies that the manufacturer assumes all risk of such use and in doing so indemnifies Cypress against all charges.

Use may be limited by and subject to the applicable Cypress software license agreement.




Capacitive Sensing 101                                                                                                                                                           Page 7 of 7

Published in Elektronik                                                                                                                                                       October 2006



                                                                                                                                                                                                    [+] Feedback

Contenu connexe

Tendances

Ee1 chapter10 capacitors_inseriesparallel
Ee1 chapter10 capacitors_inseriesparallelEe1 chapter10 capacitors_inseriesparallel
Ee1 chapter10 capacitors_inseriesparallelCK Yang
 
The Power-Bandwidth Tradeoff in MIMO Systems
The Power-Bandwidth Tradeoff in MIMO SystemsThe Power-Bandwidth Tradeoff in MIMO Systems
The Power-Bandwidth Tradeoff in MIMO SystemsMarwan Hammouda
 
Linear Ic Applications Jntu Model Paper{Www.Studentyogi.Com}
Linear Ic Applications Jntu Model Paper{Www.Studentyogi.Com}Linear Ic Applications Jntu Model Paper{Www.Studentyogi.Com}
Linear Ic Applications Jntu Model Paper{Www.Studentyogi.Com}guest3f9c6b
 
Class06 transmission line_basics
Class06 transmission line_basicsClass06 transmission line_basics
Class06 transmission line_basicsbhaavan22
 
Coupling Aware Explicit Delay Metric for On- Chip RLC Interconnect for Ramp i...
Coupling Aware Explicit Delay Metric for On- Chip RLC Interconnect for Ramp i...Coupling Aware Explicit Delay Metric for On- Chip RLC Interconnect for Ramp i...
Coupling Aware Explicit Delay Metric for On- Chip RLC Interconnect for Ramp i...IDES Editor
 
transmission line
transmission line transmission line
transmission line Suchit Bhatt
 
Lect2 up350 (100328)
Lect2 up350 (100328)Lect2 up350 (100328)
Lect2 up350 (100328)aicdesign
 
Adaptive control of saturated induction motor with uncertain load torque
Adaptive control of saturated induction motor with uncertain load torqueAdaptive control of saturated induction motor with uncertain load torque
Adaptive control of saturated induction motor with uncertain load torqueAyyarao T S L V
 
Zuken - Improve pcb quality and cost with concurrent power integrity analysis...
Zuken - Improve pcb quality and cost with concurrent power integrity analysis...Zuken - Improve pcb quality and cost with concurrent power integrity analysis...
Zuken - Improve pcb quality and cost with concurrent power integrity analysis...Zuken
 
Microwave Devices Lecture10
Microwave Devices Lecture10Microwave Devices Lecture10
Microwave Devices Lecture10Amr Al-Awamry
 

Tendances (15)

Ee1 chapter10 capacitors_inseriesparallel
Ee1 chapter10 capacitors_inseriesparallelEe1 chapter10 capacitors_inseriesparallel
Ee1 chapter10 capacitors_inseriesparallel
 
The Power-Bandwidth Tradeoff in MIMO Systems
The Power-Bandwidth Tradeoff in MIMO SystemsThe Power-Bandwidth Tradeoff in MIMO Systems
The Power-Bandwidth Tradeoff in MIMO Systems
 
Eq25879884
Eq25879884Eq25879884
Eq25879884
 
75
7575
75
 
Linear Ic Applications Jntu Model Paper{Www.Studentyogi.Com}
Linear Ic Applications Jntu Model Paper{Www.Studentyogi.Com}Linear Ic Applications Jntu Model Paper{Www.Studentyogi.Com}
Linear Ic Applications Jntu Model Paper{Www.Studentyogi.Com}
 
Class06 transmission line_basics
Class06 transmission line_basicsClass06 transmission line_basics
Class06 transmission line_basics
 
Coupling Aware Explicit Delay Metric for On- Chip RLC Interconnect for Ramp i...
Coupling Aware Explicit Delay Metric for On- Chip RLC Interconnect for Ramp i...Coupling Aware Explicit Delay Metric for On- Chip RLC Interconnect for Ramp i...
Coupling Aware Explicit Delay Metric for On- Chip RLC Interconnect for Ramp i...
 
transmission line
transmission line transmission line
transmission line
 
Lect2 up350 (100328)
Lect2 up350 (100328)Lect2 up350 (100328)
Lect2 up350 (100328)
 
Transmission Line
Transmission LineTransmission Line
Transmission Line
 
www.ijerd.com
www.ijerd.comwww.ijerd.com
www.ijerd.com
 
J026055062
J026055062J026055062
J026055062
 
Adaptive control of saturated induction motor with uncertain load torque
Adaptive control of saturated induction motor with uncertain load torqueAdaptive control of saturated induction motor with uncertain load torque
Adaptive control of saturated induction motor with uncertain load torque
 
Zuken - Improve pcb quality and cost with concurrent power integrity analysis...
Zuken - Improve pcb quality and cost with concurrent power integrity analysis...Zuken - Improve pcb quality and cost with concurrent power integrity analysis...
Zuken - Improve pcb quality and cost with concurrent power integrity analysis...
 
Microwave Devices Lecture10
Microwave Devices Lecture10Microwave Devices Lecture10
Microwave Devices Lecture10
 

Similaire à Capacitive Sensing 101

CBSE Sample Paper 2015 of Class XII Physics
CBSE Sample Paper 2015 of Class XII PhysicsCBSE Sample Paper 2015 of Class XII Physics
CBSE Sample Paper 2015 of Class XII PhysicsKV no 1 AFS Jodhpur raj.
 
CapSense Capacitive Sensing Successive Approximation Algorithm
CapSense Capacitive Sensing Successive Approximation AlgorithmCapSense Capacitive Sensing Successive Approximation Algorithm
CapSense Capacitive Sensing Successive Approximation Algorithmemilyjoseph444
 
Sheet1resistance of resistorTime Constant = 5.3s10v from power sup.docx
Sheet1resistance of resistorTime Constant = 5.3s10v from power sup.docxSheet1resistance of resistorTime Constant = 5.3s10v from power sup.docx
Sheet1resistance of resistorTime Constant = 5.3s10v from power sup.docxmaoanderton
 
Control And Programingof Synchronous Generator
Control And Programingof Synchronous GeneratorControl And Programingof Synchronous Generator
Control And Programingof Synchronous Generatorfreelay
 
Bai thi nghiem_linear_circuit_cttt
Bai thi nghiem_linear_circuit_ctttBai thi nghiem_linear_circuit_cttt
Bai thi nghiem_linear_circuit_ctttkutyonljne
 
Electric Circuits Lab Series RC Circuits Phase Angle, Phase Lag.docx
Electric Circuits Lab Series RC Circuits Phase Angle, Phase Lag.docxElectric Circuits Lab Series RC Circuits Phase Angle, Phase Lag.docx
Electric Circuits Lab Series RC Circuits Phase Angle, Phase Lag.docxpauline234567
 
An Enhanced Flying Capacitor Multilevel Inverter fed Induction Motor Drive
An Enhanced Flying Capacitor Multilevel Inverter fed Induction Motor DriveAn Enhanced Flying Capacitor Multilevel Inverter fed Induction Motor Drive
An Enhanced Flying Capacitor Multilevel Inverter fed Induction Motor DriveIDES Editor
 
12 ac bridges rev 3 080423
12 ac  bridges rev 3 08042312 ac  bridges rev 3 080423
12 ac bridges rev 3 080423Iqxca AzmYani
 
Active filters
Active filtersActive filters
Active filtersfaisal_18
 
Capacitive Touch Sensor Charge Time
Capacitive Touch Sensor Charge TimeCapacitive Touch Sensor Charge Time
Capacitive Touch Sensor Charge TimeFieldscale
 
26b Amplifiers 2.pdf
26b Amplifiers 2.pdf26b Amplifiers 2.pdf
26b Amplifiers 2.pdfivan ion
 

Similaire à Capacitive Sensing 101 (20)

Physics sqp
Physics sqpPhysics sqp
Physics sqp
 
CBSE Sample Paper 2015 of Class XII Physics
CBSE Sample Paper 2015 of Class XII PhysicsCBSE Sample Paper 2015 of Class XII Physics
CBSE Sample Paper 2015 of Class XII Physics
 
Ch32524527
Ch32524527Ch32524527
Ch32524527
 
Ch32524527
Ch32524527Ch32524527
Ch32524527
 
Microelectromechanical Assignment Help
Microelectromechanical Assignment HelpMicroelectromechanical Assignment Help
Microelectromechanical Assignment Help
 
Ie practical file
Ie practical fileIe practical file
Ie practical file
 
CapSense Capacitive Sensing Successive Approximation Algorithm
CapSense Capacitive Sensing Successive Approximation AlgorithmCapSense Capacitive Sensing Successive Approximation Algorithm
CapSense Capacitive Sensing Successive Approximation Algorithm
 
Sheet1resistance of resistorTime Constant = 5.3s10v from power sup.docx
Sheet1resistance of resistorTime Constant = 5.3s10v from power sup.docxSheet1resistance of resistorTime Constant = 5.3s10v from power sup.docx
Sheet1resistance of resistorTime Constant = 5.3s10v from power sup.docx
 
Control And Programingof Synchronous Generator
Control And Programingof Synchronous GeneratorControl And Programingof Synchronous Generator
Control And Programingof Synchronous Generator
 
Bai thi nghiem_linear_circuit_cttt
Bai thi nghiem_linear_circuit_ctttBai thi nghiem_linear_circuit_cttt
Bai thi nghiem_linear_circuit_cttt
 
Electric Circuits Lab Series RC Circuits Phase Angle, Phase Lag.docx
Electric Circuits Lab Series RC Circuits Phase Angle, Phase Lag.docxElectric Circuits Lab Series RC Circuits Phase Angle, Phase Lag.docx
Electric Circuits Lab Series RC Circuits Phase Angle, Phase Lag.docx
 
An Enhanced Flying Capacitor Multilevel Inverter fed Induction Motor Drive
An Enhanced Flying Capacitor Multilevel Inverter fed Induction Motor DriveAn Enhanced Flying Capacitor Multilevel Inverter fed Induction Motor Drive
An Enhanced Flying Capacitor Multilevel Inverter fed Induction Motor Drive
 
Unit2 ac circuits
Unit2 ac circuitsUnit2 ac circuits
Unit2 ac circuits
 
Labo circuito en rc
Labo circuito en rcLabo circuito en rc
Labo circuito en rc
 
12 ac bridges rev 3 080423
12 ac  bridges rev 3 08042312 ac  bridges rev 3 080423
12 ac bridges rev 3 080423
 
Active filters
Active filtersActive filters
Active filters
 
Capacitive Touch Sensor Charge Time
Capacitive Touch Sensor Charge TimeCapacitive Touch Sensor Charge Time
Capacitive Touch Sensor Charge Time
 
26b Amplifiers 2.pdf
26b Amplifiers 2.pdf26b Amplifiers 2.pdf
26b Amplifiers 2.pdf
 
Power point vector
Power point vectorPower point vector
Power point vector
 
48 51
48 5148 51
48 51
 

Dernier

Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...itnewsafrica
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...itnewsafrica
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Nikki Chapple
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 

Dernier (20)

Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 

Capacitive Sensing 101

  • 1. Capacitive Sensing 101 By (Jon Peterson, Applications Engineer, Cypress Semiconductor Corp.) Executive Summary Capacitive Sensing as a human-device interface is becoming increasingly popular. Capacitive sensing can be recognized in many popular consumer products such as laptop trackpads, MP3 players, computer monitors and cell phones, but it is certainly not limited to these applications. More and more engineers choose capacitive sensing for its flexibility, unique human-device interface and cost reduction over mechanical switches. Designs are likely to experience many different environmental changes, marketing requirement changes and user abuse; choosing a device that is flexible, programmable, and upgradeable is necessary. Without question, the most flexible, programmable and upgradeable device on the market is the Cypress Semiconductor Programmable System on a Chip (PSoC). PSoC is a mixed-signal array which includes analog and digital resources as well as an integrated microcontroller all on the same chip! Choosing a fixed-function device, such as an ASIC, seems like a good idea at first, but overcoming its problems requires spending more money on hardware. A mixed-signal array device allows resolution of most issues with a firmware change. One major advantage of having a flash-based device is that its firmware can be updated after the device has shipped by including a bootloader. Bootloaders are valuable are worth considering on a new design. Understanding Electric Fields In order to understand capacitive sensing, it is first important to understand some basics about electric fields (E-Fields). It is a fundamental fact that E-Fields take the path of least resistance. Figure 1 shows a general form of E-Fields in a capacitive sensing design. Figure 1. E-Fields and Parasitic Capacitance Capacitive Sensor Ground Plane Ground Plane E-Field Lines E-Fields form from the greatest potential to the least potential. Figure 1 shows E-Field lines from the capacitive sensor to ground. Measuring the capacitance at this point yields the parasitic capacitance. Parasitic capacitance is the capacitance of the sensor, without a conductive object present. Figure 2 shows the effect of a conductive object in the same system. Capacitive Sensing 101 Page 1 of 7 Published in Elektronik October 2006 [+] Feedback
  • 2. Figure 2. E-Fields with a finger present Ground Plane Button Ground Plane E-Field Lines The conductive object allows an increased number of E-Field lines to travel between the sensor and ground. This greater concentration of E-Field lines results in a greater capacitance measured at the sensor. In human interface devices, the conductive object is typically a human finger, hand, foot, etc. Measuring a Fixed Capacitance It is important to understand how to measure a fixed capacitance. One of the most fundamental capacitor equations is shown in Equation 1. Differentiating both sides with respect to time, results in Equation 2. Since a static capacitance is being dC dq measured, equals zero and the equation simplifies to Equation 3. is more commonly called current, i, allowing one dt dt final simplification to Equation 4. Equation 4 is another of the most important capacitor equations. Rearranging Equation 4 yields Equation 5 which bares a striking resemblance to the formula for a line, y = mx + b. Figure 3 shows capacitors being charged by a constant current source. dq dC dV dq dV dV i q = C *V =V * +C* =C* i =C* v(t ) = *t dt dt dt dt dt dt C Equation 1 Equation 2 Equation 3 Equation 4 Equation 5 The slope, m, of the line is current divided by capacitance. Applying constant current to the capacitor yields a linear slope. Changing the capacitance and keeping the source current constant causes the slope of the line to change. For the same current, and an increase in capacitance, the slope of the line will become more gradual as shown in Figure 3. Capacitive Sensing 101 Page 2 of 7 Published in Elektronik October 2006 [+] Feedback
  • 3. Figure 3. Voltage ramp on different capacitors v(t) C1 C2 C3 t C1 < C2 < C3 Measurement Methods Two measurements are necessary to determine the presence or absence of a conductive object on a sensor: the parasitic capacitance and the capacitance due to the conductive object. Taking Equation 4 and rearranging it results in Equation 6. ∆t C = i* ∆V Equation 6 If the supply current, i, and the time elapsed, ∆t, are known, it is possible to measure the voltage change, ∆V. Once a measurement for ∆V has been made, solving for the capacitance is simple. The method utilizing Equation 6 is simple; a more advanced solution is to use a relaxation oscillator [Figure 4]. Figure 4. CapSense Relaxation Oscillator Isrc Capacitive Sensor Bus Triangle Wave Pulse Train Co m pa rat o r Reset Capacitive S Y SCLK Sensor Vref 16-Bit PWM COUNTER Compare E nable O ut Capacitive Sensing 101 Page 3 of 7 Published in Elektronik October 2006 [+] Feedback
  • 4. The current source, Isrc, provides the constant current to charge the capacitor. Isrc is connected to a bus which allows one or more capacitors to be connected at a time. The reset switch allows the capacitors connected to the bus to be drained. Each capacitive sensor is connected to the bus one at a time. When a sensor is first connected, Isrc applies constant current to the capacitor to generate the ramp shown in Figure 3. Once the voltage reaches a predefined reference level, Vref, the comparator trips and restarts the charging sequence by draining the sensor capacitor to ground. Figure 5 shows the charging sequence and comparator trip level. Figure 5. Pulse train frequencies with different capacitors v(t) v(t) Com parator Com parator Out O ut t t v(t) v(t) Vref Vref t t C1 C2 > C1 The pulse train's frequency decreases with a greater capacitance. The pulse train is tied to the clock input of a PWM. For a fixed duty cycle, the PWM is high longer when measuring a greater capacitance. The output of the PWM enables a 16-bit counter. Figure 6 shows how the PWM enable affects the counter. The counter value is greater for C2 than C1. Figure 6. PWM Enable and Counter After the PWM disables the counter, the counter value is stored for processing. Now that the counter value has been stored, the circuit has undergone a full analog to digital conversion; the capacitance is stored as a digital value. Processing the Data Once the capacitance is stored as a digital value (raw counts), the next step is to process the data. In order for the capacitance value to be meaningful, it must be compared to something else. Equation 7 shows the capacitance ratio. Capacitive Sensing 101 Page 4 of 7 Published in Elektronik October 2006 [+] Feedback
  • 5. Cconductive ∆C = C parasitic Equation 7 The capacitance due to the conductive object, Cconductive, must be compared to the capacitance occurring naturally in the system, Cparasitic. In order to keep track of the parasitic capacitance as it changes with time, its measured value is stored in a variable called a baseline. A baseline keeps track of the slow changes in parasitic capacitance due to environmental effects such as temperature changes. A baseline is analogous to analog ground; the baseline does not need to be zero, but it serves as the reference for all capacitive measurements. There are multiple methods for storing the measured value into the baseline variable; each method is essentially a low-pass filter. An example is an Infinite Impulse Response (IIR) filter. The IIR filter follows the simple equation shown in Equation 8. The CurrentMeasurement variable is equal to the present measured value for the raw counts. 3 1 Baseline (n) = * Baseline(n − 1) + * CurrentMeasurement 4 4 Equation 8 Once a stable baseline has been established the next step is to define the level at which a finger press will be detected. The best way to detect a finger press is to define two threshold values, one at which the signal is considered to be noise and the other where the signal is considered to be a finger press (or presence of a conductive object). Figure 7 shows each of the thresholds in a capacitive sensing system. Care should be taken to choose the correct levels of these thresholds as they affect the sensitivity and performance of the system. The thresholds are relative to the baseline. To add hysteresis, detect a finger press when the raw counts break above the finger threshold, and detect the off state when the finger press falls below the noise threshold. Figure 7. Thresholds in a capacitive sensing system PCB Design Basics Capacitive sensors can be constructed from many different media, such as copper,ITO and printed ink. Copper capacitive sensors can be implemented on standard FR4 PCBs as well as on flexible material. ITO allows the capacitive sensor to be up to 90% transparent (for single layer solutions). Capacitive Sensing 101 Page 5 of 7 Published in Elektronik October 2006 [+] Feedback
  • 6. The size and spacing of the capacitive sensor are both very important to the sensor's performance. Figure 8 shows the recommended sensor spacing. Figure 8. 0.5mm 10mm 40% hatched Ground Plane 40% hatched Ground Plane Capacitive Sensor In addition to the size of the sensor, and its spacing relative to the ground plane, the type of ground plane used is very important. Since the parasitic capacitance of the sensor is related to the E-Field's path to ground, it is important to choose a ground plane that limits the concentration of E-Field lines without a conductive object present. Equation 7, shows decreasing the parasitic capacitance increases the device's sensitivity (greater ∆C). The recommended ground plane for capacitive sensors is a 40% fill, hatched ground plane. Leave some ground plane intact so that the conductive object is still able to provide a low-resistance path to ground without affecting other circuit elements. For a more detailed description of capacitive sensor layout, please refer to the Cypress Semiconductor Application Note AN2292. Troubleshooting and Debugging It is difficult to account for all environmental effects in the initial design phase. There may be some adjustments required for the noise and finger thresholds. Care should be taken to test the system across the full operating temperature range and in noisy environments. Conclusion Designing a capacitance sensing system is fairly straightforward. First, pick the type of sensing material (FR4, Flex, ITO, etc). Second, understand the environment the device will operate in. Understand the full operating temperature range, what radio frequencies are present and how the user will interact with the interface. Third, choose an integrated circuit that will be able to handle the demands of a changing environment and is upgradeable. The Cypress Semiconductor Programmable System on a Chip, Mixed Signal Array, is a configurable device which includes royalty-free source code for implementing a capacitive sensing solution. Fourth, do not make compromises with your PCB design that will affect capacitance sensing performance. Make sure to pay attention to the layout guidelines defined in Cypress application note AN2292. Fifth, spend the time to quot;tunequot; your system. Make sure the design meets the environment requirements. Finally, be patient while troubleshooting. If you are not familiar with capacitance sensing, take the time to understand it. Cypress Semiconductor makes several capacitive sensing evaluation boards, such as the CY3212 and CY3214. Cypress also provides free source code examples that ship with these evaluation kits. To view the source code online, please visit http://www.cypress.com/capsense/ and click on the quot;Applicationsquot; link. Capacitive Sensing 101 Page 6 of 7 Published in Elektronik October 2006 [+] Feedback
  • 7. References Cypress Semiconductor 198 Champion Court San Jose, CA 95134-1709 Phone: 408-943-2600 Fax: 408-943-4730 http://www.cypress.com © Cypress Semiconductor Corporation, 2007. The information contained herein is subject to change without notice. Cypress Semiconductor Corporation assumes no responsibility for the use of any circuitry other than circuitry embodied in a Cypress product. Nor does it convey or imply any license under patent or other rights. Cypress products are not warranted nor intended to be used for medical, life support, life saving, critical control or safety applications, unless pursuant to an express written agreement with Cypress. Furthermore, Cypress does not authorize its products for use as critical components in life-support systems where a malfunction or failure may reasonably be expected to result in significant injury to the user. The inclusion of Cypress products in life-support systems application implies that the manufacturer assumes all risk of such use and in doing so indemnifies Cypress against all charges. PSoC Designer™, Programmable System-on-Chip™, and PSoC Express™ are trademarks and PSoC® is a registered trademark of Cypress Semiconductor Corp. All other trademarks or registered trademarks referenced herein are property of the respective corporations. This Source Code (software and/or firmware) is owned by Cypress Semiconductor Corporation (Cypress) and is protected by and subject to worldwide patent protection (United States and foreign), United States copyright laws and international treaty provisions. Cypress hereby grants to licensee a personal, non-exclusive, non-transferable license to copy, use, modify, create derivative works of, and compile the Cypress Source Code and derivative works for the sole purpose of creating custom software and or firmware in support of licensee product to be used only in conjunction with a Cypress integrated circuit as specified in the applicable agreement. Any reproduction, modification, translation, compilation, or representation of this Source Code except as specified above is prohibited without the express written permission of Cypress. Disclaimer: CYPRESS MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS MATERIAL, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. Cypress reserves the right to make changes without further notice to the materials described herein. Cypress does not assume any liability arising out of the application or use of any product or circuit described herein. Cypress does not authorize its products for use as critical components in life-support systems where a malfunction or failure may reasonably be expected to result in significant injury to the user. The inclusion of Cypress’ product in a life-support systems application implies that the manufacturer assumes all risk of such use and in doing so indemnifies Cypress against all charges. Use may be limited by and subject to the applicable Cypress software license agreement. Capacitive Sensing 101 Page 7 of 7 Published in Elektronik October 2006 [+] Feedback