cancel
Showing results for 
Search instead for 
Did you mean: 

STSPIN32G4: No spin with encoder as main sensor

ClyneModa
Associate II

[PN]: STSPIN32G4 (custom board), AMT103 encoder
[VERSION]: MCSDK v6.4.1
[TOOL]: MC WB

[DETAILS]:
I need to implement torque control for my custom board and BLDC motor using a quadrature encoder as the primary feedback sensor.

First, I successfully profiled my motor in sensorless mode using the SDK and incorporated those values into my Workbench project. When using this sensorless configuration outside of the Profiler, I can reliably drive my motor in both torque and speed control modes (using MC_FOC_SDK.qml). At this point I have also configured the encoder as an auxillary sensor, and can see its measured RPM in Motor Pilot match the sensorless RPM feedback. This encoder has an index pin, but I am not using it in my configuration since I do not want to run in Position Control mode.

Now, I have reconfigured my project to use the encoder as the primary sensor and "sensorless" as the auxillary. The result in torque control mode is that the rotor locks into place and resists manual spinning. This resistance increases alongside increased torque reference. If I use the Motor Pilot GUI to switch to sensorless mode, then the motor finally spins up. Switching back again to the encoder will make the motor stop and lock into place. In speed control mode the torque reference will creep up towards the motor's maximum rated current while the rotor remains locked into place.

I believe my problem lies in the encoder's "Start-up parameters", but adjusting the alignment angle or current ramp value does not seem to make a difference. Happy to test again if someone has insight to share here.

Any suggestions on what might be missing (or incorrect) in my configuration?

[EXPECTED BEHAVIOR]: When starting the motor with an encoder as the primary sensor, the motor should spin up in a way comparable to sensorless mode.

[HOW TO REPRODUCE]: The MC Workbench project file is attached to this post.

10 REPLIES 10
ClyneModa
Associate II

Hi @GMA,

To the best of my knowledge, there is no issue with my encoder hardware or its configuration in MCSDK.

Do you have any explicit recommendations for achieving angle alignment and correct field generation? Should I re-evaluate the motor's Rs, Ls, Bemf characteristics (obtained from the Motor Profiler), or focus on tuning Kp/Ki values? Any resources or guides beyond the MCSDK documentation would be greatly appreciated.

This issue is now top priority for my client's project. If there is another path for direct product support from ST apart from this forum, then please let me know.

Thank you,
Clyne