I am trying for a few days to do this, I really need help, please.
I have the AS5048A connected fine. I need to calibrate T-Motor AM30
Here is the configuration so far, plus some errors I get.
Any suggestions are welcome!
In [43]: odrv0.axis0.requested_state = odrive.enums.AXIS_STATE_MOTOR_CALIBRATION
In [44]: odrv0.axis0.motor.config.phase_inductance
Out[44]: 0.0
In [45]: odrv0.axis0.motor
Out[45]:
DC_calib_phB: -1.384114146232605 (float)
DC_calib_phC: -1.0271888971328735 (float)
armed_state: 0 (int32)
config:
acim_autoflux_attack_gain: 10.0 (float)
acim_autoflux_decay_gain: 1.0 (float)
acim_autoflux_enable: False (bool)
acim_autoflux_min_Id: 10.0 (float)
acim_gain_min_flux: 10.0 (float)
acim_slip_velocity: 14.706000328063965 (float)
calibration_current: 12.0 (float)
current_control_bandwidth: 100.0 (float)
current_lim: 10.0 (float)
current_lim_margin: 8.0 (float)
direction: 0 (int32)
inverter_temp_limit_lower: 100.0 (float)
inverter_temp_limit_upper: 120.0 (float)
motor_type: 0 (int32)
phase_inductance: 0.0 (float)
phase_resistance: 0.15712322294712067 (float)
pole_pairs: 7 (int32)
pre_calibrated: False (bool)
requested_current_range: 4.0 (float)
resistance_calib_max_voltage: 11.0 (float)
torque_constant: 8.270000457763672 (float)
torque_lim: inf (float)
current_control:
I_measured_report_filter_k: 1.0 (float)
Ibus: 0.0 (float)
Id_measured: 0.0 (float)
Id_setpoint: 0.0 (float)
Iq_measured: 0.0 (float)
Iq_setpoint: 0.0 (float)
acim_rotor_flux: 0.0 (float)
async_phase_offset: 0.0 (float)
async_phase_vel: 0.0 (float)
final_v_alpha: 0.0 (float)
final_v_beta: 0.0 (float)
i_gain: nan (float)
max_allowed_current: 30.375 (float)
overcurrent_trip_level: 33.75 (float)
p_gain: 0.0 (float)
v_current_control_integral_d: 0.0 (float)
v_current_control_integral_q: 0.0 (float)
current_meas_phB: -0.025965094566345215 (float)
current_meas_phC: -0.0213547945022583 (float)
effective_current_lim: 10.0 (float)
error: 128 (int32)
gate_driver:
drv_fault: 0 (int32)
is_calibrated: False (bool)
phase_current_rev_gain: 0.012500000186264515 (float)
timing_log:
adc_cb_dc: 12858 (uint16)
adc_cb_i: 3018 (uint16)
enc_calib: 63737 (uint16)
foc_current: 36607 (uint16)
foc_voltage: 7838 (uint16)
general: 2480 (uint16)
idx_search: 9939 (uint16)
meas_l: 7878 (uint16)
meas_r: 7946 (uint16)
sample_now: 11947 (uint16)
spi_end: 17166 (uint16)
spi_start: 26407 (uint16)
In [46]: dump_errors(odrv0)
system: not found
axis0
axis: Error(s):
AxisError.MOTOR_FAILED
motor: Error(s):
MotorError.MODULATION_MAGNITUDE
DRV fault: not found
sensorless_estimator: no error
encoder: no error
controller: no error
axis1
axis: no error
motor: no error
DRV fault: not found
sensorless_estimator: no error
encoder: no error
controller: no error
Can someone please help me with this? Thanks
Ps. Here is the dump_errors(odrv0)
In [64]: dump_errors(odrv0)
system: not found
axis0
axis: Error(s):
AxisError.MOTOR_FAILED
motor: Error(s):
MotorError.MODULATION_MAGNITUDE
DRV fault: not found
sensorless_estimator: no error
encoder: no error
controller: no error
axis1
axis: no error
motor: no error
DRV fault: not found
sensorless_estimator: no error
encoder: no error
controller: no error