Hi everyone,
I’ve been struggling with a CAN communication issue on my ODrive Pro and can’t seem to get it working. I’m hoping someone here has seen this before.
I always get the can error BUS_OFF.
Configuration applied
odrv = odrv0
odrv.config.dc_bus_overvoltage_trip_level = 56
odrv.config.dc_bus_undervoltage_trip_level = 10.5
odrv.config.dc_max_positive_current = math.inf
odrv.config.dc_max_negative_current = -math.inf
odrv.axis0.config.motor.motor_type = MotorType.PMSM_CURRENT_CONTROL
odrv.axis0.config.motor.pole_pairs = 8
odrv.axis0.config.motor.torque_constant = 0.827
odrv.axis0.config.motor.current_soft_max = 10
odrv.axis0.config.motor.current_hard_max = 23
odrv.axis0.config.motor.calibration_current = 3
odrv.axis0.config.motor.resistance_calib_max_voltage = 3
odrv.axis0.config.calibration_lockin.current = 3
odrv.axis0.motor.motor_thermistor.config.enabled = False
odrv.axis0.controller.config.control_mode = ControlMode.VELOCITY_CONTROL
odrv.axis0.controller.config.input_mode = InputMode.VEL_RAMP
odrv.axis0.controller.config.vel_limit = 10
odrv.axis0.controller.config.vel_limit_tolerance = 1.2
odrv.axis0.config.torque_soft_min = -math.inf
odrv.axis0.config.torque_soft_max = math.inf
odrv.axis0.trap_traj.config.accel_limit = 10
odrv.axis0.controller.config.vel_ramp_rate = 10
odrv.can.config.protocol = Protocol.SIMPLE
odrv.can.config.baud_rate = 250000
odrv.axis0.config.can.node_id = 0
odrv.axis0.config.can.heartbeat_msg_rate_ms = 100
odrv.axis0.config.can.encoder_msg_rate_ms = 10
odrv.axis0.config.can.iq_msg_rate_ms = 0
odrv.axis0.config.can.torques_msg_rate_ms = 0
odrv.axis0.config.can.error_msg_rate_ms = 0
odrv.axis0.config.can.temperature_msg_rate_ms = 0
odrv.axis0.config.can.bus_voltage_msg_rate_ms = 1000
odrv.axis0.config.enable_watchdog = False
odrv.axis0.config.encoder_bandwidth = 100
odrv.hall_encoder0.config.enabled = True
odrv.axis0.config.load_encoder = EncoderId.HALL_ENCODER0
odrv.axis0.config.commutation_encoder = EncoderId.HALL_ENCODER0
odrv.config.enable_uart_a = False
The problem
The ODrive Inspector always shows error = BUS_OFF and n_restarts counts up rapidly.
What I have already tried
-
CAN baud rate set to 250000 b/s, protocol SIMPLE, node ID 0 (as above)
-
Wiring checked: CAN-Hi, CAN-Lo, GND — GND is also tied to power GND
-
CAN Analyser V8.0 sees no messages
-
Arduino Nano with MCP2515 module (code from the official guide) also sees no messages
-
Line resistance between CAN-Hi and CAN-Lo: 60 Ω
-
Oscilloscope shows small square-wave signals when the ODrive Pro is alone on the bus; the internal termination resistor is enabled
-
Arduino Nano sending messages in 10 ms intervals with ODrive baud rate set to auto — ODrive does not detect the baud rate
-
CAN Analyser V8.0 does receive the Arduino Nano messages when all three devices (MCP2515, ODrive, CAN Analyser) are on the bus together
-
Tried all available baud rates on the ODrive
-
Tried different node IDs: 1, 13, 63
-
Data baud rate left at default (1 Mb) and also set to 250000 b/s
-
Firmware updated to 0.6.12
-
Configuration attempted via WebGUI and via odrivetool
Any ideas what might be going on? Is the ODrive Pro simply not transmitting at all, or is there something fundamentally wrong with how I have it configured?
Thanks in advance!
