SlideShare une entreprise Scribd logo
1  sur  4
Capacitance Sensing - Signal-to-Noise Ratio
                                                      Requirement for CapSense Applications

                                                                                                               AN2403
                                                                                     Author: Mark Lee
                                                                               Associated Project: No
                                           Associated Part Family: CY8C20x34, CY8C21x34, CY8C24x94
                                                                          GET FREE SAMPLES HERE
                                                                Software Version: PSoC Designer™ 4.3
     Associated Application Notes: AN2233a, AN2277, AN2292, AN2318, AN2352, AN2355, AN2360, AN2394
                                                                          PSoC Application Notes Index

Application Note Abstract
A minimum Signal-to-Noise Ratio (SNR) requirement of 5:1 is derived for CapSense applications. This is a system level
requirement for all implementations of CapSense.




Introduction                                                       Definitions
A typical output of a PSoC® CapSense system is shown
                                                                   A number of terms need to be defined.
in Figure 1. Sensor capacitance is converted into a count
value (see Reference [1]). The unprocessed count value is
                                                                   CapSense Counts
referred to as the raw count. Processing of the raw count
                                                                   The PSoC user module library includes more than one
results in ON/OFF states for the sensor.
                                                                   method for performing CapSense, including CSA and CSD
          Figure 1. Typical CapSense Signal                        (see Reference [2]). Regardless of the method, the
User Module Firmware Converts Raw Count into ON/OFF                function of the CapSense system is to convert sensor
                        States                                     capacitance into a digital count value.

                                                                   Baseline Counts and Thresholds
                                                                   The high level API of the CapSense user module
                                                                   determines the ON/OFF state of a sensor by setting a
                                                                   baseline and comparing counts to threshold levels.
                                                                        Figure 2. Illustration of Baseline and Thresholds




In order for the user module to discriminate between ON
and OFF states for the sensor, the signal needs to be
significantly larger than the noise. The purpose of this
Application Note is to establish a “best practices” minimum
requirement for how much larger the signal needs to be
compared to the noise.




December 11, 2006                               Document No. 001-13940 Rev. *A                                              1



                                                                                                                                [+] Feedback
AN2403



Figure 2 illustrates baseline and thresholds using the              The same model applies when the sensor is in the ON
example data of Figure 1. The baseline is an estimate of            state.
the average sensor count level when the sensor is in the
                                                                          X(t)= X1 + N1(t)                     Equation 3
OFF state. The baseline provides a reference level for the
ON/OFF comparison. Subtracting the baseline level from
                                                                        X1 is the average of X(t)
the raw count produces the difference count that is used in
the ON/OFF decision process.
                                                                        N1(t) is the noise component for t during the ON state
 DifferenceCount = RawCount – Baseline         Equation 1
                                                                    X0 is called the baseline level of the raw counts. The
                                                                    difference between X0 and X1 is called the signal, S.
The straight line version of the baseline shown in Figure 2
is a simplification. The actual baseline is dynamically
                                                                              S = (X1 - X0)               Equation 4
adjusted by the user module to compensate for
environmental changes through a process called baseline             The noise components N0(t) and N1(t) are similar but not
update.                                                             identical. For example, N1(t) usually contains a higher
                                                                    level of AC line noise in finger sensing applications
The thresholds are offset by a constant amount from the
                                                                    compared to N0(t). This occurs because the human body
baseline level as shown in FIgure 2. The thresholds have
                                                                    acts as an antenna to 50 Hz and 60 Hz line noise, and the
the following functions:
                                                                    finger contact with the sensor overlay couples the noise
                                                                    into the CapSense system.
Noise Threshold: If the difference count is below the
noise threshold, then the baseline is updated.
                                                                    Minimum SNR for CapSense
ON Threshold (Finger Threshold + Hysterisis): If the
difference count is increasing and exceeds the level of             A quot;best practicequot; for CapSense includes the following
(Finger Threshold + Hysterisis), then the sensor state              threshold levels.
changes from OFF to ON. Note the quot;Transition ONquot;
indicator in Figure 2.                                                  NoiseThreshold          = 40%*S
OFF Threshold (Finger Threshold - Hysterisis): If the
                                                                        OFF Threshold           = 60%*S
