How do I properly wire Odrive V3.4?

Hello. I’m trying to connect the following hardware together and as of right now, no luck. My motor is not spining
Turnigy 4250 410
Odrive V3.4
Encoder AMT102
Arduino UNO
Power resistor
24 V 13 A UPS

I am using the arduino test code to test the hardware .
Tthis is how I connected all the components one by one.
** Power resistor to AUX (-) and (+).Power resistor has not “+” or “-” marks so I randomly picked one end and connected it to AUX + and - to Odrive.

** Turnigy 4250 410.
It has three unmarked wires and I connected them randomly to M0 on ODrive. Odrive has a green connector with a “A” and “C”.

This device has two sets of pins and I used the bottom ones and connected them to J2 as follows.
SWDIO===>to J2 SWD
GND ===>to J2 GND
SWClK===>to J2 SWC

** Arduino UNO
Pin 8 to GPIO 2
Pin 9 to GPIO 1

After I connected all the parts as described above, I downloaded the AArduino sketch and run it.
The motor didn’t move at all.
The terminal monitor displayed:
ODriveArduino alpha.
Setting parameters…
Send the character ‘s’ to exectue test move
Send the character ‘b’ to read bus voltage
Send the character ‘p’ to read motor positions in a 10s loop
Vbus voltage: 0.0000

So, my questions are.
Do the three wires coming out of the motor need to be connected to specific connectors on the Odrive?.If not, how do I identify each wire?
How do i connect the power resistor? Do I randomly choose one end and then I connect it to the AUX connector on either “+” or “-”?
The sketch suggests
SoftwareSerial odrive_serial(8, 9); //RX (ODrive TX), TX (ODrive RX), which I did. I picked GPIO 1 and GPIO 2 on Arduino UNO to establish the connection?. Is there any specific order that I need to follow when picking pins on ODrive?

The STLINK V2 has two voltage pins 3.3 and 5. Do I need to connect either one to VCC on J2?.

The Odrive comes with a golden mini USB cable. What is the purpose of this cable? DO i need to have it connected at all times?

I am only using one motor. Does it make any difference if I use M0 or M1.

Thanks very much. I know there are a lot of questions but I want to understand in detail how the ODrive works from the beginng.

Hi, thanks for the detailed writeup of what you tried.

  • Yes it’s fine to connect the power resistor and motor in a random order.
  • STLINK connection is ok.
  • You don’t need to connect 3.3 or 5v pins on J2
  • USB cable is not required, it’s used when communicating to a PC
  • Using one motor is fine.

I think the UART connection is backwards:

SoftwareSerial odrive_serial(8, 9); //RX (ODrive TX), TX (ODrive RX)

This means that pin 8 is “RX” for the Arduino, and should be connected to ODrive TX. The ODrive readme says:

GPIO 1: Tx (connect to Rx of other device)
GPIO 2: Rx (connect to Tx of other device)

So I think the connections you need to make are:

  • Arduino pin 8 <-> ODrive GPIO 1
  • Arduino pin 9 <-> ODrive GPIO 2
  • Arduino GND <-> ODrive GND (on J3)

Also, you should note that the ODrive doesn’t come pre-programmed with any firmware, and you need to go through the Configuring Parameters steps, and then flash the firmware. You can change some of the tuning parameters on the fly afterwards from the Arduino; but some of the mandatory parameters are hard-coded from when you flash.

In the future the ODrive may come pre-programmed and let you configure everything without recompiling, but we haven’t quite got there yet.

1 Like