FOC with Nucleo F334 and drv8302 control board

Hi,

I want (and need), to do an FOC control of brushless motor with a drv8302 control board (from aliexpress), and a STM32 Nucleo F334 board.
I spent months on theory of foc control, bldc motors, etc etc. So now I know a lot about theory but I am totally lost when it’s about to start some real foc control, i really don’t know where to start.
Could someone help me please?
Thanks

If you are using simpleFOC library, you can get started here: Writing the Code | Arduino-FOC

Thanks for your answer ! I would like to do Bemf control and I’m not sure if I can do it with SimpleFOC, but except that I don’t have any preferences for any software so SimpleFOC could be good. To be honest I just want to start somewhere and then to be able to grow some competences.

I don’t think simpleFOC has any BEMF sensing for right now.
If you just want to start, why not just use the library, do open loop, then try some closed loop modes?

Yeah I think you’re right about doing some open loop first. At first I thought I had to have sensors but didn’t think about open loop. It could only be better than doing nothing so I will try that this afternoon. Then I will see where I can go with that. Thanks.

I searched for F334 in the forum and found that.
You would need to confirm this.

Thanks! I’m actually trying to configure my Nucleo with Arduino IDE, I think it will work with “nucleo 64” board manager. If it doesn’t I think I have some other nucleo boards to try.

Edit : I found on the STM32duino Github that the good configuration was Generic STM32F3 Series, I’ll see if I can get some LED blinking then some open loop control !

I think current sense for F3 is also not supported in SimpleFOC, but it might not be complicated to port from F1 or F4.
What are the other nucleo boards that you have ?

I also have Nucleo F756ZG and Nucleo H723ZG, and the IHM03 kit that includes the NUCLEO-G431RB. For now, I won’t try to do current sense, just open loop.

ok but you will eventually get there :sweat_smile:
NUCLEO-G431RB should have good support.

1 Like