Post · 7 min read· pp. 304–308

Error Codes

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 run pip install odrive --upgrade. To get the newest ODrive firmware, run odrivetool 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/or odrivetool are closed and try again. Only one process can use the ODrive at any time
  • Try 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 a different USB hub
  • 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:

    powershell

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

code
- Alternatively, you can remove the Zadig drivers manually with [DriverStoreExplorer](https://github.com/lostindark/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)

![diagram](https://cdn.archive.preserve.ng/img/2de401106ed292c080bc101ada628b0aa565005481237e0f91ba1011b1efdd9b.svg)

![diagram](https://cdn.archive.preserve.ng/img/382b1023df40a17e6f458fb7f06560b82cfbbb343e526e223388dc5cb6dcf237.svg)

- 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

![diagram](https://cdn.archive.preserve.ng/img/2de401106ed292c080bc101ada628b0aa565005481237e0f91ba1011b1efdd9b.svg)

![diagram](https://cdn.archive.preserve.ng/img/382b1023df40a17e6f458fb7f06560b82cfbbb343e526e223388dc5cb6dcf237.svg)

- Likely due to incorrect gains, specifically `vel_gain` may be set too high.
  Try following the [tuning procedure](/u/c127d207b559691f#tuning).
- 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

![diagram](https://cdn.archive.preserve.ng/img/2de401106ed292c080bc101ada628b0aa565005481237e0f91ba1011b1efdd9b.svg)

![diagram](https://cdn.archive.preserve.ng/img/382b1023df40a17e6f458fb7f06560b82cfbbb343e526e223388dc5cb6dcf237.svg)

- Likely due to incorrect gains for a given motor current limit.
  Specifically `pos_gain` is set too high.
  Try following the [tuning procedure](/u/c127d207b559691f#tuning).
- Increase the current limit of your motor for more torque.

Motor slowly starts to increase in speed

![diagram](https://cdn.archive.preserve.ng/img/2de401106ed292c080bc101ada628b0aa565005481237e0f91ba1011b1efdd9b.svg)

![diagram](https://cdn.archive.preserve.ng/img/382b1023df40a17e6f458fb7f06560b82cfbbb343e526e223388dc5cb6dcf237.svg)

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](/u/b3bca87f4b24c1af#encoder-overview).

Motor feels like it has less torque than it should and/or gets hot sitting still while under no load

![diagram](https://cdn.archive.preserve.ng/img/2de401106ed292c080bc101ada628b0aa565005481237e0f91ba1011b1efdd9b.svg)

![diagram](https://cdn.archive.preserve.ng/img/382b1023df40a17e6f458fb7f06560b82cfbbb343e526e223388dc5cb6dcf237.svg)

- 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](https://discourse.odriverobotics.com/t/motor-gets-hot-has-less-torque-in-one-direction-than-the-other/2394).

False steps or direction changes when using step/dir

![diagram](https://cdn.archive.preserve.ng/img/2de401106ed292c080bc101ada628b0aa565005481237e0f91ba1011b1efdd9b.svg)

![diagram](https://cdn.archive.preserve.ng/img/382b1023df40a17e6f458fb7f06560b82cfbbb343e526e223388dc5cb6dcf237.svg)

- 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.

Error during motor calibration

![diagram](https://cdn.archive.preserve.ng/img/2de401106ed292c080bc101ada628b0aa565005481237e0f91ba1011b1efdd9b.svg)

![diagram](https://cdn.archive.preserve.ng/img/382b1023df40a17e6f458fb7f06560b82cfbbb343e526e223388dc5cb6dcf237.svg)

If motor calibration fails (for example with `UNBALANCED_PHASES`, `PHASE_RESISTANCE_OUT_OF_RANGE`, or `PHASE_INDUCTANCE_OUT_OF_RANGE`),
see the [Motor Calibration Parameters Troubleshooting](/u/f45b2fd33aed3b63#motor-parameters-troubleshooting) page for how to choose calibration parameters and diagnose these errors.

# 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.

As an example, we will be disabling notifications from Microsoft Edge, but this procedure should work for all Chromium based browsers:

1. Open Microsoft Edge
2. Go to: `edge://flags/#enable-webusb-device-detection` (replace `edge` with the browser i.e. `chrome`)
3. Select **Disabled** in the dropdown for *Automatic detection of WebUSB-compatible devices*
4. 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**.