difference count is decreasing and drops below the level
of (Finger Threshold - Hysterisis), then the sensor state
                                                                        ON Threshold            = 90%*S
changes from ON to OFF. Note the quot;Transition OFFquot;
indicator in Figure 2.                                              This will create a 20% window of the signal of which the
                                                                    counts will stay out, except during transition between OFF
Signal and Noise                                                    and ON.
Signal is a generic engineering term that can have many             In the worst-case situation, there will be noise sources that
meanings. For the capacitive sensor application under               add to the background level of noise that drive the level of
consideration in this Application Note, signal is defined as        the counts, (X(t)-X0), up to the noise threshold during the
the change in the average sensor output between the OFF             OFF state. These sources include RF transmissions, AC
and ON states when the rising edge of the difference                line noise, fluorescent lamp ballasts, EL backlighting, and
count starts below the noise threshold.                             switching power supplies. Define the noise level N as the
                                                                    worst case measured peak noise in the OFF state.
Noise is another term that has many meanings. The
following discussion presents a definition of CapSense               N = max(N0(t))= max(X(t))-X0                   Equation 5
noise that uses a simple mathematical model of the
                                                                    A quot;best practicequot; is to set a design margin between the
sensor output over time.
                                                                    worst-case noise limit, N, to 50% of the noise threshold.
When the sensor is in the OFF state, the counts, X(t), can
                                                                          N = 50% * NoiseThreshold             Equation 6
be modeled by an average count and a noise component.
                                                                    The CapSense Signal-to-Noise Ratio, SNR, is defined as
          X(t)= X0 + N0(t)            Equation 2
                                                                    the ratio of signal S to noise N.
    X0 is the average of X(t)
                                                                          SNR = S:N                            Equation 7
    N0(t) is the noise component for t during the OFF               The relation between S and N will now be solved for:
    state
                                                                          S = N/40%/50% = 5*N                  Equation 8
                                                                    Therefore, the minimum requirement for CapSense SNR
                                                                    is:
                                                                          SNR = 5:1                            Equation 9




December 11, 2006                                Document No. 001-13940 Rev. *A                                               2



                                                                                                                                    [+] Feedback
AN2403



                                                                    If the measured SNR is found to be below 5:1, consult the
Example: Measuring SNR                                              CapSense Best Practices Application Note for the latest
                                                                    advice on improving SNR (see Reference [2]). A good
SNR should be measured in the noise environment where
                                                                    layout is essential for a high SNR. For example, the
CapSense is intended to be used. In other words,
                                                                    selected overlay thickness or material type may limit SNR
measure the system SNR under worst-case noise
                                                                    (see Reference [3]). After addressing layout issues of
conditions.
                                                                    lower SNR, then filtering should be used to minimize the
The first step in measuring SNR is to monitor the raw               noise component of SNR. A simple IIR filter or averaging
count for each sensor. This can be done using data                  of multiple samples may be all that is required to boost the
logging to a text file and plotting in a spreadsheet, or            SNR above 5:1.
through the use of the Cypress FastChart GUI tool and
I2C-USB bridge. Whatever the method, the raw count
                                                                    Summary
should be observed for SNR measurement. The difference
count should not be used in the measurement of SNR                  A minimum requirement of 5:1 for CapSense has been
since it is a function of the baseline update process, which        derived. To ensure good performance, make sure your
involves filtering (filling the quot;bucketquot;) and nonlinear             project meets this minimum requirement.
threshold events.
                                                                    References
Another factor to consider is how the signal is produced.
The worst-case ON and OFF scenario should be used                   1.   Application Note AN2233a, “Capacitive Switch Scan,”
when measuring SNR. If the system is designed to sense                   Cypress Semiconductor
the presence of a finger, then measure SNR with a light
                                                                    2.   Application   Note    AN2394,    “CapSense        Best
touch of the sensor area, and position the contact point
                                                                         Practices,” Cypress Semiconductor
slightly off-center. For automated testing, a worst-case
finger touch can often be simulated by an equivalent metal
                                                                    3.   Application Note AN2292, “Layout Guideline for PSoC
disc that is the size and shape of a small coin.
                                                                         CapSense,” Cypress Semiconductor
