Hello everyone,
I’m using:
FL80BLS120 motor (48V, 1400RPM, 8 poles, sensored),
FL80BLS120 motor (48V, 2040RPM, 8 poles, sensored),
Odrive V3.6 (56 Voltage version).
I configured both axis# the same way.
For some reason axis0 works as expected while axis1 doesn’t.
I tried switching motors with axis#, tried to switch Drive, and tried to change parameters.
It seems like the problem is not the motor, but the configuration, but I can’t find the problem.
I opened the GUI to see what really happens and here is what I found:
- When Homing it spins much faster than it is configured to and takes a long time to go to offset after clicking the limit switch (end stop switch).
- After homing I see its start position/offset is -300 although it is set to -10.
- When I tell it to spin 1 turn it spins infinitely until I press the end stop switch or change its state to IDLE
- When I print position to the terminal after setting position it shows what I set it to and not what it shows on the GUI and really doing.
here is the JSON:
{
"axis0":{
"config":{
"can_heartbeat_rate_ms":100,
"can_node_id_extended":false,
"can_node_id":0,
"dir_gpio_pin":2,
"enable_step_dir":false,
"enable_watchdog":false,
"startup_closed_loop_control":false,
"startup_encoder_index_search":false,
"startup_encoder_offset_calibration":false,
"startup_homing":true,
"startup_motor_calibration":false,
"startup_sensorless_control":false,
"step_dir_always_on":false,
"step_gpio_pin":1,
"turns_per_step":0.0009765625,
"watchdog_timeout":0.0,
"calibration_lockin":{
"accel":20.0,
"current":10.0,
"ramp_distance":3.1415927410125732,
"ramp_time":0.4000000059604645,
"vel":40.0
},
"general_lockin":{
"accel":200.0,
"current":20.0,
"finish_distance":100.0,
"finish_on_distance":false,
"finish_on_enc_idx":false,
"finish_on_vel":false,
"ramp_distance":3.1415927410125732,
"ramp_time":0.4000000059604645,
"vel":40.0
},
"sensorless_ramp":{
"accel":200.0,
"current":10.0,
"finish_distance":100.0,
"finish_on_distance":false,
"finish_on_enc_idx":false,
"finish_on_vel":true,
"ramp_distance":3.1415927410125732,
"ramp_time":0.4000000059604645,
"vel":400.0
}
},
"controller":{
"config":{
"axis_to_mirror":255,
"circular_setpoint_range":1.0,
"circular_setpoints":false,
"control_mode":3,
"enable_current_mode_vel_limit":true,
"enable_gain_scheduling":false,
"enable_overspeed_error":true,
"enable_vel_limit":true,
"gain_scheduling_width":10.0,
"homing_speed":10.0,
"inertia":0.0,
"input_filter_bandwidth":2.0,
"input_mode":1,
"load_encoder_axis":0,
"mirror_ratio":1.0,
"pos_gain":1.0,
"torque_ramp_rate":0.009999999776482582,
"vel_gain":0.24810001254081726,
"vel_integrator_gain":1.2405000925064087,
"vel_limit":2000.0,
"vel_limit_tolerance":1.2000000476837158,
"vel_ramp_rate":1.0,
"anticogging":{
"anticogging_enabled":true,
"calib_anticogging":false,
"calib_pos_threshold":1.0,
"calib_vel_threshold":1.0,
"cogging_ratio":1.0,
"index":0,
"pre_calibrated":false
}
}
},
"encoder":{
"config":{
"abs_spi_cs_gpio_pin":1,
"bandwidth":100.0,
"calib_range":0.019999999552965164,
"calib_scan_distance":150.0,
"calib_scan_omega":12.566370964050293,
"cpr":24,
"enable_phase_interpolation":true,
"find_idx_on_lockin_only":false,
"idx_search_unidirectional":false,
"ignore_illegal_hall_state":false,
"mode":1,
"offset_float":0.3299543261528015,
"offset":-66,
"pre_calibrated":false,
"sincos_gpio_pin_cos":4,
"sincos_gpio_pin_sin":3,
"use_index":false,
"zero_count_on_find_idx":true
}
},
"fet_thermistor":{
"config":{
"enabled":true,
"temp_limit_lower":100.0,
"temp_limit_upper":120.0
}
},
"max_endstop":{
"config":{
"debounce_ms":50,
"enabled":true,
"gpio_num":7,
"is_active_high":false,
"offset":-10.0,
"pullup":true
}
},
"min_endstop":{
"config":{
"debounce_ms":50,
"enabled":true,
"gpio_num":8,
"is_active_high":false,
"offset":-10.0,
"pullup":true
}
},
"motor":{
"config":{
"acim_autoflux_attack_gain":10.0,
"acim_autoflux_decay_gain":1.0,
"acim_autoflux_enable":false,
"acim_autoflux_min_Id":10.0,
"acim_gain_min_flux":10.0,
"acim_slip_velocity":14.706000328063965,
"calibration_current":10.0,
"current_control_bandwidth":100.0,
"current_lim_margin":8.0,
"current_lim":10.0,
"direction":-1,
"inverter_temp_limit_lower":100.0,
"inverter_temp_limit_upper":120.0,
"motor_type":0,
"phase_inductance":0.0004909285344183445,
"phase_resistance":0.10748489946126938,
"pole_pairs":4,
"pre_calibrated":true,
"requested_current_range":25.0,
"resistance_calib_max_voltage":4.0,
"torque_constant":0.5168750286102295,
"torque_lim":"Infinity"
}
},
"motor_thermistor":{
"config":{
"enabled":false,
"gpio_pin":4,
"poly_coefficient_0":0.0,
"poly_coefficient_1":0.0,
"poly_coefficient_2":0.0,
"poly_coefficient_3":0.0,
"temp_limit_lower":100.0,
"temp_limit_upper":120.0
}
},
"sensorless_estimator":{
"config":{
"observer_gain":1000.0,
"pll_bandwidth":1000.0,
"pm_flux_linkage":0.0015800000401213765
}
},
"trap_traj":{
"config":{
"accel_limit":0.5,
"decel_limit":0.5,
"vel_limit":1000.0
}
}
},
"axis1":{
"config":{
"can_heartbeat_rate_ms":100,
"can_node_id_extended":false,
"can_node_id":1,
"dir_gpio_pin":4,
"enable_step_dir":false,
"enable_watchdog":false,
"startup_closed_loop_control":false,
"startup_encoder_index_search":false,
"startup_encoder_offset_calibration":false,
"startup_homing":true,
"startup_motor_calibration":false,
"startup_sensorless_control":false,
"step_dir_always_on":false,
"step_gpio_pin":3,
"turns_per_step":0.0009765625,
"watchdog_timeout":0.0,
"calibration_lockin":{
"accel":20.0,
"current":10.0,
"ramp_distance":3.1415927410125732,
"ramp_time":0.4000000059604645,
"vel":40.0
},
"general_lockin":{
"accel":200.0,
"current":20.0,
"finish_distance":100.0,
"finish_on_distance":false,
"finish_on_enc_idx":false,
"finish_on_vel":false,
"ramp_distance":3.1415927410125732,
"ramp_time":0.4000000059604645,
"vel":40.0
},
"sensorless_ramp":{
"accel":200.0,
"current":10.0,
"finish_distance":100.0,
"finish_on_distance":false,
"finish_on_enc_idx":false,
"finish_on_vel":true,
"ramp_distance":3.1415927410125732,
"ramp_time":0.4000000059604645,
"vel":400.0
}
},
"controller":{
"config":{
"axis_to_mirror":255,
"circular_setpoint_range":1.0,
"circular_setpoints":false,
"control_mode":3,
"enable_current_mode_vel_limit":true,
"enable_gain_scheduling":false,
"enable_overspeed_error":true,
"enable_vel_limit":true,
"gain_scheduling_width":10.0,
"homing_speed":10.0,
"inertia":0.0,
"input_filter_bandwidth":2.0,
"input_mode":1,
"load_encoder_axis":0,
"mirror_ratio":1.0,
"pos_gain":1.0,
"torque_ramp_rate":0.009999999776482582,
"vel_gain":0.24810001254081726,
"vel_integrator_gain":1.2405000925064087,
"vel_limit":2000.0,
"vel_limit_tolerance":1.2000000476837158,
"vel_ramp_rate":1.0,
"anticogging":{
"anticogging_enabled":true,
"calib_anticogging":false,
"calib_pos_threshold":1.0,
"calib_vel_threshold":1.0,
"cogging_ratio":1.0,
"index":0,
"pre_calibrated":false
}
}
},
"encoder":{
"config":{
"abs_spi_cs_gpio_pin":1,
"bandwidth":100.0,
"calib_range":0.019999999552965164,
"calib_scan_distance":150.0,
"calib_scan_omega":12.566370964050293,
"cpr":24,
"enable_phase_interpolation":true,
"find_idx_on_lockin_only":false,
"idx_search_unidirectional":false,
"ignore_illegal_hall_state":false,
"mode":1,
"offset_float":0.32997530698776245,
"offset":-72,
"pre_calibrated":false,
"sincos_gpio_pin_cos":4,
"sincos_gpio_pin_sin":3,
"use_index":false,
"zero_count_on_find_idx":true
}
},
"fet_thermistor":{
"config":{
"enabled":true,
"temp_limit_lower":100.0,
"temp_limit_upper":120.0
}
},
"max_endstop":{
"config":{
"debounce_ms":50,
"enabled":true,
"gpio_num":5,
"is_active_high":false,
"offset":-10.0,
"pullup":true
}
},
"min_endstop":{
"config":{
"debounce_ms":50,
"enabled":true,
"gpio_num":6,
"is_active_high":false,
"offset":-10.0,
"pullup":true
}
},
"motor":{
"config":{
"acim_autoflux_attack_gain":10.0,
"acim_autoflux_decay_gain":1.0,
"acim_autoflux_enable":false,
"acim_autoflux_min_Id":10.0,
"acim_gain_min_flux":10.0,
"acim_slip_velocity":14.706000328063965,
"calibration_current":10.0,
"current_control_bandwidth":100.0,
"current_lim_margin":8.0,
"current_lim":10.0,
"direction":-1,
"inverter_temp_limit_lower":100.0,
"inverter_temp_limit_upper":120.0,
"motor_type":0,
"phase_inductance":0.0004563182301353663,
"phase_resistance":0.1059090718626976,
"pole_pairs":4,
"pre_calibrated":true,
"requested_current_range":25.0,
"resistance_calib_max_voltage":4.0,
"torque_constant":0.5168750286102295,
"torque_lim":"Infinity"
}
},
"motor_thermistor":{
"config":{
"enabled":false,
"gpio_pin":4,
"poly_coefficient_0":0.0,
"poly_coefficient_1":0.0,
"poly_coefficient_2":0.0,
"poly_coefficient_3":0.0,
"temp_limit_lower":100.0,
"temp_limit_upper":120.0
}
},
"sensorless_estimator":{
"config":{
"observer_gain":1000.0,
"pll_bandwidth":1000.0,
"pm_flux_linkage":0.0015800000401213765
}
},
"trap_traj":{
"config":{
"accel_limit":0.5,
"decel_limit":0.5,
"vel_limit":1000.0
}
}
},
"can":{
"config":{
"baud_rate":250000,
"protocol":0
}
},
"config":{
"brake_resistance":2.0,
"dc_bus_overvoltage_ramp_end":59.92000198364258,
"dc_bus_overvoltage_ramp_start":59.92000198364258,
"dc_bus_overvoltage_trip_level":59.92000198364258,
"dc_bus_undervoltage_trip_level":8.0,
"dc_max_negative_current":-9.999999974752427e-07,
"dc_max_positive_current":"Infinity",
"enable_ascii_protocol_on_usb":true,
"enable_dc_bus_overvoltage_ramp":false,
"enable_i2c_instead_of_can":false,
"enable_uart":true,
"max_regen_current":0.0,
"uart_baudrate":115200,
"gpio1_pwm_mapping":{
"endpoint":null,
"max":0.0,
"min":0.0
},
"gpio2_pwm_mapping":{
"endpoint":null,
"max":0.0,
"min":0.0
},
"gpio3_analog_mapping":{
"endpoint":null,
"max":0.0,
"min":0.0
},
"gpio3_pwm_mapping":{
"endpoint":null,
"max":0.0,
"min":0.0
},
"gpio4_analog_mapping":{
"endpoint":null,
"max":0.0,
"min":0.0
},
"gpio4_pwm_mapping":{
"endpoint":null,
"max":0.0,
"min":0.0
}
}
}
Thanks for the helpers in advance