Does PSoC 4100 CapSense CSD library v2.6 with environmental compensation?

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

cross mob
KeLa_2972731
Level 1
Level 1

Hello,

According to the cap sense library CapSense CSD [v2.6] which used in CY8CKIT-022 liquid level sensing shield project, is there any environmental compensation already done in the library?  

For example if we calibrated the water bottle at room temperature, and then bring it to an extreme hot / cold environment, I think the calibrated data will not be valid anymore. If that is the case, do anyone have experience on this environmental compensation for Cap Sensing?

Thanks and regards,

Kevin

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

Hi KeLa_2972731

1. No, environmental compensation is not done in the CapSense CSD component for liquid level sensing. This must be taken care separately in the application.

2. You are correct, as the temperature changes, the initial calibration will not be valid anymore and the change will cause the raw counts also to change and this might be interpreted as a signal. So the environmental changes must be compensated.

You can refer this kba Using a CapSense Reference Sensor to Compensate Environmental Changes - KBA227366 where an example of checking the baseline to determine the environmental change is provided. Note that this implementation requires a reference sensor that is placed outside the normal LLS system that is not subject to these changes.

If that is not possible, then, you can use a reference sensor which is placed such that it does not come in contact with any liquid and the raw counts of this sensor can be used as baseline for the LLS sensors.

Best regards,
Hari

View solution in original post

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

Hi KeLa_2972731

1. No, environmental compensation is not done in the CapSense CSD component for liquid level sensing. This must be taken care separately in the application.

2. You are correct, as the temperature changes, the initial calibration will not be valid anymore and the change will cause the raw counts also to change and this might be interpreted as a signal. So the environmental changes must be compensated.

You can refer this kba Using a CapSense Reference Sensor to Compensate Environmental Changes - KBA227366 where an example of checking the baseline to determine the environmental change is provided. Note that this implementation requires a reference sensor that is placed outside the normal LLS system that is not subject to these changes.

If that is not possible, then, you can use a reference sensor which is placed such that it does not come in contact with any liquid and the raw counts of this sensor can be used as baseline for the LLS sensors.

Best regards,
Hari

0 Likes

Hi Hari,

Thanks for the reply.

According to your reply and the information in below thread on cypress community, we really need the baseline information to eliminate the environmental changes after calibration.

https://community.cypress.com/docs/DOC-17693

//Calculate difference between baselines

baseline_diff = CapSense_dsRam.snsList.button1[0u].bsln[0u] - CapSense_dsRam.snsList.button0[0u].bsln[0u];

The above baseline information comes from CapSense library base on button example, but I am not able to find any baseline information from CapSense_CSD component, how can I get the baseline information from CapSense_CSD library?

Thanks and regards,

Kevin

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

Hello KeLa_2972731

It is recommended to use the CapSense V7 component for any new projects as it is an updated version with several bug fixes and improved functionality.

However, to answer your question, you need to use the CapSense_GetBaselineData() API that takes the sensor number as a parameter (Sensor numbers are defined in CapSense.h file) and returns the baseline data.

Best regards,
Hari

0 Likes

Hi Hari,

I am not able to use "CapSense_GetBaselineData() API since my project bases on CY8CKIT-022 CapSense Liquid Level Sensing shield which is using "Generics" in widgets config.

If that is the case, do you have any suggestion if implementing environmental compensation in my project?

Thanks,

Kevin

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

Hello Kevin,

For generic sensors, there is no baseline maintained in the CapSense configuration. So, you can use the raw count from the reference sensor and process accordingly. That is, currently you are processing the sensor status based on a previously stored raw count value, which is stored using the StoreCalibration API.

Instead, you can modify the logic to process sensorDiff as (current Raw count of sensor) - (current raw count of reference sensor).

Best regards,
Hari

0 Likes

Thanks for your suggestion Hari.

If we use the raw count of sensor as a baseline, do you have a figure that what is the max tolerance for each sensor in terms of each ADC channel in PSoC 4100?

Thanks and regards,

Kevin

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

Hi KeLa_2972731

I don't follow this comment. Can you please clarify? Is the query regarding a noise threshold equivalent for the reference sensor?

Best regards,

Hari

0 Likes

Hi Hari,

The story is that, we are now using a customized flex PCB and our own design board (CY8C4124PVI-442) doing some testing, we found that there is a max 8% variation on the raw count of each sensor, but now we found that the variation is coming from the flex PCB not in the MCU. We don't have any issue now.

Thanks for your help.

Best regards,

Kevin

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

Hi Kevin,

That's great. Please let me know if there are any pending questions regarding this thread.

Best regards,
Hari

0 Likes