You are here

CapSense CSX (Mutual Capacitance) Access To Raw Data | Cypress Semiconductor

CapSense CSX (Mutual Capacitance) Access To Raw Data

Summary: 2 Replies, Latest post by paulcreaser_1517661 on 27 Oct 2016 01:14 AM PDT
Verified Answers: 1
Last post
Log in to post new comments.
paulcreaser_1517661's picture
User
7 posts

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.

yuva's picture
Cypress Employee
29 posts

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.

paulcreaser_1517661's picture
User
7 posts

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[i]; <-- Widget index here

CapSense_1_RAM_SNS_STRUCT *ptrSns = ptrFlashWdgt->ptr2SnsRam;
sensorRaw[i] = 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.

Log in to post new comments.