PSoC4000S : Raw count of CapSense vs Ambient temperature vs Cmod

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

cross mob
MiNe_85951
Level 7
Level 7
Distributor - TED (Japan)
50 likes received 500 replies posted 50 solutions authored

Dear Sirs and Madams,

 

We are considering designing a capacitive button with CapSense the PSoC4000S.

And we are facing the problem that the raw count fluctuates due to temperature changes.

 

The settings we are using are:

・ Dual IDAC sourcing mode

・ Self-capacitance sensing

As an example of problematic operation,

Normally, the raw count is about 1600 (80% of 11 bit = 2048) when initialized at 25 deg C. 

if CapSense is initialized by power-on at -30 deg C, raw count is about 1600.

And the ambient temperature rises to 25 deg C, raw count rises to about 2000 even though the sensor is not touched by a finger, exceeding the on-threshold.

Initialize again when the raw count rises, the raw count is about 1300.

 

(1) Do you know what is the main reason why raw counts fluctuate with changes in ambient temperature?

 

(2) I think that the main factor of raw count fluctuation is that the capacitor capacity of Cmod decreases at low temperature. Is this perception correct?

 

(3) If Cmod is affecting, Do you have a formula or document that shows the relationship between the raw count and the capacitor capacity of Cmod?

 

Regards,

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

Hi @MiNe_85951 

 

Using an X7R is not recommended for designs that have temperature constraints. I would recommend replacing this with a C0G cap for better and reliable performance. 

"And the CapSense we are using manual tuning, but Imod uses "Enable IDAC auto-calibration" mode.
So I understand that you have to disable these auto-calibration to set the calibration percentage you mentioned to a low value such as 60%."

No, I would recommend keeping the IDAC auto-calibration enabled. You can set the device to a lower calibration percent by using the CapSense_CSDCalibrateWidget API that takes the widget ID as first parameter and the calibration percent as the second parameter. This will help you resolve any board-to-board variations as well. 

 

Best regards, 
Hari

View solution in original post

7 Replies
Hari
Moderator
Moderator
Moderator
750 replies posted 500 replies posted 250 solutions authored

Hi @MiNe_85951 

 

This behaviour is expected and there are a lot of reasons for this. 

Cmod is one of the main reasons and we recommend using a temperature tolerant C0G (NP0) capacitor. This minimizes the effect of Cmod change on the rawcounts with temperatures. 

 

The second is the actual capacitance changes. The absolute capacitance changes with temperature and this is translated directly onto the raw counts. There aren't any solutions to overcome this, we can only compensate this change via firmware. 

Another reason is the inaccuracies in the sensing components such as IDACs. The IDAC inherently has some inaccuracies when the temperature is very low and this too impacts the performance. 

 

To compensate these, you can set the calibration percent to a lower value, such as 60% so that there is more room before the raw counts saturate. Please note that you need to enable PRS  as the sense clock source to avoid any flat spots. 

 

Best regards, 

 

Hari

MiNe_85951
Level 7
Level 7
Distributor - TED (Japan)
50 likes received 500 replies posted 50 solutions authored

Hari-san,

 

Thank you for your support!

 

We use a capacitor with X7R grade for Cmod.

 

And the CapSense we are using manual tuning, but Imod uses "Enable IDAC auto-calibration" mode.
So I understand that you have to disable these auto-calibration to set the calibration percentage you mentioned to a low value such as 60%.

 

First of all, We will try to confirm whether this measure can avoid this issue.

 

Regards,

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

Hi @MiNe_85951 

 

Using an X7R is not recommended for designs that have temperature constraints. I would recommend replacing this with a C0G cap for better and reliable performance. 

"And the CapSense we are using manual tuning, but Imod uses "Enable IDAC auto-calibration" mode.
So I understand that you have to disable these auto-calibration to set the calibration percentage you mentioned to a low value such as 60%."

No, I would recommend keeping the IDAC auto-calibration enabled. You can set the device to a lower calibration percent by using the CapSense_CSDCalibrateWidget API that takes the widget ID as first parameter and the calibration percent as the second parameter. This will help you resolve any board-to-board variations as well. 

 

Best regards, 
Hari

MiNe_85951
Level 7
Level 7
Distributor - TED (Japan)
50 likes received 500 replies posted 50 solutions authored

Hari-san,

 

I am very grateful for your many advices.

We would like to confirm only one point about this problem behavior.

 

With manual tuning, and enabled IDAC auto-calibration,

The raw count is about 1600(= 2048 * 80%) at 25 deg C in normal initialization,

We don't understand why the raw count is about 1300(= 2048 * 63%) if I initialize it at -30 deg C and then initialize it again at 25 deg C.

Do you know why the raw counts are different even if you initialize at the same 25 deg C?

 

Regards,.

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

Hi @MiNe_85951 

 

Just to confirm, does this failure occur if you try to initialize the CapSense system when the temperature changes from -30C to 25C? Can you let me know how you are initializing again at 25C? Please check the return status of the API that you are using (either CapSense_Start or CapSense_Initialize) and this will throw the error. The reason this might be happening could be due to the drastic change in temperature while the system is trying to calibrate. 

 

Best regards, 
Hari

MiNe_85951
Level 7
Level 7
Distributor - TED (Japan)
50 likes received 500 replies posted 50 solutions authored

Hari-san,

 

The current process is initialized when the raw count is saturated (exceeds about 2000).

That API used to initialize is CapSense_Start API.

This avoids the saturated state (sensor is on), but We haven't been able to determine why the raw count is about 1300.

 

As you might guess, the temperature on the board may be changing during reinitialization.

After all, is it best to avoid the problem by sensing changes in ambient temperature and initializing when the temperature changes significantly?

 

Regards,

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

Hi @MiNe_85951 

 

Yes, it would be better to avoid initialization when the temperature changes drastically. You can check this by comparing the return parameter of CapSense_Start. If the return is CYRET_SUCCESS (value = 0), only then use CapSense. Else, you can keep trying to initialize till it returns success, once the temperature stabilizes. 

 

Best regards, 
Hari

0 Likes