I’m really pissed off right now, two brake resistors overheated and exploded and I can’t figure out why.
I tried all the steps in the docs, reading every note and comment. But when I try to calibrate the encoder, I hear the power supply fans turning faster (delivering more amps), and after 2 seconds the brake resistor explodes.
Yesterday it happened when I did the AXIS_STATE_FULL_CALIBRATION_SEQUENCE and today after sending the command AXIS_STATE_ENCODER_OFFSET_CALIBRATION.
Here is the full view of commands I sent today:
Connected to ODrive 376236503137 as odrv0
Connected to ODrive 366833663037 as odrv1
In [1]: odrv0
Out[1]:
vbus_voltage = 47.95876693725586 (float)
serial_number = 376236503137 (int)
hw_version_major = 3 (int)
hw_version_minor = 5 (int)
hw_version_variant = 48 (int)
fw_version_major = 0 (int)
fw_version_minor = 4 (int)
fw_version_revision = 6 (int)
fw_version_unreleased = 0 (int)
user_config_loaded = True (bool)
brake_resistor_armed = True (bool)
system_stats:
uptime = 179853 (int)
min_heap_space = 18264 (int)
min_stack_space_axis0 = 7820 (int)
min_stack_space_axis1 = 7820 (int)
min_stack_space_comms = 384 (int)
min_stack_space_usb = 1324 (int)
min_stack_space_uart = 3964 (int)
min_stack_space_usb_irq = 1812 (int)
min_stack_space_startup = 556 (int)
usb: ...
i2c: ...
config:
brake_resistance = 2.0 (float)
enable_uart = True (bool)
enable_i2c_instead_of_can = False (bool)
enable_ascii_protocol_on_usb = True (bool)
dc_bus_undervoltage_trip_level = 8.0 (float)
dc_bus_overvoltage_trip_level = 51.840003967285156 (float)
gpio1_pwm_mapping: ...
gpio2_pwm_mapping: ...
gpio3_pwm_mapping: ...
gpio4_pwm_mapping: ...
axis0:
error = 0x0004 (int)
enable_step_dir = False (bool)
current_state = 1 (int)
requested_state = 0 (int)
loop_counter = 1469160 (int)
config: ...
get_temp()
motor: ...
controller: ...
encoder: ...
sensorless_estimator: ...
trap_traj: ...
axis1:
error = 0x0005 (int)
enable_step_dir = False (bool)
current_state = 1 (int)
requested_state = 0 (int)
loop_counter = 1469158 (int)
config: ...
get_temp()
motor: ...
controller: ...
encoder: ...
sensorless_estimator: ...
trap_traj: ...
can:
node_id = 0 (int)
TxMailboxCompleteCallbackCnt = 0 (int)
TxMailboxAbortCallbackCnt = 0 (int)
received_msg_cnt = 0 (int)
received_ack = 0 (int)
unexpected_errors = 0 (int)
unhandled_messages = 0 (int)
test_property = 0 (int)
test_function(delta: int)
get_oscilloscope_val(index: int)
get_adc_voltage(gpio: int)
save_configuration()
erase_configuration()
reboot()
enter_dfu_mode()
In [2]: odrv0.error
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
~\Anaconda3\lib\site-packages\fibre\shell.py in <module>()
----> 1 odrv0.error
~\Anaconda3\lib\site-packages\fibre\remote_object.py in __getattribute__(self, name)
243 return attr
244 else:
--> 245 return object.__getattribute__(self, name)
246 #raise AttributeError("Attribute {} not found".format(name))
247
AttributeError: 'RemoteObject' object has no attribute 'error'
In [3]: odrv0.axis0.error
Out[3]: 4
In [4]: odrv0.axis1.error
Out[4]: 5
In [5]: odrv0.axis0.encoder.error
Out[5]: 0
In [6]: odrv0.axis0.motor.error
Out[6]: 0
In [7]: odrv0.config
Out[7]:
brake_resistance = 2.0 (float)
enable_uart = True (bool)
enable_i2c_instead_of_can = False (bool)
enable_ascii_protocol_on_usb = True (bool)
dc_bus_undervoltage_trip_level = 8.0 (float)
dc_bus_overvoltage_trip_level = 51.840003967285156 (float)
gpio1_pwm_mapping:
endpoint = (0, 0) (RemoteProperty)
min = 0.0 (float)
max = 0.0 (float)
gpio2_pwm_mapping:
endpoint = (0, 0) (RemoteProperty)
min = 0.0 (float)
max = 0.0 (float)
gpio3_pwm_mapping:
endpoint = (0, 0) (RemoteProperty)
min = 0.0 (float)
max = 0.0 (float)
gpio4_pwm_mapping:
endpoint = (0, 0) (RemoteProperty)
min = 0.0 (float)
max = 0.0 (float)
In [8]: odrv0.axis0.config
Out[8]:
startup_motor_calibration = False (bool)
startup_encoder_index_search = True (bool)
startup_encoder_offset_calibration = False (bool)
startup_closed_loop_control = True (bool)
startup_sensorless_control = False (bool)
enable_step_dir = False (bool)
counts_per_step = 2.0 (float)
ramp_up_time = 0.4000000059604645 (float)
ramp_up_distance = 12.566370964050293 (float)
spin_up_current = 10.0 (float)
spin_up_acceleration = 400.0 (float)
spin_up_target_vel = 400.0 (float)
In [9]: odrv0.axis0.motor.config
Out[9]:
pre_calibrated = True (bool)
pole_pairs = 7 (int)
calibration_current = 10.0 (float)
resistance_calib_max_voltage = 2.0 (float)
phase_inductance = 2.084625702991616e-05 (float)
phase_resistance = 0.03450365364551544 (float)
direction = 1 (int)
motor_type = 0 (int)
current_lim = 10.0 (float)
requested_current_range = 70.0 (float)
current_control_bandwidth = 1000.0 (float)
In [10]: odrv0.axis0.encoder.config
Out[10]:
mode = 0 (int)
use_index = True (bool)
pre_calibrated = True (bool)
idx_search_speed = -10.0 (float)
cpr = 8192 (int)
offset = 4259 (int)
offset_float = 1.4473516941070557 (float)
bandwidth = 1000.0 (float)
calib_range = 0.019999999552965164 (float)
In [11]: odrv0.axis0.motor.config.pre_calibrated = False
In [12]: odrv0.axis0.encoder.config.pre_calibrated = False
In [13]: odrv0.axis1.motor.config.pre_calibrated = False
In [14]: odrv0.axis1.encoder.config.pre_calibrated = False
In [15]: odrv0.axis0.motor.config
Out[15]:
pre_calibrated = False (bool)
pole_pairs = 7 (int)
calibration_current = 10.0 (float)
resistance_calib_max_voltage = 2.0 (float)
phase_inductance = 2.084625702991616e-05 (float)
phase_resistance = 0.03450365364551544 (float)
direction = 1 (int)
motor_type = 0 (int)
current_lim = 10.0 (float)
requested_current_range = 70.0 (float)
current_control_bandwidth = 1000.0 (float)
In [16]: odrv0.axis0.encoder.config
Out[16]:
mode = 0 (int)
use_index = True (bool)
pre_calibrated = False (bool)
idx_search_speed = -10.0 (float)
cpr = 8192 (int)
offset = 4259 (int)
offset_float = 1.4473516941070557 (float)
bandwidth = 1000.0 (float)
calib_range = 0.019999999552965164 (float)
In [17]: odrv0.config
Out[17]:
brake_resistance = 2.0 (float)
enable_uart = True (bool)
enable_i2c_instead_of_can = False (bool)
enable_ascii_protocol_on_usb = True (bool)
dc_bus_undervoltage_trip_level = 8.0 (float)
dc_bus_overvoltage_trip_level = 51.840003967285156 (float)
gpio1_pwm_mapping:
endpoint = (0, 0) (RemoteProperty)
min = 0.0 (float)
max = 0.0 (float)
gpio2_pwm_mapping:
endpoint = (0, 0) (RemoteProperty)
min = 0.0 (float)
max = 0.0 (float)
gpio3_pwm_mapping:
endpoint = (0, 0) (RemoteProperty)
min = 0.0 (float)
max = 0.0 (float)
gpio4_pwm_mapping:
endpoint = (0, 0) (RemoteProperty)
min = 0.0 (float)
max = 0.0 (float)
In [18]: odrv0.axis0.config
Out[18]:
startup_motor_calibration = False (bool)
startup_encoder_index_search = True (bool)
startup_encoder_offset_calibration = False (bool)
startup_closed_loop_control = True (bool)
startup_sensorless_control = False (bool)
enable_step_dir = False (bool)
counts_per_step = 2.0 (float)
ramp_up_time = 0.4000000059604645 (float)
ramp_up_distance = 12.566370964050293 (float)
spin_up_current = 10.0 (float)
spin_up_acceleration = 400.0 (float)
spin_up_target_vel = 400.0 (float)
In [19]: odrv0.axis0.error
Out[19]: 4
In [20]: odrv0.axis0.error = 0
In [21]: odrv0.axis1.error
Out[21]: 5
In [22]: odrv0.axis0.requested_state = AXIS_STATE_ENCODER_INDEX_SEARCH
In [23]: odrv0.axis0.requested_state = AXIS_STATE_ENCODER_OFFSET_CALIBRATION
Reconnected to ODrive 366833663037 as odrv1
In [24]: