Author Topic: CAN bus always needs a resistor to shunt it (termination)?  (Read 9124 times)

0 Members and 1 Guest are viewing this topic.

Offline zenerbjtTopic starter

  • Regular Contributor
  • *
  • !
  • Posts: 69
  • Country: gb
CAN bus always needs a resistor to shunt it (termination)?
« on: August 19, 2020, 08:19:17 pm »
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
 
The following users thanked this post: rvalente

Offline oPossum

  • Super Contributor
  • ***
  • Posts: 1472
  • Country: us
  • Very dangerous - may attack at any time
Re: CAN bus always needs a resistor to shunt it (termination)?
« Reply #1 on: August 19, 2020, 08:30:55 pm »
4 out of 5 dentists agree that CAN bus should be terminated at each end.
 
The following users thanked this post: zenerbjt

Offline poorchava

  • Super Contributor
  • ***
  • Posts: 1673
  • Country: pl
  • Troll Cave Electronics!
Re: CAN bus always needs a resistor to shunt it (termination)?
« Reply #2 on: August 19, 2020, 08:31:49 pm »
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.
I love the smell of FR4 in the morning!
 
The following users thanked this post: zenerbjt

Offline rvalente

  • Frequent Contributor
  • **
  • Posts: 736
  • Country: br
Re: CAN bus always needs a resistor to shunt it (termination)?
« Reply #3 on: August 19, 2020, 08:46:20 pm »
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
 
The following users thanked this post: zenerbjt

Offline uer166

  • Super Contributor
  • ***
  • Posts: 1026
  • Country: us
Re: CAN bus always needs a resistor to shunt it (termination)?
« Reply #4 on: August 19, 2020, 08:51:20 pm »
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.
 
The following users thanked this post: zenerbjt

Offline AndyC_772

  • Super Contributor
  • ***
  • Posts: 4315
  • Country: gb
  • Professional design engineer
    • Cawte Engineering | Reliable Electronics
Re: CAN bus always needs a resistor to shunt it (termination)?
« Reply #5 on: August 19, 2020, 09:06:20 pm »
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.
^^^ This.

CAN bus drivers can only pull the bus into a dominant state, where CANH > CANL. The only mechanism 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.
 
The following users thanked this post: zenerbjt

Offline leo_r

  • Newbie
  • Posts: 7
Re: CAN bus always needs a resistor to shunt it (termination)?
« Reply #6 on: August 19, 2020, 09:49:43 pm »
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.
 
The following users thanked this post: zenerbjt

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 22436
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: CAN bus always needs a resistor to shunt it (termination)?
« Reply #7 on: August 19, 2020, 10:45:33 pm »
However, in my experience short CAN buses will work quite happily in the lab with termination at just one end.

Or 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
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 
The following users thanked this post: uer166, zenerbjt

Offline zenerbjtTopic starter

  • Regular Contributor
  • *
  • !
  • Posts: 69
  • Country: gb
Re: CAN bus always needs a resistor to shunt it (termination)?
« Reply #8 on: August 20, 2020, 06:29:39 am »
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?
 

Offline OneGeekGuy

  • Contributor
  • Posts: 43
  • Country: 00
Re: CAN bus always needs a resistor to shunt it (termination)?
« Reply #9 on: August 20, 2020, 07:31:27 am »
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?

120R 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
 
The following users thanked this post: zenerbjt

Offline zzattack

  • Regular Contributor
  • *
  • Posts: 136
  • Country: nl
Re: CAN bus always needs a resistor to shunt it (termination)?
« Reply #10 on: August 20, 2020, 08:51:04 am »
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?
 
The following users thanked this post: zenerbjt

Offline Rerouter

  • Super Contributor
  • ***
  • Posts: 4705
  • Country: au
  • Question Everything... Except This Statement
Re: CAN bus always needs a resistor to shunt it (termination)?
« Reply #11 on: August 20, 2020, 10:09:05 am »
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 node

Then 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
 
The following users thanked this post: zzattack, zenerbjt

Offline SparkyFX

  • Frequent Contributor
  • **
  • Posts: 676
  • Country: de
