Multiple Arduino CAN nodes create form error on CAN bus

I am using 5 Arduino megas with DF Robot CAN shields on each of them. All of them are on the same CAN bus. I am sending messages on the CAN bus using Vector VN1630A.

Each of the Arduinos are receiving messages using code receiveCheck.ino from DF Robot: DFRobot_MCP2515/examples/receiveCheck/receiveCheck.ino at 7c8a7a98c15f99712a46445ad505f2d065138c8c · DFRobot/DFRobot_MCP2515 · GitHub

With 3 of these nodes on the same CAN channel, I am able to communicate to each of them with no error.

Once 4 nodes are on the same CAN channel, I receive a form error on the CAN channel:

The error stops all communication on the CAN channel. I have added this filter to each Arduino:

CAN.initMask(MCP2515_RXM0, 0, 0x05FF);                         // there are 2 mask in mcp2515, you need to set both of them
CAN.initMask(MCP2515_RXM1, 0, 0x05FF);

/*
 * set filter, we can receive id from 0x0534
 * // there are 6 filter in mcp2515,so it can filter six id,i.e.0x04~0x09.
 */
CAN.initFilter(MCP2515_RXF0, 0, 0x0534);

There was no change after adding this filter. Everything I know about these CAN error messages points to a hardware issue. Any help is appreciated.

Hardware details:
Vector: VN1600 Family - Network Interfaces for CAN, CAN FD, LIN, K-Line, J1708 and IO | Vector
Arduino Mega: https://www.amazon.com/ELEGOO-ATmega2560-ATMEGA16U2-Projects-Compliant/dp/B01H4ZLZLQ/ref=sr_1_2_sspa?dib=eyJ2IjoiMSJ9.mz1D_mMr7EDgH2SXGDwsrcr8OpUS1dbM5BUDhRY6ADdSL60H8dDf948EJ05ngi2Xwc5iytHKFRx-cGqzvFr2BWq-BCdGj1-YdsaZVRddxPZfhGmiBOcxt6PAma839xp7hxh_CFPS9-ZjCrT5dqWCf_xmNtOur1tLFosabZk64kASqbd0y9dpO1k1mRNw-THPkATh3DIx0xBeSnO1XWCGLJ6LlxZskJAxJHQ_zGwDHhg.HL0ZZcykHQWbUOEFFS0m_CEfzZj0jU1dUIaHNMUFQ1o&dib_tag=se&hvadid=174256732038&hvdev=c&hvlocphy=9016994&hvnetw=g&hvqmt=e&hvrand=199518857279254025&hvtargid=kwd-24718511749&hydadcr=24658_9648989&keywords=arduino+mega+2560&qid=1708534323&sr=8-2-spons&sp_csd=d2lkZ2V0TmFtZT1zcF9hdGY&psc=1
CAN Shield: Arduino CAN BUS Shield - DFRobot

The schematic shows a 120 ohm termination resistor labelled R2.
A bus only works properly when there are 2 resistors, one at each end.
You need to desolder the excess resistors.

1 Like

mikb55 is correct, CAN is a 60 Ohm bus. Remove all termination jumpers except the ones at the physical ends of the bus. After that you should be able to plug in at least a dozen more if the termination is not enabled.

Well, that makes things easy. Thank you for your response... you made my day

After depopulating each R2 resistor on the CAN shields the issue is resolved.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.