Add uniform resistance when rotating by hand


I’m working on a motorized knob using a brushless DC motor and simpleFOC in closed loop position/angle mode. I’m just wondering if anyone has any suggestions on a potential way one might be able to use simpleFOC to add a slight resistance when rotating the knob to give it a “beefier” feel?


I have never done haptics, but I imagine you could apply torque with sign opposite to the sign of the velocity, so like a brake.
You would apply the torque only above a certain threshold velocity so that it’s not happening at 0 velocity, or even a torque proportional to the velocity so that it zeroes when not moving.

Please search for “haptics” in this forum. You might also consider joining our discord server (link is in header) and checking out the #haptics channel.

  • what you want is definately possible
  • it might be as simple as setting zero velocity as the target in velocity mode. This will cause the motor to oppose any motion
  • but there are many more ideas that people have discussed and implemented, and there is some code you could look at or use that might be helpful
1 Like

OK so I reinvented Proportional velocity control with 0 target :joy:

1 Like

Here’s a recent thread on the topic Explain like I'm 5: torque control


you should check out some of the videos @schoch did a few years ago:
He did some really clever stuff with jogs and virtual detents

1 Like

Maybe the easiest would be to just short motor phases (passive brake) when resistance is needed.

My guess on what is best to try…

So you would at each “detent position” maybe at every 10 or so degrees, apply torque in the direction of movement for a couple milliseconds then reverse this and apply torque the other way for a few milliseconds.

In addition you might want to simulat friction. THis is a slight toque that is opposite the diretion of movement and proportionate to rotational velocity.

1 Like