Hi odrive community,
I am testing odrive to control segway motor. I finished the setup from documentation but the motor is not moving after sending this command in terminal:-
odrv0.axis0.requested_state = AXIS_STATE_CLOSED_LOOP_CONTROL
odrv0.axis0.controller.vel_setpoint = 120
I did all the calibration and even saw motor rotating during encoder calibration. Circuit I made the same as in this image - https://user-images.githubusercontent.com/8363989/57575009-eaf37c80-7442-11e9-9ee3-52118415944d.png
Just that I haven’t added 22nF capacitors at the hall line.
Here are my config:-
In [1]: odrv0.axis0.encoder
Out[1]:
error = 0x0000 (int)
is_ready = True (bool)
index_found = False (bool)
shadow_count = 2 (int)
count_in_cpr = 2 (int)
interpolation = 0.5 (float)
phase = -0.030320167541503906 (float)
pos_estimate = 2.975128173828125 (float)
pos_cpr = 2.975128173828125 (float)
hall_state = 2 (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 = 90 (int)
offset = -21 (int)
offset_float = -0.4710468649864197 (float)
enable_phase_interpolation = True (bool)
bandwidth = 100.0 (float)
calib_range = 0.019999999552965164 (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)
In [2]: odrv0.axis0.motor
Out[2]:
error = 0x0000 (int)
armed_state = 0 (int)
is_calibrated = True (bool)
current_meas_phB = -0.19984614849090576 (float)
current_meas_phC = -0.0479818731546402 (float)
DC_calib_phB = -1.2105501890182495 (float)
DC_calib_phC = -0.13339681923389435 (float)
phase_current_rev_gain = 0.012500000186264515 (float)
thermal_current_lim = 22.963388442993164 (float)
get_inverter_temp()
current_control:
p_gain = 0.03583559766411781 (float)
i_gain = 27.331195831298828 (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 = 2438 (int)
TIMING_LOG_ADC_CB_DC = 12862 (int)
TIMING_LOG_MEAS_R = 0 (int)
TIMING_LOG_MEAS_L = 0 (int)
TIMING_LOG_ENC_CALIB = 0 (int)
TIMING_LOG_IDX_SEARCH = 0 (int)
TIMING_LOG_FOC_VOLTAGE = 0 (int)
TIMING_LOG_FOC_CURRENT = 0 (int)
config:
pre_calibrated = True (bool)
pole_pairs = 15 (int)
calibration_current = 10.0 (float)
resistance_calib_max_voltage = 4.0 (float)
phase_inductance = 0.00035835595917887986 (float)
phase_resistance = 0.27331194281578064 (float)
direction = -1 (int)
motor_type = 0 (int)
current_lim = 5.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 = 25.0 (float)
current_control_bandwidth = 100.0 (float)
What could be the problem here? Do I compulsory need to add 22nF capacitors?