cancel
Showing results for 
Search instead for 
Did you mean: 

Using FOC SDK

Posted on October 31, 2017 at 08:53

The FOC library is complicated and I have some difficulties to understand how to work with it. Even after reading UM1052, UM1053.

On the highest level we can start/stop a motor

if (MCI_GetSTMState(oMCI[M1]) == IDLE) { MCI_StartMotor(oMCI[M1]); } else { MCI_StopMotor(oMCI[M1]); }

But how to set velocity and current?

Another question - I have to drive DC motors as well. What should I set for this purpose?

Is there more extensive examples?

7 REPLIES 7
Alex Fedoseev
Associate II
Posted on December 12, 2017 at 19:21

For the second question, did you mean  brushed or brushless DC motors

PMSM FOC library is for driving the brushless ones.

Posted on December 13, 2017 at 16:33

I need to drive DC motors as well as BLDC. So I thought there is a way to set the firmware to behave like a full bridge driver.

Posted on December 14, 2017 at 00:49

I don't think FOC SDK is applicable for driving Brushed DC motors. The poles in Brushed motors are mechanically commutated vs the Brushless ones where we need complex algorithms to commutate motor windings.

If you do need an intergated solution, take a look at this document:

http://www.st.com/content/ccc/resource/sales_and_marketing/promotional_material/selection_guide/group0/52/61/48/55/a5/92/44/a4/sgstspin/files/sgstspin.pdf/jcr:content/translations/en.sgstspin.pdf

Posted on December 14, 2017 at 16:04

L6235 or L6229 would be perfect. But I need current  10-15 ampere.

Posted on December 21, 2017 at 11:12

Hi,

I confirm the FOC library cannot be modified to make it work as a full-bridge driver.

Moreover this driving technique  is extremely complex compared to the task of driving a brushed DC motor.

I suggest you to start from an easier firmware like the

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

For the current ratings you need, ST can provide you a complete set of gate drivers and mosfets.

Enrico

Posted on February 21, 2018 at 12:52

I have DC motor (two wires) in my project. I have to drive it also. I have no intention to design 2 boards - one for BLDC motors and one for DC motors.

TI's library (Control Suite) deals with both types of motors.

I suggest you to start from an easier firmware like the

/external-link.jspa?url=http%3A%2F%2Fwww.st.com%2Fcontent%2Fst_com%2Fen%2Fproducts%2Fembedded-software%2Fmcus-embedded-software%2Fstm32-embedded-software%2Fstm32cube-expansion-packages%2Fx-cube-spn4.html

I don't want to use STM32Cube in my project. I'v perfectly well with SPL.

Laurent Ca...
Lead II

The question has been moved from the "Motor Control Hardware" section to the "STM32 Motor Control" section (the question is about the STM32 MC SDK). 

Best regards