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.

DRV8301-69M-KIT: Motor Braking

Part Number: DRV8301-69M-KIT

I am using the DRV8301-69M to drive a BLDC motor and have it working fine for generating the desired power output etc. However one thing I need is that after the motor has been ran I need for the motor to provide braking for a period of time. I am using speed control for the motor so the way I implemented the brake action was to set the speed reference to _IQ(0.00). This does work somewhat. You can tell that the current is flowing in the motor attempting to hold the speed at 0 RPM but it is noisy. The motor will slightly oscillate and/or start in one direction and then stop. I have changed the loop constants but this has not resulted in much improvement. 

It occurs to me that one solution would be to simply connect all three phases to ground and this would be an effective brake. Is there a better solution to providing a brake? If I could force the PWM outputs to all turn on the three phases to ground that would seem also to work. Can someone provide some help in how I can implement a brake like this. I have a software timeout so that after 5 mins it turns off the PWM all together which is working fine. I just need the brake to be better controlled.

My project uses Lab 5b as a basis.

  • I would like to point out that I am not trying to stop the motor as an active brake. I am trying to hold the motor still during a set period of time after it has stopped.

  • You can try to implement regenerative braking mode when the speed command is reduced from a higher value, the energy will back flow to raise the dc bus voltage of the link capacitor. So a separate Dc voltage monitor and dissipation of excess energy in a resistor may be one way to dissipate the energy.

    If you don't want to use regenerative braking mode, you may try to turn on all three bottom switches, in this case the energy is dissipated as heat within the motor heating it up.

    You might find such topics in some engineering text books though I don't have a specific one in mind. 

  • Turning on the three bottom switches sounds exactly like what I need. I only need to hold the motor still not really use it as a brake. How do I turn on the three bottom switches from software?

  • Call this enableBreakPwm() function once for braking.

    static inline void HAL_enableBreakPwm(HAL_Handle handle)
    {
      HAL_Obj *obj = (HAL_Obj *)handle;
    
      // Force high side off, low side on
      PWM_setActionQualContSWForce_PwmA(obj->pwmHandle[PWM_Number_1], PWM_ActionQualContSWForce_Clear);
      PWM_setActionQualContSWForce_PwmB(obj->pwmHandle[PWM_Number_1], PWM_ActionQualContSWForce_Set);
    
      PWM_setActionQualContSWForce_PwmA(obj->pwmHandle[PWM_Number_2], PWM_ActionQualContSWForce_Clear);
      PWM_setActionQualContSWForce_PwmB(obj->pwmHandle[PWM_Number_2], PWM_ActionQualContSWForce_Set);
    
      PWM_setActionQualContSWForce_PwmA(obj->pwmHandle[PWM_Number_3], PWM_ActionQualContSWForce_Clear);
      PWM_setActionQualContSWForce_PwmB(obj->pwmHandle[PWM_Number_3], PWM_ActionQualContSWForce_Set);
    
      return;
    } // end of HAL_enableBreakPwm() function

    Call this HAL_EnableAllPwms() once for re-start the motor

    static inline void HAL_EnableAllPwms(HAL_Handle handle)
    {
      HAL_Obj *obj = (HAL_Obj *)handle;
    
     PWM_setActionQualContSWForce_PwmA(obj->pwmHandle[PWM_Number_1], PWM_ActionQualContSWForce_Disabled);
      PWM_setActionQualContSWForce_PwmB(obj->pwmHandle[PWM_Number_1], PWM_ActionQualContSWForce_Disabled);
    
      PWM_setActionQualContSWForce_PwmA(obj->pwmHandle[PWM_Number_2], PWM_ActionQualContSWForce_Disabled);
      PWM_setActionQualContSWForce_PwmB(obj->pwmHandle[PWM_Number_2], PWM_ActionQualContSWForce_Disabled);
    
      PWM_setActionQualContSWForce_PwmA(obj->pwmHandle[PWM_Number_3], PWM_ActionQualContSWForce_Disabled);
      PWM_setActionQualContSWForce_PwmB(obj->pwmHandle[PWM_Number_3], PWM_ActionQualContSWForce_Disabled);
    
      PWM_clearOneShotTrip(obj->pwmHandle[PWM_Number_1]);
      PWM_clearOneShotTrip(obj->pwmHandle[PWM_Number_2]);
      PWM_clearOneShotTrip(obj->pwmHandle[PWM_Number_3]);
    
      return;
    } // end of HAL_EnableAllPwms() function

     

  • Thanks this does work and holds quite well which is my requirement. However the motor sits there and quite noisy with what sounds like noise pops. The motor does resist movement but I am not sure why it would be so noisy. It is almost like it is moving some current through the motor which is hard to understand if this just pulls the motor windings to the low rail. Any idea why so noisy on the eval board?

  • That's normal, the energy is dissipated in the winding of the motor. You can't eliminate this noise if you want to use this braking mode.