cancel
Showing results for 
Search instead for 
Did you mean: 

Motor Control Support

santosh-ametek
Associate II

Hi,

We are using STEVAL-SPIN3201 to evaluate STSPIN32F0 which we are planning to use in one of our motor driver.

We have 24V, 60W BLDC motor of max. speed 1500 rpm and trying to drive/control it using MC Workbench of MCSDK-6.3.0 in FOC mode.

We need some assistance on the following issues which we are facing;

 

Issue-1: We don't have all the motor data which MC Workbench need. For this if we are trying to use the Motor Profiler, it is not connecting. So, we tried to measure the required motor parameters manually and entered these parameters in the workbench. We could generate the code from the workbench and drive the motor at no load. We observed that the motor runs fine at higher rpms but struggles at lower rpms (below 150). At lower rpms the speed is fluctuating meaning slowing down and again ramping up. The motor is equipped with a quadrature encoder of 5000 lines per revolution.

 

Issue-2: We do not understand which control mode to choose. There are 3 control mode namely, Torque Control, Speed Control and Position Control. So, what are the expectations from these control modes. Among Torque and Speed control mode there is no change/improvement observed for lower rpms issue. In Position control mode the lower rpms are better than the other two control modes but, the motor is vibrating, making noise and heating up.

 

Issue-3: Why 'Graph' option is disabled in Motor Pilot? Can't we use this feature in this eval board?

 Pilot.pngControl_Modes.pngProfiler.png

We went through the documentation but it is not clear. Can you please guide us to overcome the issues described above?

 

Regards,

Santosh

4 REPLIES 4
GMA
ST Employee

Hello @santosh-ametek,

Issue-1: As mentioned in the Release Notes documentation available through "Workbench tool">About>Documentations>"Release Notes": 

  • The Profiler requires an MCU equipped with an FPU. Therefore, it is not possible to generate a motor profiler firmware for the STM32F0, STM32G0 or STM32C0 families.

You can find guide lines for How To manually configure the motor parameters.
Issue-2: Speed or Torque mode depends on how you want to control the motor. Position Control mode is described in documentation available through "Workbench tool">About>Documentations>Documentation, "user Manual" tab, "Position control" link. 

Issue-3: Graph is disable according to the unselected "Data Log" option by default:

GMA_0-1721895620910.png

If you enable it, take care of warning message: "For MCU with low memory resource, an high value in the Data Log Buffer Size could cause errors at linker time.".

Do you have other ST boards to profile the motor?

If you agree with the answer, please accept it by clicking on 'Accept as solution'.
Best regards.
GMA

Thanks GMA for the reply!

I don't have other ST boards with me right now, but I can plan if it's really necessary.

For now, I measured and entered the motor parameters manually using the documentation. Now I can able to spin the motor at different RPMs even with load using the Motor Pilot.

To enable the 'Graph & Record' option in the Motor Pilot, I enabled the 'Data Log' option.

santoshametek_0-1721897320110.png

Now, the 'Graph & Record' option is enabled in Motor Pilot but, when I am adding a signal to the graph it doesn't plot anything.

santoshametek_1-1721897530540.png

And, an error pops up at the bottom of the Motor Pilot window.

santoshametek_2-1721897667179.png

Is this because the following warning message?

santoshametek_3-1721897939079.png

If so, then the buffer size selected (128) is the minimum possible value.

Can you please suggest how can I add a signal to the plotter window in this scenario?

 

Thanks,

Santosh

 

Hello @santosh-ametek,

Please try by de-selecting the "Reduce the number..." option.

GMA_0-1721901204789.png

 

If you agree with the answer, please accept it by clicking on 'Accept as solution'.
Best regards.
GMA
santosh-ametek
Associate II

Hi @GMA 

I tried by de-selecting the option you had mentioned.

Now I could see the plot in the graph window, but I guess frequent connection/disconnection are happening so the plot is sometimes stopping and restarting..

The log window show some warnings too!

santoshametek_0-1721965198776.png

Sometimes Motor Pilot is not responding and plotter stops to plot signal!

santoshametek_3-1721965777338.png

 

Regards,

Santosh