I am trying to setup the spindle for my Shapeoko CNC to use an ODrive. The Spindle is a Makita BLDC trim router. The motor is 1500kV with 2 pole pairs. It has a hall sensor. I used 12 gauge wire for the 3 phases. They are twisted together to reduce the EMI. The hall sensor wires are run through Cat7 wire. They are double shielded and the A, B, and C wires are twisted around ground. The shielding is also tied to ground on the ODrive end. I have checked continuity on the hall wires and they all are reading good. Both the 3 Phase wires and the wires for the hall are about 8 feet long. The hall sensor wires coming from the motor are Blue, Yellow, and White so it is possible I have them hooked up wrong. Also when I measure the voltage at the ODrive on the A, B, Z pins they are reading either 0 or 3.2V. When I read the voltages on those lines at the motor they are about 4.6V. Not sure if that would be an issue.
I have followed the Getting Started doc and the Hoverboard doc. When I get up to the point where I am supposed to run this command:
odrv0.axis0.requested_state = AXIS_STATE_ENCODER_OFFSET_CALIBRATION
the motor wiggles the shaft back and forth about 1/16th of a turn then stops. When I check the encoder it gives:
error = 0x0004 (int)
From what I can tell it is supposed make at least a full revolution. Here are my controller, motor, and encoder configs:
In : odrv0.axis0.controller Out: pos_setpoint = 0.0 (float) set_pos_setpoint(pos_setpoint: float, vel_feed_forward: float, current_feed_forward: float) vel_ramp_target = 0.0 (float) vel_ramp_enable = False (bool) config: vel_integrator_gain = 0.10000000149011612 (float) vel_ramp_rate = 10000.0 (float) control_mode = 2 (int) pos_gain = 1.0 (float) vel_gain = 0.019999999552965164 (float) vel_limit_tolerance = 1.2000000476837158 (float) setpoints_in_cpr = False (bool) vel_limit = 1000.0 (float) current_setpoint = 0.0 (float) move_incremental(displacement: float, from_goal_point: bool) move_to_pos(pos_setpoint: float) set_vel_setpoint(vel_setpoint: float, current_feed_forward: float) set_current_setpoint(current_setpoint: float) error = 0x0000 (int) vel_setpoint = 0.0 (float) start_anticogging_calibration() vel_integrator_current = 0.0 (float) In : odrv0.axis0.motor Out: armed_state = 0 (int) error = 0x0000 (int) phase_current_rev_gain = 0.02500000037252903 (float) thermal_current_lim = 45.572303771972656 (float) current_meas_phB = -0.024804890155792236 (float) current_meas_phC = 0.08902627229690552 (float) get_inverter_temp() config: calibration_current = 10.0 (float) inverter_temp_limit_lower = 100.0 (float) current_lim = 10.0 (float) requested_current_range = 60.0 (float) phase_resistance = 0.037017758935689926 (float) current_lim_tolerance = 1.25 (float) resistance_calib_max_voltage = 2.0 (float) motor_type = 0 (int) pole_pairs = 2 (int) pre_calibrated = False (bool) inverter_temp_limit_upper = 120.0 (float) direction = 0 (int) phase_inductance = 8.348929441126529e-06 (float) current_control_bandwidth = 1000.0 (float) DC_calib_phB = -0.7407018542289734 (float) is_calibrated = True (bool) timing_log: TIMING_LOG_ADC_CB_I = 2710 (int) TIMING_LOG_FOC_VOLTAGE = 6854 (int) TIMING_LOG_ENC_CALIB = 6910 (int) TIMING_LOG_FOC_CURRENT = 0 (int) TIMING_LOG_MEAS_L = 6570 (int) TIMING_LOG_IDX_SEARCH = 0 (int) TIMING_LOG_MEAS_R = 6566 (int) TIMING_LOG_GENERAL = 0 (int) TIMING_LOG_ADC_CB_DC = 12858 (int) DC_calib_phC = -0.4513227343559265 (float) gate_driver: drv_fault = 0 (int) current_control: final_v_beta = 0.0 (float) v_current_control_integral_d = 0.0 (float) I_measured_report_filter_k = 1.0 (float) i_gain = 37.01776123046875 (float) max_allowed_current = 60.75 (float) final_v_alpha = 0.0 (float) Ibus = 0.0 (float) Iq_measured = 0.0 (float) v_current_control_integral_q = 0.0 (float) Iq_setpoint = 0.0 (float) overcurrent_trip_level = 67.5 (float) Id_measured = 0.0 (float) p_gain = 0.008348929695785046 (float) In : odrv0.axis0.encoder Out: count_in_cpr = 3 (int) interpolation = 0.5 (float) error = 0x0004 (int) hall_state = 6 (int) config: zero_count_on_find_idx = True (bool) offset_float = 0.0 (float) cpr = 12 (int) calib_scan_distance = 50.26548385620117 (float) calib_range = 0.019999999552965164 (float) ignore_illegal_hall_state = False (bool) find_idx_on_lockin_only = False (bool) calib_scan_omega = 12.566370964050293 (float) pre_calibrated = False (bool) bandwidth = 100.0 (float) use_index = False (bool) offset = 0 (int) enable_phase_interpolation = True (bool) mode = 1 (int) idx_search_unidirectional = False (bool) pos_estimate = 3.975128173828125 (float) pos_cpr = 3.975128173828125 (float) index_found = False (bool) set_linear_count(count: int) phase = -2.6179938316345215 (float) is_ready = False (bool) calib_scan_response = 0.0 (float) vel_estimate = 0.0 (float) shadow_count = 3 (int)
Any help getting this working is greatly appreciated.