what happen when the GPIO Pins are shorted in SCD sensing method.

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

cross mob
lock attach
Attachments are accessible only for community members.
wangyuanfan
Level 3
Level 3
10 replies posted 10 questions asked 10 sign-ins

Dev-board : CY8CKIT-149
IDE : PSoC Creator 4.4

Hi, I’m using touchpad(metal mesh sheet) and trying to detect short defect by shorting two GPIO Pin connected with electrode.The capacitance value of the shorted pin is theoretically twice the normal value, but 40 times the normal value is detected.And its 40 times value is constant at 854375 (In general, capacitance value should shake out a bit).

Something is wrong obviously.I have got a few ideas.

Regarding to “PSoC® 4 and PSoC 6 MCU CapSense® Design Guide ‘3.1 CapSense CSD Sensing mode Figure3-1), when using CSD mode, a GPIO pin may serve as an output as well as an input (if both are outputs, there will be a conflict).

When I disconnected the Jumper wire from the electrode and shorted the pin on the dev-board, the constant value was detected as well, so the problem must be on the board side.

For example, I shorted P2_2 and P2_1. Any other combination would have the same result. What’s strange is that sometimes pins that aren't shorted act like they are shorted. When the Pin is not shorted, it measures normal values, so it is unlikely that the board is broken.

I share the project. Please teach me what is wrong with it and how to accomplish my purpose.

Thank you.

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

Hi @wangyuanfan 

 

The reason that you see the max value is that adjacent sensors are driven to the ground when one sensor is scanned. Therefore, you are shorting the pin to the ground and the capacitance, therefore, becomes infinite. 

To see twice the value, you need to disconnect it from the GPIO on the controller and detect the capacitance. 

Or you need to disable that sensor in the TopDesign and then try to measure the capacitance. 

 

Best regards, 
Hari

View solution in original post

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

Hi @wangyuanfan 

 

This behavior is expected as the GetSensorCapacitance API will return CapSense_TST_MEASUREMENT_HIGH_LIMIT error. You can check this out by reading the "state" variable in your code. The value 854375 needs to be ignored as this is the value that is returned during an error and does not represent the true capacitance value. The reason it goes to the maximum value is that all other sensors are connected to the device ground when one sensor is being scanned. Therefore, the capacitance formed is infinite. 

 

Instead of checking the value from GetSensorCapacitance, you can use the CapSense_CheckIntegritySensorPins which returns the sensor's status and if it is shorted. 


Best regards, 
Hari

0 Likes
lock attach
Attachments are accessible only for community members.

Thank you for responding.

I was indeed able to detect the HIGH_LIMIT from the shorted pin and CapSense_TST_SNS_SHORT by function CapSense_CheckIntegritySensorPins.

But, I'm looking for a way to detect twice the capacitance value from a shorted GPIO pin (The capacitor is connected in parallel, so theoretically it doubles).

I would like to know if there is such a way. For example, is there a way which all other sensors are not connected to the device ground when one sensor is being scanned or assigning the GPIO Pin to simple input pin to measure the capacitance value.

I shared an Image of my purpose.

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

Hi @wangyuanfan 

 

The reason that you see the max value is that adjacent sensors are driven to the ground when one sensor is scanned. Therefore, you are shorting the pin to the ground and the capacitance, therefore, becomes infinite. 

To see twice the value, you need to disconnect it from the GPIO on the controller and detect the capacitance. 

Or you need to disable that sensor in the TopDesign and then try to measure the capacitance. 

 

Best regards, 
Hari

0 Likes

I see. Thank you so much!

0 Likes