3 Replies Latest reply on Oct 3, 2019 8:22 AM by BragadeeshV_41

    Capsense slider first sensor delay in sensing

    TaH_4345166

      Hello,

      I am using CY8CKIT-042 PSoC® 4 Pioneer Kit. I am using it for the CapSense design with 10 buttons and 2 sliders.

       

      Everything works fine, except for sliders where 1 st sensor in each of the slider is taking time to sense the touch. that means, if I just scroll down on slider all other sensors are detected in tuner except first sensor.

       

      But if I put my finger on the first sensor before scrolling on the slider everything works perfect.

       

      So, just wanted to know reason behind this delay for this first sensor in the slider issue?

       

      I have checked by changing the code to first check the slider condition and also making slider widget as first priority in capsens configuration.

       

      But still the same issue. Is this because of firmware handling or due to hardware design of the capsense slider?

       

      Please reply.

       

      Thanks in advance.

        • 1. Re: Capsense slider first sensor delay in sensing
          BragadeeshV_41

          Hi TaH_4345166,

           

          Can you please share your project file focusing on the issue so that we can try to reproduce the issue from our side?

           

          Regards,

          Bragadeesh

          • 2. Re: Capsense slider first sensor delay in sensing
            TaH_4345166

            Hi BragadeeshV_41 ,

            Due to some reason, we can't share the complete project file, but here is the logic of handling the slider based on the centroid position.

             

              

            if (CapSense_IsAnyWidgetActive())  /* Scan result verification */

            {

                    /* Find Slider Position */

                Left_sliderPosition  =  CapSense_GetCentroidPos(CapSense_LEFTSLIDER_WDGT_ID);

             

             

                      if(Left_sliderPosition != NO_FINGER)

                    {

                        Left_Slider_Handler(Left_sliderPosition);  // Left_Slider

                    }

            }

             

             

            void Left_Slider_Handler(uint8 sliderPosition)

            {

                if((0 <= sliderPosition )  && (sliderPosition < 20))

                {

                    /* Action based on the centroid position */

                    ls_sns0 = 1; // Update left slider sensor 0 flag 

                }

                if((ls_sns0 == 1) && (20 <= sliderPosition )  && (sliderPosition < 40))

                {

                   /* Action based on the centroid position */

                    ls_sns1 = 1; // Update left slider sensor 1 flag

                }

                if((ls_sns1 == 1) && (40 <= sliderPosition )  && (sliderPosition < 60))

                {  

                    /* Action based on the centroid position */       

                    ls_sns2 = 1; // Update left slider sensor 2 flag

                }

                if((ls_sns2 == 1) && (60 <= sliderPosition )  && (sliderPosition < 80))

                {

                    /* Action based on the centroid position */       

                    ls_sns3 =1; // Update left slider sensor 3 flag

                }

                if((ls_sns3 == 1) && (80 <= sliderPosition )  && (sliderPosition < 100))

                {

                    /* Action based on the centroid position */       

                    ls_sns4 = 1; // Update left slider sensor 4 flag

                }

                if((ls_sns4 == 1) && (100 <= sliderPosition ) && (sliderPosition <= 120))

                {

                    /* Action based on the centroid position */

                    ls_sns5 = 1; // Update left slider sensor 5 flag

                }

            }

             

            So my logic is based on the centroid position and it should start from first sensor centroid position(0-20).

             

            In our problem case as I explained previously, Unless I am holding my finger on the first sensor of the slider for few ms(bit time din't measured exact) sensor is not detecting (if just scroll on the slider). Due to which my complete logic is not working. Because ls_sns0 is not set to 1 without sensor 0 detection on the slider.

             

            So any help to understand, why first sensor takes time to sense it? Is it due to hardware design of the slider? or is there any way to overcome this issue?

            • 3. Re: Capsense slider first sensor delay in sensing
              BragadeeshV_41

              Hi TaH_4345166,

               

              I tried your firmware logic that you sent me in our 4000 S prototyping kit. The logic is working fine even when sliding across the slider without the finger resting at position 0.

               

              for(;;)

              {

                if(CapSense_NOT_BUSY == CapSense_IsBusy())

                      {

                          CapSense_RunTuner();

                          CapSense_ProcessAllWidgets();

                          if (CapSense_IsAnyWidgetActive())  /* Scan result verification */

                          {

                               Left_sliderPosition  =  CapSense_GetCentroidPos(CapSense_SLD_WDGT_ID);

                          }

                          if(Left_sliderPosition != NO_FINGER)

                          {

                              Left_Slider_Handler(Left_sliderPosition);  // Left_Slider

                          }

                          CapSense_ScanAllWidgets();

                      }

              }

              Since it you say it takes some time for finger 1 to detect,  can you let us know how often you are scanning the sensors?

              Also try reducing the finger threshold and the noise threshold of the first sensor and see if it helps.

              Also while sliding across the sensors check if you get the following waveform:

              Waveform: Sliding from sensor 1 to sensor 5 once

              Waveform 2: Sliding across the slider multiple times:

               

               

              Can you check if you see such smooth transition in the slider segments?

               

              Regards,

              Bragadeesh