Hello,
It's me again!
I'm using CapSense in a manual mode with all the parameters set (as far as all can be set in the window of the component) but I found out that my raw count dont go back always to the same value as you can see on that simple screen when I put something in the vicinity of the proximity sensor.
The parameters I have set are:
I see the sensor frequency that it's the maximum and the average is 187.5khz. Does it mean that it's changing and it could be the reason?
Thank you so much
Alex
Solved! Go to Solution.
Hi am223qu_4008691,
Sorry for the delay in response. Please note the answer to your questions:
1. Sensitivity in general is defined as the change in raw counts for change in sensor capacitance (nothing but the Cf you add). Let's say you are adding a known capacitance to the sensor, the signal you obtain divided by change in capacitance(diff counts = raw count - baseline) will be the sensitivity. Can you do this and see?
2. Alright
3. There should be two loops. Inner loop - prox, outer loop - ground. Put hatch shield inside the loop. No need hatch outside loop.
4. After scan is complete, and when there is not active scan, read CapSense_dsRam.snsList.capteur[0u].raw[0u], this will give unfiltered raw counts. If you do CapSense_ProcessAllWidgets() and then read CapSense_dsRam.snsList.capteur[0u].raw[0u], this will give filtered raw counts. Make sure that you don't scan will reading these values using any interface.
5. If this button is pressed, do CapSense_Stop() and then Capsense_Start() again. This will reset the component again (Re-initializes the component hardware and calibration parameters).
6. Capsense and ADC uses the same hardware resources and hence they can't be used at the same time in PSoC 4 devices. But in PSoC 4S (4000S, 4100S and 4100S plus) devices, it has a Capsense_ADC component that does time multiplexed Capsense and ADC operation. So you can do both.
7. Csh_tank is optional and is required in case when your Cp of shield is high.
8. I'll confirm and let you know.
Regards,
Bragadeesh
Hi am223qu_4008691,
Please let us know the PSoC 4 device you are using in your application.
Also, this is an expected behavior. When you place a grounded object near the prox sensor the raw count is expected to rise. But if you can increase the noise threshold to greater than that, then your baseline will track the raw count.
Do you see false triggers when you place the object near the prox sensor? That would be a real problem. In that case you can increase the prox threshold so that it doesn't false trigger.
Regards,
Bragadeesh
Hi BragadeeshV_41
Thanks for you reply but think you didn't understood my problem.
If you look the picture both rectangles mean there is nothing near the proximity sensor then it's rising because I put something close to it.
So it's perfectly correct! But If you look at the raw counts in both rectangles, there are not the same and they should be because nothing changed!
How can you explain that? because I'm using a both IDAC in manual mode so it's not changing and the only other thing in the formula is the frequency of the sensor. But it doesn't seems to change when I look at it with "CapSense_dsRam.wdgtList.capteur.snsClk;".
Do you have an idea?
Thanks
Hi am223qu_4008691,
Thank you for the clear explanation of your issue.
We have seen noise related issues when IDAC is less than 20. Can you please turn OFF comp IDAC and enable IDAC auto calibration and see if it is greater than 20?
Also please set your MOD Clock to a higher value (the maximum your device will permit). Please let us know the PSoC device you are using so that we can support you better.
Under these conditions, make sure your SNR is at least 5 :1
Regards,
Bragadeesh
I set that value of IDAC because a I found it with the auto calibration.
The modulator clock is at the maximum 12MHZ
I'm using the kit CY8Ckit-040 with CY8C4014LQI-422
Hi am223qu_4008691,
We don't recommend IDAC values less than 20. Please follow the suggestion in my previous response.
Please let me know the version of capsense component you are using. If you're using version 2.6, please turn on the ALP filter and check your results.
Also are you using any low power mode in your application?
Can you please share your project file so that we can investigate this issue further?
Regards,
Bragadeesh
I will try with an higher IDAC and let you know.
I'm using the new one but I was wondering if it's better to use the new one or the last one with the ALP?
I'm not using any low power mode I think.
Here is the simple project.
I also want to improve my distance sensing! What should I do?
Here is the board I'm using with a heat shrink tube around to avoid the direct touch.
The top hatch I'm using the ground and on the bottom the hatch is the shield
with my cover:
Now I have more or less with my hand 3 cm distance sensing but I will not sense a hand so I need a better distance to be sure to sense the object.
Thank you,
Alex
Hi am223qu_4008691,
Thanks for the update.
1. Are you using those buttons for the proximity or are you using a proximity loop for proximity?
2. If they are just normal buttons, how does putting a black tube help the user identify the button location?
3. If they are meant for proximity, we don't recommend such a pattern for proximity sensor. We recommend proximity loop along with a ground loop that runs around the area of interest where proximity is meant to detected as shown below
4. Any particular reason for ground at top and shield at bottom? We usually recommend shield to be placed in a direction where you want proximity detection. Putting a ground hatch near proximity will increase Cp and will reduce the proximity distance.
5. If you want increase distance with good SNR (> 5 : 1), we recommend to use v2.6 CapSense component with ALP filter enabled.
Please refer to the following app note for designing prox sensor with PSOC 4 ( AN92239 Proximity Sensing with CapSense®.pdf)
Regards,
Bragadeesh
Hello BragadeeshV_41,
Do you have an idea about my first question? Why the raw count is sometimes no going back to the same value when there is nothing in the vicinity of the sensor as in the rectangle on the picture? Is it the sensor clock changing even if I set it to 750kHz?
Thank you so much
Alex
Hi am223qu_4008691,
Thanks for the update.
PSoC 4 third generation CapSense supports only 5 - 60 pF even in manual mode.
So if you have 125pF of Cp, you may have to move to a fourth generation CapSense. We'd recommend 4000S device for that.
If this is not possible, you need to reduce the Cp of the sensor to less than the max limit. You can do this by removing the ground hatch pattern totally and have nothing inside the loops. It is better to have a ground loop around the proximity loop for better noise immunity. Have a shield at the bottom where you want to reduce the effect of conductive objects around the prox sensor
But, putting a ground hatch will increase the Cp and will decrease the sensitivity of proximity. The sensitivity of the prox sensor is given as Cf/ Cp . Hence don't have ground hatch at all. Just have a ground loop.
Also, you need to note the proximity distance depends on the diagonal of the proximity loop (limited to the shortest side). When you have smaller breadth and longer length, you will have proximity sensing distance limited to shortest length. But in case you need higher proximity distance with the same design, you have to use the ALP filter which will reduce the noise for higher sensing distance. You will obtain 2 * diagonal distance. ie , the SNR will be good at higher distance.
But since the noise is the issue, I would recommend the following as a summary:
1. Mod IDAC > 20
2. Sense clock source : Direct
3. Ground loop around prox sensor
4. Shield pattern as suggested in this thread Capsense Proximity sensing loop design
Answer to your previous responses:
1. Can you please send us a video for what exactly you are doing when you obtained this waveform.
2. Okay, but we recommend you to use some overlay to be placed over the PCB as suggested in our app note getting started with Capsense Pg no 39
https://www.cypress.com/file/41076/download
3. Discussed above
4. Sorry for the confusion, you are right. But don't put ground, it will decrease sensitivity.
5. Discussed above. It is recommended to use ALP with older component for prox sensor provided your Cp is less that 60 pF
6. No, this is not possible.
7. Discussed above.
Regards,
Bragadeesh
Hi Alex,
Regarding your first question about raw-count not returning to the original level, I've noticed this kind of behavior in following kind of conditions earlier, is your situation like any of these:
a. If you turn ON an LED/GPIOs to sink current or trigger a firmware action based on detection of a touch/proximity event or somewhere during the time the signal is present. In this case, sinking current from GPIOs causes a slight shift in digital vs analog grounding in the device which raises the level. Even if the touch or proximity signal is removed at this instant, the raw-count remains high due to this signal being present. You could try removing all logic from your firmware and only monitor the raw-count to confirm if something like this is the cause here.
Note that this may be noticeable when the sensor is tuned for a very high sensitivity like >2000 counts/pF. Do you know how much is the rawcount per unit pf sensitivity you have tuned the sensor to?
b. I've also noticed this kind of behavior if there is less or no grounding around the sensor and if the sensor is tuned to very high sensitivity. If you improve the grounding around the sensors, this doesn't happen. You mentioned you have hatched ground on top layer, but you may want to look at how it connects to the main board i.e. impedance from device ground may have some role here. (Note that amount of grounding is a compromise, higher shielding/less ground implies better sensitivity but also higher noise)
Thanks,
Priya
Hello,
Sorry for the late reply,
I still need to test with the direct clock as you suggested before.
Thank you again !
Alex
Hi am223qu_4008691,
Sorry for the delay in response. Please note the answer to your questions:
1. Sensitivity in general is defined as the change in raw counts for change in sensor capacitance (nothing but the Cf you add). Let's say you are adding a known capacitance to the sensor, the signal you obtain divided by change in capacitance(diff counts = raw count - baseline) will be the sensitivity. Can you do this and see?
2. Alright
3. There should be two loops. Inner loop - prox, outer loop - ground. Put hatch shield inside the loop. No need hatch outside loop.
4. After scan is complete, and when there is not active scan, read CapSense_dsRam.snsList.capteur[0u].raw[0u], this will give unfiltered raw counts. If you do CapSense_ProcessAllWidgets() and then read CapSense_dsRam.snsList.capteur[0u].raw[0u], this will give filtered raw counts. Make sure that you don't scan will reading these values using any interface.
5. If this button is pressed, do CapSense_Stop() and then Capsense_Start() again. This will reset the component again (Re-initializes the component hardware and calibration parameters).
6. Capsense and ADC uses the same hardware resources and hence they can't be used at the same time in PSoC 4 devices. But in PSoC 4S (4000S, 4100S and 4100S plus) devices, it has a Capsense_ADC component that does time multiplexed Capsense and ADC operation. So you can do both.
7. Csh_tank is optional and is required in case when your Cp of shield is high.
8. I'll confirm and let you know.
Regards,
Bragadeesh