cancel
Showing results for 
Search instead for 
Did you mean: 

Blocking BLDC motor at zero speed.

DTort.1
Associate III

I am using board B-G431B-ESC1 and Motor Control 5.Y.3. How to implement BLDC blocking at zero speed. I have Hall sensors in the motors, but there is no encoder so I cannot control the position. I do not need position control, I just need a lock, and if the rotor is displaced, then I don’t need to go back, but just continue to lock. I see this as passing direct current (PWM) through the windings or possibly alternately turning on the motor with forward and reverse rotation. How can this be done?

Thanks in advance!

12 REPLIES 12
MK.1
Senior

look closely at the encoder alignment function, by analogy try to write your own:

__weak void EAC_StartAlignment( EncAlign_Handle_t * pHandle )

{

 uint32_t wAux;

 /* Set pVSS mechanical speed to zero.*/

 VSS_SetMecAcceleration( pHandle->pVSS, 0, 0u );

 /* Set pVSS mechanical angle.*/

 VSS_SetMecAngle( pHandle->pVSS, pHandle->hElAngle );

 /* Set pSTC in STC_TORQUE_MODE.*/

 STC_SetControlMode( pHandle->pSTC, STC_TORQUE_MODE );

 /* Set starting torque to Zero */

 STC_ExecRamp( pHandle->pSTC, 0, 0u );

 /* Execute the torque ramp.*/

 STC_ExecRamp( pHandle->pSTC, pHandle->hFinalTorque, ( uint32_t )( pHandle->hDurationms ) );

 /* Compute hRemainingTicks, the number of thick of alignment phase.*/

 wAux = ( uint32_t )pHandle->hDurationms * ( uint32_t )pHandle->hEACFrequencyHz;

 wAux /= 1000u;

 pHandle->hRemainingTicks = ( uint16_t )( wAux );

 pHandle->hRemainingTicks++;

}

Thanks for your reply! 

I have not found anything in these functions that can help me. I have already tried to control the torque through the api and simultaneously lower the speed to 0, but this still does not work.

What I need, in fact, I did manually, through the HAL, the only thing that still worries me is maybe someone knows how to replace these HAL functions with functions from the Motor Control library in order to stay at the api level.

The only thing close to this that I found is the mode for measuring the parameters of the R-L motor, but I did not master what to give to these functions.

/**
  * @brief  Sets the PWM duty cycle to apply in the RL Detection mode.
  * @param  pHandle: handle on the target instance of the PWMC component
  * @param  hDuty Duty cycle to apply
  *
  * @todo TODO: Describe the unit of the hDuty variable.
  *
  * @retval If the Duty Cycle could be applied on time for the next PWM period,
  *         #MC_NO_ERROR is returned. Otherwise, #MC_FOC_DURATION is returned.
  */
__weak uint16_t PWMC_RLDetectionModeSetDuty( PWMC_Handle_t * pHandle, uint16_t hDuty )
{
  uint16_t hRetVal = MC_FOC_DURATION;
  if ( pHandle->pFctRLDetectionModeSetDuty )
  {
    hRetVal = pHandle->pFctRLDetectionModeSetDuty( pHandle, hDuty );
  }
  return hRetVal;
}

Hi, I also want to perform the similar kinda locked-rotor task for a specified time period. I am using X-NULEO-IHM07M1 power board with NUCLEO-F302R8 control board for BR2804-1700kV-1 motor. However, I am totally new with this kind of controlling and staffs and rignt now, I am learning from the beginning. That's why I couldn't understand how you have already done that. Could you please mention the location of the code and what to change? Thanks in advanced.