I have an ODrive3.6 with v0.5.4 connected to a DB59S024035 brushless DC motor, powered using a 6S LiPo and connected to a AMT102-V encoder.
I am running the ‘INPUT_MODE_TUNING’ mode to produce a velocity sinewave to control the motor (not connected to any load, with the encoder firmly attached to the motor shaft).
The first image below shows everything running smoothly as I would expect:
This issue is very repeatable and requires a reboot in order for the motor to move and get back to the control seen in the first image (the control will fail after about 20s again).
To me it seems like an integrator is winding up somewhere and suddenly flipping, but I haven’t been able to find any documentation about any other integrators other than the velocity integrator (of which the gain is set to 0).
After removing these (~22nF) capacitors, the encoder signal appears to be much better (see image in the post below as I’m unable to attach 2 images to a single post).
Furthermore, each encoder signal uses a pull-up to 3.3V, however we were originally powering our encoder with 5V. Therefore we changed our encoder to be powered from 3.3V instead (this may have also helped solve the issue).
Thanks for pointing us in the right direction regarding encoder/position input.
I found the INPUT_MODE_TUNING to be really useful, however it took some time to get up and running due to the lack of documentation.
I think it would be great to add some information about the INPUT_MODE_TUNING in both the Control Modes and the Tuning sections.
Furthermore, in the ODrive.Controller.InputMode section of the API reference, it shows all InputMode commands as ‘UPPERCASE’, whereas the Tuning command is depicted as ‘Sentence case’ (I may be wrong, but I think I could only get the TUNING command to work when it was UPPERCASE).
And finally, in the above screenshots it shows that the sine-wave generation wasn’t perfectly smooth. I don’t know if this was due to my encoder issue, or whether there is an underlying issue with the sinewave generation.