Motor stops after 10s free spin in torque mode

Hi all,

I’m running into a repeated issue while using torque control. When I put the motor in torque control mode and allow it to free spin w/o an external load, it stops spinning after ~10s with default config limits in place and input_torque = 0.2. If I reverse the sign of the torque, I get 10s in the other direction, and if I double the default vel_limit, it runs for only half the time (5s). This process seems very repeatable based on my debugging steps.

I’ve read through the documentation, but don’t see any mention of a config parameter that would cause this behavior. For reference, I’m using the D6374 motor with the AMT102 encoder, and during these debugging steps, I switched to just using the odrivetool. I can give more details if that would be useful.

Any help would be appreciated. :slight_smile:


What do you get from the dump_errors(odrv0) command?

dump_errors(odrv0) shows no errors.

Is it still drawing current from the power supply when it stops? It could have lost commutation due to noise/slippage of the encoder.

The motor does resist motion if I try to manually turn the shaft in the opposite direction. Additionally, if I try to manually “help it”, it will turn approx. 30deg by itself before stopping again. And then, as mentioned, I can reverse the torque and drive it back the other way.

Hopefully that answers your question. I have a multimeter I can wire in series to check it if that’s necessary.

Yes, it sounds like it has lost commutation.
Is the encoder.config.cpr set to exactly 8192? If it were set to 8193, you would see this issue.

Also, it could be missing encoder pulses due to noise (try reducing your power supply voltage to see if the problem goes away - if it does then it’s caused by noise, try one of the ferrite rings from the shop)
It could also be going out of calibration because of the encoder slipping on the shaft - make sure it is tight. Which shaft adapter did you use with the AMT102?

1 Like

Checked: encoder.config.cpr = 8192

PSU is at 24V. It’s a MeanWell, so I can’t reduce voltage in the bench power supply sense. I do have one of the ferrite rings installed now with the wires braided.

I am running the full calibration step before each run while I am debugging (just an FYI).

I will double check the encoder mounting later today and report back. I am fairly sure it is tight because I can see the encoder spinning when the motor spins, but maybe I am missing something there. I believe I used the black one (followed the guide). Will report back later day on the encoder check.

you could also use a tiny blob of thread locking compound or superglue between the shaft and the collet.

Ok, the encoder is definitely not slipping on the shaft. (Also, I used the 8mm adapter (blue).)

Maybe adding a capacitor to the encoder cable would help (as suggested elsewhere on the forum when dealing with encoder issues)? I’ve got some shipping overnight, so I’ll report back on that tomorrow. Thanks for your help so far @towen.

Are you positive that you’re in torque mode? What does controller.config.control_mode return?

controller.config.control_mode returns 1

For reference, after a reboot, command sequence in odrivetool is:

odrv0.axis0.requested_state = AXIS_STATE_FULL_CALIBRATION
odrv0.axis0.requested_state = AXIS_STATE_CLOSED_LOOP_CONTROL
axis.controller.config.control_mode = CONTROL_MODE_TORQUE_CONTROL
axis.controller.input_torque = 0.2

Adding the capacitor to the index wire on the encoder cable did not solve the issue. :frowning:

Any ideas on what other steps I could do to nail down or solve the problem?

So I’ve done more testing to try to figure out the issue. I’m now noticing that the motor doesn’t respond to any commands after the calibration has completed, but the motor shaft strongly resists motion in either direction. (This occurred immediately following ~5 trials with the symptoms mentioned above.) Still no errors showing up at any point.

Any thoughts?

This is a common symptom of EMI issues causing a loss of communication with the board. Ferrite ring time! Ferrite Ring ESD-R-28C-1 — ODrive

And i assume you have a load on the motor, right? You’re not in torque mode with no load?

I already have a ferrite ring installed, and that did solve my initial connection issues (not mentioned in this post).

I will have a load connected, but I do not have a load connected while I’m debugging right now.

In that case you can’t use torque mode it’ll basically just spin up to high speeds and fail… You need a load for that

Hmmm I thought that was the purpose of the vel_limit in ODrive? Because it doesn’t spin out to high speeds when I do it. It just hits that velocity limit if I don’t have a load on it.

Also, I tested the original issue described above, and it happens in vel control as well.