hi,
i changed the pwm pins to 3,5,6 and the result is better
The setup() function of the code is executed smoothly, that is, the driver is able to find the motor direction and motor zero electrical angle.
However, when the program enters the loop(), the motors start shaking although the target velocity is zero intially.
When changing the target velocity, the motor is spinning in the right direction, with the right amount of velocity but it is not smooth at all : there is a lot of shaking
Any idea of where this can come from ?
the loop function is only composed of the three lines of the example sketch…
one more interesting thing :
as suggested in different post on this forum, I tried the torque control mode and indeed the torque control is working very well in closed loop !! Position and Velocity control are not working in closed loop.
So I don’t get where this problem come from…
because if the openLoop, initFOC and torque control are working, my sensor should be reliable and the wiring should be right.