What are the factors that effect the Scan time of the Cap Sense module when used with CY8CKIT-042 PSoC® 4 Pioneer Kit?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
sag_4314046
Level 1
Level 1
First like received

Hello,

I am using CY8CKIT-042 PSoC® 4 Pioneer Kit. I am using it for the Cap Sense design with 10 buttons and 2 sliders. I am tuning them using manual tuning.

The problem what i am facing is there is a small delay in scanning time of the buttons. I have implemented in two ways

Method 1. By making each button as one widget i.e., 10 widgets each containing 1 sensor.

Method 2. By diving two  buttons into two groups each containing 5 sensors under 1 Widget. So, a total of 2 widgets and 10 sensors

According to my observation Scan time in Method 2 is greater than the scan time in Method 1.

My questions are,

1. Does that make any difference in implementing the project using the above mentioned 2 methods?

2. Parameters which i am taking care for the scan time are Modulator clock frequency(set to max 24000 kHz), Scan Resolution(set to 13 bits to get a proper raw count value) and Compensation IDAC is enabled.  Kindly help me if i am missing any of the parameters for reducing the scan time.

I have attached the codes for the both methods. Function named void ProcessAllWidgets() deals with the scanning of the buttons.

Thanks in advance.

0 Likes
1 Solution

Hi sag_4314046​,

If buttons that have different Cp are grouped together under one widget then each button might produce different signal since they have the same hardware and threshold parameters. If the touch performance is good, you can use it like that.

You need to set sense clock such that it charges and discharges the sensor with max Cp in that widget.  You can use SmartSense to determine the sense clock frequency.

Hardware scan time is not the actual scan time as mentioned in the previous response. It involves the sensor initialization time also. This needs to be taken into account. For example toggle a gpio pin before and after the CapSense_ScanAllWidgets() and CapSense_ProcessAllWidgets to know the actual scan time/ processing time.

If needed, you can try using low level CapSense APIs for reduced execution time by scanning/ processing only specific widgets according to your application using CapSense_ProcessWidgetExt() , CapSense_CSDSetupWidget and CapSense_Scan().

If you want to further reduce the scan time, you may have to reduce the Cp of the sensor by:

1. Connecting hatch to shield

2. Reducing trace length

3. Reducing button diameter

Regards,

Bragadeesh

Regards,
Bragadeesh

View solution in original post

0 Likes
3 Replies
BragadeeshV
Moderator
Moderator
Moderator
First question asked 1000 replies posted 750 replies posted

Hi sag_4314046​,

Sensor scan time depends on the hardware scan time and the sensor initialization time.

Hardware scan time = (2^N - 1)/ Mod clock

Sensor initialization is the time required to setup the widget before starting to scan.

When there are several widgets in the design, the setup time is increased. If you have all the sensors in the one widget, then the widget set up time is reduced.

If possible you can have a single widget for all the 10 sensors, provided you get similar signal from all the sensors.

According to my observation Scan time in Method 2 is greater than the scan time in Method 1

This is not expected. Can you let us know how you are measuring scan time?

Regards,

Bragadeesh

Regards,
Bragadeesh
0 Likes

Thanks BragadeeshV_41 for the reply.

I have went through one query in cypress community in which you have suggested that capsense buttons(more then 1) must be of same dimension in order to give them under one widget.

Actually in my project all button buttons are not of same dimension, so we get different signal value. So according to my understanding I can't keep all sensors under one widget. Am I correct?

Correct me if I am wrong.

I am measuring sensor scan time from the following path

Capsense/Advanced/Scan order

In this it gave me the total scan time for all the widgets.

Regards,

Garrepally Sahithi

Associate Engineer, Embedded Common

L&T TECHNOLOGY SERVICES LIMITED

L3 Building, Manyata Embassy Business park

Nagawara Hobli, Bengaluru-560045

0 Likes

Hi sag_4314046​,

If buttons that have different Cp are grouped together under one widget then each button might produce different signal since they have the same hardware and threshold parameters. If the touch performance is good, you can use it like that.

You need to set sense clock such that it charges and discharges the sensor with max Cp in that widget.  You can use SmartSense to determine the sense clock frequency.

Hardware scan time is not the actual scan time as mentioned in the previous response. It involves the sensor initialization time also. This needs to be taken into account. For example toggle a gpio pin before and after the CapSense_ScanAllWidgets() and CapSense_ProcessAllWidgets to know the actual scan time/ processing time.

If needed, you can try using low level CapSense APIs for reduced execution time by scanning/ processing only specific widgets according to your application using CapSense_ProcessWidgetExt() , CapSense_CSDSetupWidget and CapSense_Scan().

If you want to further reduce the scan time, you may have to reduce the Cp of the sensor by:

1. Connecting hatch to shield

2. Reducing trace length

3. Reducing button diameter

Regards,

Bragadeesh

Regards,
Bragadeesh
0 Likes