Newbie questions

Hi there.

I am considering oDrive for a project but still have a question.
Is it possible to set a input current limit so velocity mode is limited to a maximum drawn current?

If not, is it possible to implement such a feature? Or is it planned?

Greetings

DooM

If I understand this correctly, yes it is possible.

Velocity control uses the current control loop, so all parameters specified for the current control loop also apply to velocity control.

As part of the current control commands, the odrive limits the current that is supplies to the motor in this way:

// Current limiting
float Ilim = std::min(axis_->motor_.config_.current_lim, axis_->motor_.current_control_.max_allowed_current);
bool limited = false;
if (Iq > Ilim) {
limited = true;
Iq = Ilim;
}
if (Iq < -Ilim) {
limited = true;
Iq = -Ilim;
}

see controller.cpp
Basically, you can specify a maximum amplitude, and if the gains demand a higher current then the current limit the controller will just set the current at the current limit, with all the implications of that.

The parameter axis_->motor_.config_.current_lim has a protocol property so you can specify it in python with a command like so.

odrv0.axis0.motor.config.current_lim = 2

It is set to 10 by default. See Getting Started Guide Configure M0->1 Set the limits: -> Current limit