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: Deactivate Calibration after StartUp

Part Number: MSP430FR2512

Hello,

after StartUp theDevice calculates the coarse gain, fine gain and offset. How can i deactivate or recalculate these parameters? In my project i have to detect a touch directly after startup. When the device starts with a touch, the sensor should detect this touch. After an startup of device the device calculates the tuning parameters for a RawCount value of 1000. 
no matter whether i start with pressed touch or unpressed touch.

How can i get the uncalibrated Raw Counts?

Best  regards

Andreas

  • Hi Andreas,

    The normal operation of the Captivate algorithm at start is to first perform a calibration.  If a user's finger is touching a button during this time the added capacitance due to the finger is calibrated out.  When the finger is removed this causes and "negative" touch and the system automatically recalibrates.

    Since Captivate performs detections based on a "relative" change from its last calibration, you won't be able to detect a "touch" at power for the reason described above.

    In theory you could perform a calibration without a finger touching and record the coarse, fine and offset tap values.  Then each time you perform a power up, skip calibration and re-populate the sensor structure with the recorded values.  This will work as long as you operate at the same temperature, but this no likely a realistic scenario.

    To answer your question, these values are calculated whenever a calibration is perform, which you can call whenever you want.

    What is your application?  I maybe able to suggest some alternatives if I know a little more about the use case.

  • Hi Dennis, thanks for your answer, in my application i want to detect the capacity of water or air behind the mutual electrode. At startup i cant say if water or air at the electrode. I must have the raw counts in correlation of gain and Offset. For the first frequency i think my System works. But for the another 3 frequencies the raw count value can't be recalculated with gain and offset. For Temperature stability i think i work with a reference temperature sensor.

    Andreas

  • Hi Dennis, iam not sure if you receive my my last reply.

    In my application i want measure the real capacitance of the electrode. The electrode schould detect water. At startup there can be water or no. Can i recalculate the counts? Without gain and offset? I need a solution for all four frequencies.

    Andreas

  • Hi Andreas,

    CapTIvate does have internal references capacitors that may help in this situation (See the very end of Technology chapter is Captivate Tech Guide).

    In theory, if you calibrate first time with no moisture (air only), you can use the internal reference capacitors to calculate the baseline capacitance of your electrode.  See attached.

    I say "in theory" because I have never tried what you are attempting, but will be happy to work through this with you.

    captivate_refcap.pdf

    Then if you need to recalibrate the system(don't change conversion_count or conversion_gain settings), for example a power cycle, then you can use the internal ref cap to determine what the change in the baseline capacitance of the electrode due to the presence of water.  You also know the change in capacitance at this point  so if water is added or subtracted,  you can measure any "real-time" changes.  Not sure how linear this will be and the maximum range of capacitance is upwards of 300pF.  Let me see if I can dig up some code that demonstrates how to make the measurements.

  • Hi Dennis,

    thanks for your replay. I have try the measurement with and without RefCap. MAP_CAPT_enableRefCap(&SensCap,0);

    Here are my Values

    StartUp with Air:

    Air Value: Counts 980 (without RefCap), 370 (with RefCap)

    Water Value: Counts 1280(without RefCap), 410 (with Ref Cap)

    StartUp with Water:

    Air Value: Counts 800 (without RefCap), 330 (with RefCap)

    Water Value: Counts 970 (without RefCap), 360 (with Ref Cap)

    In my calculation the Capacitance für Water an for Air was ~6pf. There wehre no Change in Capacitance

    Andreas

  • Hi Andreas, I’m imagining two scenarios. First is a binary detection where you start with an empty container and single mutual electrode on the side. You calibrate with air, then with water you detect a change in capacitance. The second scenario is same container but multiple overlapping electrodes, like a slider, that will now measuring varying levels of water. Is this something close to what you are trying to achieve?
  • Hi Dennis,

    the first scenario is correct. One electrode to detect the change of capacity. 


    Can you give me a formula for how the counts relate to FineGain and Coarse Gain and Offset?

    Andreas

  • Hi Andreas,

    Sure.  Let me find information specificy to inquery.

  • Hi Andreas,

    I'm reaching out to our team in China.  They may have a working solution for you.

  • Hi Andreas,

    Super sorry about not getting back to you.

    At the end of the day, I believe the only way to solve this problem is to have a temperature profile and table of coarse and fine gain, and offset values, as you mentioned.

    Attached is a pdf that addresses your problem.

    0410.captivate_calibration_with_water.pdf

    As stated in the document, the suggestions provided are only hypothetical and have not been tested or validated by TI.

    Under normal circumstances I could try to set this up in our TI lab, but since we are required to work from home I don't have the ability to perform this test at this time.  Although, I do have a toaster oven and refrigerator....hmmm... maybe I could try that. :)

    Let me know if this gets you going in the right direction.

  • Hi Andreas,

    I haven’t heard from you for a couple of days now, so I’m assuming you were able to move forward with your project.
    If this isn’t the case, 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.
    

**Attention** This is a public forum