background image

CY8C20xx7/S CapSense

®

 Design Guide

 

Doc. No. 001-78329 Rev. *E 

70 

9. Resources 

 

 

9.1  Website 

Visi

Cypress‟s CapSense Controllers website

 to access all of the reference material discussed in this section. 

Find  a  variety  of  technical  resources  for  the  CapSense  CY8C20xx7/S  family  of  devices  on  th

CY8C20xx7/S

  web 

page. 

9.2  Datasheet 

The datasheet for the CapSense CY8C20xx7/S family of devices are available a

www.cypress.com.

 

 

CY8C20xx7/S Datasheet

 

9.3  Technical Reference Manual 

Cypress  created  the  following  technical  reference  manual  to  give  quick  and  easy  access  to  information  on  the 
CapSense controller functionality, including top-level architectural diagrams along with register and timing diagrams. 

 

CY8C20xx7/S Technical Reference Manual (TRM)

 

Summary of Contents for CY8C20xx7/S CapSense Series

Page 1: ...CY8C20xx7 S AN78329 CapSense Design Guide Doc No 001 78329 Rev E Cypress Semiconductor 198 Champion Court San Jose CA 95134 1709 Phone USA 800 858 1810 Phone Intnl 408 943 2600 www cypress com...

Page 2: ...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 transfe...

Page 3: ...ser Modules 20 3 1 2 CY8C20xx7 S QuietZone Starter Kit 21 3 1 3 CapSense Data Viewing Tools 21 3 2 User Module Overview 22 3 3 CapSense User Module Global Arrays 22 3 3 1 Raw Count 23 3 3 2 Baseline 2...

Page 4: ...EMCPLUS UM 44 4 3 9 Firmware Design Guidelines 45 4 4 Design Migration from CY8C20xx6A AS to CY8C20xx7 S 47 4 4 1 Discontinued Support User Modules 47 4 4 2 Improvement and New Features 47 4 4 3 Pin C...

Page 5: ...2 C Slave Implementation in Sleep Mode 67 8 1 4 Sleep Mode Complications 67 8 1 5 Pending Interrupts 67 8 1 6 Global Interrupt Enable 68 8 2 Post Wakeup Execution Sequence 68 8 2 1 PLL Mode Enabled 68...

Page 6: ...l and mechanical design considerations for CapSense Low power design considerations for CapSense Additional resources and support for designing CapSense into your system 1 2 Cypress s CapSense Documen...

Page 7: ...pe 12 Test and evaluate system functionality and CapSense performance Performance satisfactory 13 Production Yes No Topics covered in this document 1 Understanding CapSense technology 4 Mechanical des...

Page 8: ...045 CY8C20055 CY8C20065 CY8C20xx6A CY8C20xx7 AN59389 Host Sourced Serial Programming for CY8C20xx6A CY8C20xx6AS CY8C20xx6L and CY8C20xx7 S 11 CY8C20xx7 S CapSense Design Guide this document CapSense C...

Page 9: ...y sensing in the presence of metal objects Supports longer trace lengths Maximum load of 100 pF 3 MHz Device Features High performance low power M8C Harvard architecture processor Up to 4 MIPS with 24...

Page 10: ...ce documentation Read about the sourcefile hex file in the PSoC Designer User Guide Bracketed Bold Displays keyboard commands in procedures Enter or Ctrl C File Open Represents menu paths File Open Ne...

Page 11: ...ng Methods in CY8C20xx7 S Figure 2 1 CapSense Implementation in a CY8C20xx7 S PSoC Device CY8C20xx7 S CMOD Sensor 1 CX 1 Sensor 2 CX 2 Sensor 3 CX 3 Sensor 4 CX 4 Sensor n CX n As shown in Figure 2 1...

Page 12: ...f magnitude greater than CF CP usually ranges from 10 pF to 20 pF but in extreme cases can be as high as 50 pF CF usually ranges from 0 1 pF to 0 4 pF The magnitude of CP is of critical importance whe...

Page 13: ...d Capacitor Input The CSD method in the CY8C20xx7 S device incorporates CX into a switched capacitor circuit as Figure 2 3 shows Figure 2 4 Pin Configured as Switched Capacitor Input Analog Mux Bus AM...

