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.

DRV2605evm-ct: connecting a new LRA



Hello ,

I want to connect a new LRA. Its parameters are:resonance frequency is 150HZ,rated voltage is 2Vrms.I know I need to change resister 0x16 and 0x17,but I can't find them in the source code.

 Which file name includes the two registers? And in this file  which function should I have look at?And which variables do I need to change?Please give me a screenshot about these.

One more question,according to the equation, I also need sample time and overdrive voltage.For my LRA's calculation,  the sample time = 300us, and the overdrive voltage=3V. Is that true?

Thank you for your reply.

xiaofei hu

  • Hi, Xiaofei:

    please find the "ActuatorSettings.h".

    you may need a new macro defining your LRA's parameters.

    for example:

    ===============

    // #define SEMCO1030    1  // SEMCO 1030      //disable the currently used macro

    #define XIAOFEI_LRA     1

    #define LRA_AUTOCAL_FB    0xC6 // Feedback Control,
    #define LRA_RATED_VOLTAGE  0x55 // Rated voltage
    #define LRA_OVERDRIVE_VOLTAGE 0x80 // Overdrive voltage
    #define LRA_CTRL2     (AutoResGain_Medium | BlankingTime_Medium | IDissTime_Medium)  // Control Register 2
    #define LRA_CTRL3    (LRADriveMode_Once | LRA_ClosedLoop)        // Control Register 3

    #endif

  • Hello Peter,

    I found the file.

    =====================

    // SEMCO 1030 - Last Modified:
    #if SEMCO1030
    #define LRA_AUTOCAL_COMP 0x07 // Compensation Coef.
    #define LRA_AUTOCAL_BEMF 0xE9 // BEMF Coef.
    #define LRA_AUTOCAL_FB 0xC6 // Feedback Control
    #define LRA_RATED_VOLTAGE 0x3C // Rated voltage
    #define LRA_OVERDRIVE_VOLTAGE 0x68 // Overdrive voltage
    #define LRA_CTRL2 (AutoResGain_Medium | BlankingTime_Medium | IDissTime_Medium) // Control Register 2
    #define LRA_CTRL3 (LRADriveMode_Once | LRA_ClosedLoop) // Control Register 3
    #endif

    ========================

    now I change it to the followings:

    ========

    #define XIAOFEI_LRA     1

    #if XIAOFEI_LRA    
    #define LRA_AUTOCAL_COMP 0x07 // Compensation Coef.
    #define LRA_AUTOCAL_BEMF 0xE9 // BEMF Coef.
    #define LRA_AUTOCAL_FB 0xC6 // Feedback Control
    #define LRA_RATED_VOLTAGE 0x55 // Rated voltage
    #define LRA_OVERDRIVE_VOLTAGE 0x80// Overdrive voltage
    #define LRA_CTRL2 (AutoResGain_Medium | BlankingTime_Medium | IDissTime_Medium) // Control Register 2
    #define LRA_CTRL3 (LRADriveMode_Once | LRA_ClosedLoop) // Control Register 3
    #endif

    =========

    Do I need to rewrite the first two macro? I notice you don't writhe them. And the other codes do not change at all.Am I right?

    By the way,according to your calculation,the overdrive voltage is 0x80, then the V-peak=2.8V. I can get this 2.8V by my rated voltage X √2,am I right? 

  • Hi, Xiaofei:

    please do member to disable the macro used before changing to yours.

    the first two macro can be ignored.

    please enable this to utilize the auto-calibration results:

    #define AUTOCALRESULTS_LRA 1  // Select auto-cal for LRA

    the 2.8V is 2.0Vrms / 0.707.

     

  • Hi Peter,

    I found this :"#define AUTOCALRESULTS_LRA 0  // Select auto-cal for LRA"   .

    I don't need to change this when I use the LRA which is on the EVM-CT,but now I need to change this,as you recommended.Could you please tell me the reason?

    Thank you very much.

  • Hi, Xiaofei:

    sorry, you can ignore this macro.

    when the EVM is powered up, both the two actuators are calibrated.

    so, it's only for debug purpose to save the calibration result into a global parameter.

  • Hi Peter,

    so I don't need to change this macro.

    Thanks very much.