Skip to main content
BTrem.1
Senior
June 15, 2021
Question

Can the resolution of the motor speed measurement code be increased?

  • June 15, 2021
  • 1 reply
  • 758 views

I have an application where I am running a light inertia motor (6 pole-pair) at a constant speed of nominally 1800 rpm. In this application I need finer control than is provided by the speed measurement resolution. I am already using SPEED_UNIT _001Hz.

Is there any means to modify the code so that I can improve the resolution by a factor of 4 or 5? I am going through the Motor Control files and trying to figure out where I might make the necessary modifications.

This topic has been closed for replies.

1 reply

Laurent Ca...
Senior III
June 28, 2021

Dear @BTrem.1​ 

Welcome to the STM32 Community

Could you give more details to the STM32 Community about your setup -the material you use- ?

(HW and also SW: CPU(s), tools and versions, board(s), motor(s) and so on)

And more especially did you use STM32 MC tools (such as MC_suite, STM32 MC Motor Profile, STM32 MC SDK, STM32 MC Workbench, the used example, the origin of the base of your application source code, and so on)?

Best regards

BTrem.1
BTrem.1Author
Senior
June 28, 2021

The initial code was developed for a STMG431 64-pin device on a NUCLEO board using the STSPIN233 driver board IHM17M1. I built the code with CubeMX after using the motor profiler. Since then I manually converted the program to the 48-pin device STM32G431 on a custom product board using the STSPIN233. I use STM32CubeIDE 1.50. I also make use of the motor control Workbench 5.45. The motor is a 6-pole-pair BLDC driven from a 5V bus. The start current is about 700mA and the steady state run current at 1850 RPM is about 35mA peak.

Another way to ask the question is doe the procedure MC_GetMecSpeedAverageMotor1() respect the define define SPEED_UNIT _001HZ ?