farshid616 / Can-to-Eth

Can bus to Ethernet Converter Using Arduino Uno

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can-to-Eth

Can bus to Ethernet Converter Using Arduino Uno This device will forward any packet that is receiving on can port to ethernet and vice versa.

Setup Device

To setup this device we need:

Arduino Uno R3

CAN to SPI module

Ethernet module

First of all attach Ethernet shield on you arduino Uno. Then connect the CAN to SPI module as the picture bellow.

Can to SPI connection

For more information you can visit the reference website.

Device Picture:

Can To Ethernet Converter

Details

How to run

After setup phase open Arduino ide and program the device with code. Simply set device ip, mac address and communication ports on line 13-18. This device forward every message that receive on device "ip" address to Canbus and forward every messages that receive from Can to ethernet on "bc" ip.

IPAddress ip(192, 168, 1, 101);
IPAddress bc(192, 168, 1, 255);
unsigned int localPort = 56800;      // local port to listen on
unsigned int bcPort = 56801;      // local port to listen on

Author

Farshid Abdollahi

About

Can bus to Ethernet Converter Using Arduino Uno


Languages

Language:C++ 100.0%