What am I doing wrong or what is wrong with my ODrive?

Hi,

I keep hitting the same error whatever I do (resolder the encoder, use M0, use M1, reboot, use other motor, …), who knows what to do?

Here is a video off my test:

Thanks in advance for the help

Cheers

Carelsbergh Stijn

Please list the Motor and Encoder error you are seeing. This makes it easier to understand what might be going wrong.

The definitions of each error are in the code (copied from https://docs.odriverobotics.com/troubleshooting)

  • Axis error flags defined here.
  • Motor error flags defined here.
  • Encoder error flags defined here.
  • Sensorless estimator error flags defined here.

Hi

I’m using a keda 63-64 motor, with an encoder from AliExpress. https://s.click.aliexpress.com/e/GjLQOBm
The problem is that the error code 0x101 is not the the troubleshooting guide :confused:

Cheers

Carelsbergh Stijn

What are the other errors? Or are they 0x00?

odrv0.axis1.motor.error
odrv0.axis1.encoder.error

Hi,

Encoder error 0x2

Cheers

Carelsbergh Stijn

I’m not sure which encoder error you have, but one of these two:

ERROR_CPR_OUT_OF_RANGE = 0x02
ERROR_INDEX_NOT_FOUND_YET = 0x20,

For the CPR error, try changing the calibration range for the encoder (and after you find the accepted range, change the CPR value to what it should be). odrv0.axis0.encoder.config.calib_range and odrv0.axis0.encoder.config.cpr .

For the index_not_found error; are you sure your encoder has an index and that the Z-wire is connected properly? Can you confirm this with a multimeter? You can also try setting odrv0.axis0.encoder.config.use_index to false.

Hi,

My encoder doesn’t have an index so I have to set it to false do I have to use this command?

odrv0.axis0.encoder.config.use_index = false

Cheers

Carelsbergh Stijn

Yes. Do not forget to save your configuration and reboot before continuing. After rebooting always confirm that the settings you changed were saved.

odrv0.axis0.encoder.config.use_index = false
odrv0.save_configuration()
odrv0.reboot()
odrv0 = odrive.find_any()
odrv0.axis0.encoder.config.use_index

Hi

Thanks a lot I will try it later today

Cheers

Carelsbergh Stijn

Hi,

I checked and the index was already set to false, so I guess it is the other problem, what do I have to do too solve this? (Cpr out of range)

Cheers

Carelsbergh Stijn

You need to check your motor pole pair setting and your encoder cpr setting.

Hi

I’ve done that and it seems like evertthing is correct. What can I do? Maybe the seller told me a wrong cpr?

Cheers

Carelsbergh Stijn

Hi Stjn,

I checked the correct cpr with the command : odrv0.axis1.encoder.shadow_count (its somewhere here in the Odrive documentation, but cant find it anymore)

If I remember correctly the procedure was like this:

  1. read the position of the Encoder (I forgot the exact command)
  2. Than write the command: odrv0.axis1.encoder.shadow_count
  3. Than turn the Motor 1 turn by Hand
  4. And finally you have to read the Position of the Encoder again. The difference should show you the cpr….
    (hope I remember correctly

Regarding the pole pairs: we both have the same motors and they have 7 pole pairs

regards Peter

Hi,

Thanks for the advice

Cheers

Carelsbergh Stijn