Motor unresponsive in closed loop control

Hi ODrive community,

I used ODrive about a year ago for a haptic feedback school project. Set myself up with the V3.6 board (running whatever firmware was current at the time), a Turnigy Multistar 9235-100 motor (100Kv). Got it up and running, and it worked beautifully. Fast forward to the present day, and i’m trying to resurrect it for another project.

The ODrive connects to my PC just fine, and runs the motor through the calibration sequence perfectly with no errors. However, when I try to put the motor in closed loop control, the motor doesn’t try to “fight” like it’s supposed to. I had it working a year ago so I know what it should feel like. If I give it a setpoint, it doesn’t move. I checked all my configured values and tuned values and they are all unchanged from when the motor was working. The ODrive doesn’t throw any errors or freeze up- I can put the motor into idle or calibrate it again. I am using a different power supply with a digital display running the ODrive at 20V, and it only shows about 0.060A of current draw in closed loop- contrast that with ~2.1A of current draw during the calibration sequence. This problem seems most similar to the one encountered by varkala_yashwanth here: Closed_loop_control problem
I changed my torque constant to 1 like he did but stil got the same “limp” closed loop control problem.

I feel like i’m missing something obvious here, but I’m stuck because the ODrive indicates all is well, and the calibration sequence is perfect. I’ve changed my tune around, and updated to firmware v0.5.1, but still encountered this problem. I’ll comment below this with screenshots of my settings, as it looks like new users can only embed one thing. Any help is appreciated. Thanks!




Start with an erase_configuration() and then setup your config again. What command are you using to set it to closed loop? Because requested state is 0 and the current state is 1 (IDLE), indicating it either finished already or never entered closed loop.

Hi Wetmelon, I’m just using the basic
requested_state = AXIS_STATE_CLOSED_LOOP_CONTROL command. Thanks for the erase.configuration() suggestion, I will try that tomorrow. I also notice that the requested and current states don’t match- I will check those tomorrow as well. Are there any alternate commands you suggest using?

Thanks again for the help Wetmelon- erasing the configuration and re-tuning the motor seemed to have solved it. I ended up tuning the motor to much higher gains this time- I think that had to with using the 8.27 torque constant rather than 1, which I had been using before. Perhaps the gains were so low that the controller had little to no effect on the motor in closed loop control. Anyway, the motor feels great now. Here is my setup for the Turnigy Multistar 9235-100, which i’m sure a few other people are using. This might help some other people using the same motor, getting started with ODrive.

.motor.config.current_lim = 60
.controller.config.vel_lim = 500
.motor.config.calibration_current = 20 (not sure if needed)
.config.brake_resistance = 0.47 (unchanged from default, also don’t think needed for basic startup)
.motor.config.pole_pairs = 20
.motor.config.torque_constant = 8.27
.motor.config.motor_type = 0 (or MOTOR_TYPE_HIGH_CURRENT)
.encoder.config.cpr = 8192 (depends on what encoder you use, i’m using the AMT102)

For the tuning parameters:
pos_gain = 150
vel_gain = 50
vel_integrator_gain = 250

1 Like