Hello: I'm using a MSP430G2533, and I would like to use the Capacitive Touch feature to sense a keypad array of buttons (12 buttons, arranged in a 3X4 matrix). I did not want to use 12 I/O's. Instead I wanted to use 7 I/Os (3 COL, 4 ROW) in a typical button array pattern.
I have reviewed the SLAA379 (MSP430 Capacitive Touch Design Guide") but I can not seem to find any discussion about this in this or in any other AP notes. I assume I can do this? A few questions:
1) What is the best PCB arrangement? Should I replace the round middle circle with 2 half circles? Or use a round pad inside of a donut shaped pad? Or some other arrangement?
2) Will the pin oscillator feature of the 2 pins near to each other interfere with each other?
If it matters, I intend to have a PCB etched on both sides, and the underside will be a ground plane.
Separate question, aside from PCB layout. What is the best way to make the processor wakeup from low power mode on the press of a button? Will the pic osc function work within any of the low power modes?
Thanks in advance - Adrian
Adrian,
I am going to redirect you to the MSP430 Ultra-Low Power 16-bit Microcontroller Forum. They can better help you with your MSP430 CapTouch questions.
Thanks,Brian
Brian P. Burk
Analog Applications Engineer
Dallas, TX USA
Adrian Pyke I would like to use the Capacitive Touch feature to sense a keypad array of buttons (12 buttons, arranged in a 3X4 matrix). I did not want to use 12 I/O's. Instead I wanted to use 7 I/Os (3 COL, 4 ROW) in a typical button array pattern.
The pad attached to a CapSense pin and the person that touches the (isolated) pad form a capacitor. The nearer the finger to the pad, the higher the capacitacne and the lower the oscillation frequency of the CapSense sensor.
Forming a matrix would require placing two pads besides each other, so that the touching finger will form a capacitance to both of them. However, they must not influence each other, neither directly nor indirectly. And here's the problem. Due to the oscillation, the two will easily interfere with each other, Whether there is a finger near them or not.
A possible solution would be placing two half-circles with an isolating graounded wire between them. However, this will lower the sensitifity,a sthere willeb a capacitance formed between the pads and the ground wire.
Also, because of the natureof a matrix, you'd have to place several pads for each pin. And only one of them is actually touched, the others form a dead base capacitance, also lowering the sensitivity.
I really suggest not combining capacitive touch sensing with matrix operation unless really necessary. It gives you mouch trouble.
_____________________________________Before posting bug reports or ask for help, do at least quick scan over this article. It applies to any kind of problem reporting. On any forum. And/or look here.If you cannot discuss your problem in the public, feel free to start a private conversation: click on my name and then 'start conversation'. But please do so only if you really cannot do it in a public thread, as I usually read all threads. And I prefer to answer where others can profit from it (or contribute to it) too.
Hi Jens-Michael: Thank you for your answer. I had decided that this would work fine, but from your answer now I'm worried, so thought it worth to follow-up....
A couple of points:
1) I planned on a solution, where I would make 2 "half circles" one over the other, with approximately 1mm gap between (no ground between them). In total the half circles together form a full circle of about 10-12mm. The top of the half circles among all buttons in a particular row would be tied together and tied to a ROWx input. Similarly, the bottom half circles in a column would be tied together and tied to a COLx input on the MSP430.
2) Regarding interference among adjacent pads. Since it is the suggested protocol for a slide bar or wheel type control, to place the pads near to each other, and such that a finger would overlap more than one of them, I decided that there should not be an interference problem among nearby pads (top half circle and bottom half circle). Am I missing something?
3) I did try a quick test on an array as described above which came out of an evaluation kit for a competing microcontroller. For this test there was a 4X4 matrix as described above. I tied ONE of the ROW pins to the MSP430 launchpad, and ONE of the COL pins to the MSP430 launchpad. Then I modified the CAPsense library code appropriately and it seemed to work. However it might be possible that with all 4 rows and all 4 columns, they would interfere more than my test case of only 1 row and 1 col. So perhaps I need to go back and make a more complete test.
Am I missing something? Thanks again - Adrian
1) Yes, I did understand the concept. Besides the possible crosstalk, the problem with the matrix is that on a 4-row-matrix you have one pad that changes capacitance, but 4 pads that add to the base capacitance. So the sensitivity is only 1/4 of that of a single pad.
2) On a slide bar or wheel, the crosstalk between two adjacent pads is intended, as they mean "adjacent" things. However, with the matrix, the row1 pad on the column1 pad is electrically connected to the row1 pad next to the column2 pad etc. So crosstalk on one pad affects the reading of all pads in the same row or column, not just the adjacent sensors.The proposed GND line will provide better separation, but also furtehr reduce sensitivity, as it increases the base capacitance of the pads.
3) I fear, with more thanj ust one pin on each lane, things get worse. Maybe you 'll still be able to get usabel results. It's worth an experiment.
My impression is, you may connect multiple touch pads to multiple pins with pin-osc capability. But, at any given instant, you never set more than one of these pins in the pin-osc mode. Thus there should be no interference between multiple oscillators.
Adrian Pyke... Then I modified the CAPsense library code appropriately and it seemed to work... ... Am I missing something? ...
... Am I missing something? ...
Are you talking about the old TI Library in slac489.zip? The functions there did not take advantage of the pin-oscillator feature.
Anyway. I think your scheme may work. But you will be better off using the pin-oscillator.
old_cow_yellowMy impression is, you may connect multiple touch pads to multiple pins with pin-osc capability. But, at any given instant, you never set more than one of these pins in the pin-osc mode. Thus there should be no interference between multiple oscillators.
So it is only the additional base capacitance that has a negative effect,a s it reduces sensitivity.
Hi OCY,
old_cow_yellow Are you talking about the old TI Library in slac489.zip? The functions there did not take advantage of the pin-oscillator feature.
Thought I'd give you an update: the latest capacitive touch library does include pinosc support - you can see pinosc referenced in the documentation and there are several code examples for pinosc in the zip file:
Doc: slaa490.zip
Code: slac489.zip
Thanks as always for you, JMG, and others always sharing your expertise on the forums!
Regards,
Katie
Please click the Verify Answer button on this post if it answers your question.