# Getting rid of feelable steps in stepper motor

**URL:** <https://community.simplefoc.com/t/getting-rid-of-feelable-steps-in-stepper-motor/2057>\
**Category:** applications\
**Created:** [May 18, 2022, 6:51pm UTC](https://community.simplefoc.com/t/getting-rid-of-feelable-steps-in-stepper-motor/2057 "2022-05-18T18:51:02Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Luca](https://community.simplefoc.com/letter_avatar_proxy/v4/letter/l/51bf81/32.png) [@Luca](https://community.simplefoc.com/u/Luca)\
**Post date:** [May 18, 2022, 6:51pm UTC](https://community.simplefoc.com/t/getting-rid-of-feelable-steps-in-stepper-motor/2057/1 "2022-05-18T18:51:02Z")

</div>

Hi,

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 🙂

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?

Thanks!

---

<div class="post-metadata">

**Author:** ![runger](https://community.simplefoc.com/user_avatar/community.simplefoc.com/runger/32/395_2.png) [@runger](https://community.simplefoc.com/u/runger)\
**Post date:** [May 18, 2022, 7:55pm UTC](https://community.simplefoc.com/t/getting-rid-of-feelable-steps-in-stepper-motor/2057/2 "2022-05-18T19:55:13Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Luca](https://community.simplefoc.com/letter_avatar_proxy/v4/letter/l/51bf81/32.png) [@Luca](https://community.simplefoc.com/u/Luca)\
**Post date:** [May 18, 2022, 8:08pm UTC](https://community.simplefoc.com/t/getting-rid-of-feelable-steps-in-stepper-motor/2057/3 "2022-05-18T20:08:34Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![dekutree64](https://community.simplefoc.com/user_avatar/community.simplefoc.com/dekutree64/32/3398_2.png) [@dekutree64](https://community.simplefoc.com/u/dekutree64)\
**Post date:** [May 18, 2022, 9:13pm UTC](https://community.simplefoc.com/t/getting-rid-of-feelable-steps-in-stepper-motor/2057/4 "2022-05-18T21:13:19Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Antun\_Skuric](https://community.simplefoc.com/user_avatar/community.simplefoc.com/antun_skuric/32/21_2.png) [@Antun\_Skuric](https://community.simplefoc.com/u/Antun_Skuric)\
**Post date:** [May 19, 2022, 10:57am UTC](https://community.simplefoc.com/t/getting-rid-of-feelable-steps-in-stepper-motor/2057/5 "2022-05-19T10:57:28Z")

</div>

Hey @Luca,

What mcu, driver and sensor are you using?

---

<div class="post-metadata">

**Author:** ![Luca](https://community.simplefoc.com/letter_avatar_proxy/v4/letter/l/51bf81/32.png) [@Luca](https://community.simplefoc.com/u/Luca)\
**Post date:** [May 19, 2022, 12:08pm UTC](https://community.simplefoc.com/t/getting-rid-of-feelable-steps-in-stepper-motor/2057/6 "2022-05-19T12:08:18Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Luca](https://community.simplefoc.com/letter_avatar_proxy/v4/letter/l/51bf81/32.png) [@Luca](https://community.simplefoc.com/u/Luca)\
**Post date:** [June 10, 2022, 12:29pm UTC](https://community.simplefoc.com/t/getting-rid-of-feelable-steps-in-stepper-motor/2057/7 "2022-06-10T12:29:10Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![aokholm](https://community.simplefoc.com/user_avatar/community.simplefoc.com/aokholm/32/2439_2.png) [@aokholm](https://community.simplefoc.com/u/aokholm)\
**Post date:** [June 13, 2022, 7:50pm UTC](https://community.simplefoc.com/t/getting-rid-of-feelable-steps-in-stepper-motor/2057/8 "2022-06-13T19:50:01Z")

</div>

Please let us know if you find a solution
