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

PSoC™ 4 Forum Discussions

YoIs_1298666
Level 5
Level 5
250 sign-ins 100 replies posted 100 sign-ins

Hello,

I am trying CE224821 CSX project with CY8CKIT041-40XX.

I have a question about the Z axis.

For the X and Y axes, the maximum X or Y axis position are configured. 

YoIs_1298666_0-1649731237638.png

The z-axis seems to get bigger towards the center of the touchpad, but how is it defined and what is the maximum?

YoIs_1298666_1-1649731416830.png

Best regards,

Yocchi

 

0 Likes
1 Solution
Hari
Moderator
Moderator
Moderator
750 replies posted 500 replies posted 250 solutions authored

Hi @YoIs_1298666 

 


1. What is the "totalSum is the sum of centroid signal calculated across the 3x3 matrix" used for?


The total sum or the Z value is an indication of how big the finger press is or how strong the press is on the touchpad. This can be used for further processing such as small finger rejection. 

 


2. Should the 3X3 matrix for the TX0-RX6 at the corner be as follows?

YoIs_1298666_0-1649917580402.png

      z=(0+0+0+0+0+91+0+161+239)/16=30


Yes, this is correct. The center of the matrix will be the node with the highest signal. Your calculations are correct. 

 


3. The Centroid parameter seems to be available only for CSD as shown below, but why does CSX use the 3x3 Centroid parameter for z-axis calculations?

YoIs_1298666_1-1649917803329.png


The documentation implies that you have the option to choose a 3x3 or a 5x5 matrix in the case of CSD. Therefore, the Centroid type is a configurable parameter for CSD. However, in CSX the centroid type is only 3x3 and not a configurable type. 

 

Best regards, 
Hari

View solution in original post

0 Likes
3 Replies
Hari
Moderator
Moderator
Moderator
750 replies posted 500 replies posted 250 solutions authored

Hi @YoIs_1298666 

 

The Z value in touchpad is the amplitude of the touch signal checked across the 3x3 centroid. The z value is a sum of raw counts of sensors that form 3x3 matrix with a local maximum in the center. It is calculated as follows - 

ptrNewTouches->touch[number].z = LO8(totalSum >> CapSense_CSX_TOUCHPAD_Z_SHIFT);

Where totalSum is the sum of centroid signal calculated across the 3x3 matrix. 

 

Best regards, 
Hari

0 Likes

Hello Hari,

Thank you very much for your reply.

I have three questions.

1. What is the "totalSum is the sum of centroid signal calculated across the 3x3 matrix" used for?

2. Should the 3X3 matrix for the TX0-RX6 at the corner be as follows?

YoIs_1298666_0-1649917580402.png

      z=(0+0+0+0+0+91+0+161+239)/16=30

3. The Centroid parameter seems to be available only for CSD as shown below, but why does CSX use the 3x3 Centroid parameter for z-axis calculations?

YoIs_1298666_1-1649917803329.png

Best regards,

Yocchi

0 Likes
Hari
Moderator
Moderator
Moderator
750 replies posted 500 replies posted 250 solutions authored

Hi @YoIs_1298666 

 


1. What is the "totalSum is the sum of centroid signal calculated across the 3x3 matrix" used for?


The total sum or the Z value is an indication of how big the finger press is or how strong the press is on the touchpad. This can be used for further processing such as small finger rejection. 

 


2. Should the 3X3 matrix for the TX0-RX6 at the corner be as follows?

YoIs_1298666_0-1649917580402.png

      z=(0+0+0+0+0+91+0+161+239)/16=30


Yes, this is correct. The center of the matrix will be the node with the highest signal. Your calculations are correct. 

 


3. The Centroid parameter seems to be available only for CSD as shown below, but why does CSX use the 3x3 Centroid parameter for z-axis calculations?

YoIs_1298666_1-1649917803329.png


The documentation implies that you have the option to choose a 3x3 or a 5x5 matrix in the case of CSD. Therefore, the Centroid type is a configurable parameter for CSD. However, in CSX the centroid type is only 3x3 and not a configurable type. 

 

Best regards, 
Hari

0 Likes