Switching between proximity and touch sensing for a 3x4 keypad

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

cross mob
Anonymous
Not applicable

I'm working on a 3x4 button keypad using a CY8C21434. I'd like to be able to detect proximity and also be able to read the status of the buttons. When proximity is detected, the LEDs behind each key illuminate to present the user with the keypad. The implementation suggested to me by the FAE is the following:

   

 

   

1) Gang together 4, 8, or 12 sensors in normal operating mode using the analog mux, creating a lot more copper surface that will be more sensitive for prox detection. Once proximity is detected, the part can go into a different operating mode, wherein each key is independent

   

2) Since the large prox detector sensor will have much higher capacitance, 2 different bleed resistors are required on different pins, connected through the global out bus.

   

 

   

I'm just a little confused about how connected multiple sensors to the mux actually connects them together. It was suggested that I set/unset the right bits in MUX_CR0, MUX_CR1, MUX_CR2, and MUX_CR3. But I'm still a bit foggy on how this connects the sensors together etc. Has anyone worked on an implementation like this? I could use a code sample or a few pointers on how to proceed. Thanks.

0 Likes
1 Solution
Anonymous
Not applicable

Yes, you will have to use two separate bleed resistors, one for proximity and the other when you want to scan the buttons due to the difference in the parasitic capacitance. I am attaching an example project, where you connect some buttons together and scan them simultaneously. This acts as a proximity sensor as it has a larger sensing area. Once the sensor is active, you can use the remaining buttons for normal button scanning.

   

I have implemented it on CY3280-21x34 SLM module available here: http://www.cypress.com/?rID=37761. I use the slider area for proximity and the buttons for normal button scanning. Here I am using just one bleed resistor, as my sensing areas are different and I've tuned them accordingly. Also, I am using the shield electrode here to reduce the parasitic capacitance.I turn on an LED when I detect proximity to a finger and another LED when my buttons are active. My buttons are scanned only when I detect proximity. 

   

What you can do with this project is to modify it scan the same sensors. You may require a dummy sensor  with which you'll connect rest of the sensors for proximity. You'll just scan that dummy sensor and once the proximity is detected, disconnect all the sensors for individual scanning. 

   

Let me know if you have trouble with implementing this.

Best Regards,
Prakhar

View solution in original post

0 Likes
3 Replies
MR_41
Employee
Employee
First like received

Let me see if I can get some code from the capsense experts and update you.

   

 

   

Best Regards,

   

Ganesh

   

The PSoC Hacker

0 Likes
Anonymous
Not applicable

Yes, you will have to use two separate bleed resistors, one for proximity and the other when you want to scan the buttons due to the difference in the parasitic capacitance. I am attaching an example project, where you connect some buttons together and scan them simultaneously. This acts as a proximity sensor as it has a larger sensing area. Once the sensor is active, you can use the remaining buttons for normal button scanning.

   

I have implemented it on CY3280-21x34 SLM module available here: http://www.cypress.com/?rID=37761. I use the slider area for proximity and the buttons for normal button scanning. Here I am using just one bleed resistor, as my sensing areas are different and I've tuned them accordingly. Also, I am using the shield electrode here to reduce the parasitic capacitance.I turn on an LED when I detect proximity to a finger and another LED when my buttons are active. My buttons are scanned only when I detect proximity. 

   

What you can do with this project is to modify it scan the same sensors. You may require a dummy sensor  with which you'll connect rest of the sensors for proximity. You'll just scan that dummy sensor and once the proximity is detected, disconnect all the sensors for individual scanning. 

   

Let me know if you have trouble with implementing this.

Best Regards,
Prakhar

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

I think there was some problem with the attachement in the last post. I am attaching the project here again.

   

Thanks.

   

Prakhar

0 Likes