2022-05-24 03:52 AM
Dear STMicroelectrinics,
I encountered with some problem with product p-nucleo-ihm002.
The problem is about speed and torque control but not with position control.
The hardware is the following:
- p-nucleo-ihm002 (nucleo-f302r8, X-Nucleo_IHM07M1 , bull running br2804)
- ISC3806-003G-1000BZ3-5-24F encoder with 1000 ppr (A,B,Z signals)
Software:
- MC_SDK_5.Y.4
- Firmware Package Version STM32 FW V1.11.3
- STM32CubeMX 6.5.0
- STM32CubeIDE
What works:
When p-nucleo-ihm002 is used in sensorless mode with FOC 3-sh control in speed control, the motor behaves as expected: it follows the referenced speed commands (for speeds higher than some lower bound).
What partially works:
When p-nucleo-ihm002 is used in sensored mode (with Encoder) with FOC 3-sh control in position control, the motor follows the given reference command for angle positioning, but in some cases it speeds up to high rpm for no reasons.
What doesn't work:
1. When in sensored configuration (with Encoder) with FOC 3-sh, it doesn't work as expected for torque and speed control. In the code, when the command sequence speed/torque ramp and start motor is executed, the motor doesn't follow the given reference (it just makes a small movement and immediately stops) and displays overcurrent error.
If delay command is added before calling the above speed/torque ramp command then the motor again does not follow the command, but in this case, it does not display the overcurrent error.
2. In the same sensored configuration (with Encoder) with FOC 3-sh, the motor will follow the given speed reference for some short time period if, before executing the above speed ramp command, we, for example, provide the following sequence of commands:
-- Init of all hardware --
HAL_Delay(1000);
MC_ProgramSpeedRampMotor1(10,0);
MC_StartMotor1();
HAL_Delay(2000);
MC_StopMotor1();
HAL_Delay(1000);
MC_ProgramSpeedRampMotor1(300,0);
MC_StartMotor1();
In the second line above, if we provide some other reference speed, e.g. 100, the motor again does not start spinning (after the later MC_ProgramSpeedRampMotor1(300,0) command) :
Example code for not working speed control:
-- Init of all hardware --
HAL_Delay(1000);
MC_ProgramSpeedRampMotor1(1000,0); // <-------------------------- changed from 10 to 1000
MC_StartMotor1();
HAL_Delay(2000);
MC_StopMotor1();
HAL_Delay(1000);
MC_ProgramSpeedRampMotor1(300,0);
MC_StartMotor1();
// motor do something and stops immediately
Also, if the Delay before MC_ProgramSpeedRampMotor1(300,0) command is lower, e.g. 100, the motor again will not start spinning:
Example code for not working speed control:
-- Init of all hardware --
HAL_Delay(1000);
MC_ProgramSpeedRampMotor1(10,0);
MC_StartMotor1();
HAL_Delay(2000);
MC_StopMotor1();
HAL_Delay(100); // <-------------------------- changed from 1000 to 100
MC_ProgramSpeedRampMotor1(300,0);
MC_StartMotor1();
// motor do something and stops immediately
3. Anyhow, if the motor begins to follow the speed reference (e.g. with the above sequence), it always spontaneously stops spinning after a few seconds. This duration (spinning time) is inversely proportional with the given speed reference (when the given rpm is high, motor spins for shorter period, e.g. 5 seconds for 100Hz reference, but when commanded lower rpm it runs longer, e.g 10 seconds for 10Hz reference, and then stops spontaneously).
In the motor pilot application, we observed that, while the motor is spinning, the power consumption is less then 1W, but when the motor spontaneously stops it uses significantly more power (more than 3W).
2023-08-25 12:31 AM - edited 2023-08-25 12:32 AM
Dear DVulo.1,
Firstly, we would like to sincerely apologize for the delay in replying to your post.
Such behavior as "speed up to high rpm" or "high power consumption" often occurs when there is a miss-alignment between electrical and mechanical (from sensors) position.
At first motor start an alignment is done in order to align electrical position and data coming from the sensor, if for a reason or another both are not aligned anymore (encoder and sensor shafts are not firmly connected, or A,B wires connection issue e.g.), you can face such issue.
Your scenarios explained on point 2, could linked to the fact that your have more or less constraint on shafts connection.
If after reset, the board restarts correctly it means alignment phase was needed.