STSPIN32F0A: Low RPM Motor Control Struggles - Page 1
Forum section: electronics / general

author: nmamore
author_rank: Newbie
timestamp: November 21, 2020, 06:17:49 pm
content: Hi! I have been using the STSPIN32F0A for motor control. I am able to control the motor well at speeds > 200RPM but once I drop below 200RPM my motor seriously struggles. I have spent quite a bit of time adjusting PID gains, which has helped to an extent. I need to be able to stably drive the motor at 15 RPM, and the best I have done is probably 100 RPM. I am at a loss as to what I am doing wrong, and I have not had much luck with the ST Community Forums.For further reference I am driving a 3 Phase BLDC with 2 pole pairs. I am using HALL Sensors for position and speed feedback. Thank you!

author: nmamore
author_rank: Newbie
timestamp: November 21, 2020, 06:21:53 pm
content: I forgot a critical part. I am using ST's Motor Control SDK and attempting to use FOC!

author: Doctorandus_P
author_rank: Super Contributor
timestamp: November 21, 2020, 08:05:13 pm
content: For such low RPM there is not enough EMF generated for reliable and accurate feedback, and simple HALL sensors for the phases are also not good enough anymore.So there are 2 options left.First option is to add a high resolution encoder. This can for example be a small magnet with a HALL sensor that measures the direction of that external magnet (AS5600 is an example of such an encoder) Higher resolution optical GRAY encoders also work.The other option is to use no feedback at all, but usemore current then you need to force a magnetic field and hope the rotor follows it. This effectively turns your BLDC motor in a 3-phase stepper motor.This second way does not need extra hardware. If you have simple phase HALL sensors, then you can use these to make a phase difference guesstimation. In this second case you can not go to 90 degree phase difference for FOC, but you need to go to a lower angle, for example 45 degree. This of course lowers efficiency of the motor, but it the motor encounters some unexpected resistance, then that resistance increases the phase angle (to for example 60 degree) and at that angle the motor delivers more torque, so the rotor keeps folowing the magnet field of the stator.If you use full FOC with 90 degre phase angle, then when extra torque increases the angle over 90 degree, the torque that the motor delivers decreases and you loose syncrhonisation between rotor and stator.

author: nmamore
author_rank: Newbie
timestamp: November 21, 2020, 08:44:35 pm
content: I was starting to suspect the Hall Sensors were the limiting factor...How would I go about adding the encoder? Is there a way to convert a hall sensor to an encoder or would I need to start looking at entirely new motors?Would switching to 6-Step be of any help?I greatly appreciate the help.

author: Doctorandus_P
author_rank: Super Contributor
timestamp: November 21, 2020, 09:21:11 pm
content: Some projects that use the HALL direction sensors I mentioned are "ananasstepper" and "mechaduino"Odrive is a BLDC motor controller project with an encoder for improved resolution.They also sell boards, motors, and encoder that fit with the motors:https://odriverobotics.com/If you search on Aliexpress / Ebay / China for:Nema 24 Servoyou will also find BLDC motors with built in encoders."Nema24" is just a start to get the 60mm servo motors, same shops usually also have other sizes.You can also have a look at the BIGTREETECH S42B v1.1This is a small stepper motor with built in HALL encoder, uC (STM32F030C8T6) and Dual H-Bridge (A4950) to drive the motor coils.