CAN bus always needs a resistor to shunt it (termination)? - Page 1
Forum section: electronics / projects

author: zenerbjt
author_rank: Regular Contributor
timestamp: August 19, 2020, 08:19:17 pm
content: Do you agree that even if you are only using a CAN bus to port a simple low frequency signal such as eg a low frequency PWM (speed control signal) being sent to an 3 phase BLDC inverter …then you still need a termination resistance shunting the CAN bus?We are using the TCAN332 CAN transceiver.TCAN332 CAN tranceiver:https://www.ti.com/lit/ds/symlink/tcan332.pdf?ts=1597868220681&ref_url=https%253A%252F%252Fwww.ti.com%252Fproduct%252FTCAN332%253Futm_source%253Dgoogle%2526utm_medium%253Dcpc%2526utm_campaign%253Dasc-null-null-gpn_en-cpc-pf-google-eu%2526utm_content%253Dtcan332%2526ds_k%253DTCAN332%2526dcm%253Dyes%2526gclid%253DEAIaIQobChMI6MPP9Yqo6wIVT-3tCh0Sbg_lEAAYASAAEgJymPD_BwE%2526gclsrc%253Daw.ds

author: oPossum
author_rank: Super Contributor
timestamp: August 19, 2020, 08:30:55 pm
content: 4 out of 5 dentists agree that CAN bus should be terminated at each end.

author: poorchava
author_rank: Super Contributor
timestamp: August 19, 2020, 08:31:49 pm
content: You do, regardless of the number of nodes.Aside from stuff like reflections, which may not be a problem is your lines are short, termination acts as a lossy element that can dissipate differential mode interferences, which may be a really serious problem, especially that you're working with a motor drive, which is typically a very noisy device.I generally tend to place small value resistors in series with data lines to help dampening any random oscillations and noise that may get coupled to the line.

author: rvalente
author_rank: Frequent Contributor
timestamp: August 19, 2020, 08:46:20 pm
content: AFAIK, you not need only one but, two 120ohms terminations, at the begin and end of line.This is the same for 485 (modbus), profibus DP and CAN

author: uer166
author_rank: Super Contributor
timestamp: August 19, 2020, 08:51:20 pm
content: With no termination you will fail transmission due to arbitration failure. The transceivers need termination to work properly to pull bus to recessive state, nothing to do with reflections/SI.

author: AndyC_772
author_rank: Super Contributor
timestamp: August 19, 2020, 09:06:20 pm
content: Quote from: uer166 on August 19, 2020, 08:51:20 pm^^^ This.CAN bus drivers can only pull the bus into a dominant state, where CANH > CANL. Theonlymechanism to pull the bus back into the recessive state (CANH = CANL) is the resistor on each end. Therefore it simply cannot work without at least one resistor across the bus no matter how short or slow it is.

author: leo_r
author_rank: Newbie
timestamp: August 19, 2020, 09:49:43 pm
content: You definitely need 1 120R resistor. If you're designing anything that has to work in the field, then you should do it properly and put 1 on each end.However, in my experience short CAN buses will work quite happily in the lab with termination at just one end. If it's a temporary setup (eg initial setup of a device with a laptop) then skipping the end termination will probably be OK.The problems come when the wire gets a bit longer or the environment a bit noisier and you forget that you've not terminated it and start getting intermittent errors. You can waste a lot of time on intermittent errors.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: August 19, 2020, 10:45:33 pm
content: Quote from: leo_r on August 19, 2020, 09:49:43 pmOr long ones. Even faster CAN (up to what, 10Mb/s?) isn't an impressive bitrate. The tolerable stub length (including one-end-terminated lines) is several meters.For short buses inside equipment, it really doesn't matter where the terminator is.Tim

author: zenerbjt
author_rank: Regular Contributor
timestamp: August 20, 2020, 06:29:39 am
content: Thankyou,Our bus is about 2 metres. The contractor put a 120R at one end, (shunting the CAN bus) and a 120R_in_series_with_10nF at the other end......i take it this is bad?

