Splitting Automotive CAN-Bus

I soldered together two MCP2515-Boards and an Arduino Nano as seen in the enclosed picture:

I connected it between my ECU and the Speedometer in my car. Speed is 500kBit/s and the MCP2515 is configured to 8MHz. I also added 120 Ohm termination-Resistors to both CAN-Lines.

The library I used: GitHub - coryjfowler/MCP_CAN_lib: MCP_CAN Library

The code I used is quite similar to the "dual_can"-example given in the library above, just reconfigured as said above and added some logs.

However, my ecu seems to have problems communicating with the speedometer when I add the arduino, even though all messages are transmitted through. I noticed that because the error log tells me "missing communication to speedometer".

Yes, I have to split the CAN-Cables, the goal is to remove the speedometer and answer the ECU's requests on startup and also later on.

Has anyone worked with this before or has any ideas as to why my ecu does not want to communicate through the arduino with the speedometer?

Maybe you are too slow and the ECU can detect at the application layer that there is a delay between some messages.

Just confirming, because its unclear what your CAN bus look like. Are you sure you need the termination resistors on the existing CAN bus. You should only add one if one is removed by the split. The resistors should be at each end and not at each node. Having too many resisiors on your bus can create communication issues as well.

I thought it to be an error in my wiring but it turns out I converted the Standard CAN-Messages to Extended ones while sending them. Therefore neither of the participants understood what my chip was saying.

So.... next time: Post the code as well.

I'm looking to do something very similar, any chance i could have a copy of your sketch please?

Regards

John

Never mind, I've done it now :slight_smile: