PSoC5LP CapSense Calculation of Cs

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

Hi,

I would like to ask again about the calculation of Cs.

PSoC5LP Get Seneor Capasitance API

We refer to the project you received.

Please tell us about the number 100663  about the calculation result in the project,

Vref : 1.024V

Resolution : 16bit = 65536

*fs = 100663 / ( 1.024 / 65535 )  = 1.5

fs = 0.667

fs is "the switching voltage of the pre-charge clocks".

We understand that fs is not frequency[Hz] but voltage.

Where should this value refer to a project?

Regards,

0 Likes
1 Solution
Alakananda_BG
Moderator
Moderator
Moderator
50 likes received 250 sign-ins 250 replies posted

Hi Masashi,

We have an equation to calculate raw count,

RC/ Cs  = (2^N - 1)(Fs)(Vref) /  Idac      (1)

          

The answer for your question i.e. from where the number 100663 was obtained is, by substituting the values Vref,resolution(N) and switching frequency(Fs).

The switching frequency Fs is in "Hz" and is calculated by dividing the scan time by analog switch divider.

In this case,

Fs = mod clock frequency/ analog switch divider  = 24MHz/16 = 1.5MHz

     

Vref : 1.024V

Resolution : 16bit = 65536

Therefore,

(2^N - 1)(Fs)(Vref) = 100663

substituting this value in eq (1),

RC/Cs   = 100663/Idac  ,  where Idac = 190uA.

   

RC/Cs = 100663/190  =sensitivity.

    

Hence, Cs = RC /sensitivity     

                 

Raw count value can be obtained by using the API CapSense_sensorRaw.

Thus the value of Cs can be calculated.

We hope our information is clear kindly come back if you have any queries.

Regards

Alakananda

Alakananda

View solution in original post

0 Likes
2 Replies
Alakananda_BG
Moderator
Moderator
Moderator
50 likes received 250 sign-ins 250 replies posted

Hi Masashi,

We have an equation to calculate raw count,

RC/ Cs  = (2^N - 1)(Fs)(Vref) /  Idac      (1)

          

The answer for your question i.e. from where the number 100663 was obtained is, by substituting the values Vref,resolution(N) and switching frequency(Fs).

The switching frequency Fs is in "Hz" and is calculated by dividing the scan time by analog switch divider.

In this case,

Fs = mod clock frequency/ analog switch divider  = 24MHz/16 = 1.5MHz

     

Vref : 1.024V

Resolution : 16bit = 65536

Therefore,

(2^N - 1)(Fs)(Vref) = 100663

substituting this value in eq (1),

RC/Cs   = 100663/Idac  ,  where Idac = 190uA.

   

RC/Cs = 100663/190  =sensitivity.

    

Hence, Cs = RC /sensitivity     

                 

Raw count value can be obtained by using the API CapSense_sensorRaw.

Thus the value of Cs can be calculated.

We hope our information is clear kindly come back if you have any queries.

Regards

Alakananda

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

Alakananda-san,

Thank you for you reply.

I did not understand the meaning of the "1.5" value,
I understand it by your explanation.

-- fs is described as "the switching voltage of the pre-charge clocks" but it is not a switching voltage.
-- fs is not reciprocal
-- MHz (10^6 ) is omitted.

I will be careful about the above from now on.

Regards,

Masashi

0 Likes