I’m trying to find an encoder for my odrive. I’ve read that the as5047p encoder is recommend to be used with the odrive controller. But I can’t figure what are the main differences between the ‘p’ and ‘d’ Thanks.
They are fairly similar and available at Digikey in same evaluation board for same price.
You can see the differences in the AMS website.
The P version can handle higher speeds, and has 4096 pulses per revolution in ABI mode (vs 2048 in D), and since that one is the easiest to interface to ODrive, it’s probably the one you want.
https://ams.com/as5047p
https://ams.com/as5047d
I have an AS5047P and using it in ABI mode, although still troubleshooting it so can’t give a clear recommendation until I know more.
Oh thanks for the reply! I’ll buy the encoder as soon as possible. Can’t wait to control my brushless motor with precision!
Good luck! I just got the AS5047P working too.
Important point was to set CPR to 4000, NOT 4096!
I also have a AS5048 board with SPI breakout (and no ABI), which is not supported by the main odrive sodtware branch right now, which is why I ended up with the less accurate option, but it is good enough (note the 5047 also has SPI option amongst others, if you ever need it).
Original issue:
Motor move to position issue
Thanks for the information! Glad you figured it out!
In my case, I need set AS5047P encoder to 2000 CPR in ABI Mode, otherwise the motor turn a few cycles, make noise and stop.
@Zhang-Yong are you sure it is 2000cpr and not 2048?
I don’t think the AS5047p can be configured to have any CPR except for powers of 2, up to 2^14. i.e. 2048, 4096, 8192 or 16384.
If you have the wrong CPR configured, then the ODrive will fail when you try to move the motor more than a few turns, because of wrong commutation.
I tried 2048, it has CPR OUT OF Range Error, while set to 2000 can work. I think AS5047 can set decimal mode and binary mode, in decimal mode, it’s 4000, 2000 , etc CPR . ODrive Firmware may use decimal mode.
You can just change the cpr on the ODrive (axis.encoder.config.cpr)
Eh? But this will not change the encoder CPR, not until ODrive supports bi-directional SPI communication with these encoders, and implements their configuration protocol.
I think the problem here is that some AS5047p devices are arriving pre-configured with different CPR on the ABI output. It can be changed using a tool from AMS that talks to the encoder over SPI.