Page 14: ...erred as IDAC or modulation IDAC in this document The sigma delta converter also requires an external integrating capacitor CMOD as Figure 2 3 on page 13 shows The recommended value of CMOD is 2 2 nF...

Page 15: ...High Level Parameters should be tuned to optimum values for reliable touch detection For a detailed discussion on tuning see CapSense Performance Tuning with User Modules 2 2 2 CapSense Sigma Delta CS...

Page 16: ...2 2 1 Switched Capacitor Input The CSDPLUS method in CY8C20xx7 S devices incorporates CX into a switched capacitor circuit as Figure 2 9 shows Figure 2 9 Pin Configured as Switched Capacitor Input Ana...

Page 17: ...ation IDAC and is referred as IDAC or modulation IDAC in this document The other 7 bit IDAC known as the compensation IDAC is either always ON or always OFF This IDAC is referred as Compensation IDAC...

Page 18: ...cally tunes them out 2 2 3 1 Process Variation The SmartSense_EMCPLUS User Module UM for the CY8C20xx7 S is designed to work with sensor parasitic capacitance in the range 5 pF to 45 pF typical sensor...

Page 19: ...opment Feasibility Study Schematics Design PCB Layout Design Mechanical Design Review System Integration Design Validation Production SmartSense based Capacitive User Interface Design Cycle Firmware D...

Page 20: ...a drag and drop design environment using a library of user modules User modules are configured either through the Device Editor GUI or by writing into specific registers with firmware PSoC Designer c...

Page 21: ...For a detailed procedure for creating a PSoC Designer project and configuring the User Module wizard refer to the datasheet of the specific user module For code examples on CapSense user modules see...

Page 22: ...for scanning sensors Low level parameters are unique to each type of sensing method and are described in CSD CSDPLUS User Module Low Level Parameters and SmartSense_EMCPLUS User Module Parameters High...

Page 23: ...es of sensors are stored in UMname_waSnsBaseline integer array This array is defined in the header file UMname h 3 3 3 Difference Count Signal The difference count which is also known as the signal of...

Page 24: ...r If the difference count value of a sensor is greater than the finger threshold value the sensor is judged as active This definition assumes that the hysteresis level is set to 0 and debounce is set...

Page 25: ...ommended value see Set High Level Parameters 3 4 1 3 Debounce The Debounce parameter prevents spikes in raw counts from changing the sensor state from OFF to ON For the sensor state to transition from...

Page 26: ...lower limit of noise counts in the raw count The baselining update algorithm is paused when the raw count is below the baseline and the difference between them is greater than this threshold Possible...

Page 27: ...o a higher range but a lower sensitivity as explained here According to Equation 2 9 the raw count can be related to CX and IDAC as follows raw count GC CX 2N 1 ICOMP IDAC Equation 3 2 Where GC is the...

Page 28: ...also moves the raw count corresponding to CP towards the maximum value of raw count 2 N For very high gain values the raw count saturates as the plot of GC3 shows Therefore you should tune the conver...

Page 29: ...ases Note that this increase in signal may not proportionally increase the SNR because of the variations in noise counts when the compensation IDAC is used The dual IDAC mode complicates the tuning pr...

Page 30: ...parameter sets the prescaler ratio and determines the precharge switch output frequency This parameter also affects the PRS output frequency Possible values are 1 2 4 8 16 32 64 128 and 256 3 4 2 8 PR...

Page 31: ...ice the scan time and RAM memory and setting the immunity level to High consumes three times the scan time and RAM memory for sensor implementation compared to the Low immunity mode Possible values ar...

Page 32: ...No 001 78329 Rev E 32 Figure 3 14 PSoC Designer SmartSense_EMC_PLUS Sensor Setting 3 5 1 3 Sensor Sensitivity This parameter is used to increase and decrease the sensitivity of a sensor Possible valu...

Page 33: ...larger than the CapSense noise The CapSense signal is compared to the CapSense noise by using a quantity called signal to noise ratio SNR Before discussing the meaning of SNR for CapSense it is first...

Page 34: ...in the tuning process the sensor capacitor must be fully charged and discharged during each cycle The charge discharge path switches between two states at a rate set by a user module parameter called...

