2018-03-21 12:50 PM
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.2018-04-23 05:06 AM
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
2018-04-23 02:19 PM
Hi Giuseppe,
I am also looking for a sensored solution for my BLDC. I came across this
, which seems to be migrated to the V5.0.2. Is there a video or a document showing how to set it up?Thanks,
Abdul
2018-04-23 08:52 PM
Giuseppe, please clarify: what do you mean by
'
The hall sensor code is supported instead for FOC control
field-oriented control is sensorless... also what is
'we have the solution already available for BLDC/PMSM motor'
do you mean you have a solution/code example for Hall sensored motor control ? Where can we find it?
Regards
Vlad
2018-04-24 05:22 AM
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
2018-04-24 05:29 AM
The FOC library supports both sensorless and sensored motor, you can use the ST Workbench tool to configure the IHM08M1 for Hall or Encoder mode.
Please take a look at the user manual
UM1052 for further info. 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 or later contains the source code.Best regards,
Giuseppe
2018-04-24 06:26 PM
Thank you Giuseppe for this info. Indeed it has everything for the Hall sensored implementation of motor control. I saw this software before but I did not check it out because of this note from STM Migrate to STM32-CUBE-MCSDK I searched for this new library and I found
just as Abdul found. Looks like this migration to a new library was already done by STM. This means that Hall sensor examples and library should be available in STM32-CUBE-MCSDK. Is it so? Can we use this library with our Nucleo-F401RE + X-NUCLEO-IHM08M1 ? Why does STM provide limiting package X-CUBE-SPN8 for those boards without Hall example?Sincerely
Vladimir
2018-04-24 06:35 PM
Hello Giuseppe,
Thank you for your reply. I have looked into that document, it seems that it's written for the
, which is not available as far as I am aware. I only have the free version of the . The full version seems to be locked behind an NDA.Please let me know if I got this wrong.
Regards,
Abdul
2018-04-24 07:10 PM
Hey Vlad,
This what I think the reason is. It seems like these code samples are prepared for high speed BLDC like the ones you find in UAVs(more than 2000 rpm)
. In that speed range, the BEMF is enough to sense the rotor position from what I understand.Anyways, I have the F401RE and IHM08M1, and I plan to try it out with the MCSDK. I do not know about your application, but mine is for high-torque low-speed BLDC hub motor for a mobile robot (250W, 300rpm, 40V), which why I want the sensored solution. I can update you with my progress if you would like.
The Motor Profiler doesn't support the F401RE, so I ordered the F302R8. I am going to use the Motor Profile to characterize my motor. until I get the new board, I will just use arbitrary values just to try to get it working.
Regards,
Abdul
2018-04-26 01:24 AM
Hi Vlad Blanshey,
On
https://www.youtube.com/watch?v=7vDJ9sWQqOk
you can watch a video and the side has a link to apdf-file for all the details in software and hardware.
Best regards
2018-04-26 01:28 PM
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.