Error Codes
If you are using
odrivetool
, rundump_errors(odrv0)
. This will dump information about active and recent errors.If using the Web GUI, inspect the ODrive icon in the button left corner.
With this information you can look up the API documentation for your error(s):
<axis>.active_errors
: Currently active error conditions. Possible values listed underODriveError
. Cleared by removing the error condition.<axis>.disarm_reason
: Errors that caused the last disarm. Possible values listed underODriveError
. Cleared by<odrv>.clear_errors()
.<axis>.procedure_result
: Describes the result of the last axis procedure (such as calibration). Possible values listedProcedureResult
.<axis>.last_drv_fault
: Additional information if there was a gate driver fault.
<odrv>.issues
: Internal issues should always be 0. A value other than 0 might indicate a firmware bug or rare hardware exception.To clear all the errors, you can run
<odrv>.clear_errors()
.
AttributeError
If you get output like
AttributeError: 'RemoteObject' object has no attribute '<missing-attribute>'
, you have a version mismatch between odrivetool and the firmware on your ODrive. To get the newest version of odrivetool, you can runpip install odrive --upgrade
. To get the newest ODrive firmware, runodrivetool dfu
. See the Firmware Update page for more details.
USB Connectivity Issues
Could not claim interface ...
make sure all other instances of the GUI and/orodrivetool
are closed and try again. Only one process can use the ODrive at any timeTry turning it off and on again (the ODrive, the script, the PC)
Make sure you’re using the latest firmware and python tools release
Linux: Type
lsusb
to list all USB devices. Verify that your ODrive is listed.Linux: Make sure you set up your udev rules correctly.
Windows: Right-click on the start menu and open “Device Manager”. Verify that your ODrive is listed.
Windows: For users migrating from ODrive v3.x, it may be necessary to remove any/all drivers installed with Zadig utility. Detailed instructions can be found below.
Ensure that no other ODrive program is running
Run
odrivetool
with the –verbose option.Run
PYUSB_DEBUG=debug odrivetool
to get even more log output.If you’re a developer you can use Wireshark to capture USB traffic.
Try a different USB cable
Try routing your USB cable so that it is far away from the motor and PSU cables to reduce EMI
Uninstall Zadig Drivers (Windows Only)
Important
These instructions do not apply to users who are new to ODrive or have never modified their drivers with Zadig.
open PowerShell as Administrator and enter the following:
# Uninstall all ODrive devices (root device, CDC interface and Native Interface) foreach ($dev in (Get-PnpDevice | Where-Object { $_.DeviceID -like "USB\VID_1209&PID_0D32*" })) { &"pnputil" /remove-device $dev.InstanceId; } Remove-Item -Path HKLM:\SYSTEM\CurrentControlSet\Control\usbflags\12090D32* -Force -Verbose
Alternatively, you can remove the Zadig drivers manually with DriverStoreExplorer. Once installed, run the application and delete everything labeled ODrive.
Encoder Noise
Noise is found in all circuits, life is just about figuring out if it is preventing your system from working. Lots of users have no problems with noise interfering with their ODrive operation, others will tell you “I’ve been using the same encoder as you with no problems”. Power to ‘em, that may be true, but it doesn’t mean it will work for you. If you are concerned about noise, there are several possible sources:
Importantly, encoder wires may be too close to motor wires, avoid overlap as much as possible
Long wires between encoder and ODrive
Use of ribbon cable
The following might mitigate noise problems. Use shielded cable, or use twisted pairs, where one side of each twisted pair is tied to ground and the other side is tied to your signal. If you are using SPI, use a 20-50 ohm resistor in series on CLK, which is more susceptible noise.
Miscellaneous
List of other issues that may not produce an error code
Motor cuts off or spins uncontrollably at high speeds (i.e.: > 5000 RPM)
You may be approaching the limit of your encoder, make sure you are not exceeding the RPM rating.
This can only be fixed by using an alternative encoder or gearing down the output of your motor onto your encoder so that it still within its rating. If using the gearing options be sure to change your counts/rotation accordingly.
Motor vibrates when stationary or makes constant noise
Likely due to incorrect gains, specifically
vel_gain
may be set too high. Try following the tuning procedure.Check encoder shaft connection. Grub screws may vibrate lose with time. If using a CUI shaft encoder try remounting the plastic retaining ring and confirm that it is not coming into contact with the encoder housing. Also confirm that the encoder is securely mounted.
If you connect your motor to an object with a large moment of inertia (such as a flywheel) this will help reduce vibrations at high gains. However, make sure that all connections are ridged. Cheap shaft couplers or belts under low tension can introduce enough flex into a system that the motor may still vibrate independently.
Motor overshoots target position or oscillates back and forth
Likely due to incorrect gains for a given motor current limit. Specifically
pos_gain
is set too high. Try following the tuning procedure.Increase the current limit of your motor for more torque.
Motor slowly starts to increase in speed
Encoder has likely slipped. This may occur when your motor makes a hard stop or violently vibrates causing something to come lose. Try re-calibrating the encoder.
Motor feels like it has less torque than it should and/or gets hot sitting still while under no load
Encoder has likely slipped causing the motor controller to commutate the wrong windings slightly which reduces output torque and produces excess heat as the motor ‘fights itself’.
This can also be caused if the rotor bell slips on the motor shaft. On some motors the rotor bell is secured against the shaft with a grub screw. Confirm that this screw is tight enough. For further details on how to resolve this issue see this forum post.
False steps or direction changes when using step/dir
Try using a twisted pair cable between your microcontroller and the ODrive. A section cut from cat-5 cable works well as does just twisting some normal insulated wire together.
Ensure that the step/dir signal cables are not draped over the ODrive, and are not running in parallel to the motor or power supply cables.
Disable Browser Notifications
When connecting an ODrive to your computer with USB you should see a popup notification from your primary/default browser, if you have multiple browsers installed you may see a notification for each. Here is a suggested procedure to disable these popups.
Open Microsoft Edge
Go to:
edge://flags/#enable-webusb-device-detection
(replaceedge
with the browser i.e.chrome
)Select Disabled in the dropdown for Automatic detection of WebUSB-compatible devices
Restart or close the browser
Note
This will only disable the notifications, it will not impact the functionality of the GUI.
If you ever want to re-enable these notifications, follow the procedure above and set Automatic detection of WebUSB-compatible devices back to Default or Enabled.