cancel
Showing results for 
Search instead for 
Did you mean: 

Examples of sensored X-CUBE-SPN8 motor control with Hall sensor?

eBirdman
Senior
Posted on March 21, 2018 at 20:50

I found only more requests of the same in this forum and no answers. Using Hall sensors for motor control is most typical today. 6-step BLDC code example provided in X-CUBE-SPN8 is sensorless only. There are driver files in X-CUBE-SPN8 package specifically made for Hall sensored control (stm32f4xx_hal_tim_ex.c andstm32f4xx_hal_tim_ex.h) but no examples of usage found. Please somebody point to any example. I will keep posting this until somebody who knows will reply.

Thanks in advance.

#x-cube-spn8 #x-nucleo-ihm08m1 #sensored #motor-control #bldc #sensor #hall

Note: this post was migrated and contained many threaded conversations, some content may be missing.
24 REPLIES 24
Posted on April 26, 2018 at 22:42

Hi Abdul, we are on the same path. This X-CUBE-MCSDK was released recently that's why we did not see it before. It looks as a perfect playground for a new MC development with Hall sensor framework available in library and examples as well. My need of the Hall sensor comes from the other end: I am developing a new motor which can be controlled only through a closed loop with position sensor such as Hall or Optical and develop a completely new control for it.  I need to start with X-CUBE library examples only to get a good familiarity with it's building blocks. I decided to try X-CUBE-MCSDK with Nucleo-F303RE with X-NUCLEO-IHM8M1 first and then migrate to Nucleo-F401RE (similar to you) and use it as starting base for my MC code. We can start a new thread to exchange info on this setup development if you want.

Sincerely

Vlad

Posted on May 01, 2018 at 22:03

Hey Vlad,

I have spent some time on the MCSDK, and managed to get a small BLDC motor running. I might put up a video of my progress later.  I am currently running into issues with the motor profiler. It doesn't seem to work with motors with low speed and high torque characteristics. 

I think we should create another thread to discuss our progress with the MCSDK.

Regards,

Abdul

Posted on May 02, 2018 at 10:44

Hi Vlad,

you can find the source code for hall sensor also in the new version of the library for sure. You can use the F401 with IHM08M1 but you need to identify the motor params (with MP tool) only with supported NUCLEO boards.

If the X-CUBE-SPN8 will be updated, the hall sensor part will be included for first !

Best Regards,

Giuseppe

Posted on May 02, 2018 at 15:17

Grazie

Giuseppe for confirmation of the path I have taken. I'll use my Nucleo-F401RE after identifying motor parameters using  Nucleo-F303RE with IHM08M1 board. I'd prefer to buy more powerful NUCLEO-F446RE board shown as supported in the release note of X-CUBE-MCSDK v.5.03 but motor profiler does not show this board.
Posted on May 11, 2018 at 04:56

Hi Abdul, I finally got time to work on the STM motor control and I am running MCSDK Profiler and Workbench with Nucleo-F303RE and IHM08M1 board running my slow 1 KW motor. Even though the motor allows 3000 max RPM but I lied to Profiler and ended up with profile of 1300 RPM max. Configured project, compiled, uploaded and run 'play' with Workbench quite smooth. So far only sensorless mode to be able to use a Profiler. I will report more in another thread.