Unable to find encoder index signal on d5065 motor

I have d5065 bldc motor with AMT102-V CUI encoder. The oDrive firmware is 0.5.1 version.
The encoder A/B/Z signal shape is OK, checked with oscilloscope. The encoder shadow counting works, when I turn the motor one rotation the shadow counter goes up/down 8192 counts.

When requesting the encoder index search state at startup the motor turns 14 full rotation and a little bit more and no error message at all. The encoder “is_ready” value is False. After that if I issue a full calibration request, then again the motor turns 14 rotation and there is error message: “ENCODER_ERROR_INDEX_NOT_FOUND_YET”

Below are the parameters and the output:
vbus_voltage = 24.7218017578125 (float)
hw_version_major = 3 (int)
hw_version_minor = 5 (int)
hw_version_variant = 48 (int)
fw_version_major = 0 (int)
fw_version_minor = 5 (int)
fw_version_revision = 1 (int)
fw_version_unreleased = 1 (int)
brake_resistor_armed = True (bool)
brake_resistor_saturated = False (bool)

config:

  • max_regen_current = 20.0 (float)*
  • brake_resistance = 0.0 (float)*
  • dc_bus_undervoltage_trip_level = 8.0 (float)*
  • dc_bus_overvoltage_trip_level = 51.36000061035156 (float)*
  • enable_dc_bus_overvoltage_ramp = False (bool)*
  • dc_bus_overvoltage_ramp_start = 51.36000061035156 (float)*
  • dc_bus_overvoltage_ramp_end = 51.36000061035156 (float)*
  • dc_max_positive_current = inf (float)*
  • dc_max_negative_current = -15.0 (float)*

In [31]: odrv0.axis0
*Out[31]: *
error = 0x0000 (int)
step_dir_active = False (bool)
current_state = 1 (int)
requested_state = 0 (int)
loop_counter = 514088 (int)
lockin_state = 0 (int)
is_homed = False (bool)
config:

  • startup_motor_calibration = False (bool)*
  • startup_encoder_index_search = True (bool)*
  • startup_encoder_offset_calibration = False (bool)*
  • startup_closed_loop_control = False (bool)*
  • startup_sensorless_control = False (bool)*
  • startup_homing = False (bool)*
  • enable_step_dir = False (bool)*
  • step_dir_always_on = False (bool)*
  • turns_per_step = 0.0009765625 (float)*

motor:

  • error = 0x0000 (int)*
  • armed_state = 0 (int)*
  • is_calibrated = True (bool)*
  • current_meas_phB = 0.02364182472229004 (float)*
  • current_meas_phC = 0.25838470458984375 (float)*
  • DC_calib_phB = -1.9168952703475952 (float)*
  • DC_calib_phC = -2.3932361602783203 (float)*
  • phase_current_rev_gain = 0.02500000037252903 (float)*
  • effective_current_lim = 10.0 (float)*

encoder:

  • error = 0x0000 (int)*
  • is_ready = False (bool)*
  • index_found = False (bool)*
  • shadow_count = -116937 (int)*
  • count_in_cpr = 5943 (int)*
  • interpolation = 0.5 (float)*
  • phase = -1.3541343212127686 (float)*
  • pos_estimate = -14.274444580078125 (float)*
  • pos_estimate_counts = -116936.25 (float)*
  • pos_cpr = 0.725555419921875 (float)*
  • pos_cpr_counts = 5943.75 (float)*
  • pos_circular = 0.725555419921875 (float)*
  • hall_state = 2 (int)*
  • vel_estimate = 0.0 (float)*
  • vel_estimate_counts = 0.0 (float)*
  • calib_scan_response = 0.0 (float)*
  • pos_abs = 0 (int)*
  • spi_error_rate = 0.0 (float)*
  • config: …*
  • set_linear_count(count: int)*
    sensorless_estimator:
  • error = 0x0000 (int)*
  • phase = 1.1790425777435303 (float)*
  • pll_pos = 1.1812183856964111 (float)*
  • vel_estimate = 0.010000092908740044 (float)*

