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
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.