cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F4DISCOVERY and STM32 PMSM FOC SDK

alessandro239955_stm1
Associate III
Posted on September 23, 2015 at 06:51

Hi everyone.

I am developing a robotic application and I need some advice.

I need to drive two BLDC motors (these drive the wheels of the robot) and also to interface with a parallel camera.

I understand that with STM32F407VGT6 I am able to drive individually two BLDC motors (using the STM32 PMSM FOC SDK) and also interface with the camera. For this reason I plan to buy the STM32F4DISCOVERY board. 

Do you know some limitation or problem that I could have with STM32F4DISCOVERY and STM32 PMSM FOC SDK?

Thank you and I am sorry in the case I put my message in the wrong place.

#stm3240g-eval
19 REPLIES 19
alessandro239955_stm1
Associate III
Posted on November 11, 2015 at 03:10

Hi Gigi

Before using the sensorless algorithm I'm trying to get the motor running properly with hall sensors. It should work without problem with the sensors but it doesn't. So I tried to manually change the PID Gains and it works now.

PID Gains:

kp 45

Ki 15

Iq:

All 246 (scaled by a factor of 10 respect the default value)

I've still the problem of the maximum PWM frequency and I'm not able to run the motor at a velocity lower than 20000 rpm. Between 20000-600000 it works pretty well.

Can you help me tuning better these parameters before moving to the sensorless control?

Grazie

Alex

Gigi
ST Employee
Posted on November 11, 2015 at 09:43

Ciao Alex

The maximum modulation index that pratically is the maximum BUS voltage available for the control depends on Sampling Time, and noise parameters (TNoise, TRise) present in power stage parametes. You can try deceasing these values.

Maybe you can take a look to the example P-NUCLEO-BullRunning that is for a drone propeller motor.

Ciao

Gigi

Gigi
ST Employee
Posted on November 11, 2015 at 09:46

Ciao Alex

The only thing that I can see from these data is that the PI coefficient that you set are very low. You can try to increase the divider so the numerator can have bigger values and better resolution.

Ciao

Gigi

alessandro239955_stm1
Associate III
Posted on November 19, 2015 at 07:55

Hi Gigi.

Thank you for your suggestions.

I'm able to run a single motor in both the configurations (Sensored and Sensorless) without any problems. But I've some problem with the dual configuration (two motors at the same time). What happens is that, in dual configuration, I'm able to separately drive the motors (one at time), but when I try to get running together the system stop working and the fault status appears.

Do you have any suggestions about how to fix this problem? I think that in order to make them running at the same time I need to change some configuration parameter.

Actually I'm working with a PWM of 45kHz, current loop of 0.5ms and rate 1, three shunt resistances.

Alex

alessandro239955_stm1
Associate III
Posted on November 19, 2015 at 21:40

Hi Gigi.

I've tried to increase the  execution rate to 2 or 3 PWM period, as you suggested into this old post:

https://my.st.com/public/STe2ecommunities/motordriver_ics/Lists/Motor%20Control%20Firmware%20and%20Software/Flat.aspx?RootFolder=https%3a%2f%2fmy%2est%2ecom%2fpublic%2fSTe2ecommunities%2fmotordriver_ics%2fLists%2fMotor%20Control%20Firmware%20and%20Software%2fFOC%20SDK%203%2e4%20with%20STM32F303CB&Fo...

With execution rate PWM period higher than 2 (without changing the other parameters) the motors start up together but they don't stabilize, I receive the error ''Speed feedback'' or ''Start-Up Failure''. I get the same message also driving only one motor at time.

Any idea how to fix this? Because it's strange that with execution rate 1 PWM period it works and with 2 it doesn't.

Thank you again for your help.

Alex.

alessandro239955_stm1
Associate III
Posted on December 01, 2015 at 19:23

Ciao Gigi.

I am still not able to run the motors in dual configuration.

Can you help me?

alessandro239955_stm1
Associate III
Posted on January 28, 2016 at 13:30

Hi Gigi.

I'm able to drive both the motor in dual configuration with hall sensors. If I switch to DUAL sensorless it works only If i run one motor at time.

Do you have any suggestion about that?

jack239955_st
Associate II
Posted on March 31, 2016 at 22:10

Hi Gigi,

In reference to the STM3240G-eval can you please confirm some of the boards that are compatible out of the box with the MP? Thank you.

Gigi
ST Employee
Posted on April 01, 2016 at 14:19

Ciao Jack,

please don't duplicate your questions, thank

See my answer

/f60eafe7

Ciao

Gigi

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