Motor randomly stops producing torque, until ENCODER_OFFSET_CALIBRATION

Hi,
I have another issue with my robot project, this time with the ODrive that controls the wheels:
Randomly and suddenly, a motor gets very weak. It is still rotating and somehow the robot still manages to balance (but barely). But if I very lightly hold the axis still, the current gets to the limit and I feel almost no torque. This only happens to one motor, and the motor gets smacked around a bit, so that might cause this issue.
After this happend, I tried to run AXIS_STATE_ENCODER_INDEX_SEARCH, but the issue remained.
Then I ran AXIS_STATE_ENCODER_OFFSET_CALIBRATION, and that actually fixed the issue.
This tells me that it is not a physical issue, but that there is something going wrong in the firmware, but what? I’m happy to modifiy it to fix this.

ODrive: 3.5 24V
Motor: Turnigy Aerodrive SK3 - 5055-280kv
Encoder: AMT102 with Index
Firmware: 0.5.1

best regards!

Sounds like you either have encoder slippage or electrical issues. Both can cause the encoder to slowly “misalign” with the original calibration, which reduces the torque. And then when you calibrate again, it fixes the problem.

It’s also possible to get the encoder cpr just slightly wrong and it’ll get “off” over time.

Thanks! It was encoder slippage.
I kind of disregarded that at first because the adapter shaft cannot slip off the encoder. But of course the sleeve with the adapter shaft can slip off the motor axis, which seemed to have happened here. It also explains why the index search didn’t help.
I now put some superglue between the motor axis and the sleeve, and the friction between those seems to be much higher now. Hopefully it will hold.

1 Like