Motor never stops spinning at startup

Hi all,

I am new to Odrive. Got my board hooked up. Can connect to it through the USB/Python interface.
After reboot, the motor beeps then starts spinning slowly. This never stops.
I am using a fairly big motor (like the one used in OpenTorque) with an AS5047 encoder.
Encoder signals seem to look ok on the scope.
When i changed to the other channel the thing happens.
I did not change any of the settings.
Any idea what am i missing?

Thanks,
Eddy

Try odrv0.erase_configuration() then try again? Because that sounds like it can’t find the index pin, which should be disabled by default.

Thanks Wetmelon. This got me a step further but i now have a different problem:
I keep getting the ERROR_CPR_OUT_OF_RANGE error.
I counted the number of magnets to be 40 and programmed 20 pole pairs.
I am using a AS5047 encoder. I am confused about the CPR value of this. According to your encoder overview the number of counts per rev for the AS5047 is 16384. I have also seen other people set the cpr to 4000. I tried 16384, 4000 and 4096 and all of them give me error #2 for the encoder.
ANy ideas?

Thanks,
Eddy

AFAIK PPR is programmable and can also can be set to 500, 400, 300, 200, 100, 50, 25, 8, 512, 256

You can also change the bandwidth on the CPR, try increasing it (and rebooting) until the error stops occuring. That should give you a good indication of what the correct value for CPR is.

I don’t think the encoder guide is correct. According to the datasheet, the AS5047P supports 4096 steps/rev, or 512 pulses per rev. So you want to use encoder.config.cpr = 4096, unless you’ve reprogrammed the chip to something else.