cancel
Showing results for 
Search instead for 
Did you mean: 

Can I control a BLDC motor based on encoder counts?

MUddi.1
Associate

Hello.

I'm using Nucleo F446re and IHM07M to control a BLDC motor. It has a built-in 2000 pulse quadrature encoder. The MCSDK version is 5.4.8. I tried the position control method and it works fine. However, it only allows me to control the motor based on the provided angle in radian. For a specific purpose, I need to control the motor based on the number of counts it crossed. Is there a way to do that?

Regards,

Sihab

1 REPLY 1
GMA
ST Employee

Hello,

In the position control application note AN5464, the proposed API is only angle based input. Could you use available API as:

MC_ProgramPositionCommandMotor1((DesiredPulseCount/M1_ENCODER_PPR)*2*3.14,DesiredTiming));

Best regards.

GMA

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