Brake Mode on Motor?

#1

Hi,

I’m using the Odrive 3.5 for a robotics project to drive some traction wheels.

I’d like to implement a “brake” mode on for the motors and I was wondering if there was some way to command the Odrive to short all the phases together so that the motor self-brakes?

#2

Why do you need to brake the motors by zero-voltage specifically? Why not simply set the velocity setpoint to 0?

#3

Setting the velocity of the motor to zero seems to place the unit in some sort of position hold mode where the motor tries to return to center when pushed.

The sort of behaviour I’m looking for is for the motor to resist movement, but not try to correct for it in any way.

#4

<odrv>.<axis>.controller.set_velocity_setpoint(0.0, 0.0) does exactly that.

1 Like
#5

What do you mean with 'to resist movement, but to not try to correct for it in any way? Do you mean the behavior of idle mode?

You could first set the velocity setpoint to zero, and after a few milliseconds set the requested state to 1

#6

I’m wondering, why is it that the motor is drifting back to it’s original position in velocity control mode? Shouldn’t it stay where you let go of the motor, ignoring it’s position?

I’m asking since I’m also working on a project where a back and forth movement should be resisted by an adjustable amount. I got it working by changing the vel_gain, but every time I let go, the motor drifts back to it’s original position.

1 Like
#7

The reason is because of the integrator gain correcting for steady-state velocity error. You can simply set the controller.config.vel_integrator_gain to 0 to disable this.

1 Like
#8

That was exactly what I was looking for, thanks!

#9

OK, now the position is kept, but how would I increase the force? I can only increase the vel_gain to about 0.0015 before the motor start shaking badly. But with this setting the current_control.Iq_measured only goes to about 20A peak while the motor should be able to handle at least triple that (Odrive 150Kv motor).