Industruino Serial com with Odrive


#1

Hello everyone,

I have been experimenting with the Industruino board for my development as it can handle industrial digital and analog I/Os (24v and 0-10v). Also the added robustness of the design is great for industrial use.

Basically I am using the industruino to receive some analog output 0-10v from an industrial kuka robot. this analog ouput will then be used to control the speed of a brushless motor using Odrive. As the industruino is based on arduino it should communicate well with the odrive using the odrivearduino library.

The issue I encounter is that the SoftwareSerial library is not supported by the Industruino (same MCU as Arduino M0). I did some digging on the industruino side and how to use serial communication. The board has built in hardware serial RX and TX pins than can be used directly (D5 and D10 according to https://static.industruino.com/downloads/diagrams/Industruino_INDIO_D21G_pinout_map_April’17_S.pdf).

My knowledge is limited in arduino library but if we could modify the OdriveArduino library to initialize the serial communication without using SoftwareSerial that should work. Someone did something similar for initializing serial using industruino with BoltIOT https://industruino.com/forum/help-1/question/softwareserial-compile-file-not-found-error-workaround-with-d21g-want-to-connect-to-boltiot-device-704 ).

If anyone has any suggestions on modifications to not use SoftwareSerial that would be great ! Thanks !


#2

You can use a hardware Serial instead of SoftwareSerial. At the top of ODriveArduinoTest make odrive_serial be a Serial object instead of a SoftwareSerial object. Just make sure you know which TX and RX pins you need to use.


#3

Thanks Oscar with your help and the industruino team’s I finally managed to get those 2 communicating.
Yep just had to use the hardware serial with Serial1 from the industruino that is linked to pin D10 (RX1) and D05 (TX1), for those who are looking to do the same.

Cheers,