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.

TMS320F28027F: Instaspin current limit variables

Part Number: TMS320F28027F
Other Parts Discussed in Thread: MOTORWARE, DRV8301

Hello,

We developed a solution for our customer based on the Instaspin Lab3b FOC closed loop speed control example in Motorware.

Our customer would like a peak current limit. We attempted to set this based on the value ‘USER_MOTOR_MAX_CURRENT’ in the user.h file.

This value seems to have some effect on the maximum current the motor can draw, but has no linear correlation to current based on its value, or the voltage supplied to the motor.

What is the appropriate way to set a current limit when using closed loop speed control with Motorware?

  • There are no variables to limit the peak current in motorWare, the peak current depends on the dc bus voltage and torque current. The USER_MOTOR_MAX_CURRENT is used to limit the reference torque current from the speed loop. Generally, use an external hardware circuit to limit the peak current of the motor.

  • Thanks for your answer,

    We are using the DRV8301 gate driver in the design.  Would the appropriate thing to do here be to configure the driver's hardware current limit through the SPI using the driver's API?  Should we call the following functions directly from the lab3b-based project code?

    //! \brief     Sets the over current level in terms of Vds
    //! \param[in] handle    The DRV8301 handle
    //! \param[in] VdsLevel  The over current level, V
    extern void DRV8301_setOcLevel(DRV8301_Handle handle,const DRV8301_VdsLevel_e VdsLevel);
    
    //! \brief     Sets the over current mode
    //! \param[in] handle  The DRV8301 handle
    //! \param[in] mode    The over current mode
    extern void DRV8301_setOcMode(DRV8301_Handle handle,const DRV8301_OcMode_e mode);
    
    

    Thanks again,

    Ralph

  • Right, the DRV device has such a function. You might change the Vds level for the over-current adjustment as below code. You can refer to the datasheet of the DRV device to find a more detailed description of this.

    gDrvSpi8301Vars.Ctrl_Reg_1.OC_ADJ_SET = DRV8301_VdsLevel_0p576_V;
    gDrvSpi8301Vars.SndCmd = true;
    HAL_writeDrvData(halHandle,&gDrvSpi8301Vars);