Hi, I’m using an Odrive v3.6-56v, and I set up Odrive following the hoverboard guide.
The motor worked well. But some problems remain.
When activating the physical brake while driving the motor in a closed loop, the motor stops for a while and then starts to rotate again.
And when you activate the physical brake while driving the motor, set the speed to zero, and release the brake, the motor moves like a spring.
How do we get rid of this phenomenon?
Here are my config parameters.
odrv0.config.gpio3_mode = GPIO_MODE_PWM
odrv0.config.gpio3_pwm_mapping.min = 4
odrv0.config.gpio3_pwm_mapping.max = -4
odrv0.config.gpio3_pwm_mapping.endpoint = odrv0.axis0.controller._input_vel_property
odrv0.config.gpio4_mode = GPIO_MODE_PWM
odrv0.config.gpio4_pwm_mapping.min = -4
odrv0.config.gpio4_pwm_mapping.max = 4
odrv0.config.gpio4_pwm_mapping.endpoint = odrv0.axis1.controller._input_vel_property
odrv0.config.gpio9_mode = GPIO_MODE_DIGITAL
odrv0.config.gpio10_mode = GPIO_MODE_DIGITAL
odrv0.config.gpio11_mode = GPIO_MODE_DIGITAL
odrv0.config.gpio12_mode = GPIO_MODE_DIGITAL
odrv0.config.gpio13_mode = GPIO_MODE_DIGITAL
odrv0.config.gpio14_mode = GPIO_MODE_DIGITAL
odrv0.config.dc_bus_undervoltage_trip_level = 8
odrv0.config.dc_bus_overvoltage_trip_level = 56
odrv0.config.brake_resistance = 2.0
odrv0.config.enable_brake_resistor = True
odrv0.axis0.motor.config.pole_pairs = 10
odrv0.axis0.motor.config.calibration_current = 10
odrv0.axis0.motor.config.current_control_bandwidth = 100
odrv0.axis0.motor.config.torque_constant = 8.27 / 5.31
odrv0.axis0.motor.fet_thermistor.config.enabled = False
odrv0.axis0.encoder.config.mode = ENCODER_MODE_HALL
odrv0.axis0.encoder.config.cpr = 60
odrv0.axis0.encoder.config.bandwidth = 250
odrv0.axis0.encoder.config.ignore_illegal_hall_state = True
odrv0.axis0.encoder.config.hall_polarity_calibrated = True
odrv0.axis0.controller.config.enable_gain_scheduling = True
odrv0.axis0.controller.config.gain_scheduling_width = 250
odrv0.axis0.controller.config.enable_vel_limit = True
odrv0.axis0.controller.config.enable_overspeed_error = False
odrv0.axis0.controller.config.spinout_electrical_power_threshold = 100
odrv0.axis0.controller.config.spinout_mechanical_power_threshold = -100
odrv0.axis0.controller.config.pos_gain = 20
odrv0.axis0.controller.config.vel_gain = 2
odrv0.axis0.controller.config.vel_integrator_gain = 20
odrv0.axis0.config.calibration_lockin.current = 30
odrv0.axis0.config.general_lockin.current = 30
odrv0.axis0.config.calibration_lockin.vel = 20
odrv0.axis0.config.general_lockin.vel = 20
odrv0.axis0.controller.config.vel_limit = 20
odrv0.axis0.controller.config.control_mode = CONTROL_MODE_VELOCITY_CONTROL
odrv0.axis0.controller.config.input_mode = INPUT_MODE_VEL_RAMP
odrv0.axis0.controller.config.torque_ramp_rate = 1
odrv0.axis0.controller.config.vel_ramp_rate = 4
odrv0.axis0.motor.config.current_lim = 30
odrv0.axis0.motor.config.current_lim_margin = 8
odrv0.axis0.motor.config.requested_current_range = 38