Odrive to ethernet

The project I’m working on requires Odrive to ethernet communication. This is about ~60 meters (200 feet) between the Odrive and the server.

I’m thinking about trying Odrive → CAN → Ethernet using: https://www.amazon.com/Ethernet-Interface-Converter-CAN-Bus-Adapter/dp/B07Y8SS25C

Also looking at trying Odrive → USB - > Eternet using: https://www.amazon.com/AmazonBasics-1000-Gigabit-Ethernet-Adapter/dp/B00M77HMU0/

Does anyone have any experience doing this?

We once had a guy go Ethernet → SPI I think? Or possibly Ethernet → UART (?) :thinking:

What do you need it to do, and how many ODrives?

I’ll be using 4 D6374 motors with 2 controller 56v boards and 4 encoders. The motors will be controlled by a rack server 60 to 100m away.

Ideally ethernet can be used since it is already wired in place.

Any help would be greatly appreciated, this project is on a timeline.

CAN bus can cope with quite a long cable run. I’m sure it can do 100 metres without too much bother.
Ethernet cable can be used for CAN - just use one pair for CANH/CANL and any other wire for GND.
To avoid ground loops over that distance, use an isolated CAN transciever at the controller end e.g. https://www.amazon.co.uk/dp/B07Q812QK8

Thanks for the reply, towen.That could definitely work, however I’d like to use the ethernet cable for other network communication. So ideally convert the CAN to use TCP/IP then back to CAN then to USB?

If you are running Linux, consider using cannelloni - it’s a program to tunnel CAN over SCTP (like a real-time TCP, unique to Linux)
You could have a raspberry pi with CAN adapter at the remote end, and the server could use a vCAN socket connected via cannelloni to the real CAN bus on the Pi.
Then, use your python code with vcan as the CAN interface and it should ‘just work’
You may need to install libsctp-dev and build cannelloni from source on both platforms, because it’s not included by default in most distributions, but it works much better than UDP transport.

There are ethernet uart bridges like these. UART TTL to Ethernet Converter

1 Like