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.

MSP430FR2512: Variability of Touch Proximity measure with CapTIvate sensor

Part Number: MSP430FR2512

Hi everyone,

We are using a MSP430FR2512 in our project in order to detect a touch on a metal base of a lamp, in order to switch the light or snooze the alarm. (We also use its PWMs to control the leds drivers).

I used the Captivate design center software (which is very nice to use btw) and proceeded to the first calibrations of the module in our system, which works pretty well on several of our prototypes, but the results are not consistent on all of them. It seems that there are some variations from one to another, maybe due to the mechanics involved in the measure (we use a simple copper wire, soldered to the PCB on one end, and stick to the base of the lamp via a copper scotch on the other end, perhaps the length and position of the wire can explain the variation between two protos).

Another problem that we have to face is that the sensor is triggered when audio starts to play from our speaker. For now, I'm just resetting the calibration when I detect more than 2 seconds of trigger, so that a real touch detection can be measured even if audio is playing, but this is only a quick fix, maybe there is a better option to choose.

We would be glad to have some inputs on those problems if it's possible.

Thank you in advance for your help, and have a great day.

Yoann

  • Hi Piocky,

    First, the wire is an "un-shielded" antenna whose sensitivity can be affected by nearby (un-wanted) parasitic capacitances and electrical disturbances.  So depending on how you route the wire the parasitic capacitance could be different with each installation.  Captivate has the ability to remove a large portion of these parasitics during each measurement.  This is how it is able to achieve good sensitivity independent of the base capacitance (capacitance of the electrode).  Afer power up during calibration, the proper adjustments are automatically made to achieve the sensitivity you set with the Captivate Design Center GUI.  What this does is remove the variability of sensitivity from product to product.

    So when you say the "results are not consistent", do you mean some lamps detect a touch and others don't?

    What value are you using for the target conversion_count, touch threshold and conversion frequency?  If you can, please attach the design center ".ser" project file.

    You indicated that the wire is attached to the base of the lamp, and a user can touch anywhere on the base to cause a touch event?

    What material is the base of the lamp made of?

    Is there any conductive material (metal) near the wire and if so is is electrically grounded or floating?

    Regarding the trigger when audio starts playing, remember this is an "un-shielded" antenna that is susceptible to electrical disturbances that can cause small currents to flow in the wire.  These small currents can add/subtract to the charge current that is applied during the "charge phase" of the measurement process.

    I assume the speaker is a typical magnetic coil speaker.  How close is the wire to the speaker?

    If you can share photos of the wire routing, that would be very helpful.  If the photos would be proprietary you can hover your mouse over my name and select a "friend request".  That will allow you to share privately with only me.

  • Hi Dennis,

    Thank you very much for your answer! I will try to help you as much as I can:

    Dennis Lehman said:

    So when you say the "results are not consistent", do you mean some lamps detect a touch and others don't?

    Yes exactly, more precisely on some of them, the detection works well when I'm touching them, even when audio is playing (as I'm reseting the calibration when I detect 2s of touch, which happens when audio is playing continiously), but on some others, the touch doesn't respond very well, and it is triggered several times when audio starts playing, which lets me suppose that it is not consistent. (I discussed with an hardware consultant, and he told me that the fact that touch is detected when audio is playing could come from the design and especially the ground plane of the PCB, so we'll work on that).

    Dennis Lehman said:

    What value are you using for the target conversion_count, touch threshold and conversion frequency?  If you can, please attach the design center ".ser" project file.

    Please find attached the project file.

    Dennis Lehman said:

    You indicated that the wire is attached to the base of the lamp, and a user can touch anywhere on the base to cause a touch event?

    What material is the base of the lamp made of?

    Yes, we would like to be able to touch anywhere on the base of lamp (which is made of alumlinum), which works pretty well at the moment actually. The only problem we have to face is that we want the detection when we touch the base, but not the buttons, which are also made of aluminum. I kind of find a good threshold so proximity is detected when touching the buttons, and touch when touching the base, but again it's not consistent on all the lamps.

    Dennis Lehman said:

    Is there any conductive material (metal) near the wire and if so is is electrically grounded or floating?

    The wire is between our PCB (which has ground plane) and the base. Some cables are close as they are also connected to our PCB, and not always in the exact same position, so maybe it can also explain the inconsistensy of the results.

    Dennis Lehman said:

    Regarding the trigger when audio starts playing, remember this is an "un-shielded" antenna that is susceptible to electrical disturbances that can cause small currents to flow in the wire.  These small currents can add/subtract to the charge current that is applied during the "charge phase" of the measurement process.

    I assume the speaker is a typical magnetic coil speaker.  How close is the wire to the speaker?

    If you can share photos of the wire routing, that would be very helpful.  If the photos would be proprietary you can hover your mouse over my name and select a "friend request".  That will allow you to share privately with only me.

    I don't have a full lamp at the moment, but I will share some pictures as soon as I can, so you could understand a bit more how everything is assembled.

    Thanks again for your help and time. Have a nice day.

    Yoann

    CaptivateDesignCenter.zip

  • Hi Piocky,

    I will go ahead and close this thread.
    When you are ready, please click the "This did NOT resolve my issue" button and reply to this thread with more information.
    If this thread locks, please click the "Ask a related question" button and in the new thread describe the current status of your issue and any additional details you may have to assist us in helping to solve your issues.


  • Hi Dennis,

    Sorry for the late response, please find attached the pictures of the assembly. The yellow cable is the touch electrode, on the first picture you can see how it is solder to our PCB (this will be replace by a connector very soon). On the second picture, you can see how it is fixed to the aluminum base, with a copper scotch and a second scotch on top of it to maintain it. The black box behind is the speaker, and the four cables at the front are connected to the Leds.

    Please let me know if you need anything else.

    Yoann

  • Awesome photos!

    Ok, so regarding the yellow wire I can see how susceptible it is to electrical disturbances.  I suspect the magnetic coil in the speaker could potentially be coupling into the wire and causing some currents.  If I'm correct about the magnetic coupling to the wire that would explain why it triggers when music starts to play.

    How you route the yellow wire can affect its calibration, so if when the lamp is assembled from unit to unit that wire ends up in a different location or is bent differently, that can affect its sensitivity somewhat from unit to unit.

    After seeing this my one suggestion that should solve this issue would be to use a shielded wire with the shield tied to ground on the PCB.  Leave the other end of the shielded cable non-terminated.

    Another option (would require re-layout of the PCB) locate the wire coming off the pcb as close to the wall as possible so to keep the wire very short.  I mocked up your photo to illustrate.

    Now regarding the metal buttons, do you have a photo of those?

  • Hi Dennis,

    Thanks for your quick answer! I'm glad you liked the photos.

    Ok, so it confirms my guess that the way it is assembled, especially the fact that the cable is not always in the same position, has an influence on the sensitivity of the measure. I'm currently proceeding to a re-routing of the PCB, so your suggestions come at the perfect time! The connector to the touch is now located on the edge of the PCB, so you would be able to shorten the wire.

    Do you have maybe a specific reference in mind for the shielded wire as well as a compatible connector? I just checked on Mouser, but there are a lot of different solutions for shielded wires.

    For the buttons, they are located in the top-front of the base (see the picture below), and their axes are going down, where we read the rotation with a tiny magnet and a magnetic sensor (you can see the back of its PCB on the second picture).

    Thanks again for your help, and have a nice day.

    Yoann

  • Hi Yoann

    I have to admit, this is a pretty cool design for a lamp that plays music.

    Regarding the shielded cable, use the least expensive.  You just need a single conductor with a shield.  Actually, thinking about it you could probably wrap the wire in a strip of copper tape and solder a short ground wire to the copper tape.  I think as long as the wire has a pretty thick outer jacket to maintain consistent spacing between the wire and the copper shield tap.  This adds a few steps to manufacturing compared to using an off shelf shield cable.

    Now for the buttons - another cool idea that they rotate.  How do you connect the rotating buttons to a Captivate channel?

  • Hi Dennis,

    Thank you very much!

    Regarding the shielded cable, you are not afraid that this could add some parasitic capacitance to the measure?

    The buttons are not connected to the Captivate channel, only the base is. We use tuhe base as a snooze button (also to switch on/off the light when not in alarm mode), and the buttons are for controlling the volume and the light.

    Best regards,

    Yoann

  • Hi Yoann,

    Yes, you want to keep parasitics as small as possible.  If the wire you choose has a thin insulating jacket then the parasitics will be higher compared to a wire with a thick jacket.  Basically you are using the wire's insulating jacket thickness to control the parasitics. This might require a few iterations.

  • Hi Yoann,

    It's been a few days since I have heard from you so I’m assuming you are busy with new PCB design.

    For now I'm going to close out this thread.  If you need additional help with the same topic, please click the "This did NOT resolve my issue" button and reply to this thread with more information.


    If this thread locks, please click the "Ask a related question" button and in the new thread describe the current status of your issue and any additional details you may have to assist us in helping to solve your issues.



  • Hi Dennis,

    Thanks for your message. I worked on the new design the last few days, PCBs are on the way now. The MSP and its connector are closer to the edge now, so the length of the wire can be shorten. We will make some tests with and without shielded wire to compare and see what's the best, I'll let you know when it's done.

    Thanks again for your help, and have a great day.

    Yoann

**Attention** This is a public forum