As an example of measuring SNR, consider the raw count
waveform in Figure 1.
X0 = 5925 counts
X1 = 6055 counts
S = 130 counts
N = 5940 - 5925 = 15 counts
SNR = 130:15 = 8.6:1
NoiseThreshold = 40%*130 = 52 counts
OFF Threshold = 60%*130 = 78 counts
ON Threshold = 90%*130 = 117 counts
Hysterisis = (117-78)/2 = 19 counts
Finger Threshold = (117+78)/2 = 97 counts




December 11, 2006                                Document No. 001-13940 Rev. *A                                              3



                                                                                                                                   [+] Feedback
AN2403




About the Author
          Name:       Mark Lee
            Title:    Senior Application Engineer
 Background:          Ph.D.E.E. 1992
                      University of Washington
                      Computer Aided Modeling of                  the
                      Dielectric Properties of Materials
                      Experienced in the aerospace, medical
                      electronics, and computer industries
                      focusing on new product development.
                      Holder of several patents.
                      Cypress employee since 2005.
       Contact:       olr@cypress.com




In March of 2007, Cypress recataloged all of its Application Notes using a new documentation number and revision code. This new documentation
number and revision code (001-xxxxx, beginning with rev. **), located in the footer of the document, will be used in all subsequent revisions.
PSoC is a registered trademark of Cypress Semiconductor Corp. quot;Programmable System-on-Chip,quot; PSoC Designer, and PSoC Express are trademarks
of Cypress Semiconductor Corp. All other trademarks or registered trademarks referenced herein are the property of their respective owners.




                                                                                                                                 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, 2006-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.
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.


December 11, 2006                                          Document No. 001-13940 Rev. *A                                                                4



                                                                                                                                                               [+] Feedback

Contenu connexe

Similaire à Capacitance Sensing - Signal-to-Noise Ratio Requirement for CapSense Applications

Signal conditioning & condition monitoring using LabView by Prof. shakeb ahm...
Signal conditioning & condition monitoring  using LabView by Prof. shakeb ahm...Signal conditioning & condition monitoring  using LabView by Prof. shakeb ahm...
Signal conditioning & condition monitoring using LabView by Prof. shakeb ahm...mayank agarwal
 
Digital Signal Conditioning
Digital Signal ConditioningDigital Signal Conditioning
Digital Signal ConditioningGhansyam Rathod
 
47296653 testing-adc
47296653 testing-adc47296653 testing-adc
47296653 testing-adcGururaj B
 
FPGA Design & Simulation Modeling of Baseband Data Transmission System
FPGA Design & Simulation Modeling of Baseband Data Transmission SystemFPGA Design & Simulation Modeling of Baseband Data Transmission System
FPGA Design & Simulation Modeling of Baseband Data Transmission SystemIOSR Journals
 
Converting Capacitance Into Controller Counts
Converting Capacitance Into Controller CountsConverting Capacitance Into Controller Counts
Converting Capacitance Into Controller CountsFieldscale
 
CapSense Capacitive Sensing Best Practices
CapSense Capacitive Sensing Best PracticesCapSense Capacitive Sensing Best Practices
CapSense Capacitive Sensing Best PracticesRuth Moore
 
EBDSS Max Research Report - Final
EBDSS  Max  Research Report - FinalEBDSS  Max  Research Report - Final
EBDSS Max Research Report - FinalMax Robertson
 
Electronz_Chapter_6.pptx
Electronz_Chapter_6.pptxElectronz_Chapter_6.pptx
Electronz_Chapter_6.pptxMokete5
 
Bt0064 logic design2
Bt0064 logic design2Bt0064 logic design2
Bt0064 logic design2Techglyphs
 
NM310S Product Brochure: Nonlinear Starter Kit For Agilent VNA
NM310S Product Brochure: Nonlinear Starter Kit For Agilent VNANM310S Product Brochure: Nonlinear Starter Kit For Agilent VNA
NM310S Product Brochure: Nonlinear Starter Kit For Agilent VNANMDG NV
 
PNAPlus Product Brochure: Nonlinear Starter Kit For Agilent VNA
PNAPlus Product Brochure: Nonlinear Starter Kit For Agilent VNAPNAPlus Product Brochure: Nonlinear Starter Kit For Agilent VNA
PNAPlus Product Brochure: Nonlinear Starter Kit For Agilent VNANMDG NV
 
