cancel
Showing results for 
Search instead for 
Did you mean: 

I can't complete ST Motor Profiler nor make my motor rotates from C generated code

Gnahore
Senior

Hello,

Level : beginner

Hardware : NUCLEO-F302R8 + X-NUCLEO-IHM08M1 + Qmot BLDC motor

Software : Motor Control Benchwork 5.4.6, STM32CubeMX 5.6.0 and STM32CubeIDE 1.12.1

I'm trying to follow this tutoriel : STM32StepByStep:Getting started with Motor Control - stm32mcu (stmicroelectronics.cn)

First issue : when I try to use the ST Motor Profiler and click on the start profile button, I can't complete it because my board start smoking and the process stop because of overheating fault. What's the reason of that?

Second issue : I open ST Motor Control Workbench to create a new project. I select Single motor as System,  Custom as Application Type, Power & Control as Selected Boards, NUCLEO-F302R8 as Control Board, X-NUCLEO-IHM08M1-3Sh as Power Board and Generic lov voltage <= 50V as Motor. I change the motor parameters, more precisely Electrical Parameters : 4 as pole pairs, 4000rpm, 5Apk, 36V, 0.35Ohm, 1mH and I leave the B-emf constant as default because I don't know what it is and where to find the info. After that I generate the code but here come the issue when I build the project ; in the sysmem.c file, the compiler says unknown type name 'caddr_t'. I went on Google and changed it by 'void*'. Was it right ?

Last issue : after changing every 'caddr_t' by 'void*' in the sysmem.c file, I encounter no error anymore so I run the program. Once I click on the user button, the motor rotates 1 second then stop by itself. Is that was it supposed to? I don't think so.. So I moved on to the next step which is the 2.3 from the tutorial. I add these lines in my code :

 while (1)
  {
	  MC_StartMotor1();
	  HAL_Delay(2000); 
      MC_StopMotor1();
 }

But then when i run the program, the motor still rotates 1second then stop.

What am I constantly doing wrong???? I'm so frustrated right now and I can't find any thing to help me on the internet 

25 REPLIES 25

@Gnahore 
very good news, the Profiler now seems to connect correctly.
please now make sure to remove the firmware errors, to be able to profile, and perform your pole pair detection. it seems that you have a voltage problem, check your connection, then check that your ihm08 is in 3Shunt finally, if it still does not work lower the voltage of your power supply, the errors must turn orange, then by clicking on ack faults you delete them.

If you agree with my answer, please accept it by clicking on "Accept as solution".

@Zied b. 

Yes finally but as usual there is another issue to face.

I did the pole pair detection, it seems that my motor has 40. The connection is pretty fine, and my ihm08 is in 3Shunt IMG_20230908_142747.jpg. I lowered the voltage from 36V to 26V then start profiling but the profiling don't go beyond 28% and I received the message that the RPM max speed might be too low or too high (it was set as 300 RPM). I changed it to 500 RPM and when I start the profile, it stops for orange over voltage fault... This really frustrate me

The number of poles pairs seems super high to me, can you redo the pole pairs detection, by increasing the current so that the motor is a little harder to turn.

If you agree with my answer, please accept it by clicking on "Accept as solution".

Hello @Zied b. 

I did the pole detection again, the number of time I've find 42 times "strong areas".

I set the profiler with the following paramters : 42 poles pairs, 200RPM, 1.3A and 24V voltage (23V shown in the page). I can complete the profiling of electrical and mechanical parameters but every time I want to do that again, I need to restart the computer... that is not normal

However I had issues with the profiling of the hall sensors. I increased the current set to 3Apk and what my generator provide to 5A and it worked. I completed all profiling.

I'll just open another topic because this one is way too long and different from the original post

I don't understand, why do you need to restart your computer? Otherwise it's very good news, you can save your profiling, and import it on the Workbench.
For this forum post you can close it by marking one of my answers by clicking "Accept as Solution"

If you agree with my answer, please accept it by clicking on "Accept as solution".

I'm just like you. I really don't understand neither and  why I do face so many issues like that. I made a ticket but no one reached me back yet.

Yes I will, it's just hard to tell which one fit though.

edit : thank you for having supported me this whole time