cancel
Showing results for 
Search instead for 
Did you mean: 

Nucleo-f302r8 and x-nucleo-IHM08M1 : can't run motor profiler properly, C program to control a motor

Gnahore
Senior

Hi everyone,

I'm a french student in internship in a company and my project is about using 3 products : the NUCLEO-F302R8, the X-NUCLEO-IHM08M1 and a BLDC motor from Trinamic. Please consider me as a total beginner in this and so please use simple words.

I watched few videos how to turn on or turn off a motor with this kind of devices and I found out using ST Motor Control Workbench is what I need and the following tutorial could be really useful : https://wiki.stmicroelectronics.cn/stm32mcu/wiki/STM32StepByStep:Getting_started_with_Motor_Control

I launch the ST Motor Profiler then enter the pole pairs (4), the max speed (4000rpm), the max current (5A, the real max current my motor can handle is 6.67A but my generator can't supply above 5A) and the voltage bus (36V). However when i try to click on Start Profile button after connecting the board after few second the board start smoking (the motor do spin a little) and then the profile stop because of overheat fault. What's the issue?

Thanks to the videos I saw and the tutorial, I know ST Motor Workbench (and STM32CubeMX) will generate a C code to program the board and control the motor as I wish. Is there a file that group all the C functions to command the motor?

Finally, if I want to use an external button for something, how can I do that? Do I just have to connect it to one of the ST morpho connector? Like how to use input and output when the nucleo-f302r8 and x-nucleo-ihm08m1 are plugged together.

 

Thanks for reading.

1 ACCEPTED SOLUTION

Accepted Solutions

Hello Gnahore,

I am glad that you have found what you were searching for.

Concerning your last question, the answer is that when you use a LED, the GPIO is set to Output as the MCU gives (output) an "order" to the LED (to light on or to light off), whereas when you are using a button, this time the MCU receives (input) the information : the button is pressed or not.

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

Hope this will help,
Gaël A.

View solution in original post

4 REPLIES 4
Gael A
ST Employee

Hello Gnahore,

Concerning your Motor Profiler issue, I see you were taking in charge by Zied B. in another post, so I get that your are not facing any issue anymore. If it is not the case, please let me know and I will do my best to assist you.

Concerning your question about the use of an external button, you can do that easily by configuring your Pins via CubeMX (after Workbench generation). Choose from the available Pins and use it as GPIO Input. There are a lot of tutorials on the internet about it, if you want a more guided approach.

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

Hope this will help,
Gaël A.

Hello Gael A,

Thank you for reminding me this post, I totally forget about. Yes I can use the Motor Profiler now, however it seems that setting a value above 2000 as max RPM makes the board (x-nucleo-ihm08m1) smoking which create a over heat fault and stop the profiling.. so for now I'm working with 1500 as max RPM but that is strange..

Thank you for your concern, I have found videos about connecting external button.

Also do you mind explaining to me why button are set as input ? At first I thought they should be set as output (just like leds) but I was wrong

Hello Gnahore,

I am glad that you have found what you were searching for.

Concerning your last question, the answer is that when you use a LED, the GPIO is set to Output as the MCU gives (output) an "order" to the LED (to light on or to light off), whereas when you are using a button, this time the MCU receives (input) the information : the button is pressed or not.

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

Hope this will help,
Gaël A.

It makes so much sense. Thank you Gael A !