CapSense CSX (Mutual Capacitance) Access To Raw Data

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

cross mob
Anonymous
Not applicable

We are currently experimenting with the CY8CKIT-022 CapSense Liquid Level Sensing Shield. So far we have been using the demo software as is, with CSD mode (self capacitance mode).

   

One problem we would like to overcome is the possibility of droplets of water or liquid accumulating on the sensors which are not submerged. This would result in measurement errors. The simplest step appears to be to use the CSX mode (mutual capacitance mode). This appears to reduce the impact of the water drops.

   

Looking at the API, to determine the liquid level, we would use the number of active sensors. The sensors are essentially buttons activated by the water level.

   

However to reduce the number of sensors we would like to use longer sensors and do some interpolation of the raw sensor data to determine the liquid level. For experimental purposes, we would like to use the CSX mode, but also use the raw sensor data? In the case of CSD there is access to the raw sensor data, but there doesn't appear to be in the case of CSX. I may be wrong, so I will keep looking.

   

The aim would be to determine if the effect of the water drops could be reduced using CSX combined with longer sensors and data interpolation.

0 Likes
1 Solution
Yuva
Moderator
Moderator
Moderator
250 replies posted 250 sign-ins 100 solutions authored

Hi,

   

 

   

CSX alone can't be used for water rejection. You have to use CSD also for this purpose since their response to the water is opposite. The other option is to use shield with CSD mode. Similar to CSD you should be able to access the rawcount for CSX also.

   

 

   

Thanks,

   

Yuva.

View solution in original post

0 Likes
2 Replies
Yuva
Moderator
Moderator
Moderator
250 replies posted 250 sign-ins 100 solutions authored

Hi,

   

 

   

CSX alone can't be used for water rejection. You have to use CSD also for this purpose since their response to the water is opposite. The other option is to use shield with CSD mode. Similar to CSD you should be able to access the rawcount for CSX also.

   

 

   

Thanks,

   

Yuva.

0 Likes
Anonymous
Not applicable

Looked through the CapSense generated software. One potential method for accessing the CSX raw count seems to be:-

   

 CapSense_1_FLASH_WD_STRUCT const *ptrFlashWdgt;
 ptrFlashWdgt = &CapSense_1_dsFlash.wdgtArray; <-- Widget index here

   

CapSense_1_RAM_SNS_STRUCT *ptrSns = ptrFlashWdgt->ptr2SnsRam;
sensorRaw = ptrSns->raw[0];
 

   

It actually doesn't seem to work (the code freezes), however that could potentially be another issue. . There doesn't seem to be a clean API for accessing the count/raw data.

0 Likes