cancel
Showing results for 
Search instead for 
Did you mean: 

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

BTrem.1
Senior II

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.

2 REPLIES 2
Laurent Ca...
Lead II

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

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 ?