7 Replies Latest reply on Feb 12, 2019 10:29 PM by ShanmathiN_06

    How do I speed up CapSense widget to have a faster button response?

    antrc_3264986

      Using the example CapSense code, after touching the button widget remains touched for more than a second. How do I speed up the response to allow the user a faster button?

        • 1. Re: How do I speed up CapSense widget to have a faster button response?
          ShanmathiN_06

          Hi,

           

          Please let us know which code example you are referring to and how is it determined that the button stays touched, even when there is no touch present on the sensor.

          Also, how many CapSense sensors and widgets, have you enabled in the customer GUI?

           

          In general, the response time (initialization + scan + process time) is reduced by following the steps below:

           

          1) Reduce resolution (to reduce scan time). Please ensure that your desired SNR is achieved at a lower resolution.

          You might require a higher finger capacitance in that case. So, you could use thin overlays with high dielectric constant.

           

          2) Increase modulator clock frequency (to reduce scan time).

           

          3) Increase the CPU clock frequency (to reduce any processing time in firmware).

           

          4) Disable firmware filters (to reduce process time). Please ensure that noise maybe high in such cases.

           

          5) Avoid switching between different scan types (to reduce sensor-initialization time). This is generally done for low-power applications.

           

          6) Prefer using single widget with many sensors, rather than many widgets (to reduce sensor-initialization time). Please ensure that the sensors are similar, so that the tuning parameters are similar for all the sensors within a widget.

           

          7) Use manual tuning for thresholds (to reduce process time).

           

          I hope this helps.

          Thanks,
          Shanmathi

          • 2. Re: How do I speed up CapSense widget to have a faster button response?
            antrc_3264986

            ShanmathiN_06,

             

            I have custom code for the touch process. However, I am interested in the point 6 of your email. How is this done?

             

            6) Prefer using single widget with many sensors, rather than many widgets (to reduce sensor-initialization time). Please ensure that the sensors are similar, so that the tuning parameters are similar for all the sensors within a widget.

             

            Thanks.

            Andrew Trobia – Software Engineer

            AP Engineering Services | 6053 Hudson Road - Suite 350, Woodbury, MN 55125

            D: 651-739-6521 | C: 847-627-9928 | andrew.trobia@apengineering.com<mailto:andrew.trobia@apengineering.com>

            • 3. Re: How do I speed up CapSense widget to have a faster button response?
              ShanmathiN_06

              Hi Andrew,

               

              Regarding point 6, let us assume you have 5 CapSense buttons in your design.

               

              In case you configure them as 5 separate button widgets in the component customizer GUI, all the hardware and software parameters have to be initialized for each widget separately, which will take time for sensor initialization.

               

              On the other hand, if you configure them as 5 sensors within the same button widget, then the widget hardware and software parameters (except compensation IDAC value) are initialized only once for all the 5 sensors.

               

              However, since the parameters are same for all sensors within the widget, you will have to ensure that the sensors have almost same Cp.

              Minor variations in Cp could be compensated by the compensation IDAC value, which is individual for every sensor.

               

              Thanks,
              Shanmathi

              • 4. Re: How do I speed up CapSense widget to have a faster button response?
                antrc_3264986

                Great explanation. Thanks. However, I understood why using one widget would be a speed up  before I asked how. I was asking how to have more than one sensor in a single widget?

                • 5. Re: How do I speed up CapSense widget to have a faster button response?
                  ShanmathiN_06

                  Hi Andrew,

                   

                  Please check out the attached image.

                  "Button0" is the widget and the number of sensors in button0 widget is "5".

                   

                  Thanks,

                  Shanmathi

                  • 6. Re: How do I speed up CapSense widget to have a faster button response?
                    antrc_3264986

                    Thanks. I did implement using your recommendations. However, my total scan time is still 11ms with or without the recommendation in point 6. Other changes (i.e. number of conversion and Tx freq) had an affect on the perceived touch response and total scan time. The longer total time of 11ms seemed to respond the fastest.

                     

                    In my touch task, I wait until the button shows not touch to avoid double button touch responses. These changes seem to make the touch system usable.

                     

                    I will try both configurations to see if there is an change in the response as perceived by the user. Thanks again for you input.

                    • 7. Re: How do I speed up CapSense widget to have a faster button response?
                      ShanmathiN_06

                      Could you please let me know your CapSense configuration? I could try at my end to reduce the scan time further.

                      You could save the configuration in xml file and send the same.

                       

                      Thanks,
                      Shanmathi