I use Odrive v3.6 with T-motor(U8 Pro) and encoder(AS5047D).
But when I run odrv0.axis0.requested_state = AXIS_STATE_FULL_CALIBRATION_SEQUENCE
The motor just ran in one direction and stopped. Then I got the error: ERROR_CPR_OUT_OF_RANGE
But from AS5047D datasheet, I believe CPR is 2000.
Then I did encoder test with command: shadow_count
The value could change, so I think the encoder is Ok.
Can someone help me with it ?
Reboot your odrive so shadow_count is = 0 (or nearly). Spin the motor around one time. Check shadow_count again. What value do you get?
It is 1991, so I think it should be 2000 CPR
Ok, then it’s most likely an issue with the pole_pairs setting. Do you know how many pole_pairs that motor has?
The motor looks like this:
So I believe the pole_pairs is 18.
According to this image, it’s a
36N42P motor so it would be 21 pole pairs, not 18.
Thank you for your correction. Unfortunately, it still just ran in one direction and stopped. And sometimes when running AXIS_STATE_FULL_CALIBRATION_SEQUENCE, the motor didn’t move. Do you know why?
When the case that the motor didn’t run, the error is : axis:ERROR_CURRENT_MEASUREMENT_TIMEOUT
And there is no error about encoder.
It works ! Thank you very much! I forget to change CPR.