Page 35: ...compensate for any changes introduced by a finger and the moving finger will not be detected If the update rate is too slow relatively slow environmental changes may be mistaken for fingers During de...

Page 36: ...ibes these parameters and provides guidance about how each should be tuned based on system characteristics and other parameters By default hardware parameters are global settings that apply to all Cap...

Page 37: ...of the maximum raw counts Note down the SNR Repeat this procedure with a higher value of compensation IDAC until maximum SNR is achieved Note that a higher compensation IDAC value results in higher s...

Page 38: ...2 N 1 Table 4 2 gives recommended resolution settings based on CP and the finger capacitance CF CF is the change in capacitance of a sensor when a finger is placed on the sensor CF depends on overlay...

Page 39: ...LUS_waSnsResult and CSDPLUS_waSnsDiff respectively The high level API parameter settings are based primarily on ambient noise and finger signal strength as indicated by this data Noise and signal stre...

Page 40: ...determined at runtime by the SmartSense_EMCPLUS User Module You should not use APIs that modify these CSD parameters in firmware unless you know exactly what effect it has in your design To migrate a...

Page 41: ...sensitivity 0 1 pF leads to a stronger signal from the sensor Designs with thicker overlays require stronger signals from sensors for proper implementation The available options for sensitivity select...

Page 42: ...2 C slave interface the master clock should operate within the reduced specification mentioned earlier Not doing this will lead to data corruption I 2 C bus conjunction or inconsistent behavior from...

Page 43: ...an be calculated from the previous tables using Equation 4 1 Sampling time for the previously mentioned configuration 24 MHz of IMO and 0 3 pF of sensitivity is chosen from Table 4 4 it is 680 s Proce...

Page 44: ...sor raw count SmartSense_EMCPLUS_waSnsResult sensor normalized signal SmartSense_EMCPLUS_baSnsSignal and sensor finger threshold SmartSense_EMCPLUS_baBtnFThreshold must be observed during the tuning p...

Page 45: ...d of the signal on the Port_0 1 pin is 4 9 ms the period is twice the loop time as the port pin is toggled If the parasitic capacitance of one sensor is increased to approximately 15 pF the scan time...

Page 46: ...case main loop execution time This is the sum of the worst case scan times of the individual CapSense sensors If the parasitic capacitance of the sensor is close to the boundary of the SmartSense_EMCP...

Page 47: ...C slave interface I2CSBUF User Module with dedicated 32 byte buffer eliminating clock stretching by the slave Improved I 2 C interface also supports wakeup interrupt from I 2 C slave address match ev...

Page 48: ...ctric constant decrease the overlay thickness and increase the button diameter Table 5 1 Overlay Material Dielectric Strength Material r Breakdown Voltage V mm Minimum Overlay Thickness at 12 kV mm Ai...

Page 49: ...nected to chassis ground As recommended in PCB Layout Guidelines providing a hatched ground plane around the button or slider sensor can redirect the ESD event away from the sensor and CapSense contro...

Page 50: ...wer planes If the CapSense controller PCB is connected to the power supply by a cable minimize the cable length and consider using a shielded cable Place a ferrite bead around power supply or communic...

Page 51: ...nt The average current consumed by the device over a long period can be calculated by using the following equation Equation 5 1 The average power consumed by the device can be calculated as follows Eq...

Page 52: ...utput pin in the oscilloscope and measure the time period between two toggles This gives the active time Assign this value to tACT 5 Apply sleep scan to the project The period of the sleep scan cycle...

Page 53: ...any port pin having an odd number as pin number For a CapSense controller if the current budget of odd port pin is 100 mA the total current drawn though all odd port pins should not exceed 100 mA In...

Page 54: ...l The worst case noise appears in the CapSense system when the GPIO state is changed from a no current flow state for example all LEDs OFF to a maximum current flow state for example all LEDs ON The G...

Page 55: ...nt Noise To prevent sensor false triggers due to GPIO load transients the sensor baseline can be updated using rule based algorithms One of the methods to compensate the baseline is explained here Fig...

