2
\$\begingroup\$

I'm wondering if anyone knows if there is an upper limit for the distance a terminating resistor can be from the literal end of the CAN bus or where the last node is.

We have an HMI that is connected to the CAN bus and it is located beside a panel. We are wondering if it is acceptable to have the terminating resistor within the panel itself (via a terminal block) and a harness would run from there to the HMI. The cable distance would be about 10' (including strip length and distance between the panel and HMI).

We are hoping this will be acceptable purely for aesthetics, because this will eliminate the amount of loose wires hanging near the HMI.

I've gone through the TI physical layer instructions and did not find any such constraint.

I'm guessing the distance would only be an issue if the line impedance increases dramatically due to the length of cable but I'd like to know for sure.

Thanks.

enter image description here

\$\endgroup\$
2
  • 1
    \$\begingroup\$ Thats not a 'dropping resistor', its a terminator resistor used for impedance matching, the line should also be 120Ω line impedance. \$\endgroup\$
    – Voltage Spike
    Nov 6 '18 at 17:42
  • \$\begingroup\$ True, I will remove that link from the question because it does not apply in this case. Thanks. \$\endgroup\$
    – Djames
    Nov 6 '18 at 17:43
3
\$\begingroup\$

What you have is essentially an unterminated stub. This TI application note mentions on page 9 the maximum length allowed for a stub according to the CAN specification. It is 0.3 m, slightly longer than your 10, therefore I think you should be fine.

If you can change the slew rate of your CAN driver, as they suggest, then you might have longer unterminated stubs, but it does not apply to your case, since your HMI panel probably cannot change its slew rate.

edit: Oops, mixed 10 inches with 10 feet, which is way larger than the maximum allowed stub.

\$\endgroup\$
3
  • \$\begingroup\$ Thank you Antoine! I hadn't seen this section before. However, I think you got the units above mixed up. 0.3 m = 0.98'. But what you've told me has made this more clear. Our programmer sent me 5.2.5 Shield Termination of J1939/11, which states that the stub length should be less than 1 m. So in this case 10' is far larger, so I think I will not be able to use the terminal block resistor. \$\endgroup\$
    – Djames
    Nov 6 '18 at 17:54
  • \$\begingroup\$ Indeed, it appears that I mixed feet and inches, not used to working with those on that side of the Atlantic! I will edit my answer accordingly. \$\endgroup\$ Nov 6 '18 at 18:27
  • \$\begingroup\$ Wouldn't this rather depend on the baudrate used? \$\endgroup\$
    – Lundin
    Nov 7 '18 at 7:51
1
\$\begingroup\$

It depends on the speed of your bus. The bus is a transmission line, the terminations are there to absorb reflections. As long as your stub is less than \$\frac{1}{20}\$ of the length of a bit time on your transmission media, you should be fine. If CAN is still limited to 1MBps (yes, it's been a while for me) then a 10' stub should be fine.

\$\endgroup\$
4
  • 1
    \$\begingroup\$ The critical wavelength is the rising and falling edge speed, which is at least 5 times the bit rate. \$\endgroup\$ Nov 6 '18 at 17:24
  • \$\begingroup\$ @EdgarBrown Damn, it's been too long -- I recalled 1/2 a bit time. At any rate, even on twisted pair with a 2/3 velocity factor a 1Mbps pulse is 200 meters long. 1/5 of that is 40 meters, which is comfortably longer than ten feet. Unless he's running at a higher bit rate, that is (what is the current maximum?). \$\endgroup\$
    – TimWescott
    Nov 6 '18 at 17:28
  • \$\begingroup\$ @TimWescott I am not aware what the maximum bit rate for CAN is now, but I do know that ours is less than 1 Mbps because our programmer advised me to limit the total length of the bus to 40 meters (suggested maximum length by TI, section 4.1). \$\endgroup\$
    – Djames
    Nov 6 '18 at 17:36
  • \$\begingroup\$ If you're paranoid, try it with a stub twice as long, at your maximum data rate. Or try longer and longer stubs until it stops working. \$\endgroup\$
    – TimWescott
    Nov 6 '18 at 18:56
1
\$\begingroup\$

Although you are exceeding by a factor of 10 the recommended maximum stub length for 1MHz CAN. Some back of the envelope calculations tell me that you are in a marginal region, that those rules are rather conservative, and there are ways that you might be able to get away with it.

The main issue is the rise/fall time of the drivers, if you reduce the transition speed on the stub this would reduce the problematic reflections. That same application note describes adjusting the drivers to achieve 1.6m stubs, half of what you need.

By adding a resistor in series with the stub you can achieve three things: (1) reduce the rise/fall time of the signals on the stub, (2) attenuate the reflections back to the main line, and (3) reduce the impedance mismatch introduced due to the attachment of the stub.

If you really NEED to have that stub there add a ~10-20ohm resistor in series with it. Be aware that the capacitive load of the lines would reduce transition time, and the terminations introduce a voltage divider that will reduce the noise margins for signals originating on the device on the stub side. Make sure to evaluate the signal eye for a large enough margin if you follow this approach.

\$\endgroup\$

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.