This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Capacitive Touch button array

Other Parts Discussed in Thread: MSP430G2533, MSP430FR2633

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

  • Adrian Pyke said:
    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.

    Unfortunately, this isn't how capacitive touch sense works. At least you cannot map the typical switch-based matrix to a CapSense based one.

    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.

  • 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 said:
    ...  Then I modified the CAPsense library code appropriately and it seemed to work...

    ...  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_yellow said:
    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.

    Ah, well, you're right. YOu have to enable only one pin at a time, and if not enabled fo rPinOsc, it does not oscillate. No need for a grounded wire to separate the two row/column sensors.

    So it is only the additional base capacitance that has a negative effect,a s it reduces sensitivity.

  • Hi OCY,

    old_cow_yellow said:

    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

  • Hi Adrian

    I think as your project, you wanna use 3x4 = 7I/O for cap touch array?

    As I know, this applicaiton note does not support multi-button.

    But, in software you can made 4 buffer to save the data, and read buffer back in one sampling time.

    In Hardware, for your hardware PCB layout, you can reference the app note.
    SLAA363A PCB-Based Capacitive Touch Sensing With MSP430.


    Best Regards,

  • Bard,

    Do you possibly have an example of how that would be accomplished in software? I am currently working on this very issue where I need to read the data from 8 pins and send the status of all 8 pins over SPI to another chip. Any help would be appreciated!

    Thanks,

    Nathan

  • Hello,

    I want to develop Capacitive Touch keypad with button array as mentioned in above posts. Will somebody help me with demo code or pseudo code for the same to start with?

    Regards,

    Amit

  • Alvina,

    We recently announced a new line of devices with even better capacitive touch technology called CapTIvate - I thought you might be interested: www.ti.com/.../peripherals.page
    That link should take you to a video and a bunch of resources about the technology.
    It also has kits available here: www.ti.com/.../msp-capt-fr2633

    For any MSP device, e.g. the MSP430FR2633 with CapTIvate technology I mentioned above, you can request samples from the product page by going to the "Sample & buy" tab: www.ti.com/.../samplebuy There are buttons for requesting samples that should take you to the right place. Please note however, that for evaluating CapTIvate I strongly recommend getting the kit too, as that will have the form-factor touch hardware to help you better evaluate the solution: www.ti.com/.../msp-capt-fr2633

    Regards,
    Katie

**Attention** This is a public forum