First Calibration Issue

Hello! I have been just learning how to use the ODrive, reading up on forums and have been running into this problem with calibrating my motor.

Here’s the motor I’m using - X8318S KV100 KV120 Brushless Motor High Power High Loading Motor for Large Hexacopter Octocopter Agricultural Drone HLY W9235|motor for|brushless motormotor brushless motor - AliExpress

Here’s the encoder - AS5047P (digikey)

After I run odrv0.axis0.requested_state = AXIS_STATE_FULL_CALIBRATION_SEQUENCE, the motor only moves one direction then stops. Here are the dump errors:
system: not found
axis0
axis: Error(s):
UNKNOWN ERROR: 0x00000100
motor: no error
sensorless_estimator: no error
encoder: Error(s):
ENCODER_ERROR_CPR_POLEPAIRS_MISMATCH
controller: no error
axis1
axis: no error
motor: no error
sensorless_estimator: no error
encoder: no error
controller: no error

After reading up on this I tried shadow count to make sure my encoder is working and I do get proper values for It. Any clue where to go from here. Thanks for all the help!

Have you set motor.config.pole_pairs properly?

That motor is 20 pole pairs IIRC. Or it might be 21.

What is your value for odrv0.axis0.encoder.config.cpr?
It should be 4x the Pulse Per Revolution (PPR) of your encoder

1 Like

Thanks for the responses! I actually fixed it last night, I had to change the cpr to 4000 then it just worked!

3 Likes