author: OneGeekGuy
author_rank: Regular Contributor
timestamp: August 20, 2020, 07:31:27 am
content: Quote from: zenerbjt on August 20, 2020, 06:29:39 am120R is series with 10nF Cap? Are we talking about split termination? Two 60Ohm resistors and 10nF cap in the middle connected to ground? I have never seen before 120R in series with Cap between CANH and CANL.2m CAN will work even with really diferent termination far away from 120Ohm as other users pointed, but this is not the proper way to do it.BR

author: zzattack
author_rank: Regular Contributor
timestamp: August 20, 2020, 08:51:04 am
content: What designates an 'end' of a bus within a branching topology? Would you place the terminating resistors at the nodes spanning the longest possible path? Or do you use Ohms law to determine a suitable resistor value to place at every single node?

author: Rerouter
author_rank: Super Contributor
timestamp: August 20, 2020, 10:09:05 am
content: For canbus, the ends are usually loosely defined as the ends of the wires that are furthest away from one another, seeing as canbus is preffered as a piggyback bus instead of a trunk and branch topology, its usually clear where the ends are,Other ways are 1 on the most active node, and some fractional ones at the ends of each branch if its closer to a star topology, trying to keep the total load around 60 ohms, though honestly I have never seen a bus fail in the wild with only 1 terminated 120 ohm nodeThen there are intelligent can trancievers that can automatically switch in a termination resistor if it detects it is lacking one, but they tend to cost about 3x as much, from memory an optofet and a resistor was about the same price and a bit harder to kill.Edit: Remove that capacitor, It will only cause you greif, can is a differential pair, so it doesnt need added capacitance to soak up differential mode noise

author: SparkyFX
author_rank: Frequent Contributor
timestamp: August 20, 2020, 11:40:35 am
content: Quote from: zenerbjt on August 20, 2020, 06:29:39 amLonger stretches of CAN should be wired as twisted pair, i reckon the approach to use a capacitor in series was trying to address issues with signaling? Because otherwise he might have tried to add the parasitic capacitance in form of a component, which is very unusual and counteracts the termination itself i guess.Quote from: T3sl4co1l on August 19, 2020, 10:45:33 pmI heard 2 MBit is like a practical limit. Line length adds to the problem as well. Modern car is 1 MBit.

author: Rerouter
author_rank: Super Contributor
timestamp: August 20, 2020, 12:13:04 pm
content: CANFD goes up to 12Mbit, but the length and capacitance requirements get a bit hard to handle, also the controllers to interface with the protocol tend to cost more.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: August 20, 2020, 05:03:15 pm
content: A DC-block terminator is used when the load is well known (it only works up to a certain line length, proportional to C), the pulse length is much longer than the electrical line length, and supply current should be saved (hence the DC block).It will improve signal quality for an intermediate length bus, have little effect for short lengths (again, CAN is tolerant of stubs) and be insufficient for long lengths (where either C is too small, or the electrical line length is longer than the bit time).Tim

author: exmadscientist
author_rank: Frequent Contributor
timestamp: August 20, 2020, 05:26:01 pm
content: Always put a (preferably split) terminator at every transceiver. Every single one. No exceptions.You can always just not populate it. It's a lot easier to skip loading a R-C-R network if you don't need it than to have to bodge in a terminator because Something Changed and you need one now in a place you didn't need it before....

author: T3sl4co1l
author_rank: Super Contributor
timestamp: August 21, 2020, 02:29:58 am
content: In the design, yeah, doesn't hurt. In a product, leaving a jumper to disable the terminator for mid-bus devices is a good idea.Tim

