Download Print this page
Infineon PSoC 3 Design Manual
Hide thumbs Also See for PSoC 3:

Advertisement

Quick Links

AN75400
PSoC™ 3 and PSoC™ 5LP CAPSENSE™ design
guide

About this document

Scope and purpose
This document provides guidance for designing CAPSENSE™ applications with the PSoC™ 3 and PSoC™ 5LP
family of devices.
Intended audience
It is intended for design engineers who are familiar with capacitive sensing technology and have chosen the
PSoC™ 3 and PSoC™ 5LP family of devices for their applications.
Application note
Please read the sections "Important notice" and "Warnings" at the end of this document
001-75400 Rev. *F
www.infineon.com
2024-06-26

Advertisement

loading
Need help?

Need help?

Do you have a question about the PSoC 3 and is the answer not in the manual?

Questions and answers

Summary of Contents for Infineon PSoC 3

  • Page 1: About This Document

    It is intended for design engineers who are familiar with capacitive sensing technology and have chosen the PSoC™ 3 and PSoC™ 5LP family of devices for their applications. Application note Please read the sections “Important notice” and “Warnings” at the end of this document 001-75400 Rev. *F www.infineon.com 2024-06-26...
  • Page 2: Table Of Contents

    Table of contents About this document ........................1 Table of contents ..........................2 Introduction .......................... 5 Infineon CAPSENSE™ documentation ecosystem ................. 5 PSoC™ 3 and PSoC™ 5LP device features ....................8 Document conventions ........................... 9 CAPSENSE™ technology ......................10 CAPSENSE™ fundamentals ........................10 Capacitance conversion ........................
  • Page 3 PSoC™ 3 and PSoC™ 5LP CAPSENSE™ design guide Table of contents 5.3.7 Widget resolution ..........................33 5.3.8 Filter selection ..........................34 5.3.8.1 Raw data noise filter ........................34 5.3.8.2 Position noise filter ........................35 5.3.9 High-level parameter recommendations ..................35 Low-level parameters ...........................
  • Page 4 PSoC™ 3 and PSoC™ 5LP CAPSENSE™ design guide Table of contents Manual tuning ............................67 SmartSense Auto-Tuning ........................69 6.3.1 Guidelines ............................70 6.3.2 Parameter settings ........................... 70 6.3.2.1 Sensor auto reset ........................70 6.3.2.2 Debounce ............................ 70 6.3.2.3 Modulator capacitor pin ......................70 6.3.2.4 Sensitivity level ...........................
  • Page 5: Introduction

    CAPSENSE™. Infineon CAPSENSE™ documentation ecosystem Figure 1 Table 1 summarize the Infineon CAPSENSE™ documentation ecosystem. These resources enable you to quickly access the information you need to complete a CAPSENSE™ product design. Figure 1 shows a typical product design cycle with capacitive sensing. This guide covers the topics highlighted in green.
  • Page 6 PSoC™ 3 and PSoC™ 5LP CAPSENSE™ design guide Introduction 1. Understanding CAPSENSE technology Topics covered in this document 2. Specify system requirements and Topics covered in other documents characteristics Not covered in any document, user should define the process based on application 3.
  • Page 7 PSoC™ 3 and PSoC™ 5LP CAPSENSE™ design guide Introduction Table 1 Infineon documents supporting numbered design tasks of Figure 1 Numbered Supporting Infineon CAPSENSE™ documentation design task Name Section Description In-depth theory of CAPSENSE™ Getting started with CAPSENSE™ operation 4 and 5 Describe device features and assist in Getting started with CAPSENSE™...
  • Page 8: Psoc™ 3 And Psoc™ 5Lp Device Features

    PSoC™ 3 and PSoC™ 5LP CAPSENSE™ design guide Introduction PSoC™ 3 and PSoC™ 5LP device features PSoC™ 3 and PSoC™ 5LP are programmable embedded system-on-chips that integrate configurable analog and digital peripheral functions, memory, and a microcontroller. These devices are highly flexible and can implement many functions in addition to CAPSENSE™.
  • Page 9: Document Conventions

    PSoC™ 3 and PSoC™ 5LP CAPSENSE™ design guide Introduction Document conventions Convention Usage Courier New Displays file locations, user entered text, and source code: C:\ ...cd\icc\ Italics Displays file names and reference documentation: Read about the sourcefile.hex file in the PSoC™ Designer User Guide. [Bracketed, Bold] Displays keyboard commands in procedures: [Enter] or [Ctrl] [C]...
  • Page 10: Capsense™ Technology

    PSoC™ 3 and PSoC™ 5LP CAPSENSE™ design guide CAPSENSE™ technology CAPSENSE™ technology CAPSENSE™ fundamentals CAPSENSE™ is a touch sensing technology that works by measuring the capacitance of each I/O pin that has been designated as a sensor. The total capacitance on each of the sensor pins can be modeled as equivalent lumped capacitors with values of Cx1 through Cxn as shown in Figure 2.
  • Page 11: Capacitance Conversion

    PSoC™ 3 and PSoC™ 5LP CAPSENSE™ design guide CAPSENSE™ technology D = Overlay thickness Figure 3 CAPSENSE™ system equivalent model Even without a finger touching the overlay, the sensor input pin has some parasitic capacitance (C ). C results from the combination of the CAPSENSE™ controller internal parasitic and electric field coupling among the sensor pad, traces, and vias, and other conductors in the system, such as ground plane, other traces, any metal in the product’s chassis or enclosure, and so on.
  • Page 12: Capacitive Sigma Delta (Csd)

    PSoC™ 3 and PSoC™ 5LP CAPSENSE™ design guide CAPSENSE™ technology 2.2.1 Capacitive sigma delta (CSD) Capacitive sigma delta (CSD) is one method for converting sensor capacitance into digital counts. The CSD method outperforms other sensing methods. Figure 4 shows a block diagram of the CSD method. Voltage Reference Charging C...
  • Page 13: Csd Implementations

    SmartSense Auto-Tuning is an advanced technology from Infineon. SmartSense is a sophisticated algorithm, which automatically optimizes system performance in a wide range of applications. It is easy to use and reduces design cycle time by eliminating manual tuning during the prototype and manufacturing stages.
  • Page 14: Capsense™ In Psoc™ 3 And Psoc™ 5Lp

    (Vref). The sigma delta converter outputs a bit stream to a counter. The counter outputs the raw count. The CPU processes the raw count and determines the sensor’s status. Figure 6 shows the IDAC Sourcing method of implementing CSD. Other methods are explained in Current source methods. PSoC 3/PSoC Switching Clock IDAC Counting Clock Vref...
  • Page 15: Unique Capsense™ Features

    PSoC™ 3 and PSoC™ 5LP CAPSENSE™ design guide CAPSENSE™ in PSoC™ 3 and PSoC™ 5LP Unique CAPSENSE™ features 3.2.1 Two channel design The PSoC™ 3 and PSoC™ 5LP devices are capable of scanning two sensors at a time. This cuts the scan time almost in half.
  • Page 16: Sio Pins

    PSoC™ 3 and PSoC™ 5LP CAPSENSE™ design guide CAPSENSE™ in PSoC™ 3 and PSoC™ 5LP Guard Sensor Button Shield Slider Figure 7 Shield electrode and guard sensor 3.2.2.1 SIO pins The PSoC™ 3 and PSoC™ 5LP devices have special input/output (SIO) pins, which feature a programmable “logic-high”...
  • Page 17: Idac Sourcing Method

    PSoC™ 3 and PSoC™ 5LP CAPSENSE™ design guide CAPSENSE™ in PSoC™ 3 and PSoC™ 5LP 3.2.3.1 IDAC sourcing method In this configuration, the CAPSENSE™ sensor switches between C and GND continuously, discharging C The IDAC is configured in source mode and is switched on when C voltage drops below Vref.
  • Page 18: Idac Sinking Method

    PSoC™ 3 and PSoC™ 5LP CAPSENSE™ design guide CAPSENSE™ in PSoC™ 3 and PSoC™ 5LP 3.2.3.2 IDAC sinking method In this configuration, the CAPSENSE™ sensor switches between V and C continuously, charging C . The IDAC is configured in sink mode and switched on when C voltage exceeds Vref.
  • Page 19: External Resistor Method

    PSoC™ 3 and PSoC™ 5LP CAPSENSE™ design guide CAPSENSE™ in PSoC™ 3 and PSoC™ 5LP 3.2.3.3 External resistor method This configuration is similar to the IDAC Sinking method except it uses an external resistor (bleed resistor) to discharge C in place of the IDAC. The CAPSENSE™ sensor switches between V and C continuously, charging C...
  • Page 20: Tuning

    PSoC™ 3 and PSoC™ 5LP CAPSENSE™ design guide CAPSENSE™ in PSoC™ 3 and PSoC™ 5LP 3.2.4 Tuning SmartSense Auto-Tuning is an advanced technology that tunes each CAPSENSE™ button automatically at power up and maintains optimum button performance during runtime. It reduces design cycle time and takes care of process variations.
  • Page 21: Manual Tuning Features

    PSoC™ 3 and PSoC™ 5LP CAPSENSE™ design guide CAPSENSE™ in PSoC™ 3 and PSoC™ 5LP Immunity to process variations can vary because of PCB layout and trace length, PCB manufacturing process variation, or vendor-to-vendor PCB variation within a multi-sourced supply chain. The sensitivity of a button depends on C ;...
  • Page 22: Non-Blocking Architecture

    Capacitive Touch Motor Control LED Control LCD Display Interface Communication PSOC 3/PSoC 5LP Protocol Analog Signal Chain Digital Filtering Analog Input Figure 14 CAPSENSE™ PLUS other functionalities in the system Visit applications on our website to browse areas where CAPSENSE™ Plus with PSoC™ 3 and PSoC™ 5LP devices...
  • Page 23: Capsense™ Design Tools

    PSoC™ 3 and PSoC™ 5LP CAPSENSE™ design guide CAPSENSE™ design tools CAPSENSE™ design tools Infineon offers a full line of hardware and software tools for developing your CAPSENSE™ capacitive touch sensing application. See datasheets for ordering information in references section.
  • Page 24: Hardware Kits

    CY8CKIT-050B PSoC™ 5LP development kit • 4.2.2 Universal CAPSENSE™ module boards Infineon provides Universal CAPSENSE™ module boards which feature a variety of CAPSENSE™ sensors, LEDs, and interfaces to meet your needs. CY3280-BSM simple button module • CY3280-BMM matrix button module •...
  • Page 25: Capsense_Csd Component

    PSoC™ 3 and PSoC™ 5LP CAPSENSE™ design guide CapSense_CSD Component CapSense_CSD Component CapSense_CSD Component Data Processing Button ON/OFF Sensor Widget Raw Count Data Data Finger Position Figure 17 CapSense_CSD Component block diagram The CapSense_CSD component provides a complete CAPSENSE™ system. The component has several parameters classified as high-level or low-level.
  • Page 26: Parameter Summary

    PSoC™ 3 and PSoC™ 5LP CAPSENSE™ design guide CapSense_CSD Component Parameter summary Figure 19 shows a screen shot of the CapSense_CSD component from PSoC™ Creator as well as the configuration window. You can open the configuration window by double clicking on the component or by right clicking and selecting “Configure”.
  • Page 27 PSoC™ 3 and PSoC™ 5LP CAPSENSE™ design guide CapSense_CSD Component General Widget config Scan order Advanced Tune Helper Digital resource Number of Widget implementation, sensor elements resolution channel 0/ channel 1 API resolution Negative Voltage reference noise source threshold Position noise Low baseline filter reset...
  • Page 28: Global Arrays

    PSoC™ 3 and PSoC™ 5LP CAPSENSE™ design guide CapSense_CSD Component Global arrays The CAPSENSE™ system uses several global arrays to ensure proper detection and operation in presence of environmental changes. These arrays should not be altered manually, but may be inspected for debugging purposes.
  • Page 29: Difference Count

    PSoC™ 3 and PSoC™ 5LP CAPSENSE™ design guide CapSense_CSD Component 5.2.3 Difference count The difference count is the difference between the raw count and the baseline of the sensor. Usually, the difference count is zero when the sensor is inactive. When the sensor is touched, it causes the raw count to increase, and results in a positive difference count value.
  • Page 30: Finger Threshold

    PSoC™ 3 and PSoC™ 5LP CAPSENSE™ design guide CapSense_CSD Component Figure 22 High-level parameters 5.3.1 Finger threshold The finger threshold parameter defines the sensitivity of the sensor to finger touches. It is used in conjunction with the Hysteresis parameter to determine the sensor state, as defined in Equation 4.
  • Page 31: Noise Threshold

    PSoC™ 3 and PSoC™ 5LP CAPSENSE™ design guide CapSense_CSD Component 5.3.4 Noise threshold For individual sensors, the Noise Threshold parameter sets the upper raw count limit for updating the baseline value. For slider sensors, it sets the lower raw count limit for counting results in the centroid calculation. Possible values are 3 to 255.
  • Page 32: Sensor Auto Reset

    PSoC™ 3 and PSoC™ 5LP CAPSENSE™ design guide CapSense_CSD Component The Negative Noise Threshold parameter acts as a negative difference count threshold. If the raw count is below the baseline minus the negative noise threshold for the number of samples specified by the Low Baseline Reset parameter, the baseline is set to the new raw count value.
  • Page 33: Widget Resolution

    PSoC™ 3 and PSoC™ 5LP CAPSENSE™ design guide CapSense_CSD Component 5.3.7 Widget resolution Figure 26 Widget resolution parameter This parameter decides whether to use 8-bit or 16-bit variables for signal count. Signal count is the difference between raw counts and baseline as shown in Figure 21.
  • Page 34: Filter Selection

    PSoC™ 3 and PSoC™ 5LP CAPSENSE™ design guide CapSense_CSD Component 5.3.8 Filter selection 5.3.8.1 Raw data noise filter Figure 27 Raw data noise filter parameter Raw count is the raw output of the CAPSENSE™ system and has inherent noise. The noise on raw counts can be minimized by using software filters.
  • Page 35: Position Noise Filter

    PSoC™ 3 and PSoC™ 5LP CAPSENSE™ design guide CapSense_CSD Component 5.3.8.2 Position noise filter Figure 28 Position noise filter parameter Some widget types such as linear slider and radial slider have finger position output. The Position Noise Filter parameter allows you to select from several software filters to clean up the finger position output. 5.3.9 High-level parameter recommendations The following recommendations are a starting place for selecting the optimal parameter settings...
  • Page 36: Low-Level Parameters

    PSoC™ 3 and PSoC™ 5LP CAPSENSE™ design guide CapSense_CSD Component Low-level parameters Low level parameters define the behavior of the CAPSENSE™ system at the physical layer and relate to the conversion from capacitance to raw count. 5.4.1 Clock settings 5.4.1.1 Scan clock Figure 29 Scan clock parameter...
  • Page 37: Enable Clock Input

    PSoC™ 3 and PSoC™ 5LP CAPSENSE™ design guide CapSense_CSD Component 5.4.1.2 Enable clock input Figure 30 External clock input parameter Selecting the Enable Clock Input parameter means that the source clock originates outside of the CAPSENSE™_CSD block. When this option is enabled, the Scan Clock frequency is disabled and a terminal appears on the CapSense_CSD component as shown in Figure 30.
  • Page 38: Analog Switch Divider

    PSoC™ 3 and PSoC™ 5LP CAPSENSE™ design guide CapSense_CSD Component 5.4.2 Analog switch divider 5.4.2.1 Analog switch divider (prescaler) Figure 31 Analog switch divider parameter The Analog Switch Divider parameter sets the switching frequency for the CAPSENSE™ sensors. The CAPSENSE™ sensors are continuously switched between C and GND in IDAC Sourcing mode.
  • Page 39: Multiple Analog Switch Divider

    PSoC™ 3 and PSoC™ 5LP CAPSENSE™ design guide CapSense_CSD Component 5.4.2.2 Multiple analog switch divider Figure 32 Multiple analog switch divider parameter The CAPSENSE™_CSD allows you to select an individual Analog Switch Divider value for each CAPSENSE™ sensor or to have one common Analog Switch Divider value for all of the sensors. A common Analog Switch Divider value is suitable when C is nearly the same for all of the sensors.
  • Page 40: Analog Switch Drive Source

    PSoC™ 3 and PSoC™ 5LP CAPSENSE™ design guide CapSense_CSD Component 5.4.2.3 Analog switch drive source Figure 33 Analog switch drive source parameter This parameter selects how the Analog Switch Divider is implemented. The Analog Switch Divider is a timer based divider. The resource utilized to implement this timer can be selected from the following three options: Direct –...
  • Page 41: Pseudo Random Sequence (Prs)

    PSoC™ 3 and PSoC™ 5LP CAPSENSE™ design guide CapSense_CSD Component 5.4.3 Pseudo random sequence (PRS) Figure 34 PRS EMI reduction parameter This parameter gives you the ability to use a pseudo random sequence (PRS) on the Switching Clock. The PRS varies the Switching Clock frequency around its central frequency to spread its spectrum and reduce EMI.
  • Page 42: Scan Resolution

    PSoC™ 3 and PSoC™ 5LP CAPSENSE™ design guide CapSense_CSD Component 5.4.4 Scan resolution Figure 35 Scan resolution parameter This parameter determines the scanning resolution in bits. The maximum raw count value for a Scan N–1 Resolution of N bits is 2 .
  • Page 43: Idac Current

    PSoC™ 3 and PSoC™ 5LP CAPSENSE™ design guide CapSense_CSD Component 5.4.5 IDAC current 5.4.5.1 IDAC value Figure 36 IDAC value parameter This parameter sets the IDAC current. When the IDAC current decreases, raw counts increase along with N–1 sensitivity. The maximum raw count value for a Scan Resolution of N bits is 2 .
  • Page 44: Idac Range

    PSoC™ 3 and PSoC™ 5LP CAPSENSE™ design guide CapSense_CSD Component 5.4.5.2 IDAC range Figure 37 IDAC range parameter This parameter selects the range of the IDAC current. The IDAC current required varies directly with C . For high a higher range should be chosen and vice versa. Possible values are 32 µA, 255 µA, and 2048 µA. 5.4.6 Scan speed Figure 38...
  • Page 45 PSoC™ 3 and PSoC™ 5LP CAPSENSE™ design guide CapSense_CSD Component This parameter sets sensor scanning speed. Faster scanning speeds provide good response time. Slower scanning speeds provide improved SNR and better immunity to power supply and temperature changes. Possible values are Very Fast, Fast, Normal, and Slow. The Scan Speed clock sets the Counting Clock using the following equation: ��������...
  • Page 46: Digital Resource Implementation

    PSoC™ 3 and PSoC™ 5LP CAPSENSE™ design guide CapSense_CSD Component 5.4.7 Digital resource implementation Figure 39 Digital resource implementation parameter The Scan Speed setting uses a timer based divider to create the Counting Clock. This parameter allows you to select the resource for implementing this divider. The Digital Resource Implementation can be chosen individually for each channel.
  • Page 47: Current Source

    PSoC™ 3 and PSoC™ 5LP CAPSENSE™ design guide CapSense_CSD Component 5.4.8 Current source Figure 40 Current source parameter This parameter selects the current source method. Possible values are IDAC Sourcing, IDAC Sinking, and External Resistor. See Current source methods for a detailed description of these current source methods. Application note 001-75400 Rev.
  • Page 48: Number Of Bleed Resistors

    PSoC™ 3 and PSoC™ 5LP CAPSENSE™ design guide CapSense_CSD Component 5.4.8.1 Number of bleed resistors Figure 41 Number of bleed resistors parameter The External Resistor method requires bleed resistors external to PSoC™ device. This parameter allows you to specify the number of external bleed resistors. Up to three bleed resistors can be connected. For two-channel capacitive sensing, each channel needs a separate set of bleed resistors.
  • Page 49: Voltage Reference Source

    PSoC™ 3 and PSoC™ 5LP CAPSENSE™ design guide CapSense_CSD Component 5.4.9 Voltage reference source Figure 42 Voltage reference source parameter This parameter allows you to specify the voltage reference source. The options are: Vref 1.024 V – This is the bandgap voltage •...
  • Page 50: Shield Electrode And Guard Sensor

    PSoC™ 3 and PSoC™ 5LP CAPSENSE™ design guide CapSense_CSD Component 5.4.10 Shield electrode and guard sensor Figure 43 Shield electrode and guard sensor parameters 5.4.10.1 Shield This parameter should be enabled if your design uses shield electrodes. See Water tolerant design.
  • Page 51: Using Sio Pin For Shield Electrode

    PSoC™ 3 and PSoC™ 5LP CAPSENSE™ design guide CapSense_CSD Component 5.4.10.4 Using SIO pin for shield electrode Figure 44 SIO pin used as shield electrode When the Shield is enabled a shield terminal appears on the component as shown in Figure An I/O pin should be connected to this terminal.
  • Page 52: Multiple Shield Electrode Pins

    PSoC™ 3 and PSoC™ 5LP CAPSENSE™ design guide CapSense_CSD Component 5.4.10.5 Multiple shield electrode pins Figure 46 Multiple shield electrode pins When the shield area is large, a single pin may not be sufficient to drive the shield electrode. You need to verify that the shield electrode completely charges and discharges.
  • Page 53: Widget Configuration

    PSoC™ 3 and PSoC™ 5LP CAPSENSE™ design guide CapSense_CSD Component Widget configuration The Widgets Config tab allows you to add and configure widgets. 5.5.1 Adding a widget Figure 48 Adding widgets To add a widget select the type of widget and click Add. 5.5.2 Number of sensor elements The number of sensors for each widget is set in this tab.
  • Page 54: Proximity Sensor

    PSoC™ 3 and PSoC™ 5LP CAPSENSE™ design guide CapSense_CSD Component 5.5.4 Proximity sensor Figure 49 Proximity sensor parameters A proximity sensor detects the presence of hand near the sensor without actually touching it. A proximity sensor can consist of a long trace around the perimeter of the user interface on the PCB. Alternately, you can short the sensors together and scan them as a single sensor.
  • Page 55: Number Of Dedicated Sensor Elements

    PSoC™ 3 and PSoC™ 5LP CAPSENSE™ design guide CapSense_CSD Component 5.5.4.1 Number of dedicated sensor elements Figure 50 Combing existing sensors with proximity sensor To combine existing sensors with a dedicated proximity sensor set the Number of Dedicated Sens on the Widgets Config tab as shown in Figure 49.
  • Page 56: Tuning Method

    PSoC™ 3 and PSoC™ 5LP CAPSENSE™ design guide CapSense_CSD Component Tuning method Figure 51 Tuning method parameter This parameter allows you to select how the CAPSENSE™ system will be tuned. For all tuning methods the Tuner GUI can be used to monitor the CAPSENSE™ signals. Possible values are: Auto –...
  • Page 57: Sensitivity

    PSoC™ 3 and PSoC™ 5LP CAPSENSE™ design guide CapSense_CSD Component 5.6.1 Sensitivity The Sensitivity parameter sets the value of C for the SmartSense Auto-Tune algorithm. The Sensitivity setting is multiplied by 0.1 pF to determine C . A setting of 1 represents C = 0.1 pF a setting of 4 represents C = 0.4 pF.
  • Page 58: Move To Channel 1 / Channel 0

    PSoC™ 3 and PSoC™ 5LP CAPSENSE™ design guide CapSense_CSD Component 5.7.1 Move to Channel 1 / Channel 0 Figure 53 Setting channel assignment for sensor This parameters allows you to specify the channel assignment for each sensor. On the Scan Order tab, select the desired sensor, and click on Move to Channel 1 or Move to Channel 0.
  • Page 59: Pin Assignment For Two Channel Design

    PSoC™ 3 and PSoC™ 5LP CAPSENSE™ design guide CapSense_CSD Component 5.7.2 Pin assignment for two channel design Left side of the analog routing Right side of the analog routing Figure 54 Pin assignment for two channel design Each GPIO of PSoC™ is a part of either the left side or the right side of analog routing, depending on its connection to the internal routing buses.
  • Page 60: Tuner Gui

    PSoC™ 3 and PSoC™ 5LP CAPSENSE™ design guide CapSense_CSD Component Tuner GUI One of the useful features of CapSense_CSD component is an embedded GUI that lets you monitor the CAPSENSE™ signals. The Tuner GUI is available for both Auto and Manual tuning. CAPSENSE™...
  • Page 61 PSoC™ 3 and PSoC™ 5LP CAPSENSE™ design guide CapSense_CSD Component 4. Place and configure an EZI2C component. Figure 57 Rename the EZI2C component 5. Add the following section of code to your project. #include <device.h> void main() CyGlobalIntEnable; /* Global Interrupt enable */ CapSense_TunerStart();...
  • Page 62 PSoC™ 3 and PSoC™ 5LP CAPSENSE™ design guide CapSense_CSD Component Figure 58 Tuner GUI 3. Click on the MiniProg3 in the Tuner Communication Setup window and set the parameters as shown here: Figure 59 Tuner Communication Setup Note: The voltage settings for the MiniProg3 must match the voltage settings on the board. 4.
  • Page 63 PSoC™ 3 and PSoC™ 5LP CAPSENSE™ design guide CapSense_CSD Component Figure 60 Starting Tuner Communication 6. Set the parameters for each sensor. Clicking OK at the lower right of the Tuner window sets the parameters in the component once tuning is complete. Figure 61 Setting the parameters for a sensor Application note...
  • Page 64 PSoC™ 3 and PSoC™ 5LP CAPSENSE™ design guide CapSense_CSD Component 7. The Graphing tab allows you to monitor signals. You can log data using the Logging tab. Figure 62 Monitoring the CAPSENSE™ results Note: The raw count signal displayed in the Graphing tab is the unfiltered raw count. If a filter is used on raw count, the SNR should be calculated using the filtered raw count.
  • Page 65: Capsense™ Performance Tuning

    PSoC™ 3 and PSoC™ 5LP CAPSENSE™ design guide CAPSENSE™ performance tuning CAPSENSE™ performance tuning Tuning is the process of determining the optimum values for the CAPSENSE™ parameters. Tuning is required to maintain high sensitivity to touch and to compensate for process variations in the sensor board, overlay material, and environmental conditions.
  • Page 66: Capsense™ Snr

    PSoC™ 3 and PSoC™ 5LP CAPSENSE™ design guide CAPSENSE™ performance tuning Note: If you use a Raw data noise filter in your system, calculate noise using the filtered raw count. The Tuner GUI reports the unfiltered raw count on Graphing tab, therefore, you should log the data to calculate noise.
  • Page 67: Manual Tuning

    PSoC™ 3 and PSoC™ 5LP CAPSENSE™ design guide CAPSENSE™ performance tuning ���� ������ 10×�� �� �� �� Equation 8 Manual tuning The flow chart in Figure 65 provides step-by-step instructions for manually tuning a CapSense_CSD component. Application note 001-75400 Rev. *F 2024-06-26...
  • Page 68 PSoC™ 3 and PSoC™ 5LP CAPSENSE™ design guide CAPSENSE™ performance tuning Start Enable the Shield electrode if needed in the design Set the switching frequency (Scan Clock and Analog Switch Divider) Set the Scan Speed to Fast Enable the PRS according to design requirement and set the PRS resolution (8 or 16 bits) Open the Tuner GUI to tune the...
  • Page 69: Smartsense Auto-Tuning

    PSoC™ 3 and PSoC™ 5LP CAPSENSE™ design guide CAPSENSE™ performance tuning CAPSENSE™_CSD Configuration window. Once you have changed this value you must rebuild the project and reprogram the device. 3. The Scan Speed can be changed later if the SNR or scan time are unacceptable. 4.
  • Page 70: Guidelines

    PSoC™ 3 and PSoC™ 5LP CAPSENSE™ design guide CAPSENSE™ performance tuning 6.3.1 Guidelines In order to use SmartSense Auto-Tuning: for all sensors must be 5–45 pF • must be at least 0.1-pF • capacitor X7R, 2.2 nF, voltage rating more than 5 V •...
  • Page 71 PSoC™ 3 and PSoC™ 5LP CAPSENSE™ design guide CAPSENSE™ performance tuning Figure 66 Raw count graph for a typical sensor with a finger touch Application note 001-75400 Rev. *F 2024-06-26...
  • Page 72: Design Considerations

    PSoC™ 3 and PSoC™ 5LP CAPSENSE™ design guide Design considerations Design considerations When designing capacitive touch-sense technology into your application, it is crucial to keep in mind that the CAPSENSE™ device exists within a larger framework. Careful attention to every level of detail from PCB layout to user interface to end-use operating environment will lead to robust and reliable system performance.
  • Page 73: Power Consumption

    PSoC™ 3 and PSoC™ 5LP CAPSENSE™ design guide Design considerations Figure 67 Filtering of raw counts; black = unfiltered raw counts, green = filtered raw counts Figure 67 shows the effect of noise and filtering on raw counts. The noise was created by switching neighboring sensors at 500 kHz in order to simulate a noise due to high switching lines near to sensor.
  • Page 74: Sleep-Scan Method

    PSoC™ 3 and PSoC™ 5LP CAPSENSE™ design guide Design considerations There are several ways to reduce the power consumption of your CAPSENSE™ capacitive touch-sensing system. Set GPIO drive mode to HI-Z: Be default all the GPIO pins are configured as HI-Z. But if the project has •...
  • Page 75: Measuring Average Power Consumption

    PSoC™ 3 and PSoC™ 5LP CAPSENSE™ design guide Design considerations = Device sleep time sleep Total Time = T active sleep The average power consumed by the device can be calculated as follows: ���������������� = �� × ���������������� ���� Equation 10 Where, = Device average power average...
  • Page 76: Sleep Current

    PSoC™ 3 and PSoC™ 5LP CAPSENSE™ design guide Design considerations 7.2.2.3 Sleep current The sleep current value for the PSoC™ 3 is 1 µA and for PSoC™ 5LP is 2 µA. You can measure sleep current by creating a project that keeps the device in sleep mode forever and use the method described in Active current.
  • Page 77: Response Time

    PSoC™ 3 and PSoC™ 5LP CAPSENSE™ design guide Design considerations Active Time for PSoC™ 3, CPU = 24 MHz, Resolution 12-Bits and Scan Speed Normal = 3760 µs. active Sleep Current from the datasheet = 1 µA sleep Sleep Time, assume sleep period is set to 128 ms in sleep timer Sleep Time = Total Time –...
  • Page 78: Debounce

    PSoC™ 3 and PSoC™ 5LP CAPSENSE™ design guide Design considerations While (1) Scan all sensors and process sensor results Execute half of the other application code Scan all sensors and process sensor results Execute remaining other application code Figure 72 Scanning multiple time within the loop to improve the response time 7.3.3 Debounce...
  • Page 79: Filter Delay

    PSoC™ 3 and PSoC™ 5LP CAPSENSE™ design guide Design considerations The maximum delay due to debounce is: ������ ���������� = ���������������� × �������� ���������������� Equation 11 Debounce should set to 1 when you use sleep mode. Sleep mode delays response time, so it should effectively debounce the signal.
  • Page 80: Interrupt Priority

    PSoC™ 3 and PSoC™ 5LP CAPSENSE™ design guide Design considerations Step change due to Finger = 320 counts Finger threshold = 75% of peak finger response = 240 counts. To calculate the delay caused by the filter: ��−1 �� = �� × �� ��...
  • Page 81: Pin Assignments

    PSoC™ 3 and PSoC™ 5LP CAPSENSE™ design guide Design considerations Pin assignments 7.4.1.1 Opamp output pins The opamp outputs are directly connected to P0[0], P0[1], P3[6], and P3[7]. If these pins are used for CAPSENSE™, the opamps become unusable. These pins have higher C because they are directly connected to opamp outputs.
  • Page 82: Glossary

    CAPSENSE™ Infineon’s touch-sensing user interface solution. The industry’s No. 1 solution in sales by 4x over No. 2. CAPSENSE™ Mechanical Button Replacement (MBR) Infineon’s configurable solution to upgrade mechanical buttons to capacitive buttons, requires minimal engineering effort to configure the sensor parameters and does not require firmware development.
  • Page 83 PSoC™ 3 and PSoC™ 5LP CAPSENSE™ design guide Glossary Capacitive sigma delta (CSD) is a Infineon-patented method of performing self-capacitance (also called self- cap) measurements for capacitive sensing applications. In CSD mode, the sensing system measures the self-capacitance of an electrode, and a change in the self- capacitance is detected to identify the presence or absence of a finger.
  • Page 84 PSoC™ 3 and PSoC™ 5LP CAPSENSE™ design guide Glossary Guard sensor Copper trace that surrounds all the sensors on the PCB, similar to a button sensor and is used to detect a liquid stream. When the Guard Sensor is triggered, firmware can disable scanning of all other sensors to prevent false touches.
  • Page 85 PSoC™ 3 and PSoC™ 5LP CAPSENSE™ design guide Glossary Modulation capacitor (CMOD) An external capacitor required for the operation of a CSD block in Self-Capacitance sensing mode. Modulator clock A clock source that is used to sample the modulator output from a CSD block during a sensor scan. This clock is also fed to the Raw Count counter.
  • Page 86 PSoC™ 3 and PSoC™ 5LP CAPSENSE™ design guide Glossary Proximity sensor A sensor that can detect the presence of nearby objects without any physical contact. Radial slider A widget consisting of more than one sensor arranged in a specific circular fashion to detect the physical position of a finger.
  • Page 87 PSoC™ 3 and PSoC™ 5LP CAPSENSE™ design guide Glossary Sensor ganging Ganged sensors. Shield electrode Copper fill around sensors to prevent false touches due to the presence of water or other liquids. Shield Electrode is driven by the shield signal output from the CSD block. See Driven-shield. Shield tank capacitor (C An optional external capacitor (C Tank Capacitor) used to enhance the drive capability of the CSD shield,...
  • Page 88: References

    Code examples Infineon offers a large collection of code examples to get your design up and running fast. Open PSoC™ Creator, and click on ‘find example project’ link in the Start Page. Following two example projects are recommended for familiarizing with CAPSENSE™:...
  • Page 89 PSoC™ 3 and PSoC™ 5LP CAPSENSE™ design guide References Design support Infineon has a variety of design support channels to ensure the success of your CAPSENSE™ solutions. Knowledge based articles – Browse technical articles by product family or perform a search on various •...
  • Page 90: Revision History

    Getting started with CAPSENSE™ guide. 201601-21 Added Glossary 2017-04-19 Updated logo and copyright. 2017-05-16 No change. Sunset review 2024-06-26 Fixed typo and made a few edits throughout the document Migrated to the Infineon template Application note 001-75400 Rev. *F 2024-06-26...
  • Page 91: Disclaimer

    Infineon Technologies hereby Infineon Technologies’ products may not be used in disclaims any and all warranties and liabilities of any applications where a failure of the product or any any kind (including without limitation warranties of © 2024 Infineon Technologies AG.

This manual is also suitable for:

Psoc 5lp capsense