New boards first spin - Motor stalls after a few revolutions

I just got my boards and I have my test stand all set up! Turnigy sk3 6374 149Kv…12v battery. Poles set to 7 for 14 magnets. US Digital Encoder with 1024 PPR.

The first few tests went okay. I ran the calibration and was able to command some positions!

Two issues have crept up…

  1. If I command a large position, say hundreds of complete rotations the motor turns over a few times and then locks up.

  2. Once I experience the lockup and I can’t seem to get the controller to do anything useful until I reboot and re-calibrate.

–edit–
I tried velocity control mode and I get similar behavior.

I tested the position control mode further…things seems most stable in this setting. My encoder is 1024 PPR so I have

odrv0.axis0.encoder.config.cpr = 4096

If I command values up to about 9000 counts in either direction everything is fine. But there is a point where the board will lock up and throw some sort of fault. For instance, 10,000 counts to -10,000 counts worked fine but trying to do a 12,000 count jump caused a rotor lockup.

When I get these rotor locks the Hex error code is 0x0

This behaviour is typical for encoder slip. Can you double check that the encoder is physically very securely mounted on the motor shaft?

To verify, when it has locked up: do requested state idle, then run the encoder offset calibration, then back to closed loop again. If that fixes it, it must be encoder slipping.

The encoder disk is physically firmly attached to the rotor shaft. I see no possibility for slip.

Upon first test this morning I noticed slightly different behavior. The motor will start spinning quite well in velocity mode, but after a few seconds it starts to get sluggish and then locks up.

I tried the sequence you mentioned. Typically the result is that the motor will not spin when attempting an encoder offset cal…a few times it has run away wildly in both directions.

You mean after completing a calibration, it will do this when setting state closed loop control, right? Or is this behaviour you describe actually when attempting the offset calibration itself?

Can you try with use_index = False, and pre_calibrated = False, save_configuration(), reboot().

Once the rotor locks up…if I try to go to idle and then do an encoder offset the motor will run away sometimes and sometimes just do nothing.

I will try what you said in a few and get back to you.

I will also try M1.

Both variables you asked about were already set .

This time around the motor ran for a good bit before starting to slow and then eventually locking up.

Is there a temperature safety running or some other safety that’s getting tripped? The motor seems to run for a decent amount of time on the first run after its been sitting for a while.

If you are available now, I can do a teamviewer and voice call session. Find me on the ODrive Discord.

Solved…my encoder was losing counts because of poor physical mounting. :confused: