Odrive and Arduino USB Serial interface (Tx0,Rx0)

Does anyone know why is not possible to talk with the Odrive through Arduino Serial interface? It works for example on Serial1, Serial2, Serial3 (on Arduino MEGA) and in general with SoftwareSerial as in the example on OdriveArduino library. But it doesn’t work on the first Serial port (the one also connected to the USB interface, Tx0 and Rx0 to be clear). And I’ve also never seen anyone using Tx0 and Rx0 to communicate with the Odrive. What I’m missing about it? :thinking:

The main problem with the first serial interface on most older Arduino boards (and I believe the MEGA as well) is that it is used to program the board (through a USB to UART bridge). If it all possible it is nice to not have to share this communication channel. That being said, there is no reason why you shouldn’t be able to use the first serial port to control and ODrive. Ensure that you are crossing the RX and TX lines. The TX pin on the Arduino should run to the RX pin on the ODrive and visa-versa. Also ensure that you’ve connected the ground pins on the two boards. It should also be possible to use the builtin USB to UART bridge normally used to program the Arduino board to communicate with your ODrive. Connect the Ground and Reset pins on the Arduino board to force it into a reset state and use a serial console program on your PC to directly issue commands to the ODrive.

1 Like