CapSense Capacitive Sensors Sigma Delta Algorithm
CapSense Capacitive Sensors Sigma Delta AlgorithmCapSense Capacitive Sensors Sigma Delta Algorithm
CapSense Capacitive Sensors Sigma Delta AlgorithmRuth Moore
 

Similaire à Capacitance Sensing - Signal-to-Noise Ratio Requirement for CapSense Applications (20)

Signal conditioning & condition monitoring using LabView by Prof. shakeb ahm...
Signal conditioning & condition monitoring  using LabView by Prof. shakeb ahm...Signal conditioning & condition monitoring  using LabView by Prof. shakeb ahm...
Signal conditioning & condition monitoring using LabView by Prof. shakeb ahm...
 
Digital Signal Conditioning
Digital Signal ConditioningDigital Signal Conditioning
Digital Signal Conditioning
 
47296653 testing-adc
47296653 testing-adc47296653 testing-adc
47296653 testing-adc
 
Child Pneumonia Monitor
Child Pneumonia Monitor Child Pneumonia Monitor
Child Pneumonia Monitor
 
FPGA Design & Simulation Modeling of Baseband Data Transmission System
FPGA Design & Simulation Modeling of Baseband Data Transmission SystemFPGA Design & Simulation Modeling of Baseband Data Transmission System
FPGA Design & Simulation Modeling of Baseband Data Transmission System
 
Converting Capacitance Into Controller Counts
Converting Capacitance Into Controller CountsConverting Capacitance Into Controller Counts
Converting Capacitance Into Controller Counts
 
CapSense Capacitive Sensing Best Practices
CapSense Capacitive Sensing Best PracticesCapSense Capacitive Sensing Best Practices
CapSense Capacitive Sensing Best Practices
 
Final ppt
Final pptFinal ppt
Final ppt
 
EBDSS Max Research Report - Final
EBDSS  Max  Research Report - FinalEBDSS  Max  Research Report - Final
EBDSS Max Research Report - Final
 
Electronz_Chapter_6.pptx
Electronz_Chapter_6.pptxElectronz_Chapter_6.pptx
Electronz_Chapter_6.pptx
 
ADC - Types (Analog to Digital Converter)
ADC - Types (Analog to Digital Converter)ADC - Types (Analog to Digital Converter)
ADC - Types (Analog to Digital Converter)
 
Accuracy whitepaper
Accuracy whitepaperAccuracy whitepaper
Accuracy whitepaper
 
Chapter 9.pptx
Chapter 9.pptxChapter 9.pptx
Chapter 9.pptx
 
Ads harmonic balance
Ads harmonic balanceAds harmonic balance
Ads harmonic balance
 
Ms 2446 final
Ms 2446 finalMs 2446 final
Ms 2446 final
 
Bt0064 logic design2
Bt0064 logic design2Bt0064 logic design2
Bt0064 logic design2
 
Real time signal processing
Real time signal processingReal time signal processing
Real time signal processing
 
NM310S Product Brochure: Nonlinear Starter Kit For Agilent VNA
NM310S Product Brochure: Nonlinear Starter Kit For Agilent VNANM310S Product Brochure: Nonlinear Starter Kit For Agilent VNA
NM310S Product Brochure: Nonlinear Starter Kit For Agilent VNA
 
PNAPlus Product Brochure: Nonlinear Starter Kit For Agilent VNA
PNAPlus Product Brochure: Nonlinear Starter Kit For Agilent VNAPNAPlus Product Brochure: Nonlinear Starter Kit For Agilent VNA
PNAPlus Product Brochure: Nonlinear Starter Kit For Agilent VNA
 
CapSense Capacitive Sensors Sigma Delta Algorithm
CapSense Capacitive Sensors Sigma Delta AlgorithmCapSense Capacitive Sensors Sigma Delta Algorithm
CapSense Capacitive Sensors Sigma Delta Algorithm
 

Dernier

Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
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
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditSkynet Technologies
 
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
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...panagenda
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...AliaaTarek5
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesThousandEyes
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
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
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 

Dernier (20)

Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
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
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance Audit
 
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
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
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
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 