Re: CAN bus always needs a resistor to shunt it (termination)?
« Reply #12 on: August 20, 2020, 11:40:35 am »
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?
Longer 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.

Even faster CAN (up to what, 10Mb/s?) isn't an impressive bitrate.
I heard 2 MBit is like a practical limit. Line length adds to the problem as well. Modern car is 1 MBit.

Support your local planet.
 
The following users thanked this post: zenerbjt

Offline Rerouter

  • Super Contributor
  • ***
  • Posts: 4705
  • Country: au
  • Question Everything... Except This Statement
Re: CAN bus always needs a resistor to shunt it (termination)?
« Reply #13 on: August 20, 2020, 12:13:04 pm »
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.
 
The following users thanked this post: zenerbjt

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 22436
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: CAN bus always needs a resistor to shunt it (termination)?
« Reply #14 on: August 20, 2020, 05:03:15 pm »
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
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 
The following users thanked this post: thm_w, zenerbjt

Offline exmadscientist

  • Frequent Contributor
  • **
  • Posts: 404
  • Country: us
  • Technically A Professional
Re: CAN bus always needs a resistor to shunt it (termination)?
« Reply #15 on: August 20, 2020, 05:26:01 pm »
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....
 
The following users thanked this post: zenerbjt

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 22436
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: CAN bus always needs a resistor to shunt it (termination)?
« Reply #16 on: August 21, 2020, 02:29:58 am »
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
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 
The following users thanked this post: zenerbjt

Offline Doctorandus_P

  • Super Contributor
  • ***
  • Posts: 4004
  • Country: nl
Re: CAN bus always needs a resistor to shunt it (termination)?
« Reply #17 on: August 21, 2020, 02:34:23 am »
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.
« Last Edit: August 21, 2020, 02:38:09 am by Doctorandus_P »
 
The following users thanked this post: SilverSolder, zenerbjt

Offline SparkyFX

  • Frequent Contributor
  • **
  • Posts: 676
  • Country: de
Re: CAN bus always needs a resistor to shunt it (termination)?
« Reply #18 on: August 22, 2020, 12:11:08 pm »
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....
Should 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.
Support your local planet.
 
The following users thanked this post: zenerbjt

Offline rvalente

  • Frequent Contributor
  • **
  • Posts: 736
  • Country: br
 
The following users thanked this post: zenerbjt

Offline SparkyFX

  • Frequent Contributor
  • **
  • Posts: 676
  • Country: de
Re: CAN bus always needs a resistor to shunt it (termination)?
« Reply #20 on: August 23, 2020, 01:36:08 pm »
Check this article

https://e2e.ti.com/blogs_/b/industrial_strength/archive/2016/07/14/the-importance-of-termination-networks-in-can-transceivers
I don't get it, isn't CAN supposed to be immune against common mode noise, given it is a differential signal?
Support your local planet.
 
The following users thanked this post: zenerbjt

Offline AndyC_772

  • Super Contributor
  • ***
  • Posts: 4315
  • Country: gb
  • Professional design engineer
    • Cawte Engineering | Reliable Electronics
Re: CAN bus always needs a resistor to shunt it (termination)?
« Reply #21 on: August 23, 2020, 03:19:25 pm »
"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.
 
The following users thanked this post: zenerbjt

Offline SparkyFX

  • Frequent Contributor
  • **
  • Posts: 676
  • Country: de
Re: CAN bus always needs a resistor to shunt it (termination)?
« Reply #22 on: August 23, 2020, 04:42:23 pm »
you'd need transformer isolation
Sure, 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.
Support your local planet.
 
The following users thanked this post: zenerbjt

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 22436
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: CAN bus always needs a resistor to shunt it (termination)?
« Reply #23 on: August 23, 2020, 07:47:30 pm »
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
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 
The following users thanked this post: zenerbjt

Offline rvalente

  • Frequent Contributor
  • **
  • Posts: 736
  • Country: br
Re: CAN bus always needs a resistor to shunt it (termination)?
« Reply #24 on: August 25, 2020, 12:21:42 pm »
If anyone want's do have a look inside a Industrial Equipment, this is the place:

http://s7detali.narod.ru/
 
The following users thanked this post: oPossum, zenerbjt


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf