Proximity Sensor vs Button Sensor

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

cross mob
JaBo_4446056
Level 1
Level 1
5 replies posted First question asked First reply posted

Hello,

Playing around with the Capsense lead me to discover that the proximity widget lead to a better S/NR than the button widget (~225 vs ~150 for me test) in raw counts. This is even with adjusting the button's IDAC values so it matches with that of the automatic values generated for the proximity sensors.

I am using the multi-frequency scan, but the same effect is present without that option checked. The proximity and button widgets are in separate Capsense modules (I disable one when using the other).

One thing to note is that the amplitude of the button widget vs the proximity widget is different where the noise stays about the same for both widgets (thus a higher S/NR). I am curious as to if there is a difference as to how the button and proximity widgets are handled by the Capsense module (in terms of RAW counts)?

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

Hello JaBo_4446056

I ran your project (I had to change the device and a few pin assignments but these should not affect the performance drastically) and I still got similar results.

1. Please make sure the IDAC gain parameter is set correctly. I see that in the buttons configuration, the gain is set to 300, however, I got IDAC gain as 600 in my tests.

2. I also see CapSenseFilters library added to the project, I had removed this for my tests as it was not available.

3. There is a difference in configuration between the CapSense components. The Button configuration is using pin 4.3 as Cmod and proximity is using 4.2. Please make sure that you are using the same Cmod pin for both configuration for the tests.

Thanks,
Hari

View solution in original post

0 Likes
11 Replies
VenkataD_41
Moderator
Moderator
Moderator
750 replies posted 500 replies posted 250 solutions authored

Hello,

We would like to say that CapSense IP wise, there is no difference between normal button sensor and proximity sensor.

The only difference comes in tuning of the sensor parameters in the firmware.

There are several parameters like IDAC, resolution, sense clock frequency which decides the sensitivity of the sensor. If you are using Smart-sense algorithm, the algorithm sets the sensor parameters in such a way that the proximity sensors will have high sensitivity.

Kindly attach your project or CapSense component configuration file for us if possible.

You can send the capsense configuration file by clicking on the Save configuration icon on the CapSense component. Please refer page 12 of the component datasheet for more information.

https://www.cypress.com/file/420216/download

Thanks

Ganesh

0 Likes

Here are the configuration for my proximity and button components:

Proximity: Proximity.xml - Google Drive

Button: Button.xml - Google Drive

Note that for the button component, the IDAC calibration values are manually set to that of what the proximity sensor generated to have a fair match (compensation and modulation IDAC, clocks, resolution, etc.)

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

Hello JaBo_4446056

I tried the configuration at my end -

1. I took the XML and imported into the CapSense component

2. Ran the proximity example (I took the button sensor from the 145 kit as my sensor but this shouldn't make a difference)

3. Noted down the IDAC code and IDAC gain values that I got for Modulator IDAC as well as compensation IDAC.

4. Configured the button sensor modifying only the IDAC gain and IDAC code from the XML that was previously shared.

5. Checked the SNR and compared both cases.

In my tests, I the SNR was similar - 134 in one case and 132 in the second.

The implementation is similar in both cases - proximity as well as button. Proximity sensor has more firmware features such as an additional threshold parameter called proximity threshold and the ability to configure firmware filters only for proximity sensor.

So, in your case as well, if the sensor is the same, you should be getting the same SNR in both cases. Please make sure that you are setting the IDAC gain and compensation IDAC values correctly in both cases.

Best regards,
Hari

0 Likes

Hello,

Here are my screenshots of PSOC turner with both the proximity widget and the button widget:

Proximity:

Capture.PNG

Capture2.PNG

Button:

Capture3.PNG

Capture4.PNG

The button has a lower S/NR (126 vs 92) and has a lower amplitude (possible explaining the lower S/NR). The modulation clock and the clocking scheme is the same for both widgets as well. Self-test is enabled and so is multi-frequency scanning.

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

Hello JaBo_4446056

From the screenshots shared, the sensors don't seem to be calibrated to the required 85% value. It is required that all sensors are calibrated to 85% of the maximum raw counts, which is 0.85*65535 = 557000, with a 10% error. In this case, the proximity sensors are getting calibrated to 70% in case of proximity and lower in the case of the button sensor.

Please make sure that the sensors are getting charged and discharged completely with the 3MHz clock that is provided. You can probe the sensors and check the result.

Also, please confirm if the tests are performed on the same sensor, that is button/loop in both cases.

Best regards,
Hari

0 Likes

Hello,

You are correct that I am setting the raw counts to 70% of the maximum output on startup instead of the default 85%. Is there any reason that it needs to be 85%. The only reason I could find in the PSOC4 Capsense Application Note is to mitigate against flat spots, which are negated anyways due to PRS being used. The default 85% auto-calibration is too close to the maximum raw value when activated.

Also during my testing with an auto-calibration of 85%, 70%, and 60%, the 70% auto-calibration percentage lead to the best S/NR (Of 226 vs 197 for 85%).

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

Hi JaBo_4446056

That is correct. We recommend 85% to avoid any flat spots in the sensing region. PRS will help in reducing the width of flat spots (the effective range of Cp where raw counts stays constant) but does not help in eliminating flat spots.

In my previous response I had mentioned that I was obtaining similar SNR in the case of both buttons and proximity sensors for a code that I ran with the configurations shared previously. I had not tried with changing the calibration percent. Can you please share the project that you are using so that I can run the same and check the performance.

As long as both sensors are identical in hardware (the shape and overlay material of the sensors), you should be getting similar SNR.

Thanks,
Hari

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

Hi JaBo_4446056

I do not have access to the drive link, and have requested for the same. Kindly approve.

You can also share the project directly in the thread by going to the advanced editor and uploading an attachment.

Thanks,
Hari

0 Likes
lock attach
Attachments are accessible only for community members.

Hello,

I have attached the project directly (didn't know direct-upload was a thing)

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

Hello JaBo_4446056

I ran your project (I had to change the device and a few pin assignments but these should not affect the performance drastically) and I still got similar results.

1. Please make sure the IDAC gain parameter is set correctly. I see that in the buttons configuration, the gain is set to 300, however, I got IDAC gain as 600 in my tests.

2. I also see CapSenseFilters library added to the project, I had removed this for my tests as it was not available.

3. There is a difference in configuration between the CapSense components. The Button configuration is using pin 4.3 as Cmod and proximity is using 4.2. Please make sure that you are using the same Cmod pin for both configuration for the tests.

Thanks,
Hari

0 Likes