Getting rid of feelable steps in stepper motor


Im trying to make a haptic dial control based on simplefoc and a stepper motor.
Currently I am able to implement feelable clicks at certain degree intervals, I really like simplefoc for this :slight_smile:

My main problem that is remaining is that you can feel clicks every 1.8 degree (for every step of the motor) Is there a way to get rid of this with the foc algorithm and make the rotation super smooth?


May I ask why not use a BLDC rather than a stepper?

I had steppers on hand and like their torque.
I tried bldc a while ago and didn’t get the same performance as I’m getting with the stepper now. Also remember bldc having the same feelable clicks issue as the stepper.

I think ODrive has cogging compensation and is open source, so you could check how they did it. My guess would be to slowly rotate the motor and each time the encoder position changes, record the direction of the current vector being fed to the coils. Then during normal operation, plug your desired rotor angle into that lookup table to get the current vector that will produce it.

You may also need to do torque ripple compensation though. i.e. increase current when farther from full step positions, and decrease current when close to full steps. I’m not sure how to go about generating the lookup table for that. And you’d want to do it first, and then generate the current vector table with torque ripple compensation applied incase the different current magnitude causes the rotor to pull one way or the other from the full step position.

ATmega328 doesn’t have enough RAM for such lookup tables, so you’ll need a better microprocessor.

Hey @Luca,

What mcu, driver and sensor are you using?

Should have mentioned that!

I am using a Teensy 4.0 with a LM298N driver board and a AMT102
Going to replace the AMT102 with a as548a tomorrow.

This MCU and driver are for test purposes. I will be switching both out for smaller alternatives when making the PCB.

I tried replacing the as5048 but ended up going back to the AMT102 because it’s much less noisy in it’s output than the AS5048.

Im still trying to rid these feelable clicks.

1 Like

Please let us know if you find a solution