simplefoc / Arduino-FOC

Arduino FOC for BLDC and Stepper motors - Arduino Based Field Oriented Control Algorithm Library
https://docs.simplefoc.com
MIT License
1.95k stars 511 forks source link

Why does the motor turn left and right twice at the beginning when I call the closed loop program? #310

Closed CJT1111 closed 9 months ago

CJT1111 commented 9 months ago

Hello, why is it that when I call a closed-loop program, the motor rotates two times from side to side at the beginning? Is it calibration? Can you cancel it?

runger1101001 commented 9 months ago

This is the calibration required to find the electrical zero point.

After you have run it once, you can re-use the values found by remembering them and passing them to motor.initFOC(). Please see our documentation for further details.

CJT1111 commented 9 months ago

Thank you for your reply and I wish you all the best.