Using termination to ensure recessive bit transmission

Termination is used for two reasons. First is to improve signal quality. Termination prevents reflections that might cause communication failure as a result of ringing (oscillation) on the bit edges. Reflexions can be particularly strong when the signal reaches the end of the cable, which is why termination adapters are placed at the ends. Secondly, termination can be used to get a recessive level defining a logical 1 in the communication.


Why use a resistor?

CAN is a serial protocol that transmits binary 0 or 1, where 0 is dominant and 1 is recessive. The CAN-driver in every CAN-node is normally completely passive when sending binary 1, the recessive level.

To get a defined signal level during recessive bit transmission, a passive component is required on the communication line – a resistor, usually. This resistor can ‘pull-up’ or ‘pull-down’ to a certain voltage level or be used in combination e.g. Single Wire CAN (SWC) uses a pull-up resistor, whilst Low Speed CAN (LS-CAN) uses a combination of pull-up and pull down resistors. Both SWC and LS-CAN have bit-rates of less than 125 kbit/s, making it possible to distribute the resistors across different CAN nodes.

 

Maximising signal quality

To achieve good signal quality, it is necessary to use a twisted pair wire as the transmission medium and to protect the signal from external noise. A twisted pair improves signal quality by ensuring a uniform cross section along the twisted pair and a fixed geometry, which will secure a fixed impedance. Fixed impedance is essential for good signal quality.

The twist keeps the two wires close together, protecting the signal from external electrical fields by ensuring that both wires experience a common voltage noise level, cancelling the effect of the interference. In addition, the twist makes the pair of wires resistant to magnetic disturbance. The limited gap between the two wires minimises exposure to magnetic flow, plus the twist ensures opposite flow in the next twist, nulling the effect of the magnetic field.

 

Obtaining a recessive level

To achieve a certain load to the recessive level, a resistive load (i.e. the resistor) is placed between the two twisted wires. This ensures that a certain energy level is required to create a differential voltage between the two wires. The resistor also ensures that the voltage difference returns to zero when the dominant signal disappears.

One challenge is to select an appropriate value for the resistor defining the recessive level. During dominant signal transmission, when a CAN-unit is sending a binary 0, it is necessary to achieve a certain signal level whilst recognising that a low resistor value will demand a high current from the CAN-driver. In other words, to save energy, the resistor value should be as high as possible. However, this has other drawbacks.

There are two challenges related to high resistor value. Firstly, if the resistor has a low value will it demand a relatively high noise energy to activate a dominant level and a low noise threshold makes the communication stream vulnerable to errors.

Secondly, during a dominant state, capacitance in the cable can be charged to this signal level so that before the CAN-driver can return to a passive state, those capacitors need to be discharged. To get the best performance, the resistor value should have lowest possible value.

For low speed communication (< 125 kbit/s), the rise and fall time is 500 nanoseconds and this signal change, recessive to dominant and vice versa, will be spread out over 100 metres. If the CAN-bus is less than 100 metres, it is possible to place the resistor at any place along the bus-line. In SWC and LS-CAN, the load is spread across every CAN-node. This has electrical advantages, but if you increase the number of CAN-nodes, the load will also increase unless the resistor value is increased in each node.

For bit-rates above 125 kbit/s, a new problem is created because an increased bit-rate also demands higher slew-rate. If a slew rate of 500 nanoseconds works at 125 kbit/s, a slew-rate of 50 nanoseconds will be required when sending at 1 Mbit/s, causing the bit-edge to be spread out over a 10 metre cable length. If the CAN-bus wire is longer than 5 metres, the bit-edge will reach the other end of the CAN bus and be reflected back to the other end, where it will be reflected again until all the energy is absorbed in the cable resistance. Reflections cause ringing in the signal level and to remove them, it is necessary to absorb the energy. This can be done by placing a resistor at the end of the CAN-bus with the same value as the impedance of the cable. It will absorb all the energy in the edge and create a signal with be a perfect square wave, without any ringing.

 

Some further questions to ask:

  • What is the impedance of my cable?
    This is not a simple question because it depends on the cable’s composition and isolation properties, together with its mechanical dimensions. A typical coax-cable will have 50 to 75 Ohm and a CAT5 cable will have 100 Ohm impedance. A resistor with the same value should be placed at both ends of the cable.
  • How many nodes are connected to my CAN bus?
    It is necessary to detect the exact number of nodes connected to the CAN-bus and adjust the internal termination to the correct value. Finding out the number of connected nodes is not a simple task, nor is changing the resistor value accordingly. A simple solution is to place two 120 Ohm resistors on the cable at two locations that will assure a 60 Ohm load. This will result in a proper recessive level for any number nodes connected to the bus-line. For bit-rates above 125 kbit/s or over long cables will it be necessary to place the load at the two ends of the cable to prevent oscillations at the bit-edge.
  • Why has the CAN standard selected 120 Ohm resistors?
    The answer is that most automotive cables are single wire. If you take the wires typically used in a car and twist them into a pair, you will get an impedance of 120 Ohm. If you then squeeze the twisted wires into a cable, the impedance typically drops to 105 Ohm and then use thin isolation – as exemplified in CAT5 cable – the impedance drops to 100 Ohm.

A 120 Ohm resistor is not the optimal ending resistor when using a CAT5 cable for your CAN-bus, but it is good enough for a slew-rate of 50 nanoseconds at 1 Mbit/s. If bit-rate is increased to 100 Mbit/s and slew-rate of a few nanoseconds is sought, there will be problems … but this is more than even CAN-FD will ever reach.