cancel
Showing results for 
Search instead for 
Did you mean: 

Motor Profiler profile not working correctly

BGlen.1
Associate II

I have a strenge problem.

I can run the Motor Profiler 5.4.7

The program generates the profile and I can use the play function to control my motor. Great.

then I export the profile

Generate code using ST Motor Control Workbench 5.4.7. I dont make changes,

Open the code in STM32CubeIDE 1.7.0, compiles okay and uploads.

When I try to control the motor using ST Motor Control Workbench monitor, the motor makes a very tiny click and over current fault is activated. I can not make the motor move regardless what I do. I have played with acceleration etc without luck.

I can do the same procedure with another totally different BLDC motor and make it run and control it using the ST Motor Control Workbench monitor.

If I for testing purpose connect the first BLDC motor, that I could not control, to the ESC, using the motor profile from my working test using another motor. I can make the motor run a bit, after 2 seconds i get a speed feedback error of cause because I have the wrong motor connected, but the motor spins for the short time.

Am I missing something basic?

Hardware: B-G431B-ESC1 3Sh

My motor has the following specs from the Motor Profiler

Pole pairs 7

Max speed 3750

Max Current 25

VBus 16

SM-PMSM

Electric model:

Rs 0,1

Ls 0,02

Vbus 19,33

Imax 25

3,12vrms/krpm

Mechanical Model:

Friction 40.3 uNms

Inertia 41.75 uNms2

Max speed 3730

4 REPLIES 4
cedric H
ST Employee

Hello @BGlen.1​ ,

If I understood correctly you succeed to do the complete flow (from motor profiling to motor spinning) with one motor amongst two. And all your trials have been done with one hardware only : B-G431-ESC1 3sh. Is it correct ?

Could you check that the profiler data output are closed to the real values. A dedicated wiki is available here.

Could you share your two stmcx ?

Regards

Cedric

BGlen.1
Associate II

Hi @cedric H​ 

Thank you for answering.

Both motors work in the Motor Profiler and generate working profiles, and I can use the play function with both motors.

After generating code and uploading the code, 1 of the motors work and can be controlled with the ST motor control workbench monitor.

The other motor shows over current fault when I press the start button in the monitor.

The winding resistance the profiler calculates is not correct, for both motors. But the motors are well below the 1ohm resistance that is preferred for the profiler. But I guess since the profiler succeed in making a profile that I can use in the play mode, it should work, at least a little bit/short time.

I have attached my stmcx files, compressed as zip,

Stmcx file for the motor that works with both profiler and ST motor control workbench: maxon_499768.

Stmcx file for the motor that shows fault: T200_motor_not_working

Datasheet for the motor that shows fault, https://bluerobotics.com/store/thrusters/t100-t200-thrusters/t200-thruster-r2-rp/

I have 4 pcs B-G431-ESC1

Regards

Brian

BGlen.1
Associate II

Hi @cedric H​ 

I managed to get the motor running, by adjusting the PID regulators, startup sequence and acceleration ramps. It kinda works but now I need more power from the motor and have a new problem. According to ST totorial I need to finetune the PID by using the DAC output, but the DAC pins are used for current and bemf sensing on the B-G431B-ESC1. Is there another way to finetune the PID on the B-G431B-ESC1? Will the values work if I tune by using your Nucleo board with the 431 processor?

I hope you can give me some advice

Best regards

Brian

cedric H
ST Employee

Hello Brian,

I am glad to read that you are able to spin your motor even if everything is not perfect yet.

" Is there another way to finetune the PID on the B-G431B-ESC1?"

Moving from 5.4.7 release to 5.Y.2 will allow you to use the new Motor Pilot tool with a lot of great debug features.

the 5.Y.2 version uses a new communication protocol allowing to set the UART to almost 2Mbit/s and plot algorithm data generated at PWM frequency.

From the top of my head, all data accessible with the DAC are accessible through the Data log feature of the Motor Pilot.

Tuning with a Nucleo G431 is worth to test if you have a power board that can do the job.

Regards

Cedric