Skip to main content
EDokm
Associate III
Apr 21, 2025 11:34 AM UTC
Solved

Emergency brake function for Position Control mode.

I am working on a project to drive a door using a PMSM motor in position control mode. I am trying to add an emergency brake function. In an emergency, when the operator pushes a button, motor should brake and then return to its starting position without harming anyone.

I know there is PWMC_TurnOnLowSides() function (https://community.st.com/t5/stm32-mcus-motor-control/how-can-i-stop-the-motor-urgently/m-p/597309#M8287 ). But it is just stopping the motor, not braking. I have tried this function.

As far as I know, there is no such API in position control mode.

If I am wrong, is there an API to brake the motor in an emergency? Can anyone help me? Do you have any advice for me?

Any information you provide will be welcomed.

 

 

 

Project:

ST MCW Ver             : 6.3.2

STM32CubeIDE Ver : 1.18.1

Driving algorithm      : FOC

Control board            : Nucleo-G474RE

Power board             : STEVAL-IHM023V3

Bridge                       : X-NUCLEO-IHM09M2

GMA
GMABest answer
ST Technical Moderator
Apr 22, 2025 7:33 AM UTC

Hello @EDokm,
Dissipative Brake feature for Over Voltage management is available on EVLSERVO1 or STEVAL-IHM023V3 boards and selected in:

GMA_0-1745307151119.png

 

If you agree with the answer, please accept it by clicking on 'Best answer'.Best regards.GMA

5 replies

GMA
GMABest answer
ST Technical Moderator
Apr 22, 2025 7:33 AM UTC

Hello @EDokm,
Dissipative Brake feature for Over Voltage management is available on EVLSERVO1 or STEVAL-IHM023V3 boards and selected in:

GMA_0-1745307151119.png

 

If you agree with the answer, please accept it by clicking on 'Best answer'.Best regards.GMA
EDokm
EDokmAuthor
Associate III
Apr 25, 2025 9:10 AM UTC

Thanks for your response.

Actually, what I need exactly is, while the MC_ProgramPositionCommandMotor1 function is running in position control mode, to have the motor speed sharply decrease to zero (before the MC_ProgramPositionCommandMotor1 function completes its execution) when the emergency stop button is pressed. 

Regards.

 

Bob S
Super User
Apr 25, 2025 1:16 PM UTC

I don't know about the regulations regarding sliding doors, so feel free to ignore this if it doesn't apply - but in the CNC machining world, the "emergency stop" response must be done in hardware, no software can be involved.  This is typically done with contactors and relays to de-power the motors and/or switch in heavy dissipative loads  The EStop can signal the software to ALSO do things, but the primary "stop" must be hardware controlled.

EDokm
EDokmAuthor
Associate III
Apr 25, 2025 8:19 PM UTC

Thank you very much for your interest and response.

Visitor II
Jun 29, 2026 3:58 AM UTC

Thanks for sharing the solution. The dissipative brake feature seems like the right approach for emergency stopping. I'll look into whether my hardware supports it.