Home

XC83x AP08129 Microcontrollers Application Note

image

Contents

1. Figure 36 Actual calculated position 3 1 4 Library for Position Calculation Infineon provides a function library for position calculation The resolution which was explained in earlier sections is user selectable from 1 to 8 The XC82xMx and XC83xMx microcontrollers have a Multiplication Division Unit MDU for hardware acceleration If the MDU is used for the division necessary to calculate the position the resolution is fixed at 8 The execution is faster and code size is smaller than without hardware acceleration The disadvantage is that the MDU increases the microcontroller s current consumption almost 1mA Application Note 29 V1 0 2012 02 e AP08129 Infi neon inTouch Application Kit Touch Sliders U SPY 4 U SPY Two settings files inTouch_Slider ini and inTouch_Slider_ll ini have been configured for the inTouch_Slider and inTouch_Slider_II boards respectively 4 1 inTouch_Slider ini This settings file Figure 37 is customized to allow the user to monitor the calculated slider position and the parameters of the Touch Slider Library while running the demonstration program B U SPY Control Box ele File Edit View Config Tools Window Help comis iS WREEK SSH ANT E Control Box o e fem Reset Ost 1 Close Osc 1 Reset Osc 2 Close Osc 2 Ready Disconnected HEX HEX Figure 37 inTouch_Slider ini User Interface Buttons The buttons in this settings
2. Y X x dx aa isy Gi One division is needed to calculate the position this operation needs the most computing performance To minimize the error it is safer to use Equation 3 if X is larger and Equation 4 if Y is larger A scaling factor of 2 is added to create a more usable calculated position Figure 15 and Figure 16 R is for resolution and corresponds to the number of left bitshifts in the numerator A Y x2R Section 1 2R_ E X Y Xx2R Section 2 d X Y X Y MAXT 0 d 0 2R Figure 15 Transformed pad average signals after offsetting and scaling Application Note 15 V1 0 2012 02 e AP08129 Infi neon inTouch Application Kit Touch Sliders Sensing Touch on Slider Figure 16 Actual calculated position 3 1 2 3 pad Slider The three touch pads of the slider are placed in a spatially interpolated manner as shown in Figure 17 The slider is divided into 3 sections for position calculation Section 1 Section 2 Section 3 Figure 17 Spatially interpolated 3 pad slider layout and abstraction If the pads are calibrated to roughly the same sensitivity and the finger slides from left to right with constant speed and constant pressure constant effective finger area the pad average signals are expected to behave in a linear manner in this model as seen in Figure 18 Application Note 16 V1 0 2012 02 e AP08129 Infi neon inTouch Application Kit Touc
3. e AP08129 In fi neon inTouch Application Kit Touch Sliders Hardware 8 Program Flow Calculate Slider Amplitude Condition slider signals Calibrate slider pads Update LEDs for inTouch_Slider board Calculate Slider Position Figure6 Timer 2 Overflow Interrupt Service Routine Application Note 9 V1 0 2012 02 e AP08129 In fi neon inTouch Application Kit Touch Sliders Ye es Hardware amp Program Flow Retrieve data from xe buffer No Check selected button Shift data out to buffer gt _ Figure 7 UART Interrupt Service Routine Mask LEDTS E LEDTE pees ROM Library flags signal processing for slider pads Figure8 Time Frame Interrupt Service Routine Dim LEDs based on touched position Set LED LINE and COMPARE values Figure 9 Time Slice Interrupt Service Routine for inTouch Slider only Application Note 10 V1 0 2012 02 oT re AP08129 Infi neon inTouch Application Kit Touch Sliders Sensing Touch on Slider 3 Sensing Touch on Slider This section describes how the LEDTS module of the XC836 complemented with a software library controls the touch slider The algorithm for calculating the location of touch is also explained in the following section The main touch sensing functions handled by software are as follows e Sample accumulation ROM library Sig
4. i Cinfineon a XC83x AP08129 inTouch Application Kit Touch Sliders Application Note V1 0 2012 02 Microcontrollers Edition 2012 02 Published by Infineon Technologies AG 81726 Munich Germany O 2012 Infineon Technologies AG All Rights Reserved LEGAL DISCLAIMER THE INFORMATION GIVEN IN THIS APPLICATION NOTE IS GIVEN AS A HINT FOR THE IMPLEMENTATION OF THE INFINEON TECHNOLOGIES COMPONENT ONLY AND SHALL NOT BE REGARDED AS ANY DESCRIPTION OR WARRANTY OF A CERTAIN FUNCTIONALITY CONDITION OR QUALITY OF THE INFINEON TECHNOLOGIES COMPONENT THE RECIPIENT OF THIS APPLICATION NOTE MUST VERIFY ANY FUNCTION DESCRIBED HEREIN IN THE REAL APPLICATION INFINEON TECHNOLOGIES HEREBY DISCLAIMS ANY AND ALL WARRANTIES AND LIABILITIES OF ANY KIND INCLUDING WITHOUT LIMITATION WARRANTIES OF NON INFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS OF ANY THIRD PARTY WITH RESPECT TO ANY AND ALL INFORMATION GIVEN IN THIS APPLICATION NOTE Information For further information on technology delivery terms and conditions and prices please contact the nearest Infineon Technologies Office www infineon com Warnings Due to technical requirements components may contain dangerous substances For information on the types in question please contact the nearest Infineon Technologies Office Infineon Technologies components may be used in life support devices or systems only with the express written approval of Infineon Technologies if a
5. F 34 Y Z qa d d Y Z Y Y Ez 3 Z del gt 4 One division is needed to calculate the position this operation needs the most computing performance To minimize the error it is safer to use Equation 3 if Y is larger and Equation 4 if Zis larger An offset of 1 and a scaling factor of 2 are added to create a more usable calculated position Figure 24 R is for resolution and corresponds to the number of left bitshifts on the numerator a Zx2R R_ Section 1 Left d 2x2 Yaz Section 1 Right d 22 or 9 Y Z Application Note 20 V1 0 2012 02 e AP08129 Infi neon inTouch Application Kit Touch Sliders Sensing Touch on Slider XY Z MAXT 0 d MAXT 2 0 2 2 2 3 2 Figure 24 Section 1 after offsetting and scaling Sections 2 and 3 In these two sections the position can be calculated in a similar way as in Section 1 using the two non constant signals Offsets of 4 and 7 and the same scaling factor can then be added to sections 2 and 3 respectively to get a calculated position of 0 9 2 Yx2R tion 2 Left d 2R Section 2 Le 5x y X x 2R R Section 2 Right d XaY 4x2 Xx2R t Left d 2R Section 3 Le 8x Yaz R Section 3 Right ds aa 7 x2R Figure 25 gives an illustration of the calculated position across all 3 sections while Figure 26 shows the actual calculated position Application Note 21 V1 0 2012 02 nf AP08129 Infi neon inTouch Application Kit T
6. 11 2pad Slider ici a a A A Bas ee eS 11 p d Slider seraingin rr A AR a a e a a a 16 Apad Sider ON 22 Library for Position Calculation oooocoooccoo ooo 29 A ion cian da bebade ihe i oubhew ae r a ae heat a aaa a dowels ada ar a whad ond 30 inTouch_Slider ini ese aeniea aaa a a aa A eee eee 30 InTouch Slider UA ineke eria ea A A AA A eal a a bad a 32 Appendix Schematics and Layout aana anaana 36 References Vinci aaan aaan 41 Application Note 4 V1 0 2012 02 e AP08129 Infi neon inTouch Application Kit Touch Sliders Introduction 1 Introduction In today s Human Machine Interface HMI designs capacitive touch technology is now often more widely used than traditional mechanical buttons Capacitive touch technology is the more popular choice because it brings flexibility a high level of customization and a significant reduction in overall system cost The inTouch Application Kitis available to help learn about working with the advanced touch solutions provided by Infineon Step by step tutorials covers the basics of Infineon s touch solutions while example application code can be used to start developing new touch related projects The inTouch Application Kit comprises of a mother board supplied as a USB stick and a number of daughter boards Figure 1 shows the USB stick with the Slider daughter board Among the many different touch input elements that can be designed with capacitive touch technology t
7. 12 Pad average signals of the two slider pads after tuning Application Note 12 V1 0 2012 02 e AP08129 Infi neon inTouch Application Kit Touch Sliders Sensing Touch on Slider Figure 13 Actual pad average signals after tuning The now common untouched level UT is very high compared to the difference between touched and untouched states To make calculations easier the signals are transformed near to zero by linear combinations which can be represented by the formulae below Figure 14 provides an illustration of the transformation X UT B Y UT A Application Note 13 V1 0 2012 02 n_n AP08129 Infineon inTouch Application Kit Touch Sliders Sensing Touch on Slider Left Right Section 1 Section 2 UT UT MAXT MAXT position 0 Figure 14 Transformed pad average signals Before the transformation Section 1 has two signals between UT and UT MAXT UT stands for the untouched level and UT MAXT stands for the signal level when the largest area of the respective pad is touched this happens at the two extremes After the transformation the X and Y signals have much lower values Application Note 14 V1 0 2012 02 e AP08129 Infi neon inTouch Application Kit Touch Sliders Sensing Touch on Slider The two signals can be described as X MAXT xd 1 Y MAXT MAXT x d 2 If we rearrange Equation 1 we get MAXT which we can substitute in Equation 2
8. A medium high 7 ue A Communication with Slider Position 7 Touch Sense signal 5 Calculation LED settings processing PC miid Figure4 Program Overview for inTouch Slider board Application Note 7 V1 0 2012 02 Infineon AP08129 inTouch Application Kit Touch Sliders Hardware amp Program Flow Slider Position Calculation Touch Sense signal processing high 7 Communication with PC send amp receive data Figure 5 Program Overview for inTouch Slider Il board The tasks performed in each interrupt service routine are further illustrated in the flowcharts that follow e T2 Overflow Interrupt Figure 6 The T2 module provides a slow time base by generating the T2 Overflow interrupt for calculations necessary to handle the touch slider UART Interrupt Figure 7 The UART module which is part of the XC800 core is used for full duplex UART communication with the PC Time Frame Interrupt Figure 8 The LEDTS module generates this interrupt after every measurement where signal processing and touch detection take place Time Slice Interrupt Figure 9 inTouch_Slider board only The LEDTS module generates this interrupt after every LED column activation where the pattern for the next LED column is loaded into shadow registers Application Note V1 0 2012 02
9. Controller with Capacitive Touch Interface Application Note AP08122 16 Button Capacitive Touch Interface with XC836T Application Note AP08124 XC82 83x Design Guidelines for Electrical Fast Transient EFT Protection in Touch Sense Applications Application Note AP08126 Infineon Touch Solutions inTouch Application Kit 10 Application Note AP08127 inTouch Application Kit Buttons 11 Application Note AP08128 inTouch Application Kit Touch Wheel 12 Application Note AP08130 inTouch Application Kit LED Matrix 13 Link to XC83x Series www infineon com xc83x 14 Link to Solutions for advanced touch control www infineon com intouch Application Note 41 V1 0 2012 02
10. P08129 Infi neon inTouch Application Kit Touch Sliders U SPY r U SPY Control Box eE File Edit View Config Tools Window Help COM15 JS UBE I R Ba P 5 Control Box gt Reset Osc 1 Open Osc 1 Reset Osc 2 Open Osc 2 Slider Avg Position Amp Buttons Slider2 Po Slider3 Pos 255 255 191 Ready Disconnected HEX HEX Figure 39 inTouch_Slider_ll ini User Interface Buttons The buttons in this settings file are used to select the signal s to be monitored The format of the data transmitted for the buttons is shown in the following table Table 6 Table 6 Transmit Data Format for Buttons DO D1 Value hex 08 XX Description I D number Button number The data received by the microcontroller will be used to determine the signals that will be transmitted to U SPY for display on the Oscilloscope Progress Bars The progress bars display the calculated slider positions for the 2 pad and 3 pad sliders The format of the transmitted data for the progress bar is as follows Table 7 Application Note 33 V1 0 2012 02 O fi AP08129 In ineon inTouch Application Kit Touch Sliders U SPY Table 7 Transmit Data Format for Progress Bar DO D1 D2 D3 Value hex A2 XX XX XX Description I D number Progress Bar Index Calculated Position Calculated Position High Byte Low Byte Oscilloscope The oscilloscope functi
11. ck plexiglas cover glued to the board The 4 pad slider on the inTouch Slider board is connected to 4 LEDTS pad inputs of the XC836 4 indicator LEDs are each connected to an LEDTS line pin and they share an LEDTS column pin of the XC836 The 2 pad and 3 pad sliders on the inTouch Slider II board are connected to 2 and 3 LEDTS pad inputs of the XC836 respectively The schematics are available in the Appendix Schematics and Layout Users can tap or swipe the touch sliders 2 2 Program Flow This section presents an overview of the program in terms of the interrupts involved and then provides the tasks performed in each interrupt service routine Both programs for inTouch_Slider and inTouch_Slider_I are essentially the same The main difference is that the program for inTouch_Slider has additional tasks to toggle the indicator LEDs In terms of interrupts the UART interrupt has the highest priority to ensure the smooth transmission of data to U SPY The Time Frame interrupt has the medium priority In this service routine touch sense related tasks are performed each time pad capacitance has been measured LED updates for inTouch_Slider board which are performed in the Time Slice interrupt have low priority The Timer 2 T2 Overflow interrupt is given lowest priority due to its slow frequency Figure 4 and Table 5 provide an illustration of the program overviews for inTouch_Slider and inTouch_Slider_Il boards respectively lw 7 low L
12. e 38 U SPY Oscilloscope Table 3 Transmit Data Format for Oscilloscope DO D1 D2 D3 D4 D5 D6 D7 Value hex A4 01 XX XX XX XX XX XX Description I D Scope Signal 1 Signal 1 Signal 2 Signal 2 Signal 3 Signal 3 number number high byte low byte high byte low byte high byte low byte Application Note 31 V1 0 2012 02 Infineon AP08129 inTouch Application Kit Touch Sliders U SPY As mentioned in the previous section the user is able to monitor two different types of signals in this settings file The signals displayed are as follows Table 4 Slider Avg Mode Table 5 Position Amp Mode Table 4 Signals Displayed for Slider Avg Mode Oscilloscope 1 Signal 1 Signal 2 Signal 3 Description Slider_B Current Pad Slider_C Current Pad Slider_D Current Pad Average Average Average Colour Green Pink Yellow Oscilloscope 2 Signal 1 Signal 2 Signal 3 Description Slider_A Current Pad None None Average Colour Green Pink Yellow Table 5 Signals Displayed for Position Amp Mode Signal 1 Signal 2 Signal 3 Description Slider Position Slider Amplitude None Colour Green Pink Yellow 4 2 inTouch_Slider_ll ini This settings file Figure 39 is customized to allow the user to monitor the calculated slider position and the parameters of the Touch Slider Library while running the demonstration program Application Note 32 V1 0 2012 02 e A
13. ers Appendix Schematics and Layout Figure 44 inTouch Slider Board Bottom Layout Application Note 38 V1 0 2012 02 e AP08129 Infi neon inTouch Application Kit Touch Sliders Appendix Schematics and Layout inTouch_SLIDER2 5 5 2011 4 36 24 PM Sheet 1 1 Touch Sense Application Kit INE2 COL5 Figure 45 inTouch Slider II Board Schematics Application Note 39 V1 0 2012 02 AP08129 Infi neon inTouch Application Kit Touch Sliders Appendix Schematics and Layout inTouch Application Kit Figure 46 inTouch Slider I Board Top Layout abile BINTIOS Figure 47 inTouch Slider II Board Bottom Layout Application Note 40 V1 0 2012 02 AP08129 Infi neon inTouch Application Kit Touch Sliders References References The list below provides resources that may be useful to the user ONOaARWN gt 9 User s Manual XC83x 8 Bit Single Chip Microcontroller Application Note AP08100 Configuration for Capacitive Touch Sense Application Application Note AP08110 Design Guidelines for XC82x and XC83x Board Layout Application Note AP08113 Capacitive Touch Color Wheel Implementation Application Note AP08115 Design Guidelines for Capacitive Touch Sensing Application Application Note AP08121 Infrared Remote
14. failure of such components can reasonably be expected to cause the failure of that life support device or system or to affect the safety or effectiveness of that device or system Life support devices or systems are intended to be implanted in the human body or to support and or maintain and sustain and or protect human life If they fail it is reasonable to assume that the health of the user or other persons may be endangered e AP08129 Infi neon inTouch Application Kit Touch Sliders XC83x Revision History V1 0 2012 02 Previous Version s Page Subjects major changes since last revision We Listen to Your Comments Is there any information in this document that you feel is wrong unclear or missing Your feedback will help us to continuously improve the quality of this document Please send your proposal including a reference to this document to mcdocu comments infineon com gt lt Application Note 3 V1 0 2012 02 AP08129 A Infi neon inTouch Application Kit Touch Sliders Table of Contents 1 2 2 1 2 2 3 3 1 3 1 1 3 1 2 3 1 3 3 1 4 4 1 4 2 Introd cese na daaa SA A AA EA A E 5 Hardware 8 Program Flow oooccococcccoc eae 6 HOWARD AA AAA A AA al dea 6 PO AM FlOW aspan ESKEAN EEEREN a ay Oita Ral ene ag a aay Sonne Gree aaa eae aa ee 7 Sensing Touch on Slider 2 0 00 cece ttt eee nee 11 Slider Position Calculation asics neiaa anaa e i a a eee
15. file are used to select the signal s to be monitored The format of the data transmitted for the buttons is shown in the following table Table 1 Table 1 Transmit Data Format for Buttons DO D1 Value hex 08 XX Description I D number Button number Application Note 30 V1 0 2012 02 AP08129 inTouch Application Kit Touch Sliders U SPY The data received by the microcontroller will be used to determine the signals that will be transmitted to U SPY for display on the Progress Bar The progress bar displays the calculated slider position The format of the transmitted data for the progress bar is as follows Table 2 Transmit Data Format for Progress Bar DO D1 D2 D3 Value hex A2 XX XX XX Description 1 D number Progress Bar Index Calculated Position Calculated Position High Byte Low Byte Oscilloscope The oscilloscope function allows the user to monitor up to 3 signals at a time A total of 3 oscilloscopes are available In this application only 2 oscilloscopes are used If the Slider Avg button is selected 4 signals will be displayed 3 signals on 1 oscilloscope and 1 signal on another If the Position Amp button is selected 2 signals will be displayed on 1 oscilloscope The format of the transmitted data for the oscilloscope is as follows E Oscitoscope a x 214 gt 4 tji v 0 ele Beams z j A Meru Connect Figur
16. h Sliders Sensing Touch on Slider Left Right Section 1 Section 2 Section 3 slider_a untouched_a untouched_c untouched_b slider_c Figure 18 Pad average signals of the three slider pads during swiping Values untouched_a untouched_b and untouched_c are the pad average levels for pads A B and C respectively when they are not touched If the pads have roughly the same sensitivity the three signals can be tuned to have a common untouched level Figure 19 The actual signals can be expected to look like those in Figure 20 Left Right Section 1 Section 2 Section 3 untouched_a slider_a slider_b slider_c Figure 19 Pad average signals of the three slider pads after tuning Figure 20 Actual pad average signals after tuning The now common untouched UT level is very high compared to the difference between touched and untouched states To make calculations easier the signals are transformed near to zero by linear combinations which can be represented by the formulae below Figure 21 provides an illustration of the transformation This transformation also makes the transitions between sections smooth which is especially important if the three pads have different sensitivity or unstable untouched levels due to imperfect calibration or a changing environment A B _c y 2A _ p z Bt X 2 2 2 A Application Note 17 V1 0 2012 02 e AP08129 In fi neon inTouch Applicati
17. he slider is gaining popularity because of the intuitive control it provides This application note describing the slider daughter board aims to highlight the ease of implementing a design with Infineon s touch solutions Topics covered include program flow touch behavior and touch position calculation algorithm Figure 1 inTouch Application Kit USB Stick and Slider board Application Note 5 V1 0 2012 02 e AP08129 Infi neon inTouch Application Kit Touch Sliders Hardware amp Program Flow 2 Hardware amp Program Flow This section describes the hardware used and the connections involved 2 1 Hardware Infineon s XC836MT 2FRI Figure 2 is used in this application The XC836MT is embedded in the inTouch Application Kifs USB stick For more details regarding the USB stick please refer to AP08126 Infineon Touch Solutions inTouch Application Kit Figure 2 Infineon s XC836MT 2FRI The inTouch Slider and inTouch Slider II boards Figure 3 are available as plug in daughter boards which are part of the inTouch Application Kit Figure3 Slider Boards Application Note 6 V1 0 2012 02 e AP08129 Infi neon inTouch Application Kit Touch Sliders Hardware amp Program Flow The inTouch Slider board consists of a 4 pad slider Figure 3 left The inTouch Slider II board consists of a 2 pad and a 3 pad slider Figure 3 right Both slider boards are standard PCBs with a 1mm thi
18. ill have four distinct sections Section 1 Before the transformation Section 1 has three signals between UT and UT MAXT Figure 32 UT stands for the untouched level and UT MAXT stands for the signal level when the largest area of the respective pad is touched this happens at the section borders Application Note 25 V1 0 2012 02 e AP08129 Infi neon inTouch Application Kit Touch Sliders Sensing Touch on Slider A B C D UT UT MAXT Figure 32 Section 1 before transformation After the transformation the W X Y and Z signals have much lower values Figure 33 The position axis has been arbitrarily scaled from 0 5 to 1 5 in this region for convenience W X Y Z MAXT MAXT 3 0 5 1 5 Figure 33 Section 1 after transformation Signals W and X are constant low in this section so they do not participate in the position calculation The other two signals can be described as YS2 tg 1 MAXT _ MAXT Lea 2 3 3 d 2 Application Note 26 V1 0 2012 02 oT re AP08129 Infi neon inTouch Application Kit Touch Sliders Sensing Touch on Slider If we rearrange Equation 1 we get A x which we can substitute in Equation 2 z la Z Xa d d Y Z Y a 5 3 ots Z 4 One division is needed to calculate the position this operation needs the most computing performance To minimize the error it is safer to use Equation 3 if Y is larger and Equat
19. ion 4 if Z is larger An offset of 0 5 and a scaling factor of 2 are added to create a more usable calculated position Figure 34 Ris for resolution and corresponds to the number of left bitshifts on the numerator Zx2R Section 1 Left le R_ d 15x2 Y Z Section 1 Right d YZ os 2R Y Z W X Y Z Figure 34 Section 1 after offsetting and scaling Sections 2 3 and 4 In these three sections the position can be calculated in a similar way as in Section 1 using the two non constant signals Offsets of 2 5 4 5 and 6 5 and the same scaling factor can then be added to sections 2 3 and 4 respectively to get a calculated position of 0 8 2 Application Note 27 V1 0 2012 02 e AP08129 Infi neon inTouch Application Kit Touch Sliders Sensing Touch on Slider Y x2R n2L 3 R_ Sectio eft d 3 5x2 Xay Section 2 Right d X sok X Y Section 3 Left d 5 5 x 2R XX 2 X Z Section 3 Right d 22 as oR X Z Section 4 Left da 75x2R 22 a X Z Section 4 Right d Z2 465x28 X Z Figure 35 gives an illustration of the calculated position across all 4 sections while Figure 36 shows the actual calculated position position Left Right calculated position 0 2 2k 4 2 6 2 8 2F Figure 35 Calculated position vs real position across all sections Application Note 28 V1 0 2012 02 e AP08129 Infi neon inTouch Application Kit Touch Sliders Sensing Touch on Slider
20. ized according to the number of pads forming the touch slider 3 1 1 2 pad Slider The two touch pads of the slider are placed in a spatially interpolated manner as shown in Figure 10 The slider is divided into 2 sections for position calculation Section 1 Section 2 Figure 10 Spatially interpolated 2 pad slider layout and abstraction Application Note 11 V1 0 2012 02 AP08129 SE Infi neon inTouch Application Kit Touch Sliders Sensing Touch on Slider If the pads are calibrated to roughly the same sensitivity and a finger slides from left to right with constant speed and constant pressure constant effective finger area the pad average signals are expected to behave in a linear manner in this model as seen in Figure 11 finger position Left Right Section 1 Section 2 untouched_d untouched_e Figure 11 Pad average signals of the two pads when slider is swiped Values untouched_d and untouched_e are the pad average levels for pads D and E respectively when they are not touched If the pads have roughly the same sensitivity the two signals can be tuned to have a common untouched UT level Figure 12 The actual signals can be expected to look like those in Figure 13 If the two pads have slightly different sensitivity due to board layout it may be necessary to manually modify the oscillation windows Left Right Section 1 Section 2 untouched_d Figure
21. nal filtering and moving average calculation ROM library e Touch detection ROM library e Touch slider calibration user software in Flash Signal tuning user software in Flash If properly configured the LEDTS automatically measures the capacitance of the slider pads This capacitance increases when a slider pad is touched A library function in ROM processes the capacitance signals and detects touch on the slider lt does so by accumulating a number of samples and low pass filtering them to obtain a moving average The moving average filters noise and is used as a reference to detect sudden changes in capacitance When the slider is touched or released a corresponding pad flag in RAM will be set or reset For more information on the LEDTS ROM Library please refer to the XC836 User s Manual The pad flags for the slider pads are unused always cleared in the slider position calculation algorithm It is the moving averages pad averages that are used instead to calculate the position of the touch The slider pads are automatically calibrated to the same sensitivity and resolution during startup Once the pad averages are stable a position calculation algorithm is run if the slider is touched The calculated position is then used to determine the location of touch and is shown on the LEDs 3 1 Slider Position Calculation This section describes the algorithm for calculating the location of touch on the slider This section is categor
22. olour Green Pink Yellow Oscilloscope 2 Signal 1 Signal 2 Signal 3 Description Slider_A Current Pad Slider_B Current Pad Slider_C Current Pad Average 3 pad Slider Average 3 pad Slider Average 3 pad Slider Colour Green Pink Yellow Table 10 Signals Displayed for Position Amp Mode Oscilloscope 1 Signal 1 Signal 2 Signal 3 Description 2 pad Slider Position 2 pad Slider Amplitude None Colour Green Pink Yellow Oscilloscope 2 Signal 1 Signal 2 Signal 3 Description 3 pad Slider Position 3 pad Slider Amplitude None Colour Green Pink Yellow Application Note 35 V1 0 2012 02 e AP08129 Infi neon inTouch Application Kit Touch Sliders Appendix Schematics and Layout Appendix Schematics and Layout inTouch_SLIDER1 4 5 2011 12 53 22 P Sheet 1 1 Touch Sense Application Kit R1470R R2470R R3 470R R4 470R B 5 Figure 41 inTouch Slider Board Schematics Application Note 36 V1 0 2012 02 e AP08129 Infi neon inTouch Application Kit Touch Sliders Appendix Schematics and Layout FE TE E TED3 2 2 Figure 42 inTouch Slider Board Componenet Bottom Layout A inTouch Application Kit Slider Figure 43 inTouch Slider Board Top Layout Application Note 37 V1 0 2012 02 Ginfi AP08129 In fi neon inTouch Application Kit Touch Slid
23. on Kit Touch Sliders Sensing Touch on Slider Left Right Section 1 Section 2 Section 3 UT UT MAXT X A B 2 C Y A C 2 B Z B C 2 A MAXT 0 position MAXT 2 Figure 21 Combined pad average signals The resulting X Y and Z signals still have three distinct sections Section 1 Before the transformation Section 1 has three signals between UT and UT MAXT Figure 22 UT stands for the untouched level and UT MAXT stands for the signal level when the largest area of the respective pad is touched this happens at section borders Application Note 18 V1 0 2012 02 Infineon AP08129 inTouch Application Kit Touch Sliders Sensing Touch on Slider A B C UT UT MAXT Figure 22 Section 1 before transformation After the transformation the X Y and Z signals have much lower values Figure 23 The position axis has been arbitrarily scaled from 1 to 2 in this region for convenience XYZ MAXT y 0 MAXT 2 1 0 Figure 23 Section 1 after transformation Application Note 19 V1 0 2012 02 e AP08129 Infi neon inTouch Application Kit Touch Sliders Sensing Touch on Slider Signal X is constant low in this section so it does not participate in the position calculation The other two signals can be described as Y MAXT j 1 2 Z MAXT MAXT 2 2 2 If we rearrange Equation 1 we get MAS x which we can substitute in Equation 2 Y Y Z
24. on allows the user to monitor up to 3 signals at a time Figure 40 A total of 3 oscilloscopes are available In this application only 2 oscilloscopes are used If the Slider Avg button is selected 5 signals will be displayed 2 signals on 1 oscilloscope for 2 pad slider and 3 signals on another for 3 pad slider If the Position Amp button is selected 4 signals will be displayed on 2 oscilloscope 2 signals each The format of the transmitted data for the oscilloscope is as follows Table 8 ie oo A eee Figure 40 U SPY Oscilloscope Table 8 Transmit Data Format for Oscilloscope DO D1 D2 D3 D4 D5 D6 D7 Value A4 01 XX XX XX XX XX XX hex Descriptio LD Scope Signal 1 Signal 1 Signal 2 Signal 2 Signal 3 Signal 3 n number number high byte low byte high byte low byte high byte low byte As mentioned in the previous section the user is able to monitor two different types of signals in this settings file The signals displayed are as follows Table 4 Slider Avg Mode Table 5 Position Amp Mode Application Note 34 V1 0 2012 02 Infineon AP08129 inTouch Application Kit Touch Sliders U SPY Table 9 Signals Displayed for Slider Avg Mode Oscilloscope 1 Signal 1 Signal 2 Signal 3 Description Slider_D Current Pad Slider_E Current Pad None Average 2 pad Slider Average 2 pad Slider C
25. ouch Sliders Sensing Touch on Slider position Left Right calculated position 0 3 2R 6 2 9 2R Figure 25 Calculated position vs real position across all sections Figure 26 Actual calculated position 3 1 3 4 pad Slider The four touch pads of the slider are placed in a spatially interpolated manner as shown in Figure 27 The slider is divided into 4 sections for position calculation Application Note 22 V1 0 2012 02 AP08129 Infi neon inTouch Application Kit Touch Sliders Sensing Touch on Slider Section 1 Section 2 Section 3 Section 4 Figure 27 Spatially interpolated 4 pad slider layout and abstraction Ifthe pads are calibrated to roughly the same sensitivity and the finger slides from left to right with constant speed and constant pressure constant effective finger area the pad average signals are expected to behave in a linear manner in this model as seen in Figure 28 Left Right Section 1 Section 2 Section 3 Section 4 slider_a ZAR INN Figure 28 Pad average signals of the four slider pads during swiping untouched_a untouched_c untouched_d untouched_b slider_d Values untouched_a untouched_b untouched_c and untouched_d are the pad average levels for pads A B C and D respectively when they are not touched If the pads have roughly the same sensitivity the four signals can be tuned to have a common un
26. touched level Figure 29 The actual signals can be expected to look like those in Figure 30 Application Note 23 V1 0 2012 02 e AP08129 Infi neon inTouch Application Kit Touch Sliders Sensing Touch on Slider Left Right Section 1 Section 2 Section 3 Section 4 untouched_a slider_a slider_b slider_c slider_d Figure 29 Pad average signals of the four slider pads after tuning Figure 30 Actual pad average signals after tuning The now common untouched level is very high compared to the difference between touched and untouched states To make calculations easier the signals are transformed near to zero by linear combinations which can be represented by the formulae below Figure 31 provides an illustration of the transformation This transformation also makes the transitions between sections smooth which is especially important if the four pads have different sensitivity or unstable untouched levels due to imperfect calibration or a changing environment w tB C p x AtBt D ye AFCHD 5 z BCAD_ 3 3 3 3 dl Application Note 24 V1 0 2012 02 n_n AP08129 Infineon inTouch Application Kit Touch Sliders Sensing Touch on Slider Left Right Section 1 Section 2 Section 3 Section 4 UT UT MAXT W A B C 3 D X A B D 3 C Y A C D 3 B Z B C D 3 A MAXT 0 position MAXT 3 Figure 31 Combined pad average signals The resulting W X Y and Z signals st

Download Pdf Manuals

image

Related Search

Related Contents

    ATV Body - Genero Motors    Untitled - Klarstein  11-12 Gestione del colore di EX7750  Department of Computing Science and Mathematics University of  VOLTRONIC 4 - PLC Forum info  MANUEL D\INSTRUCTIONS  Práctica de captura - Wireshark - Departamento de Ingeniería  

Copyright © All rights reserved.
Failed to retrieve file