Page 56: ...he OFF condition 2 At instant 2 a finger is on the sensor and the shift in raw count difference count is greater than the finger threshold 3 Because the shift in difference count is greater than the f...

Page 57: ...Finger Touch Shift Due to GPIO Load Transient Difference Count is Zero Due to Baseline Compensation LED OFF LED ON Sensor Status Baseline Rawcount 1 2 3 4 LED OFF Baseline Compensated Rawcount Returns...

Page 58: ...ice humidity changes or any other liquids For such applications shield electrodes and guard sensors can provide robust touch sensing 6 1 Shield Electrode and Guard Sensor Figure 6 1 PCB Layout with Sh...

Page 59: ...tic Layout Firmware development 6 1 1 1 Schematic Select the proper pin to drive the shield electrode out signal The following pins should be used to drive the shield electrode out signal Port pins P0...

Page 60: ..._2_2 Buf 2 Port_0_2 Buf 3 Port_0_0 Buf 4 Port_1_2 The shield drive buffers are OFF by default select the desired shield drive buffer Figure 6 5 shows the enabling of Buf 0 such that the shield signal...

Page 61: ...eam or a large liquid spill When a water stream or a large liquid spill is present on the sensing surface a large capacitance CST is added to the system as shown in Figure 6 8 This capacitance may be...

Page 62: ...mplemented in firmware One CapSense pin and a counter hardware software are required to implement the guard sensor When a water stream or a large liquid spill is present on the board the guard sensor...

Page 63: ...opper hatch recommendations Top layer 7 mil trace and 45 mil grid 15 percent fill Bottom layer 7 mil trace and 70 mil grid 10 percent fill The shield electrode between buttons should be at least 10 mm...

Page 64: ...y sensor Because detecting a hand relies on the capacitance change from electric field changes any stray capacitance or objects affecting the electrical field around the wire will affect the range of...

Page 65: ...rly helpful when the proximity sensor must operate in the presence of metal A wire sensor increases the beneficial effect of the shield electrode because it can be located farther from the shield elec...

Page 66: ...device is sleeping to allow extra processing 8 1 Additional Power Saving Techniques All of the power saving techniques with the exception of sleep mode is application based Some of them produce undesi...

Page 67: ...he SLP_CFG2 register Call the M8C_Sleep function this sets the SLEEP bit Bit 3 within the CPU_SCR0 register Note Data retention during sleep and deep sleep modes in the 32 byte I 2 C buffer is guarant...

Page 68: ...U speed However this register just sets a divider of SYSCLK which means that the CPU speed will vary between part families with different SYSCLKs Typically SYSCLK is 24 MHz OSC_CR0 0xf8 CPU 3 Mhz IMO...

Page 69: ...8 Hz 64 Hz and 512 Hz the timer generates an interrupt It is often useful to periodically wake the CapSense controller up to do some processing or check for activity An example of this is to periodic...

Page 70: ...of devices on the CY8C20xx7 S web page 9 2 Datasheet The datasheet for the CapSense CY8C20xx7 S family of devices are available at www cypress com CY8C20xx7 S Datasheet 9 3 Technical Reference Manual...

Page 71: ...ly does not have on chip debug OCD capability if a debug platform is needed then the CY8C20xx6A Universal CapSense Controller Kit is available The Universal CapSense Controller Kits feature predefined...

Page 72: ...5 and P1 5 of the CY8C20237 24SXI device Two GPIOs connected to pins P0 7 and P0 4 of CY8C20237 24SXI to drive LEDs D1 and D2 Shield electrode is connected to pin P1 2 to drive shield plane Programmi...

Page 73: ...Resources CY8C20xx7 S CapSense Design Guide Doc No 001 78329 Rev E 73 Figure 9 3 Liquid Tolerant Button Design with I 2 C Header on CY8C20437...

Page 74: ...e developed in a drag and drop design environment using a library of fully characterized analog and digital functions including CapSense PSoC Designer comes with a built in C compiler and an embedded...

Page 75: ...ink to QuietZone Starter Kit external web Updated Section 3 4 2 4 Pg 40 Added table 4 8 Updated Section 6 1 1 1 D 01 21 2015 PRIA DCHE Added sections Switched Capacitor Input and Sigma Delta Converter...

Reviews: