Hi everyone,
I’m new to ODrive and currently trying to control a bot wheel using an ODrive S1. However, I’m running into an issue:
When I apply new code in the web GUI, I immediately get the message Status: BREAK_RESISTOR_DISARMED. Despite this, I can proceed with the next steps and control the wheel. However, when the ODrive is in idle mode and I manually move the wheel, the DC voltage to my power supply increases too much. This causes current to be sent back, which ultimately leads to my power supply shutting down. The power supply parameters: 24V, 13A
I have a 2Ω brake resistor connected to my S1 board, but it doesn’t seem to be handling the regenerated energy properly.
This is the code I’m trying to upload:
odrv = odrv0
odrv.config.dc_bus_overvoltage_trip_level = 30
odrv.config.dc_bus_undervoltage_trip_level = 19
odrv.config.dc_max_positive_current = 15
odrv.config.dc_max_negative_current = -0.1
odrv.config.brake_resistor0.enable = True
odrv.config.brake_resistor0.resistance = 2
odrv.axis0.config.motor.current_control_bandwidth = 100
odrv.axis0.controller.config.vel_gain = 3
odrv.axis0.controller.config.vel_integrator_gain = 25
odrv.axis0.controller.config.pos_gain = 20
odrv.axis0.config.motor.motor_type = MotorType.HIGH_CURRENT
odrv.axis0.config.motor.pole_pairs = 15
odrv.axis0.config.motor.torque_constant = 0.9505747126436782
odrv.axis0.config.motor.current_soft_max = 16
odrv.axis0.config.motor.current_hard_max = 30.8
odrv.axis0.config.motor.calibration_current = 3.3333333333333335
odrv.axis0.config.motor.resistance_calib_max_voltage = 4
odrv.axis0.config.calibration_lockin.current = 3.3333333333333335
odrv.axis0.motor.motor_thermistor.config.enabled = False
odrv.axis0.controller.config.control_mode = ControlMode.POSITION_CONTROL
odrv.axis0.controller.config.input_mode = InputMode.POS_FILTER
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.controller.config.input_filter_bandwidth = 20
odrv.can.config.protocol = Protocol.NONE
odrv.axis0.config.enable_watchdog = True
odrv.axis0.config.watchdog_timeout = 1
odrv.inc_encoder0.config.enabled = True
odrv.axis0.config.load_encoder = EncoderId.INC_ENCODER0
odrv.inc_encoder0.config.cpr = 3200
odrv.axis0.pos_vel_mapper.config.use_index_gpio = False
odrv.axis0.config.encoder_bandwidth = 100
odrv.hall_encoder0.config.enabled = True
odrv.axis0.config.commutation_encoder = EncoderId.HALL_ENCODER0
odrv.config.enable_uart_a = True
odrv.config.gpio7_mode = GpioMode.UART_A
odrv.config.gpio6_mode = GpioMode.UART_A
odrv.config.uart_a_baudrate = 19200
Does anyone know how to fix this issue? Any help would be greatly appreciated!
Thanks in advance!