High performance motor control
View the Project on GitHub odriverobotics/ODrive
Help improve these docs: submit edits using the link in the top right.
If you need help, please search or ask the ODrive Community.
No description
ERROR_PHASE_RESISTANCE_OUT_OF_RANGE
— 0x00000001
The measured motor phase resistance is outside of the plausible range.
During calibration the motor resistance and inductance is measured. If the measured motor resistance or inductance falls outside a set range this error will be returned. Check that all motor leads are connected securely.
The measured values can be viewed using odrivetool as is shown below:
In [2]: odrv0.axis0.motor.config.phase_inductance
Out[2]: 1.408751450071577e-05
In [3]: odrv0.axis0.motor.config.phase_resistance
Out[3]: 0.029788672924041748
Some motors will have a considerably different phase resistance and inductance than this. For example, gimbal motors, some small motors (e.g. < 10A peak current). If you think this applies to you try increasing config.resistance_calib_max_voltage from its default value of 1 using odrivetool and repeat the motor calibration process. If your motor has a small peak current draw (e.g. < 20A) you can also try decreasing config.calibration_current from its default value of 10A.
In general, you need
resistance_calib_max_voltage > calibration_current * phase_resistance
resistance_calib_max_voltage < 0.5 * vbus_voltage
ERROR_PHASE_INDUCTANCE_OUT_OF_RANGE
— 0x00000002
The measured motor phase inductance is outside of the plausible range.
See PhaseResistanceOutOfRange
for details.
No description
The gate driver chip reported an error.
The ODrive v3.4 is known to have a hardware issue whereby the
motors would stop operating when applying high currents to M0. The
reported error of both motors in this case is ERROR_DRV_FAULT
.
The conjecture is that the high switching current creates large ripples in the power supply of the DRV8301 gate driver chips, thus tripping its under-voltage fault detection.
To resolve this issue you can limit the M0 current to 40A. The lowest current at which the DRV fault was observed is 45A on one test motor and 50A on another test motor. Refer to this post for instructions for a hardware fix.
ERROR_CONTROL_DEADLINE_MISSED
— 0x00000010
No description
ERROR_NOT_IMPLEMENTED_MOTOR_TYPE
— 0x00000020
No description
ERROR_BRAKE_CURRENT_OUT_OF_RANGE
— 0x00000040
No description
ERROR_MODULATION_MAGNITUDE
— 0x00000080
The bus voltage was insufficent to push the requested current through the motor. If you are getting this during motor calibration, make sure that config.resistance_calib_max_voltage is no more than half your bus voltage.
For gimbal motors, it is recommended to set the config.calibration_current and config.current_lim to half your bus voltage, or less.
ERROR_BRAKE_DEADTIME_VIOLATION
— 0x00000100
No description
ERROR_UNEXPECTED_TIMER_CALLBACK
— 0x00000200
No description
ERROR_CURRENT_SENSE_SATURATION
— 0x00000400
The phase current was outside the measurable range.
There is a default 10% margin between the max allowed current and the measurable current range.
This is usually sufficent, but in some situations you may need some more margin. You can simply
decrease the current_lim
a bit, or you can increase the requested_current_range
. If you
still have issues after requested_current_range
is 30% higher than current_lim
then
you may have instability issues in the current controller.
ERROR_CURRENT_LIMIT_VIOLATION
— 0x00001000
Motor current magnitude exceeded the limit and margin.
There is a default of 8A margin between the current_lim
and this error. In some
situations the current controller may overshoot a bit more than this, so you can try to
turn this up a bit. If you still have issues after the margin is more than 30% of your
current_lim
you may have stability issues in the current controller.
ERROR_BRAKE_DUTY_CYCLE_NAN
— 0x00002000
No description
ERROR_DC_BUS_OVER_REGEN_CURRENT
— 0x00004000
too much current pushed into the power supply
ERROR_DC_BUS_OVER_CURRENT
— 0x00008000
too much current pulled out of the power supply