cancel
Showing results for 
Search instead for 
Did you mean: 

STEVAL-SPIN3202. Got it turning. Now need a guidance on where / what file and how I can control the speed.

EShaw.1
Associate II

Hi All,

Got it turning. Now need a guidance on where / what file and how I can control the speed. 

SDK 5.4.8.

6S_STEVAL3202_SL_VM example.

Monitor connects well.

I can start the motor.

Final ramp speed does not work. The only use - setting the direction of rotation.

Measured speed raises from 0 to 4000rpm and motor stops with Fault over "Start-up failure". Motor power indicator jumps to max and stays there.

My application is simple. I need an open loop control. 2 speeds forward, 2 speeds reverse. Stop. Preferably hardware control -3 pin. The only feedback - hardware Fault output.

Questions are:

  1. Where (what settings) can be an error.
  2. Where can I find the code where I can control the speed.
  3. How I can control the speed (what variables are responsible for speed and acceleration?). I assume that it can be done in main.c in while(1) loop.
  4. Could you please direct me to some manual or documentation on 6S_STEVAL3202_SL_VM package.

Thanks in advance for your answers.

Regards,

Edward.

1 ACCEPTED SOLUTION

Accepted Solutions
ADAVE.1
ST Employee

Hi Edward,

the errors raised are related to FOC functions that should not be there in the six-step project. You are likely missing something in the generation process.

I suggest to clean the folder and recreate the project from scratch starting from loading the example from 5.Y.4 as follows:

1- in the 5.Y.4 click on the example you are interested in

0693W00000Nqd6OQAR.png 2- After reading, close the readme.txt file and the warning message

3- Click on "Save As" and save the project without renaming it

0693W00000Nqd6xQAB.png4- Click on project generation icon, select the toolchain and click UPDATE

0693W00000Nqd7lQAB.png5- generation process should start with the proper library version (5.Y.4-Full)

0693W00000Nqd8FQAR.png6- Load the project in your development environment and open the file stm32f0xx_mc_it.c where you have to replace the function like in my previous post

0693W00000Nqd9DQAR.png7- build and download the project to the board (or launch the debug mode...)

0693W00000NqdA6QAJ.png8- Open the Motor Pilot, load the defaultApp_6STEP and connect with Speed 115200

0693W00000NqdApQAJ.png 

Regards

Alessio

View solution in original post

19 REPLIES 19
ADAVE.1
ST Employee

Hi Edward,

can you please confirm that you are using MCSDK 5.4.8? This release doesn't include the example you mentioned while MCSDK 5.Y.4 does.

Could you explain which motor are you using and whether you changed any setting or default configuration parameter ?

Regards

Alessio

EShaw.1
Associate II

Hi Alessio,

Thanks for the response.

I am using MCSDK_v5.4.8.

MCSDK 5.Y.4 does not work with STEVAL-SPIN3202. One of your colleagues suggested not to use MCSDK 5.Y.4 but MCSDK_v5.4.8 instead.

0693W00000NqOekQAF.pngThe name of the project - I just changed generic name to 6S_STEVAL3202_SL_VM. Sorry for confusion.

This project was created by ST Motor control Workbench:

File\New Project

Motor B28 - small brushless sensorless inrunner.

Changes to settings:

1) Motor Parameters

2) Overcurrent protection disabled (Tick on main screen and in Analog and input protection) (As I was unable to get it working with protection activated)

3) Speed setting - Sensorless (Oserver+PLL)

4) PWM Freq changed to 12000Hz

5) Control mode- Speed control

Could you please suggest another way of using some example for STEVAL-SPIN3202?

Regards,

Edward.

0693W00000NqOkxQAF.png 

0693W00000NqOfEQAV.png

ADAVE.1
ST Employee

Hi Edward,

it's not clear to me why you have been suggested to use 5.4.8 and if you created the project from scratch (like I see from the image above) or you just load the example of the STEVAL-SPIN3204 (that is compatible with STEVAL-SPIN3202).

Please be aware that if you create a project from scratch in 5.4.8 you are generating a FOC project.

On the other hand, if you load the example you are not able to customize it from the main interface but you have to look for the configuration parameters inside the generated code.

Since SDK 6.0 doesn't currently support F0, I would recommend to use 5.Y.4 and load the example "Six-Step Sensorless and Voltage Mode on a STEVAL-SPIN3202+Shinano LA052-080". Save it WITHOUT renaming the project and generate the code by clicking the UPDATE button. In order to customize the parameters and where to find them into the code, I suggest you to read carefully the attached doc.

Regards

Alessio

EShaw.1
Associate II

Hi Alessio,

Thank you again.

The reason why your colleague suggested that STEVAL-SPIN3202 does not work with 5.Y.4 is that after uploading the project, It is impossible to connect to it with Motor Pilot:

0693W00000NqZ5qQAF.pngThat is why he suggested using 5.4.8 instead.

If you could suggest how to fix connection issue, it would be great.

I'll download the example of the STEVAL-SPIN3204 in 5.4.8 as you suggested and will keep you posted:).

Regards,

Edward.

ADAVE.1
ST Employee

Hi Edward,

Please read section 4.1 of the document I attached in my previous post.

You need to select the proper "qml" file in the MotorPilot installation folder.

Regards

Alessio

EShaw.1
Associate II

After downloading the example of the STEVAL-SPIN3204 in 5.4.8 

This error pops out. May be board STEVAL-SPIN3202 is not that compatible with STEVAL-SPIN3204?

What and where can be tweaked?

0693W00000NqZQPQA3.png

ADAVE.1
ST Employee

Like I wrote in my previous post, I recommend to use 5.Y.4

EShaw.1
Associate II

0693W00000NqZYTQA3.png

EShaw.1
Associate II

same result. 5.Y.4. Correct GUI. No connection. Not on 115200 nor on 9600 Baud