author: Doctorandus_P
author_rank: Super Contributor
timestamp: August 21, 2020, 02:34:23 am
content: As written before, signalling on CAN bus has a "dominant" and a "recessive" state.In the "dominant" state CANH is driven to a higher voltage, while CANL is driven to a low voltage (usually GND).In the "Recessive" state None of the CAN wires are driven in any way, and a resistor is required to pull the CAN bus wires together.So the termination resistors on a CAN bus have 2 functions.Using a capacitor in series with a resistor at the end of the cable is a trick used with RS485. It makes it easier to have a reasonably high DC bias voltage on the bus (and thus noise resistance) when the bus is not driven by any of the nodes, while still having a low AC resistance close to the intrinsic cable impedance, to dampen reflections.When an RS485 bus is Idle, and the termination resistors pull the bus wires together, there is an "undefined" state on the RS485 bus. RS485 receivers react to relatively small voltage levels (50mV to 200mV or so) and easily pick up noise without an extra biasing network on the bus. The simplest bias network are a few resistors of a few hundred Ohm to a few kOhm to pull the wires apart, Lower resistors form a higher load on the bus, and may cause distortions, while with higher value resistors the created offset voltage decreases. With a capacitor in series with the termination resistor, you have it both ways.But that is for RS485. For CAN the capacitor has no advantages.

author: SparkyFX
author_rank: Frequent Contributor
timestamp: August 22, 2020, 12:11:08 pm
content: Quote from: exmadscientist on August 20, 2020, 05:26:01 pmShould the design goal be to put components of the exact same design on a CAN network, you need a method to tell them what their message IDs will be anyway, otherwise there will be arbitration problems. So practically you need to know at the design stage which component will be at the ends or in the middle and determine which ones get a termination resistor and which ones don't. Often this is just defined by function, you could also include it in the wiring, like an endcap or in the connector.Theoretically you could form a ring and gain redundancy against discontinuity, in which case you would need to know where to place the termination resistors or define where the discontinuity will be.

author: rvalente
author_rank: Frequent Contributor
timestamp: August 22, 2020, 01:46:37 pm
content: Check this articlehttps://e2e.ti.com/blogs_/b/industrial_strength/archive/2016/07/14/the-importance-of-termination-networks-in-can-transceivers

author: SparkyFX
author_rank: Frequent Contributor
timestamp: August 23, 2020, 01:36:08 pm
content: Quote from: rvalente on August 22, 2020, 01:46:37 pmI don't get it, isn't CAN supposed to be immune against common mode noise, given it is a differential signal?

author: AndyC_772
author_rank: Super Contributor
timestamp: August 23, 2020, 03:19:25 pm
content: "Immune", up to a point. Any transceiver will have a finite CMRR and a finite range of DC values over which it's able to perform the differential subtraction and recover the signal. If either wire goes outside the accepted range, the receiver can no longer cope, and the signal becomes corrupted.To achieve a signal which is truly immune to CM noise - and I'll well aware that pedants will jump at the chance to pipe up at this point - you'd need transformer isolation. Transformers have really excellent CMRR and no real limitation on the CM voltage range they can support, right up to the dielectric strength of the insulation.

author: SparkyFX
author_rank: Frequent Contributor
timestamp: August 23, 2020, 04:42:23 pm
content: Quote from: AndyC_772 on August 23, 2020, 03:19:25 pmSure, as it is done with Ethernet. But it won't play well with recessive/dominant bus states and their error detection or requires separate RX/TX and subsequently hubs/switches that establish the required network topology. Makes everything a lot more complicated.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: August 23, 2020, 07:47:30 pm
content: Doesn't have to be on the medium side. Isolated RS-485 and CAN transceivers are a common bit of industrial kit.There, typically the power is transformer isolated, while the signals are optoisolated.Of course the question follows -- how isolated is it really, and at what frequencies? CMRR might be very high at DC, sure; DC is trivial. How about at 1MHz, for equipment at the base of an AM transmitter? Or about step or impulse response (with bandwidth beyond 100MHz), for use in a switching inverter, or high voltage spark generator?Tim

author: rvalente
author_rank: Frequent Contributor
timestamp: August 25, 2020, 12:21:42 pm
content: If anyone want's do have a look inside a Industrial Equipment, this is the place:http://s7detali.narod.ru/