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.

MSP430AFE252: inquiry about Approximity sensor design via captivate center for temperature drift test

Part Number: MSP430AFE252
Other Parts Discussed in Thread: MSP430FR2512

Hello,

I use the silicon to do Approximity sensor design on my own board via CapTIvate center(studio), I need to test the raw count data from 20 C to 50C and I set LTA filter to 7(highest step) to compensate the temperature drift, I just do calibration once after communication successfully between PC and my board, then I find that the delta value(for approximity judgement) decrease dramatically during the heating and cooling procedure and it's hard to distinguish the real trigger for approximity with highest temperature such as 50C. I haven't expected that delta value is so sensitive to temperature change.I'd like to know if I need to do the calibration by pressing calibration button on the studio from time to time for fixing this issue or is there any other method to make sensor not so sensetive to temperature?Thanks!

B.R

YUKE

  • Hello yuke,

    In the captivate design center (GUI), do you have the "run-time recalibration" enabled.  You will find this on sensor's tuning tab.

  • Hello yuke,

    I also want to point out that if you are rapidly ramping the temperature you want to have the LTA beta = 0 or 1, not 7.  A beta = 7 may cause the LTA to lag the change in counts due to temperature.

  • Thanks Dennis for your answer. I also wonder if I select realtime calibration,what if it does calibration when proximity behavior happens. I am thinking about whether real time calibration can be used in my case. And I wonder for real design ,if it's  necessary to add temperature sensor to help for changing LTA filter parameter to adapt to rapidly temperature or slow temperature because this value seems need to be adjusted according to differnt temperature or humidity rising speed according to what you mentioned. Thanks!

    B. R

    YUKE

  • Hi Dennis,there  is another question,when I use design center,I update one parameter like select real time calibration,I reconnected to MCU board but sometimes I find the GUI stucks with no plot out and sometimes it works,I check by correctly reading back parameter I set  when stuck happens means communication OK, and my MCU hardware setting is correct also.Created code has been programned successfully  into MCU. I wonder what cause the GUI stucks and what should I do to avoid this. Thanks!

    B. R

    YUKE

  • Hi Dennis,I'd like to confirm that in the design center GUI,the count value that plotting out is the raw data from sensor without any data processing. Right? Because  the variation range of this count data also changes alot with different temperature point,I mean with bad linearity. So LTA filter even with small latch can't help this on my end. Could you help to give some suggestions? Thanks!

    B. R

    YUKE

  • HI yuke,

    Great questions.

    Here is a brief overview how the runtime calibration works. After the initial calibration, usually at power on, the LTA (long term average) and count measurement are equal.  Let's assume no touch or proximity at this point.  As temperature changes, the LTA slowly tracks the changing count measurement.   Now as temperature changes, so does the sensor's sensitivity.  If the LTA changes by +/- 12% from its last calibration, the system will re-calibrate. This is how CapTIvate can maintain a relatively constant sensitivity across the entire temperature range and why it is important to enable the run-time calibration.

    Now, when there is a proximity or touch, the LTA is temporarily disabled.  Usually a touch or proximity event lasts only a second or two.  When there is no proximity event or touch, the LTA continues to track the count measurement changes.

    So question for you, how long is your proximity or touch event?

    Regarding the GUI, when you "update" the parameter while connected to the target, you are only changing the parameters stored in RAM.  Power cycling the MCU will loose these values.  You need to update your firmware project and re-program the MCU with the new parameters.

    Following the guidelines in the CapTIvate Technology Guide to see how this is done.

  • Hi Dennis,

    Thanks for your information.On my end,we use proximity sensor to check if person is available or not  in the environment for test and person will stay there and may changing distance which cause the count variation.So if temperature change rapidly and person is close and stay there, the re-calibration will have a problem.

    B.R

    YUKE  

  • Hi yuke,

    You are correct. However, we can provide you with an example code that demonstrates what we call "long touch."  What it will do for your application is when the proximity detects a person, the long touch will allow the LTA to continue tracking, even while the person remains close and is causing a proximity event.  This will solve the issue with changing temperature and re-calibration. Let me pull the example together and I will post it.

  • Hi Dennis,

    Thanks so much for your help. Can't wait to see your example which may help a lot:) BTW,I'd like to confirm that the 'E00 count value' on the plot is the raw data just from sensor electrode without any later data processing by SW after data sampling? What's the relation between this count and the transfer charge number? is that a linear relationship? I just want to make sure that the issue (see attached pic)about same proximity distance cause different count drop with different temperature point has nothing to do with your SW ,only caused by HW and environment.  Thanks!

    B.R

    YUKE

    .

  • Hi yuke,

    Regarding the previous question about a "long touch" solution:

    Attached is a working example of a "long touch" algorithm.
    The example uses a self cap sensor so the direction of interest is DOWN (conversion count decreases due to increase of capacitance during a touch).
    If it were a mutual cap sensor the direction of interest would be UP.

    The demo works like this:

    1. Long touch timeout set = 5sec (you choose appropriate timeout for your application)
    2. During no touch event, LTA tracking enabled.
    3. If a touch event lasting <5 sec, LTA is disabled during touch and sensor reports a touch.
    4. After release, LTA tracking enabled again.

    So far this is the normal Captivate touch sensing behavior.  Now lets look at how the long touch works.

    1. If a touch event lasting (up to) 5 sec, LTA tracking is disabled and sensor reports a touch.
    2. Now if touch continues longer than the 5 sec timeout, the long term algorithm will "re-seed" the LTA and conversion count (essentially set the equal), the direction of interest changes from DOWN to UP and LTA tracking is enabled.
    3. Important: The sensor's status will no longer report this as touch, however, the long term algorithm's touch status does (you want to use this status while in long term touch, not the sensor).
    4. Next, if a release occurs that lasts < 5 sec, the long term status shows this as a release and the LTA is disabled during this short period of time.
    5. But, if a touch re-occurs before the 5 sec timeout, the long term status switches back to a touch and the LTA is re-enabled.
    6. Finally, if a release occurs that lasts > 5 sec, the long term algorithm  will "re-seed" the LTA and conversion count, the direction of interest changes from UP to DOWN, LTA tracking is enabled and long term touch status set to released.
    7. System is now operating back in normal Captivate touch sensing mode until the next long touch event.

    CapTIvate_LongTouch_Demo.zip

    I'd like to confirm that the 'E00 count value' on the plot is the raw data just from sensor electrode without any later data processing by SW after data sampling? [Dennis] You can use either the raw or filtered measurement count.  I'm not sure which one you are logging but they will be very close.

    What's the relation between this count and the transfer charge number?[Dennis] The count is the number of charge-transfers.

    is that a linear relationship?[Dennis] It is the same.  If you haven't discovered the CapTIvate Technology guide, this is described in the Technology chapter.

    I just want to make sure that the issue (see attached pic)about same proximity distance cause different count drop with different temperature point has nothing to do with your SW ,only caused by HW and environment. 

    Keep in mind that at lower temperatures it is possible to see elevated device noise that can potentially cause false triggers if your thresholds are not set properly.  It is strongly recommended that you assess the reliability of each sensor by utilizing the SNR measurement tool in the CapTIvate Design Center to measure the SNR and design margins. For details on this process, see the application report Sensitivity, SNR, and Design Margin in Capacitive Touch Applications.

  • Hi Dennis,

    Thanks so much for your illustration and source share, that help me a lot!

    B.R

    YUKE

  • Hi Dennis,

    I want to further make sure the long touch algorithm which based on Button Group sensor(with example you provided) can be applicable also for the proximity sensor? I mean sensor status will not report a status like proximity while the long term algorithm status will report for long term proximity?

    B.R

    YUKE

  • Hi Dennis,

    I want to further make sure the long touch algorithm which based on Button Group sensor(with example you provided) can be applicable also for the proximity sensor? I mean sensor status will not report a status like proximity while the long term algorithm status will report for long term proximity?

    BTW, my silicon name is MSP430FR2512, I suppose the proximity works the same,if there are any difference for algorithm,may I know if it's possible to send me an example for long term dealing based on this silicon if it's available? Thanks so much!

    B.R

    YUKE

  • Hi Yuke,

    Yes, it should behave the same for long term proximity as in does for touch.  The ui16Timeout counter (defined in CAPT_Type.h) will increment when ever the sensor is either in proximity detect or touch.

    The algorithm works the same for all MSP430FR2xxx MCU's with Captivate.

  • Hi Dennis,

    Thanks so much for your confirm.Then I have another question, I can't measure SNR with my configuration and I got Max Count error. I don't know why that happens, according to the illustration, the value across error threshold will cause that, but my count definitely not surpassing 8191.  Anyway, I tried to reduce the conversion count to 1000 and conversion gain to 100, I adjust to lower threshold accordingly but still with Max count error.Could you please give some hint on why max count error happens even with max 8191 to me? Thanks in advance for your help!

    B.R

    YUKE

      

  • Hi Yuke,

    I recommend starting with conversion_gain = 100 (don't change this value), and conversion_count = 1000 and see if you still see max error.

    If you need to increase the conversion_count higher than 1000, then definitely follow the application report Sensitivity, SNR, and Design Margin in Capacitive Touch Applications.

    What you may discover is you will never be able to get the desired sensitivity.  I would then take a second look at your electrode design.  It may be too small or have too much parasitic capacitance from surrounding grounds so you will never achieve the performance you are looking for.

    What are using for your proximity sensor?

  • Hi Dennis ,

    I tried with conversion gain=100 and conversion count =1000 already, even with this parameter setting, max count error still happens and the studio often stucked for some seconds(especially when approximate/touch happens) during data plotting and then work again. I wonder why all this things happen, I am sure my count value has not come to Max at 8191.

    Besides, according to the equation:

    (conversion gain/count - conversion gain/lta)*100% =delta Cap

    I measured base cap for my hardware is around 21pf, delta cap between touch/not touch occupied around 4% of the base cap for my hardware environment at 25C.We have limitation of reducing base cap with a long cable from sensor electrode. From your application note, it seems 4% delta cap can be used to test, but it seems from us the performance seems unstable with such delta signal.

    B.R

    YUKE

  • Hi Yuke,

    The max count error threshold specifies the maximum conversion result allowed for any element within a sensor. Error threshold crossings are detected in hardware. If during the conversion process one or more elements does not complete their conversion before the conversion result crosses the error threshold, the peripheral will terminate the conversion and the error condition will be flagged in software at a sensor level. This mechanism prevents a conversion from continuing forever in the event of an incorrect calibration or a hardware problem. Hardware problems may include, but are not limited to, a disconnected electrode or a shorted electrode.

    Do you only see this error when you are in the proximity range or touching the sensor?

    If you open your Captivate Design Center and create a completely new project and Generate Source Code, don't change any of the default parameter settings, program your target, do you see this same behavior?

**Attention** This is a public forum