cancel
Showing results for 
Search instead for 
Did you mean: 

X-CUBE-SPN7 motor control

user-stm
Associate II

Dear all,

I am using the STM32 Nucleo pack with a F302R8 card, the IHM07M1 and the associated motor.

The library for motor control (6Step_Lib.c) of  X-CUBE-SPN7 only provides a few functions, for ex MC_StartMotor, MC_StopMotor() and MC_Set_Speed().

I would thus be interested to know how to control the motor given a specific angle as input : it seems that only using theses 3 functions won't be precise enough : for example if we use MC_Set_Speed() to set the speed at w degree per second, and if we want a rotation of theta degree, rotate the motor (at speed w) for theta/w second won't enable to target a precise angle.

Thanks for your help & time ! :)

4 REPLIES 4
Gael A
ST Employee

Hello user-stm,

If you want to do position control, I recommend you to use the MCSDK 6.1.2. You might also want to switch to FOC instead of 6STEP (as its name indicate, you can only go through 6 positions aka a step equal 60° which is really not precise)
Please refer to our Motor Control Wiki for how to use the Motor Control Suite.
If you really need to use the X-CUBE-SPN7, you can still enable it via CubeMX once your project is generated by WorkBench.

Hope this will help,
Gaël A.

If you agree with my answer, please consider accepting it by clicking on 'Accept as solution'.

Hope this will help,
Gaël A.

Hi, Gael A,

I am trying to develop a project with a BLDC motor and want to use X-CUBE-SPN7 but i don't know how can I start. Dou you know where can I find some examples to start a project from scratch with NUCLEO-F401RE, X-NUCLEO-IHM07M1? 

Thank you in advance,

 

Cristhian 

Hello @cristhianchr ,

X-CUBE-SPN7 is Not Recommended for New Design. The recommended starting point to generate a project with NUCLEO-F401RE and X-NUCLEO-IHM07M1 is with the MCSDK 6.2.1 available here.

Regards

Cedric

Thanks @cedric H !