Clone
8
Home
Oskar Weigl edited this page 2018-08-17 00:23:32 -07:00

OUT OF DATE

This wiki page is out of date, the relevant content needs to be moved to the new documentation.


Welcome to the ODrive wiki!

  • The Odrive github readme is found here.
  • The Odrive motor spreadsheet is found here.
  • If your problem is not listed below or you need additional help please visit the support discussion board.
  • For additional information on getting started including selecting the right encoder, resistor or power supply see here.
  • For live support please visit the Odrive discord support channel.

Troubleshooting

Firmware

Failure to build the firmware when running make

  • Confirm that you have installed all the required prerequisites.
  • Windows users: Confirm that tup has been correctly added to path by running env|grep PATH in Git Bash. If you see no mention of tup then you must add its location to your PATH environment variable.. Note that you may need to restart for the added path to take affect.
  • If you see unexpected errors relating to changes that you have made to the firmware and you are unsure how to solve them then you can start fresh (delete all changes) by running git reset --hard HEAD

Failure to flash the firmware when running make flash

  • Confirm that the ST-link is connected the correct pins and that you have power supplied to the board. This can be by the 5V pin on the ST link or the main DC power jack. No power is supplied over the USB connection.
  • Confirm that you have installed all the required prerequisites for the ST-link.
  • Note: Some ST-Links have been reported DOA. If you suspect your ST-link to be defective please get in contact with @madcowswe on the discussion board.

Troubleshooting unexpected startup behaviour

No movement on powerup

  • Confirm that power is indeed supplied to the Odrive DC jack and that the polarity is correct. For initial testing a 12V PSU which can supply a couple of Amps should be sufficient while the use of low current 'wall wart' plug packs may lead to inconsistent behaviour and is not recommended.
  • Confirm that there is only once source of power to the odrive. Remove the 5V connection from the ST-link if you have not already done so and turn the main DC power off and on again.
  • Check that calibration_current is not set to zero in low_level.c.
  • Check that you have good connections from your motor to the board.
  • If you are using a motor with a high winding resistance (some ebike/hoverboard motors and all gimbal motors) confirm that you have set #define HW_VERSION_HIGH_VOLTAGE true in main.h. This error can be confimred by checking for error 3 in the error codes.

Motor beeps once and then slowly rocks (not rotating smoothly) back and forth before stopping.

  • Check that the number of pole pairs in firmware matches your motor. Remember, this is the number of magnet poles in the rotor, divided by two. You can simply count the number of permanent magnets in the rotor, if you can see them. Note: this is not the same as the number of coils in the stator.
  • Check that you have good connections from your motor to the board.

Motor beeps once, rotates slowly in one direction and then stops.

  • Check that you encoder is connected correctly and that the encoder is plugged into the same channel as the motor that you are using.
  • Check that the encoder is coupled to your motor shaft correctly. Remember that grub screws can work them selves lose with time.
  • Check that you have the correct encoder_cpr set for your motor (M0 or M1) in low_level.c.. Remember that the counts per rotation is 4x the pulses per rotation for a quadrature encoder.
  • If you encoder has a configurable counts/rotation (such as the CUI series) check that the encoder output matches that listed in encoder_cpr set for your motor in low_level.c..

Motor continuously rotates at a slow speed in one direction on startup without stopping.

Motor beeps once, moves back and forth slightly during calibration but then cuts out (power to the motor is lost)

  • Confirm that your power supply is not experiencing a brownout by checking for error 23 in the error codes.
  • [KNOWN ISSUE] If you see error 20 (DRV fault) when checking for error codes then try reducing either your velocity gains or motor current. This issue only impacts boards V3.3 onwards and a fix is currently being tested.

The motor turns the wrong way during calibration (is hitting a hardstop)

  • Switch any two of the motor connectors to reverse the motor direction during calibration.

Troubleshooting motor behaviour after calibration

Motor vibrates when stationary or makes constant noise

  • Likely due to incorrect gains, specifically vel_gain in low_level.c is 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 are using a high resolution encoder (>4000 counts/rotation) then encoder_pll_bandwidth in low_level.c can be increased from its default of 1000 to a larger value such as 3000 to help reduce vibration.
  • 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 gians. 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 in low_level.c 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. Power the board off and on again so that it undertakes a new calibration. If you are using an index signal you will need to reconfigure encoder_offset.

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

Motor cuts off or spins uncontrollably at high rotational speeds (ie: > 5000 RPM)

  • You may be approaching the limit of your encoder. The 2400 count/rotation encoders included with odrive are realistically limited to around 5000 RPM. Exceeding this speed causes the odrive to loose track of position. 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 sees < 5000RPM at full speed. If using the gearing options be sure to change your counts/rotation accordingly.

Communication

Windows users: Python Window closes immediately upon opening.

  • Instead of double clicking the icon, open it using Ipython. The most fool proof way to do this is to install Anaconda 3.6 which installs all the required dependencies, open Ipython from the start menu (Anaconda3 -> Ipython), change directories to the location of ODrive\tools (eg. cd C:\ODrive\tools) and then enter run explore_odrive.py.

Failure to connect to Odrive over USB

  • Try connecting directly to your PC without the use of USB hub.
  • Windows users: Confirm that the Zadig utility that your ODrive (not STLink!) still has libusb-win32 applied. Sometimes installing a new USB device can cause windows to no longer associate libusb-win32 with odrive and it needs to be reapplied.
  • Restart your current terminal window and power cycle your odrive and try again.

USB connection is lost while in use

  • Try connecting directly to your PC without the use of USB hub.
  • Where possible, avoid passing the USB cable over the Odrive, in parallel to the motor cables or power supply cables in order to limit electrical interference.

False steps or direction changes when using step/dir [ KNOWN ISSUE ]

  • Inductively coupled noise causes false steps to be detected. Fix planed for future release of odrive.
  • Use a twisted pair cable between your microcontroller thats generating the step/dir signals and your odrive board. 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 board, are not running in parallel to the motor or power supply cables.
  • Move the odrive board far away from the microcontroller thats generating the step/dir signals. The further the better.
  • To fix existing boards from an an ~22 Ohmn resistor in series with the step and direction pins along with a ~ 4.7 nF capacitor between the ground pin and the step and dir pins such as shown here.