cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 5, 3 & 1

Anonymous
Not applicable

Hello,

   

I am very new with PSOC and embedded programming.  I have been having issues with CapSense proximity sensing.   I have created a proximity widget and assigned it a sensor.  I have other capsense buttons on my board which have been configured as well and are working.  I have not been able to figure out how to use the tuner with a proximity sensor.  I read that all widgets are enabled by default except proximity widgets.  How do you manually enable a proximity widget so you can use it in the tuner?  Below is the part of my code that is dealing with CapSense.  Thank you for your help.

   

-Walt

   

 

   

(This portion of code is in my main)

   

   

/* start tuner operation */

   

        CapSense_1_TunerStart();

   

CapSense_1_EnableSensor(CapSense_1_SENSOR_PROXIMITYSENSOR1_0__PROX);  //Not sure where to put this??

   

for(;;)

   

       {

   

        CapSense_1_TunerComm();

   

}

   

/* end tuner operation */

0 Likes
15 Replies
ETRO_SSN583
Esteemed Contributor

This might help - www.cypress.com/

   

 

   

Regards, Dana.

0 Likes
Anonymous
Not applicable

 Thanks Dana for your reply but the link to the post you sent me does not provide a sufficient amount of info on enabling the proximity widget in the main.  Any other ideas out there?  Thanks

   

-Walt

0 Likes
Bob_Marlowe
Expert II

I always suggest to post the complete project here so that we can have a look at. Together with some hardware-information (Kit used) it is much easier to sort out the facts which may lead to an error.

   

 

   

Bob

0 Likes
Bob_Marlowe
Expert II

Forgot:

   

Use in Creator: "File -> Create Workspace Bundle" and upload the resulting archive here.

   

 

   

Bob

0 Likes
Anonymous
Not applicable

You guys may be interested to know that within the week, Cypress will upload a couple of proximity-sensing example projects on the 100-projects-in-100-days initiative for PSoC 4. These are going to be simple examples to demonstrate the feature, and show how to use it in an application (RGB control, Theremin). The Bridge Control Panel will be used to interactively graph the sensor raw counts.  

   

http://www.element14.com/community/community/knode/dev_platforms_kits/element14_dev_kits/psoc4_pione...

   

One thing to note is that the type of sensor used for proximity detection affects the range/sensitivity of the sensor. For example, if you connect a large metal object to the pin which is configured for proximity detection, you are likely to get a much larger range.

   

Best,

   

Antonio

0 Likes
Anonymous
Not applicable

Here is my project.  I had to leave out some areas of code.  I am using a propritary PCB with seven capsense buttons and am trying to use one of the buttons as a proximity senor or gange them up as one proximity sensor.  Thanks for taking a look at it.

   

-Walt

0 Likes
Bob_Marlowe
Expert II

Tuning method is set to "Auto" which -as I understand the datasheet - will not use the tuner. Should be set to "Manual"

   

 

   

Bob

0 Likes
Anonymous
Not applicable

I am affraid that is not the problem.  I have attempted manual and auto with the same results.  The graph shows zero signal ad does not vary even with contact.

   

-Walt

0 Likes
Bob_Marlowe
Expert II

Check your (ceramic) capacitor of 2.2 pF on pin 60

   

also check pin ...

   

FOUND IT!

   

Your proximity pin is not in the pin-list! Try a remove and re-create the proximity sensor in the CapSense's property dialog. After a build there are some errors concerning doubly connected pins. Concentrate on those!

   

 

   

Bob

0 Likes
Anonymous
Not applicable

The seven capsense buttons on this board work great so I dont think there is anything wrong with my CMOD.  I double checked and it is 2.2nF.  I was under the impression a proximity widget did not need a dedicated pin but could scan on top of any button.  Just to test, I have configured the proximity sensor with its own button sensor.  There still seems to be a problem with enabling the proximity sensor.  When I probe the proximity sensor there is no signal but when I probe one of the buttons which is also enabled it is functioning with a signal.  Attached is my latest project file.  Thanks for the help!

   

-Walt

0 Likes
Bob_Marlowe
Expert II

Try the following: Unlock all your pins that are not concerned with the CapSense proximity,  rebuild and test

   

when test fails, unlock the prox.sense P15(4) and try to use the pin the fitter assigns after a rebuild (or if hardware does not allow an adjacent one)

   

 

   

Bob

0 Likes
Anonymous
Not applicable

 I have decided to set aside trying to use the tuner with proximity sensing.  After the 15th project of the 100 was posted I decided to attemp it since it uses proximity sensing and displays the collected data through the Bridge Control Panel over a RS232 com port.  Unfortunately I am still having issuse getting a GUI working.  The Bridge Control Panel connects to the com port but when I press the repeat button nothing happens.  I have seen a brief connection occur twice .  But all the Repeat button does is index the status window one row.  I have configured the protocol and the variable settings correctly and am sure my command is correct.  Please let me know what you think.  Attached is my project.  Thanks you all for your help!

   

 

   

-Walt

0 Likes
Anonymous
Not applicable

 Sorry here is my project

0 Likes
Anonymous
Not applicable

 Here is a screenshot of the Bridge Control Panel

0 Likes
Anonymous
Not applicable

 When I watch the port through hyperterminal everything looks like its working properly.  The header 'C' is there along with a following character that changes with the proximity sensor.  Attached is a screen shot.

   

-Walt

0 Likes