Capacitance Sensing - Signal-to-Noise Ratio Requirement for CapSense Applications

  • 1. Capacitance Sensing - Signal-to-Noise Ratio Requirement for CapSense Applications AN2403 Author: Mark Lee Associated Project: No Associated Part Family: CY8C20x34, CY8C21x34, CY8C24x94 GET FREE SAMPLES HERE Software Version: PSoC Designer™ 4.3 Associated Application Notes: AN2233a, AN2277, AN2292, AN2318, AN2352, AN2355, AN2360, AN2394 PSoC Application Notes Index Application Note Abstract A minimum Signal-to-Noise Ratio (SNR) requirement of 5:1 is derived for CapSense applications. This is a system level requirement for all implementations of CapSense. Introduction Definitions A typical output of a PSoC® CapSense system is shown A number of terms need to be defined. in Figure 1. Sensor capacitance is converted into a count value (see Reference [1]). The unprocessed count value is CapSense Counts referred to as the raw count. Processing of the raw count The PSoC user module library includes more than one results in ON/OFF states for the sensor. method for performing CapSense, including CSA and CSD Figure 1. Typical CapSense Signal (see Reference [2]). Regardless of the method, the User Module Firmware Converts Raw Count into ON/OFF function of the CapSense system is to convert sensor States capacitance into a digital count value. Baseline Counts and Thresholds The high level API of the CapSense user module determines the ON/OFF state of a sensor by setting a baseline and comparing counts to threshold levels. Figure 2. Illustration of Baseline and Thresholds In order for the user module to discriminate between ON and OFF states for the sensor, the signal needs to be significantly larger than the noise. The purpose of this Application Note is to establish a “best practices” minimum requirement for how much larger the signal needs to be compared to the noise. December 11, 2006 Document No. 001-13940 Rev. *A 1 [+] Feedback
  • 2. AN2403 Figure 2 illustrates baseline and thresholds using the The same model applies when the sensor is in the ON example data of Figure 1. The baseline is an estimate of state. the average sensor count level when the sensor is in the X(t)= X1 + N1(t) Equation 3 OFF state. The baseline provides a reference level for the ON/OFF comparison. Subtracting the baseline level from X1 is the average of X(t) the raw count produces the difference count that is used in the ON/OFF decision process. N1(t) is the noise component for t during the ON state DifferenceCount = RawCount – Baseline Equation 1 X0 is called the baseline level of the raw counts. The difference between X0 and X1 is called the signal, S. The straight line version of the baseline shown in Figure 2 is a simplification. The actual baseline is dynamically S = (X1 - X0) Equation 4 adjusted by the user module to compensate for environmental changes through a process called baseline The noise components N0(t) and N1(t) are similar but not update. identical. For example, N1(t) usually contains a higher level of AC line noise in finger sensing applications The thresholds are offset by a constant amount from the compared to N0(t). This occurs because the human body baseline level as shown in FIgure 2. The thresholds have acts as an antenna to 50 Hz and 60 Hz line noise, and the the following functions: finger contact with the sensor overlay couples the noise into the CapSense system. Noise Threshold: If the difference count is below the noise threshold, then the baseline is updated. Minimum SNR for CapSense ON Threshold (Finger Threshold + Hysterisis): If the difference count is increasing and exceeds the level of A quot;best practicequot; for CapSense includes the following (Finger Threshold + Hysterisis), then the sensor state threshold levels. changes from OFF to ON. Note the quot;Transition ONquot; indicator in Figure 2. NoiseThreshold = 40%*S OFF Threshold (Finger Threshold - Hysterisis): If the OFF Threshold = 60%*S difference count is decreasing and drops below the level of (Finger Threshold - Hysterisis), then the sensor state ON Threshold = 90%*S changes from ON to OFF. Note the quot;Transition OFFquot; indicator in Figure 2. This will create a 20% window of the signal of which the counts will stay out, except during transition between OFF Signal and Noise and ON. Signal is a generic engineering term that can have many In the worst-case situation, there will be noise sources that meanings. For the capacitive sensor application under add to the background level of noise that drive the level of consideration in this Application Note, signal is defined as the counts, (X(t)-X0), up to the noise threshold during the the change in the average sensor output between the OFF OFF state. These sources include RF transmissions, AC and ON states when the rising edge of the difference line noise, fluorescent lamp ballasts, EL backlighting, and count starts below the noise threshold. switching power supplies. Define the noise level N as the worst case measured peak noise in the OFF state. Noise is another term that has many meanings. The following discussion presents a definition of CapSense N = max(N0(t))= max(X(t))-X0 Equation 5 noise that uses a simple mathematical model of the A quot;best practicequot; is to set a design margin between the sensor output over time. worst-case noise limit, N, to 50% of the noise threshold. When the sensor is in the OFF state, the counts, X(t), can N = 50% * NoiseThreshold Equation 6 be modeled by an average count and a noise component. The CapSense Signal-to-Noise Ratio, SNR, is defined as X(t)= X0 + N0(t) Equation 2 the ratio of signal S to noise N. X0 is the average of X(t) SNR = S:N Equation 7 N0(t) is the noise component for t during the OFF The relation between S and N will now be solved for: state S = N/40%/50% = 5*N Equation 8 Therefore, the minimum requirement for CapSense SNR is: SNR = 5:1 Equation 9 December 11, 2006 Document No. 001-13940 Rev. *A 2 [+] Feedback
  • 3. AN2403 If the measured SNR is found to be below 5:1, consult the Example: Measuring SNR CapSense Best Practices Application Note for the latest advice on improving SNR (see Reference [2]). A good SNR should be measured in the noise environment where layout is essential for a high SNR. For example, the CapSense is intended to be used. In other words, selected overlay thickness or material type may limit SNR measure the system SNR under worst-case noise (see Reference [3]). After addressing layout issues of conditions. lower SNR, then filtering should be used to minimize the The first step in measuring SNR is to monitor the raw noise component of SNR. A simple IIR filter or averaging count for each sensor. This can be done using data of multiple samples may be all that is required to boost the logging to a text file and plotting in a spreadsheet, or SNR above 5:1. through the use of the Cypress FastChart GUI tool and I2C-USB bridge. Whatever the method, the raw count Summary should be observed for SNR measurement. The difference count should not be used in the measurement of SNR A minimum requirement of 5:1 for CapSense has been since it is a function of the baseline update process, which derived. To ensure good performance, make sure your involves filtering (filling the quot;bucketquot;) and nonlinear project meets this minimum requirement. threshold events. References Another factor to consider is how the signal is produced. The worst-case ON and OFF scenario should be used 1. Application Note AN2233a, “Capacitive Switch Scan,” when measuring SNR. If the system is designed to sense Cypress Semiconductor the presence of a finger, then measure SNR with a light 2. Application Note AN2394, “CapSense Best touch of the sensor area, and position the contact point Practices,” Cypress Semiconductor slightly off-center. For automated testing, a worst-case finger touch can often be simulated by an equivalent metal 3. Application Note AN2292, “Layout Guideline for PSoC disc that is the size and shape of a small coin. CapSense,” Cypress Semiconductor As an example of measuring SNR, consider the raw count waveform in Figure 1. X0 = 5925 counts X1 = 6055 counts S = 130 counts N = 5940 - 5925 = 15 counts SNR = 130:15 = 8.6:1 NoiseThreshold = 40%*130 = 52 counts OFF Threshold = 60%*130 = 78 counts ON Threshold = 90%*130 = 117 counts Hysterisis = (117-78)/2 = 19 counts Finger Threshold = (117+78)/2 = 97 counts December 11, 2006 Document No. 001-13940 Rev. *A 3 [+] Feedback
  • 4. AN2403 About the Author Name: Mark Lee Title: Senior Application Engineer Background: Ph.D.E.E. 1992 University of Washington Computer Aided Modeling of the Dielectric Properties of Materials Experienced in the aerospace, medical electronics, and computer industries focusing on new product development. Holder of several patents. Cypress employee since 2005. Contact: olr@cypress.com In March of 2007, Cypress recataloged all of its Application Notes using a new documentation number and revision code. This new documentation number and revision code (001-xxxxx, beginning with rev. **), located in the footer of the document, will be used in all subsequent revisions. PSoC is a registered trademark of Cypress Semiconductor Corp. quot;Programmable System-on-Chip,quot; PSoC Designer, and PSoC Express are trademarks of Cypress Semiconductor Corp. All other trademarks or registered trademarks referenced herein are the property of their respective owners. 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, 2006-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. 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. December 11, 2006 Document No. 001-13940 Rev. *A 4 [+] Feedback