Trying to close the velocity loop sensorless

The only one with persistent state is I, and it should decay to 0 when the motor is stopped (or any other time the velocity remains steadily equal to the target), but it’s not instantaneous. D only remembers one frame worth of history, so it is effectively reset on the next update.

I’ve never seen I cause reverse spinning behavior, but it’s probably too difficult to try and debug exactly what’s going on.

Do the VRR sensors give an analog output, or only on/off? Digital halls aren’t accurate enough for something like a record player, but analog might work. The LinearHall class is designed for two sensors spaced 90 degrees, but can easily be hacked to work with 120 degree spacing.

Another possibility is to simply use open loop. It sounds like your motor is pretty coggy, but you could check with Anthony what kind of steppers he was using here Baffling but extremely convenient phenomena that allows stepper motors to be used in e.g. fans easily

My NEMA23 steppers are pretty noisy, so apparently not just any stepper will work, same as with BLDC motors. Finding a motor that’s naturally smooth is probably a better path to success than trying to improve the control loop. Record players are among the most demanding applications for motor smoothness, due to the extreme sensitivity of human ears.

1 Like