0
\$\begingroup\$

Background: I need to set up a CAN bus between different components of an electric UAV (battery management system, motor inverter, autopilot, etc.). My avionics/networking experience up to now includes home networking, RC hobby servos (PWM), and "smart" hobby servos (serial), so I'm familiar with the general process I have to follow in terms of network software (device IDs, baud rates, etc).

Problem: I've never dealt with the idea of "termination". I keep reading something along the lines of "CAN needs 120Ω termination at each device".

This video helps me understand why I need termination, but I'm not sure how to implement that.

Am I supposed to slap a 120c resistor parallel to the CAN_H and CAN_L pins of each device?

OR

Should I measure the impedance of a length of desired wire length and match that impedance?

For example: I need 75 cm of wire between device A and B. I've set CAN bit rate to 250 kbps. I connect 75 cm of wire connected to a signal generator supplying a square wave at 250 kHz and measure an impedance of 75 Ohms. I terminate with a 75Ω resistor.

Followup questions:

  1. Do I need to terminate at both ends of a connection?
  2. Is there a hand-held tool for measuring impedance at a set frequency?
  3. What is the recommended way of connecting a wire branch from the main CAN line to a set device? Solder?
\$\endgroup\$
2
\$\begingroup\$

Not at each device. You're supposed to daisy chain CAN devices so you only need termination at both far ends, preferably a little bit past the last device (rather than slightly in front of it) so the termination is truly at the end.

Do you know how if you pour water into a bucket it splashes? And the faster you pour the more it splashes? Now imagine instead of a bucket it's a big long pipe with a closed end.Why does it splash? Because the water flow abruptly changes due to the bottom of the bucket or pipe. Now instead of a closed end the pipe diameter abruptly changes and narrows.

The water is like electricity, The pipe is like a conductor, the pipe diameter is the characteristic impedance, and the splashes are voltage reflections (and technically the far end of the pipe communicating to the near-end of the pipe that something has changed so the system can react and reach equilibrium).

Pouring faster is like trying to have a faster transition edge. How do you stop the splashing? One way is maybe to make a hole at the far end so that the water flow doesn't abruptly change. That's what a termination basically is (there's more to it and in electricity there's other ways to go about it that don't have mechanical analogs).

It's characteristic impedance that ideally determines the termination values you want, not impedance.

Go read up on transmission lines. Also:

Why does the CAN bus use a 120 ohm resistor as the terminating resistor and not any other value?

\$\endgroup\$
  • \$\begingroup\$ Ok, I understand why I just need a resistor at each end ("terminal") of the BUS. If I'm reading this site correctly, I can use 120Ω terminal resistors if I'm doing high speed (>125 kbps) for any number of nodes on short distance (5-10 m cable). Correct? \$\endgroup\$ – techSultan Jun 25 '19 at 19:43
  • 1
    \$\begingroup\$ Yes. You can always scope to see if the ringing is acceptable or not and adjust the resistor value. A lot cheaper than getting equipment to measure the line's characteristic impedance, although I do wish those were more common. \$\endgroup\$ – DKNguyen Jun 25 '19 at 19:46
  • 1
    \$\begingroup\$ It’s not the bit rate that matters but the propagation delay vs rise time. If not matched, the rise time needs to be a 10th of the propagation delay and same for impulse noise down the line. \$\endgroup\$ – Tony Stewart Sunnyskyguy EE75 Jun 25 '19 at 21:07

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.