13/09/2019 by Dynamic

(48 devices connected on one bus with a cable length of 20m)

To optimize the CAN-bit-rate it is necessary to have more information about the cable layout.
The optimal cable is a straight line with a termination in both ends, where all units are connected directly to this bus-line with only recessive load.
The delay in such cable is typically 5 ns/meter cable.
With a 20 meter cable that will result in a delay of 100 ns at the propagation segment in the CAN-bit must be twice this length in time ( 200 ns).
If everything else is perfect in the CAN-system it could be possible to have a bit-length of 250ns which indicate a bit-rate of 4 Mbit/s. (1/250*1000)=4)
Unfortunately is there a number of other factors that has to be considered, that will reduce the maximum usable bit-rate.

In most cases is the installation not this perfect. Below is a list of parameters that must be known before it is possible to define the best bit-configuration.

Longest signal delay

One important factor for CAN is the longest signal delay between any two nodes connected to the CAN-bus. The main source for delays is the CAN-bus wire which the units are connected to but there is other parts in signal chain that could cause considerable delays and phase shift in the CAN-bit edges;

  1. The drop-length: typically is there some wire extension from the bus line down to the CAN-driver in the installed unit and that length must be known. This drop-line will add some delay time that has to be considered, but worse it will cause distortion to the signal which will show up as oscillation at the bit-edges where there is a signal level switch.
  2. The EMC-filter: the best is to have a clean connection between the drop-line wires and the CAN-driver. In some cases it is necessary to add on EMC-filters which could include inductors and/or capacitors. This LP-filter could cause some signal-delay that would add up to the signal delay over the CAN-bus. Such energy storage components will also be part in the signal oscillation in the same way as the drop-lines.
  3. The CAN-driver delay: the CAN-driver have some internal delay from the TX-pin out to the CAN-bus. There will also be a delay from the level change at the CAN-bus to the RX-pin. This delay will add up to the total signal delay over the CAN-bus (20 meter). This delay is in the range from 50 to 500 ns, depending on the CAN-driver model and the temperature.
  4. The galvanic isolation delay: An galvanic isolation between the CAN-driver and the CAN-controller will delay the signal both to the CAN-driver TX-pin and from the RX-pin back to the CAN-controller. For fast galvanic isolators could this delay be between 5 to 50 nanosecond, but there is devices with delays far above 1000 nanosecond.
  5. The delay between CAN-driver and galvanic-isolation and CAN-controller: Normally is the wire distance between components on the PCB short and negligible but if the distance is long also this delay must be considered. Normally is the wire length less than 0.1 meter which is a delay less than 1 nanosecond.
Oscillator tolerance

The second important factor is the oscillator tolerance. By using good oscillators, like a crystal oscillator it is possible to more or less neglect this problem. If the oscillator tolerance is worse than +/-100 ppm it is necessary to use correct compensation for this problem. It should be noted that it is the two units with lowest tolerance that will set the rules for all installed units. In other words if you have 46 units with a tolerance of +/-30 ppm and two units with +/- 800 ppm all 48 units have to adjust to the worse tolerance of 800 ppm.

By knowing the worse oscillator tolerance and the maximum delay it is possible to assign minimum propagation segment, Synch-Jump Segment, Phase Segment 1 and Phase Segment 2.
If those values are assigned to the CAN-bit you will get the highest possible bit-rate. In many cases is a lower bit-rate selected and that will provide a slack in the CAN-bit.
This slack can be be used to extend the propagation segment and by that make the system robust to future delays caused by extension of the CAN-bus or possible units with more delays in the CAN-driver, galvanic oscillation or EMC-filter. It could also be used to extend the SJW to make it possible to use future units with less oscillator tolerance. It should also be noted that a larger Phase segments that necessary to handle the oscillator tolerance will move the sample point further away from the edge and by that less sensitive to edge phase offset caused by noise.