Index search does not work correctly with my setup

Hello Community,

perhaps there are experiences and solutions about this topic ?

my setup:

  • Odrive 3.6 hardware with the firmware version 0.4.10.
  • eX8108-105kV motor coupled to the AMT102-V encoder
  • settings like described in the documentation " Encoder with index signal"

my problem:
I try to use the index impulse but after every AXIS_STATE_ENCODER_INDEX_SEARCH cycle the bldc motor does not stop at the “zero position of the index pulse”.
If you take a look to the odrv0.axis0.encoder.shadow_count register you can see the exact “distance of steps” to the index impulse location. The electrical measurement of the “zero index signal” at the connector J4 looked good. Therefore - adding a 10nF capacitor did not result in any improvement . Attached there is a screen shot with some index searches an the monitored encoder shadow register with the distance to the pulse location.

many Thanks for your support !

Well let’s start by updating to firmware 4.11. I don’t recall if that has any changes to index search, but it’s somewhere to start.

Thank you for your advise - but it looks like the same

- how to go on ?

Ok, so to confirm:

odrv0.axis0.motor.pre_calibrated = False
odrv0.axis0.encoder.pre_calibrated = False
odrv0.axis0.encoder.config.use_index = True
odrv0.axis0.requested_state = AXIS_STATE_FULL_CALIBRATION
dump_errors(odrv0)  # Check that there are no errors
odrv0.axis0.motor.pre_calibrated = True
odrv0.axis0.encoder.pre_calibrated = True

odrv0.axis0.requested_state = AXIS_STATE_ENCODER_INDEX_SEARCH
odrv0.axis0.requested_state = AXIS_STATE_CLOSED_LOOP_CONTROL

At the end of this process the odrive should be in closed loop control and sitting at position 0

many thanks for your answer - I tried the given flow but the result looks like before with my setup.

and after reboot

It seems that the correct location of the index impulse is found and can be used correctly by the position setpoint command, but Index_search and calibration cannot stop exactly at this point ?

We never made that guarantee. When you flip it into CLOSED_LOOP_CONTROL mode, it’ll go to the index position (position 0). Try odrv0.axis0.config.startup_encoder_index_search = True and odrv0.axis0.config.startup_closed_loop_control = True if you want it to sorta behave like that.

many thanks for your hints -
I have set the both variables “odrv0.axis0.config.startup_encoder_index_search” and “odrv0.axis0.config.startup_closed_loop_control” to True.
On Power on - now the system starts with a closed loop with the same
behaviour like before - some counts besides of index location -

but with the “odrv0.axis0.controller.pos_setpoint = 0” the correct position can than be
reached by the motor.
When flipping from IDLE into “closed loop” the problem is still the same.

In my application I want to drive two motors with spindle shafts simultaneously.
My main interest is that both motors will do exactly the same rotation all the time - perhaps there are better ways than using the index impulse ?

Hello Wetmelon,

do you habe any idea about my problem ? It looks strange because after calibration the shadow count shows the exact distance to the “index pulse location” but the closed loop state do not move the rotor to the “shadow count = 0 position” ?

But much more important is the question - can Odrive drive two motors synchronously that means that they should do exactly the same rotation/movement all the time ?
(the motors rotate two spindle shaft, that are mechanically coupled and there would be a jam e.g. if the calibration procedure would rotate the motors differentially)
thanks for reply

ODrive makes no guarantees about the position of the spindle shafts during calibration. You’ll need absolute encoders in your situation.

For me it look likes as there is no possibilty to work with the index impulse like discribed - do you intend to make a new software release to fix it (e.g. the last step within the calibration process will do a rotation to shadow count = 0, or something …)