Skip to main content
eBirdman
Senior
March 21, 2018
Question

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

  • March 21, 2018
  • 6 replies
  • 3980 views
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.
This topic has been closed for replies.

6 replies

eBirdman
eBirdmanAuthor
Senior
March 21, 2018
Posted on March 21, 2018 at 21:00

I had to mention that the X-NUCLEO-IHM08M1 expansion board for which  X-CUBE-SPN8 was made, does have connectors for Hall sensors. So everything was designed ready for Hall sensored control but no examples of code.

I know that many users (if not vast majority) who buy this board will be using Hall sensors, please help all of those.

eBirdman
eBirdmanAuthor
Senior
April 4, 2018
Posted on April 04, 2018 at 18:10

Is there anybody who used STM32 for sensored BLDC motor control? Anybody in the world used X-CUBE-SPN8 for Hall sensored motor control?   Am I the first user of it for such basic application ?

eBirdman
eBirdmanAuthor
Senior
April 4, 2018
Posted on April 04, 2018 at 18:13

This forum tagged this question as 'No one else has this question' ! False.  I found 4 more similar questions starting from years ago.

Tesla DeLorean
Guru
April 4, 2018
Posted on April 04, 2018 at 19:10

Ok, but nobody has clicked 'I also have this question' on yours.

Suggest you contact your local ST office and connect with an FAE

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
eBirdman
eBirdmanAuthor
Senior
April 4, 2018
Posted on April 04, 2018 at 19:34

Nobody clicked 'I also have this question' to mine because they didn't see it !  I also did not get theirs when I was searching for these key words while on this site. If I did I'd click on theirs 'I also have this question' (nobody clicked for them either). (later on I found their similar question on google search - what's the difference?). Also possible that they might be out of here because they did not get any replies - people cannot stay here for years waiting for answers   If such general questions about STM product's direct intended usage by the users must be asked in STM sales office, then what is the purpose of the community forum ?

Tesla DeLorean
Guru
April 4, 2018
Posted on April 04, 2018 at 19:57

This is a user-to-user forum, ST's engineering staff generally work corporate accounts directly through the usual channels (sales, support, product reps, etc). They also have a list of contractors/consultants for more hands-on engineering support needs.

The lack of FAE participation here has been lamented for the most part of a decade.

The forum was moved to a new platform ~15 months ago, so of the older posts won't get flagged, without links/cites I'm not going to dig for them. Answers would be dependent on fellow Motor Engineers participating and helping each other, a review of the sub-forum activity should provide some insight into that level of participation, and who the moderation staff are.

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
Tesla DeLorean
Guru
April 4, 2018
Posted on April 04, 2018 at 20:01

Anyone home? Rattling the squirrel cage in Motor Control

Kling.Brian

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
Giuseppe Scuderi
Associate II
April 23, 2018
Posted on April 23, 2018 at 14:06

Hello,

the X-NUCLEO-IHM08M1 embeds the Hall/Encoder connector but no code is available inside 6Step control (SPN8).

The hall sensor code is supported instead for FOC control, in case of change of control strategy we have the solution already available for BLDC/PMSM motor.

Best regards,

Giuseppe Scuderi

Abdul Fourteia
Associate II
April 23, 2018
Posted on April 23, 2018 at 21:19

Hi Giuseppe,

I am also looking for a sensored solution for my BLDC. I came across this

http://www.st.com/content/st_com/en/products/embedded-software/mcus-embedded-software/stm32-embedded-software/stm32-standard-peripheral-library-expansion/stsw-stm32100.html

, which seems to be migrated to the  

http://www.st.com/content/st_com/en/products/embedded-software/mcus-embedded-software/stm32-embedded-software/stm32cube-expansion-packages/x-cube-mcsdk.html

 V5.0.2. Is there a video or a document showing how to set it up?

Thanks,

Abdul

Giuseppe Scuderi
Associate II
April 24, 2018
Posted on April 24, 2018 at 12:22

Hi Abdul,

in case you are using the

/external-link.jspa?url=http%3A%2F%2Fwww.st.com%2Fcontent%2Fst_com%2Fen%2Fproducts%2Fembedded-software%2Fmcus-embedded-software%2Fstm32-embedded-software%2Fstm32-standard-peripheral-library-expansion%2Fstsw-stm32html

version, the UM1052 document contains the right info about it, for instance for Hall sensor take a look at ''8.3.3 Setting up the system when using Hall-effect sensors''. Consider that the parameters calculated must be filled in the ST Workbench tool (see image attached) in the section ''motor'' and select the settings in ''drive management->speed position....'' section.

Best regards,

Giuseppe Scuderi

0690X0000060AkSQAU.png

Edgar Marx
Visitor II
April 26, 2018
Posted on April 26, 2018 at 10:24

Hi Vlad Blanshey,

On

https://www.youtube.com/watch?v=7vDJ9sWQqOk

you can watch a video and the side has a link to a

pdf-file for all the details in software and hardware.

Best regards

eBirdman
eBirdmanAuthor
Senior
April 26, 2018
Posted on April 26, 2018 at 20:28

Thank you Edgar - good example of using STM32CubeMX  and generation of the phase switching from the Hall-driven interrupts.  I think the same could be done by using X-CUBE-SPN8 software from STM and only replace zero crossing BEMF event with Hall sensor switching event driving the phase switching interrupts. Doing this way allows more convenient code for fine tuning of synchronization which I need for my research. I am developing a new kind of motor and I need a convenient library for the fine tuning of switching and also of duty cycles.

Even more promising to me would be X-CUBE-MCSDK  if the code is clean and works as advertised. I and Abdul Fourteia will go this path.

Thanks again - neat work you've done and good presentation too!

Vlad.