Hi everyone,
I am using ODrive for a constant torque polling rotation count project, encountering some problems need help.
Setting:
odrivetool 0.5.1
ODrive 3.5-48V one channel version, firmware firmware 0.4.12
motor(387250).
Problem 1
When I tried senseless mode, the motor started rotating, and stopped within 2 seconds when current was closed to 5A, and error code = 0x0040
odrv0.axis0.controller.vel_setpoint = 5
odrv0.axis0.requested_state = AXIS_STATE_SENSORLESS_CONTROL
When tried velocity closed loop control, the motor would not spin.
odrv0.axis0.requested_state = AXIS_STATE_CLOSED_LOOP_CONTROL
Problem 2
odrv0.axis0.encoder.shadow_count increased very quick, even if I just turned the motor a little bit, shadow_count increased by 2 or more.
Problem 3
If I update firmware to fw-v0.5.2, windows and odrivetool could not detect any odrive device, if update firmware to v0.5.1, the vbus_voltage was fixed to 12.0V, and could not read any encoder value, motor could not spin at all.
Here is my config
In [116]: odrv0.axis0.motor
Out[116]:
error = 0x0000 (int)
armed_state = 0 (int)
is_calibrated = True (bool)
current_meas_phB = -0.0747307538986206 (float)
current_meas_phC = 0.15085291862487793 (float)
DC_calib_phB = -1.2545756101608276 (float)
DC_calib_phC = -1.6411025524139404 (float)
phase_current_rev_gain = 0.012500000186264515 (float)
thermal_current_lim = 44.389366149902344 (float)
get_inverter_temp()
current_control:
p_gain = 0.02551434375345707 (float)
i_gain = 63.82950210571289 (float)
v_current_control_integral_d = 0.0 (float)
v_current_control_integral_q = 0.0 (float)
Ibus = 0.0 (float)
final_v_alpha = 0.0 (float)
final_v_beta = 0.0 (float)
Iq_setpoint = 0.0 (float)
Iq_measured = 0.0 (float)
Id_measured = 0.0 (float)
I_measured_report_filter_k = 1.0 (float)
max_allowed_current = 30.375 (float)
overcurrent_trip_level = 33.75 (float)
gate_driver:
drv_fault = 0 (int)
timing_log:
TIMING_LOG_GENERAL = 0 (int)
TIMING_LOG_ADC_CB_I = 2434 (int)
TIMING_LOG_ADC_CB_DC = 12850 (int)
TIMING_LOG_MEAS_R = 6650 (int)
TIMING_LOG_MEAS_L = 6658 (int)
TIMING_LOG_ENC_CALIB = 0 (int)
TIMING_LOG_IDX_SEARCH = 0 (int)
TIMING_LOG_FOC_VOLTAGE = 6618 (int)
TIMING_LOG_FOC_CURRENT = 0 (int)
config:
pre_calibrated = True (bool)
pole_pairs = 8 (int)
calibration_current = 2.0 (float)
resistance_calib_max_voltage = 4.0 (float)
phase_inductance = 0.00025514344451949 (float)
phase_resistance = 0.6382949948310852 (float)
direction = 1 (int)
motor_type = 0 (int)
current_lim = 10.0 (float)
current_lim_tolerance = 1.25 (float)
inverter_temp_limit_lower = 100.0 (float)
inverter_temp_limit_upper = 120.0 (float)
requested_current_range = 3.0 (float)
current_control_bandwidth = 100.0 (float)
In [117]: odrv0.axis0.encoder
Out[117]:
error = 0x0000 (int)
is_ready = True (bool)
index_found = False (bool)
shadow_count = 1 (int)
count_in_cpr = 1 (int)
interpolation = 0.5 (float)
phase = 0.015839576721191406 (float)
pos_estimate = 1.9875190258026123 (float)
pos_cpr = 1.9875190258026123 (float)
hall_state = 3 (int)
vel_estimate = 0.0 (float)
calib_scan_response = 0.0 (float)
config:
mode = 1 (int)
use_index = False (bool)
find_idx_on_lockin_only = False (bool)
pre_calibrated = True (bool)
zero_count_on_find_idx = True (bool)
cpr = 48 (int)
offset = 24 (int)
offset_float = 1.484874963760376 (float)
enable_phase_interpolation = True (bool)
bandwidth = 50.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)
set_linear_count(count: int)
I dont know if it is a config setting, since phase_inductance and phase_resistance is roughly half of the datasheet shown.
I would really appericate if anyone could help.
Thanks a lot