In [32]: odrv0.axis0.motor
*Out[32]: *
error = 0x0000 (int)
armed_state = 0 (int)
is_calibrated = True (bool)
current_meas_phB = 0.1407015323638916 (float)
current_meas_phC = -0.05837512016296387 (float)
DC_calib_phB = -1.9132405519485474 (float)
DC_calib_phC = -2.3986690044403076 (float)
phase_current_rev_gain = 0.02500000037252903 (float)
effective_current_lim = 10.0 (float)
current_control:

  • p_gain = 0.01363507192581892 (float)*
  • i_gain = 47.38605880737305 (float)*
  • v_current_control_integral_d = -0.029422428458929062 (float)*
  • v_current_control_integral_q = -0.5050048232078552 (float)*
  • Ibus = 0.32411035895347595 (float)*
  • final_v_alpha = 0.18637003004550934 (float)*
  • final_v_beta = -0.4721737802028656 (float)*
  • Id_setpoint = 0.0 (float)*
  • Iq_setpoint = -10.0 (float)*
  • Iq_measured = -9.767295837402344 (float)*
  • Id_measured = -0.04731021076440811 (float)*
  • I_measured_report_filter_k = 1.0 (float)*
  • max_allowed_current = 60.75 (float)*
  • overcurrent_trip_level = 67.5 (float)*

config:

  • pre_calibrated = True (bool)*
  • pole_pairs = 7 (int)*
  • calibration_current = 10.0 (float)*
  • resistance_calib_max_voltage = 3.0 (float)*
  • phase_inductance = 1.3635071809403598e-05 (float)*
  • phase_resistance = 0.047386057674884796 (float)*
  • torque_constant = 0.030629629269242287 (float)*
  • direction = -1 (int)*
  • motor_type = 0 (int)*
  • current_lim = 10.0 (float)*
  • current_lim_margin = 16.0 (float)*
  • torque_lim = inf (float)*
  • inverter_temp_limit_lower = 100.0 (float)*
  • inverter_temp_limit_upper = 120.0 (float)*
  • requested_current_range = 60.0 (float)*
  • current_control_bandwidth = 1000.0 (float)*

In [33]: odrv0.axis0.encoder
*Out[33]: *
error = 0x0000 (int)
is_ready = False (bool)
index_found = False (bool)
shadow_count = -116937 (int)
count_in_cpr = 5943 (int)
interpolation = 0.5 (float)
phase = -1.3541343212127686 (float)
pos_estimate = -14.274444580078125 (float)
pos_estimate_counts = -116936.25 (float)
pos_cpr = 0.725555419921875 (float)
pos_cpr_counts = 5943.75 (float)
pos_circular = 0.725555419921875 (float)
hall_state = 2 (int)
vel_estimate = 0.0 (float)
vel_estimate_counts = 0.0 (float)
calib_scan_response = 0.0 (float)
pos_abs = 0 (int)
spi_error_rate = 0.0 (float)
config:

  • mode = 0 (int)*
  • use_index = True (bool)*
  • find_idx_on_lockin_only = False (bool)*
  • abs_spi_cs_gpio_pin = 1 (int)*
  • zero_count_on_find_idx = True (bool)*
  • cpr = 8192 (int)*
  • offset = 3854 (int)*
  • pre_calibrated = False (bool)*
  • offset_float = 1.1452500820159912 (float)*
  • enable_phase_interpolation = True (bool)*
  • bandwidth = 1000.0 (float)*
  • calib_range = 0.05000000074505806 (float)*
  • calib_scan_distance = 50.26548385620117 (float)*
  • calib_scan_omega = 12.566370964050293 (float)*
  • idx_search_unidirectional = False (bool)*
  • ignore_illegal_hall_state = False (bool)*
  • sincos_gpio_pin_sin = 3 (int)*
  • sincos_gpio_pin_cos = 4 (int)*
    set_linear_count(count: int)

In [36]: odrv0.axis0.requested_state = AXIS_STATE_FULL_CALIBRATION_SEQUENCE

In [37]: dump_errors(odrv0)
axis0

  • axis: Error(s):*
  • AXIS_ERROR_ENCODER_FAILED*
  • motor: no error*
  • fet_thermistor: no error*
  • motor_thermistor: no error*
  • encoder: Error(s):*
  • ENCODER_ERROR_INDEX_NOT_FOUND_YET*
  • controller: no error*

I also checked the index signal on oscilloscope, there is one square shape per rotation. No big noise visible on encoder signals.
Could you please help me, what I am doing wrong?

Have you read through the documentation? You’ve skipped a step. Encoders | ODrive

Thank you very much for the answer, I’ll go through the documentation again and check my settings.

I went through that with the same error (though the URL seems to be different now)

Is there anywhere to set it to an AB encoder, specifically not ABI?