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

cross mob
samac_3770401
Level 1
Level 1

Hi,

I am using the CY8CKIT-043 PSoC® 4 M-Series Prototyping Kit. What I am trying to achieve is to be able to detect the proximity of a hand and at the same time been able to interact with capacitive buttons.

Getting the proximity part of the project works fine, but been able to turn on and LED by pushing on a CAP sense button does not. I have looked thru the example CE210291_CapSense_P4_One_Button & Alan Hawse tutorial vid  to try to implement a button to turn on an LED but to not end.

My first question is can you use both the proximity feature and the cap sense button at the same time?

I appreciate the feedback. Thanks.

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

Hi

In the code, the code for initializing sensor baseline and updating sensor baseline for CapSense button component are missing. Also at the end of the if(CapSense_IsBusy()== NOT_BUSY) condition, the code for scanning widgets must be added instead of scanning only the proximity sensor by replacing the CapSense_ScanSensor(PROXIMITY_SENSOR_INDEX); line with CapSense_ScanEnabledWidgets();.

I've added a project with all these changes. Please have a look as it might work in your case as well.

It is, however recommended to use the new CapSense component for new designs as it has new features and enhanced performance. A detailed migration guide can be found on page 152 of the PSoC 4 Capacitive sensing document, link: https://www.cypress.com/file/442046/download

Hope that it solves the problem. If any issue arises, please attach the archive of your project along with the problem so that we can debug and provide a solution. Details for archiving a project can be found in this link: https://community.cypress.com/docs/DOC-9742

Regards

Harigovind

View solution in original post

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

Hi

It is possible to use both CapSense button and proximity sensor at the same time.

I have attached a project that demonstrates the same. This might work in your case as well. Please try it out and let us know if it works.

0 Likes

Hi,

I am getting an error message stating that it cannot find V6 of the capsense component. I swapped it with a V5 capsense and update the project but it still did not work properly. One LED turns on and off, but the other stays on despite interfacing with the sensor. This is the same thing that happens on my project.

I attached some JPGs of my project for reference.

Some Background info:

  • I started my project in PSOC creator 3.2
  • I moded the sample example "Project Name : CapSense_Proximity_Design" - the project is all good until that point
  • Had to update the project to add a button, so I ended up downloading PSOC creator 4.2 and updated the project "Top design" as thing where showing out of date. Then updated the code.

I am hoping that by looking a the JPGs you will be able to spot what I am doing wrong.

1.JPG

2.JPG

4.JPG

5.JPG

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

Hi

In the code, the code for initializing sensor baseline and updating sensor baseline for CapSense button component are missing. Also at the end of the if(CapSense_IsBusy()== NOT_BUSY) condition, the code for scanning widgets must be added instead of scanning only the proximity sensor by replacing the CapSense_ScanSensor(PROXIMITY_SENSOR_INDEX); line with CapSense_ScanEnabledWidgets();.

I've added a project with all these changes. Please have a look as it might work in your case as well.

It is, however recommended to use the new CapSense component for new designs as it has new features and enhanced performance. A detailed migration guide can be found on page 152 of the PSoC 4 Capacitive sensing document, link: https://www.cypress.com/file/442046/download

Hope that it solves the problem. If any issue arises, please attach the archive of your project along with the problem so that we can debug and provide a solution. Details for archiving a project can be found in this link: https://community.cypress.com/docs/DOC-9742

Regards

Harigovind

0 Likes

Hi,

Thank you for the feedback, both sensors are working now. For future project I will definitely be using the updated component. Thanks again for the support on this!

Regards,
Sam.

0 Likes