cancel
Showing results for 
Search instead for 
Did you mean: 

STEVAL-IFN003V1

joe2
Associate II
Posted on August 24, 2013 at 20:33

Hi,

I am trying to get sensorless FOC working on a 14 pole surface mounted outrunner motor. It has a Rs of 0.35 Ohm and Ls of 1.0 mH.

I installed Motor Library v3.0 and applied the IFN003V1 patch. I set all of the board settings listed in UM1478. I then compiled the library and user application code and loaded with ST-LINK. The board connects fine and the settings match the workbench.

When I try to start the motor with overcurrent sensing enabled, it always returns an overcurrent error immediately. When I disable overcurrent the sensorless revup works, but at the end of the revup I instantly get a ''startup failure''.

Any suggestions on what to try? It seems that something in the current feedback is erroneous.

Thanks
3 REPLIES 3
Gigi
Senior
Posted on August 26, 2013 at 10:12

Ciao

Hard to say where is the problem!|

As first step I suggest you to make some capture of the motor phase currents, using a current probe and post here. Try to catch the phase and the point in which you get the maximum value of the current, but keep the time base sufficiently wide to take a look at the waveform of the current (for example 50ms per division).

Ciao

Gigi

joe2
Associate II
Posted on August 29, 2013 at 05:34

Hi Gigi,

Would an oscilloscope capture of the current shunt op amp outputs be ok?

It definitely seems to be a problem in the feedback from the motor. If I enable open loop FOC the motor spins smoothly. I do notice that the gains generated by motor control workbench seem odd, many of them are negative. I also get a compiler warning about a change in sign of FINAL_I_ALIGNMENT due to integer conversion.

example of negative gain:

/* State observer constants */

#define GAIN1                            -6077

#define GAIN2                            22423

I also have a question about where we are supposed to get the official v3.0 of the library. It is odd that the product support page has only the patch but not the library too. The only version I could find was called a ''web distribution'' from here:

http://www.element14.com/community/solutions/6846/l/stmicroelectronics-stm32-pmsm-foc-sdk-v30-motor-control-firmware-library

Thanks

Gigi
Senior
Posted on August 29, 2013 at 11:30

Ciao Joevn

Due to safety reason I suggest you don't download the FOC library from a non-ST site.

Indeed the MC lib. support the L6230 inverter bridge, present in the STEVAL-IFN003V1, even in the v3.2 and later but this feature is not supported by the workbench (it will be supported in next releases).

Please take a look at this post

[DEAD LINK /public/STe2ecommunities/mcu/Lists/motor_control/Flat.aspx?RootFolder=/public/STe2ecommunities/mcu/Lists/motor_control/L6234%20%2b%20STM32F4%20%2b%20MC%20%2b%20STM32%20PMSM%20FOC%20LIB%203.2&FolderCTID=0x01200200770978C69A1141439FE559EB459D7580005A810128153A7244A21980BD49736843]Here

to enable this feature manually in v3.2 or above.

And in particular to my first answer there: “11/12/2012 5:36 PM�?

The patch just add this support and the functionality of the push button and potentiometer that is not necessary if you use the ST MC Workbenh real time communication feature.

The only think that is really missing can be the DAC function because in the

STEVAL-IFN003V1

it is mapped to another Timer. But you can take a look at the DACRCTIMER_UserInterfaceClass.c file present in the patch to now how to modify the code to remap the DAC functionality.

Regarding the remaining questions

> Would an oscilloscope capture of the current shunt op amp outputs be ok?

It will be better to use a current probre monitoring one of the motor phases (for instance the phase A).

> I do notice that the gains generated by motor control workbench seem odd, many of them are negative.

It is not automatically true that negative value is wrong. The FW lib. use a lot of signed values.

> I also get a compiler warning about a change in sign of FINAL_I_ALIGNMENT due to integer conversion.

This kind of warning, instead, you need to take care. But in this case I think that is not a problem. Maybe it is be generated by a ''Final current ramp value'' in the ''Drive Management - Start-up parameters'' that is above the ''Nominal current'' present in the ''Motor - Electrical parametes''. But since the ''Include alignment before ramp-up'' in ''Drive Management - Start-up parameters'' is disabled then the generated value (that is wrong) is not used. Any how I suggest you, to avoid the warnings during the compilation, to enable the ''Include alignment before ramp-up'' just the time to set a ''Final current ramp value'' that is allowed and then disable it back again.

> It definitely seems to be a problem in the feedback from the motor.

I suggest to double check the setting of the current measurement inputs ''Control Stage - Analog Input'' - ''ADC Channel selection for phase U,V, W'' and, if DAC functionality is working, to take a look at the Ia and Ib (it sould be the measured one) doing this when the open loop FOC is enabled and the motor is running.

Ciao

Gigi