cancel
Showing results for 
Search instead for 
Did you mean: 

Motor stalled with custom hardware based on STM32-MCKIT (FOC 2.0)

Lopez.Antonio
Associate II
Posted on January 03, 2014 at 09:48

Hello all,

I'm trying to start a custom inverter hardware, based on the STM32-MCKIT hardware. The FOC library used is 2.0 configured in quadrature encoder mode. In my custom hardware I'm using the 64 pin version of the STM32F103, whereas in the STM32-MCKIT the 100 pin version is used. I've adjusted the peripherals initialization accordingly.

I already ran the application motor connected to the STM32-MCKIT, in order to get the right regulation parameters to be used on custom hardware later.

The problem I have is that the motor is stalled, no matter how I connect motor phases or the encoder. I've verified hundred of times the PWM pulses sequence, IGBTs, etc. It reaches a condition where there is sinusoidal current fed to two of the phases, but the third one remains off, or with wery short PWM pulses applied to it.

I suspect of the current sensing circuitry, but I'm unsure about it.

Do you have any hints which could help me in determining where the problem lies?

Thank you.

1 REPLY 1
Gigi
ST Employee
Posted on January 23, 2014 at 15:14

Ciao Antonio,

many times the open loop mode give us an help to debug a new hardware before to go in full current regulation.

I suspect that in the v2.0 is not implemented, but starting from the v3.0 and above you can enable it manually modifing the Drive parameters.h as follow

#define OPEN_LOOP_FOC

ENABLE

#define OPEN_LOOP_VOLTAGE_d 

xxxx

/*!< Three Phase voltage amplitude

in s16 format */

#define OPEN_LOOP_SPEED_RPM 100 /*!< Final forced speed in rpm */

#define OPEN_LOOP_SPEED_RAMP_DURATION_MS 1000 /*!< 0-to-Final speed ramp duration */

The xxxx value above is the percentage of bus voltage applied (32768 = 100%) to the motor in open-loop mode so I suggest to start with lower value and increase it step by step until motor start to run.

In this modality the current is not regulated but is anyhow measured and can be tracked using DAC to see if it is ok. Moreover you can verify that the inverter is working.

Usage of the last released version of the STM32 FOC SDK, is always encouraged.

Ciao

Gigi