1
\$\begingroup\$

I'm trying to diagnose the significant amount of bus "stuff errors" on my CAN network. Network is new and has not ran without these errors. Topology is as shown below.

enter image description here

  • 18 Devices on CAN bus. 9 on each side, joined at din rail terminals.

  • Cable on the outside of dotted lines are this twisted pair cable.

  • Cable on inside of dotted lines to din rail terminals is this shielded twisted pair cable.

  • Dotted lines represent deutsch connector.

  • Bus length is roughly 20m - 25m

  • Bit rate is 500kbits/s

My question relates to the physical layer because I can be fairly sure software is working correctly.

Can any of the following things cause stuff errors on the bus?

  • Two different cable types
  • Sections of non shielded cable
  • A bad high or low connection to a device

Here is a picture of the CAN signals on a scope.

enter image description here

Here is an example of CAN traffic showing errors:

   355)      4916.3  Rx         0520  5  A6 0C 64 00 06 
   356)      4919.6  Rx         0523  8  05 00 00 00 41 00 00 00 
   357)      4919.8  Rx         0526  6  C0 01 08 00 08 01 
   358)      4920.3  Rx         0525  6  A8 73 AC 0D D0 02 
   359)      4920.5  Rx         0525  6  34 73 AC 0D D0 02 
   360)      4920.7  Rx         0523  8  B4 00 00 00 40 00 00 00 
   361)      4920.8  Error      0004  4  01 0A 01 00
   362)      4920.9  Error      0004  4  01 0A 02 00
   363)      4920.9  Error      0004  4  01 0A 03 00
   364)      4921.0  Error      0004  4  01 0A 04 00
   365)      4921.2  Error      0004  4  01 0A 05 00
   366)      4921.2  Error      0004  4  01 0A 06 00
   367)      4921.5  Rx         0523  8  10 00 00 00 41 00 00 00 
   368)      4921.7  Rx         0523  8  62 00 00 00 50 00 00 00 
   369)      4922.0  Rx         0523  8  1C 00 00 00 50 00 00 00 
   370)      4922.0  Error      0004  4  01 0A 04 00
   371)      4922.1  Error      0004  4  01 0A 05 00
   372)      4922.2  Error      0004  4  01 0A 06 00
   373)      4922.3  Error      0004  4  01 0A 07 00
   374)      4922.4  Error      0004  4  01 0A 08 00
   375)      4922.4  Error      0004  4  01 0A 09 00
   376)      4922.6  Error      0004  4  01 0A 0A 00
   377)      4922.6  Error      0004  4  01 0A 0B 00
   378)      4922.7  Error      0004  4  01 0A 0C 00
   379)      4922.8  Error      0004  4  01 0A 0D 00
   380)      4922.9  Error      0004  4  01 0A 0E 00
   381)      4923.0  Error      0004  4  01 0A 0F 00
   382)      4923.1  Error      0004  4  01 0A 10 00
   383)      4923.2  Error      0004  4  01 0A 11 00
   384)      4923.3  Error      0004  4  01 0A 12 00
   385)      4923.3  Error      0004  4  01 0A 13 00
   386)      4923.4  Error      0004  4  01 0A 14 00
   387)      4923.7  Rx         0523  8  9C 00 00 00 4F 00 00 00 
   388)      4923.7  Error      0004  4  01 0A 14 00
   389)      4923.8  Error      0004  4  01 0A 15 00
   390)      4924.1  Rx         0523  8  CC 00 00 00 41 00 00 00 
   391)      4924.1  Error      0004  4  01 0A 15 00
   392)      4924.2  Error      0004  4  01 0A 16 00
   393)      4924.3  Error      0004  4  01 0A 17 00
   394)      4924.4  Error      0004  4  01 0A 18 00
   395)      4924.4  Error      0004  4  01 0A 19 00
   396)      4924.6  Error      0004  4  01 0A 1A 00
   397)      4924.7  Error      0004  4  01 0A 1B 00
   398)      4924.8  Rx         0525  6  86 73 AC 0D D0 02 
   399)      4925.0  Rx         0525  6  28 73 AC 0D D0 02 
   400)      4925.1  Error      0004  4  01 0A 1A 00
   401)      4925.2  Error      0004  4  01 0A 1B 00
   402)      4925.4  Rx         0525  6  4B 73 AC 0D D0 02 
\$\endgroup\$
2
  • \$\begingroup\$ Have you tried with one or two devices on the network, then start adding more and see when the error starts occurring? \$\endgroup\$ – Ron Beyer Nov 12 '20 at 20:47
  • \$\begingroup\$ @RonBeyer I have tried this but the results were very inconsistent and I wasn't able to narrow it down. For example, adding in the devices one by one lead to no errors on the bus but as soon as the network was reset, the errors came back. \$\endgroup\$ – dos584 Nov 12 '20 at 20:56
1
\$\begingroup\$

I'm only going to answer one of your questions. Can two different cable types cause errors. Yes, if the cables have different characteristic impedances, signals may be reflected at the cable interfaces. I have no idea whether that is an issue in your case, however.

\$\endgroup\$
2
  • \$\begingroup\$ Thanks, unforunately the datasheet does not show any impedance values for one of the cables so I can't be sure on the effect and replacing the cable is my last resort so exploring other options first. \$\endgroup\$ – dos584 Nov 12 '20 at 23:58
  • \$\begingroup\$ Also, your schematic shows 120 ohm termination resistors. If your cable does not have 120 ohm characteristic impedance, there will be reflection at the ends as well. \$\endgroup\$ – Math Keeps Me Busy Nov 13 '20 at 0:44
1
\$\begingroup\$

At room temperature, with 60 ohm total load between the two CAN wires, the differential voltage rapidly decay to ZERO.

Yet there are hundreds of milliVolts of difference,

Fix that.

\$\endgroup\$
2
  • \$\begingroup\$ are all the devices set to run on the same bit rate, same identifier lengths, etc? \$\endgroup\$ – electrogas Nov 13 '20 at 5:45
  • \$\begingroup\$ @analogsystemsrf You're right. Fixed the differential voltage difference. Did not have signal ground connected because I didn't realize they were isolated transceivers. \$\endgroup\$ – dos584 Nov 18 '20 at 2:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.