CAN-BUS Shield V1.2 - Translating messages between 2 CAN net

Hello,

I need to develop some kind of “gateway” between two different CAN subnets, so I can translate one signal from one subnet to the other:
CAN subnet “A” is 250kbps
CAN subnet “B” is 500kbps

My intention is to read signal “X” on CAN “A”, and transmit the data as signal “Y” on CAN “B”.

How can I do this with Arduino + CAN-BUS shield? Should I have two CAN-BUS shields attached to the same Arduino, and then read/transmit messages as described above?

Thanks a lot for your help!

Hi, as the two device has different baud rate, you should have 2 Arduino and 2 Can bus Shield.
And the two Arduinos connect via I2C or Serial.
Thanks.

Actually, you can do this with one Arduino and two CAN Bus shields. One of the shields will need to have the Select(CS) and Interrupt(Int) signals moved to other pins.

As for the code, I threw this together quickly, but it comes untested. There are drawbacks with the sketch and that version of the library. If you need more robust support for bridging, use the sub-development branch of the MCP_CAN_lib on my github. There is a tested dual CAN example already included in that library.
github.com/coryjfowler/MCP_CAN_ … bridge.ino

Yep, One Arduino with 2 Can bus shield is ok, sorry to make a mistake. :smiley:
Thanks cory.j.fowler.

Hello, i have a small question so i can finish my project my car has 3 different baudrate 33.3 , 95.0 and 500 for 2 shields yeah you use d9 and d10 but for the 3th i guess i have to do some modification on the board to use d8 ?

Yes, the 3 boards need 3 CS pin. :smiley: