Odrive v 3.6 24v drawing current upto 1.2 Amps and not getting connected to windows and linux debian

Hello,

I have been trying to use an odrive with the latest firmware (0.5.1) and two MN6007 Tmotors with two encoders(as5047p-ts_ek_ab) in the SPI interface configuration.

I was clearing some of the errors that occured on the odrive due to (I believe) an improper configuration The errors were an axis error and an encoder error which was specific to SPI configuration. Though our pin configuration matched that of the as5047 datasheet and we were connected to the SPI communication pins on the odrive that listed in the documentation.

After I had cleared these errors and power cycled the board, it was no longer able to be recognized by my PC or the microcontroller. It shows in the device manager of my PC as an odrive device, yet I am not able to connect via tty from terminal, nor am I able to see the odrive using the Zadig configurator. These problems persist even when the device is put into DFU mode. I have attempted to flash fresh firmware a number of times but it still does not connect using a Windows or Linux machine, again, even in DFU mode.

Further, I had noticed that when plugged in, the processor becomes unusually warm. When I measured the current draw of the device when powered, it measured a steady 1.2A. I compared this to the current draw of another functional Odrive that I had on-hand, and noticed that a fluctuation between 0.3 and 0.5A…

So my questions are:
How could this have happened to the board after only power-cycling it?
What are some best practices to avoid this in the future?
Is it possible that these problems could have arisen from the configuration of the board?
Is the board permanently damaged?

configuration:
In [1]: odrv0.axis0
Out[1]:
error = 0x0100 (int)
step_dir_active = False (bool)
current_state = 1 (int)
requested_state = 0 (int)
loop_counter = 1754916 (int)
lockin_state = 0 (int)
is_homed = False (bool)
config:
startup_motor_calibration = False (bool)
startup_encoder_index_search = False (bool)
startup_encoder_offset_calibration = False (bool)
startup_closed_loop_control = False (bool)
startup_sensorless_control = False (bool)
startup_homing = False (bool)
enable_step_dir = False (bool)
step_dir_always_on = False (bool)
turns_per_step = 0.0009765625 (float)
watchdog_timeout = 0.0 (float)
enable_watchdog = False (bool)
step_gpio_pin = 1 (int)
dir_gpio_pin = 2 (int)
calibration_lockin: …
sensorless_ramp: …
general_lockin: …
can_node_id = 0 (int)
can_node_id_extended = False (bool)
can_heartbeat_rate_ms = 100 (int)
fet_thermistor:
error = 0x0000 (int)
temperature = 27.565919876098633 (float)
config: …
motor_thermistor:
error = 0x0000 (int)
temperature = 0.0 (float)
config: …
motor:
error = 0x0000 (int)
armed_state = 0 (int)
is_calibrated = True (bool)
current_meas_phB = 0.270877480506897 (float)
current_meas_phC = 0.30440035462379456 (float)
DC_calib_phB = 0.6150272488594055 (float)
DC_calib_phC = 0.34016484022140503 (float)
phase_current_rev_gain = 0.02500000037252903 (float)
effective_current_lim = 10.0 (float)
current_control: …
gate_driver: …
timing_log: …
config: …
controller:
error = 0x0000 (int)
input_pos = 0.0 (float)
input_vel = 0.0 (float)
input_torque = 0.0 (float)
pos_setpoint = 0.0 (float)
vel_setpoint = 0.0 (float)
torque_setpoint = 0.0 (float)
trajectory_done = True (bool)
vel_integrator_torque = 0.0 (float)
anticogging_valid = False (bool)
config: …
move_incremental(displacement: float, from_input_pos: bool)
start_anticogging_calibration()
encoder:
error = 0x0080 (int)
is_ready = False (bool)
index_found = False (bool)
shadow_count = 0 (int)
count_in_cpr = 0 (int)
interpolation = 0.5 (float)
phase = -2.7090189456939697 (float)
pos_estimate = 0.0 (float)
pos_estimate_counts = 0.0 (float)
pos_cpr = 0.0 (float)
pos_cpr_counts = 0.0 (float)
pos_circular = 0.0 (float)
hall_state = 7 (int)
vel_estimate = 0.0 (float)
vel_estimate_counts = 0.0 (float)
calib_scan_response = 0.0 (float)
pos_abs = 0 (int)
spi_error_rate = 0.9997616410255432 (float)
config: …
set_linear_count(count: int)
sensorless_estimator:
error = 0x0000 (int)
phase = 0.036993540823459625 (float)
pll_pos = 0.03553962707519531 (float)
vel_estimate = 0.02666371501982212 (float)
config: …
trap_traj:
config: …
min_endstop:
endstop_state = False (bool)
config: …
max_endstop:
endstop_state = False (bool)
config: …
watchdog_feed()
clear_errors()

In [2]: odrv0.config
Out[2]:
enable_uart = True (bool)
uart_baudrate = 115200 (int)
enable_i2c_instead_of_can = False (bool)
enable_ascii_protocol_on_usb = True (bool)
max_regen_current = 0.0 (float)
brake_resistance = 0.5 (float)
dc_bus_undervoltage_trip_level = 8.0 (float)
dc_bus_overvoltage_trip_level = 25.68000030517578 (float)
enable_dc_bus_overvoltage_ramp = False (bool)
dc_bus_overvoltage_ramp_start = 25.68000030517578 (float)
dc_bus_overvoltage_ramp_end = 25.68000030517578 (float)
dc_max_positive_current = inf (float)
dc_max_negative_current = -9.999999974752427e-07 (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)
gpio3_analog_mapping:
endpoint = (0, 0) (RemoteProperty)
min = 0.0 (float)
max = 0.0 (float)
gpio4_analog_mapping:
endpoint = (0, 0) (RemoteProperty)
min = 0.0 (float)
max = 0.0 (float)

Sounds like the STM32 has died. You can replace it directly if you like, it’s not an expensive part.

The most common reason for this is ground loops, see https://docs.odriverobotics.com/ground-loops

1 Like

Thank you for your quickest response and for the solution.

1 Like