Share this

Research on the impact of CAN bus sampling points on CAN bus communication

2026-04-06 05:14:26 · · #1

1 Introduction

CAN stands for Controller Area Network, an ISO internationally standardized serial communication protocol. CAN's high performance and reliability are widely recognized and it is extensively used in industrial automation, shipbuilding, medical equipment, elevators, and other fields. Fieldbus is one of the hottest technologies in the field of automation today, often referred to as the computer local area network of automation. Its emergence provides strong technical support for distributed control systems to achieve real-time and reliable data communication between nodes. The CAN bus protocol is a fieldbus protocol that implements the physical layer, data link layer, and application layer. Because a fieldbus typically consists of only one network segment, it does not require layers 3 (transport layer) and 4 (network layer), nor layers 5 (session layer) and 6 (description layer). Layer 2 is the CAN protocol, and layer 7 is the application layer protocol. The CAN protocol has strong error correction capabilities, ensuring reliable transmission on the data link, which saves on the overhead of the application layer in this regard.

The characteristics of the CAN bus are: (1) There is no master-slave distinction in data communication. Any node can initiate data communication with any other (one or more) nodes, and the communication order is determined according to the priority of each node's information; (2) When multiple nodes initiate communication at the same time, the lower priority nodes give way to the higher priority nodes, which will not cause congestion on the communication line; (3) The maximum communication distance can reach 10Km (speed less than 5Kbps) and the speed can reach 1Mbps (communication distance less than 40m); (4) The CAN bus transmission medium can be twisted pair, coaxial cable, or optical fiber. The CAN bus is suitable for the following occasions: large data volume short-distance communication, small data volume long-distance communication, high real-time requirements, multi-master and multi-slave, or equal nodes.

CAN bus sampling points, as the name suggests, are the moments when the CAN bus level is read and parsed. They are crucial for CAN bus communication, especially in CAN networking mode. All nodes in the CAN network should be set to the same sampling point as much as possible, and the sampling point values ​​recommended by the standard should be used according to the communication distance and transmission rate. If the sampling points differ greatly, data interaction between CAN nodes in the same network may fail.

2. Rules and principles of CAN bus sampling points

In the CAN protocol, a bit time is divided into a synchronization segment, a propagation segment, phase buffer segment 1, and phase buffer segment 2. These segments are composed of the smallest time unit called a Time Quantum (hereinafter referred to as Tq). The number of Tqs constituting one bit and the number of Tqs constituting each segment can be set. By setting the bit timing, a sampling point can be set so that multiple units on the bus can sample simultaneously. The sampling point is the moment when the level on the bus is latched, and this latched level is used as the bit value. The sampling point is located at the end of phase buffer segment 1 (PBS1), as shown in Figure 1.

Figure 1. CAN bit timing structure diagram

The synchronization segment (SS) is responsible for timing adjustments between multiple units connected to the bus, enabling synchronized reception and transmission. Edges are included within this segment. The propagation time segment (PTS) compensates for all physical delays on the network. Phase buffer segment 1 (PBS1) and phase buffer segment 2 (PBS2) compensate for signal edges that cannot be included in the synchronization segment. The sampling point is a point in time where the bus level is read and interpreted, and the read level is used as the bit value. Therefore, the percentage of time from the start of a bit to the sampling point relative to the total time of a complete bit is the value of the sampling point, calculated using the formula: sampling point = (1 + TSEG1) / (1 + TSEG1 + TSEG2). Sampling points are crucial for the CAN bus. When networking, multiple nodes should ideally maintain the same sampling point, preferably at no more than 7/8 bit time points. Recommended sampling points for commonly used frequencies are shown in Table 1.

Table 1 Recommended values ​​for commonly used frequency sampling points

Regarding the calculation of sampling points: Sampling point = (1 + TSEG 1) / (1 + TSEG1 + TSEG2).

Assuming the crystal oscillator clock frequency is 16MHz, SJW is 1 Tq, TSEG1 is 13 Tq, and TSEG2 is 2 Tq, then the sampling point calculation, substituted into the above formula, is: sampling point = (1+13)/(1+13+2) = 87.5%.

It is recommended to set the sampling points to the CiA recommended values ​​as much as possible: when the baud rate > 800Kbps, a sampling point ratio of 75% is recommended; when the baud rate > 500Kbps, a sampling point ratio of 80% is recommended.

When the baud rate is less than or equal to 500Kbps, it is recommended to use 87.5% of the sampling points.

3. Analysis of the impact of CAN bus sampling points on transmission distance

Improvements to CAN transceivers and the introduction of isolation devices have significantly enhanced communication reliability. However, they have also introduced additional delays, leading to shorter communication distances or an increase in bus error frames. Taking an application at a 1Mbps baud rate as an example, this paper briefly analyzes the CAN bus signal delay. Factors related to CAN bus transmission distance include:

(1) ACK response

The CAN bus employs a multi-master communication mode and a non-destructive bus arbitration mechanism. Taking a standard data frame as an example, structurally it is divided into seven segments: start segment, arbitration segment, control segment, data segment, CRC check segment, ACK acknowledgement segment, and frame end segment. The ACK segment is 2 bits long and includes an ACK slot and an ACK delimiter.

In the acknowledgment field, the transmitter sends two "recessive" bits. When the receiver correctly receives a valid message, it sends a dominant bit to the transmitter during the acknowledgment slot (ACK signal) to acknowledge it. When the transmitting node detects that the bus is in an explicit state based on the wired-AND result, it considers that a node has given a valid acknowledgment and that its own frame is normal.

(2) CAN bus bit time composition

In CAN bus communication, the time of each bit consists of four parts: synchronization segment, propagation segment, phase buffer segment 1, and phase buffer segment 2. The synchronization segment is used for synchronization between bus nodes. Time segment 1 consists of the propagation segment and phase segment 1; the propagation segment compensates for the physical propagation delay of the signal. Time segment 2, or phase buffer segment 2, along with phase segment 1 and phase segment 2, compensates for phase errors along the edges. In practical controller design, adjusting the values ​​of time segment 1 and time segment 2 can change the compensation time for bus propagation delay.

(3) CAN bus delay theory analysis

After transmitting the CRC field, the transmitting node sends an acknowledgment bit. Within this bit's time, the receiving node should output an explicit bit as a response. If the transmitting node does not detect a valid explicit bit within the acknowledgment bit, it will determine that there is a bus error. Therefore, the fundamental condition for limiting the upper limit of signal propagation delay in the CAN bus system is to ensure that the transmitting node receives a valid acknowledgment signal within the acknowledgment bit. To meet this fundamental condition, taking a 1 Mbit/s baud rate and single-point sampling mode as an example, based on the changes in the sampling point before and after the synchronization segment, time period 1, and time period 2, when the width is set to 75% (i.e., the sampling point is located at 75% of the bit width from the start of the bit, which is 750 ns), theoretically, for the transmitting node to acquire a valid explicit bit in the acknowledgment bit, the entire signal propagation delay must be less than 750 ns. That is, the total delay of isolation devices, bus drivers, cables, etc., must be less than 750 ns to ensure a valid acknowledgment, i.e., ensuring that the total delay is less than or equal to the percentage of the bit time program sampling point position.

(4) CAN bus delay analysis

Figure 2 shows the propagation delay of communication between nodes on the CAN network. t2 and t5 are transceiver cycle delays, t3 and t6 are isolation delays, t4 and t7 are CAN controller processing delays, and t1 is the cable transmission delay.

Taking node A sending and node B receiving as an example, from the start of sending the CAN message to receiving the ACK response, the total delay of the entire response loop is T_total = (t1 + t2 + t3 + t4 + t5 + t6 + t7) * 2. During this period, the message passes through 4 isolation and transceiver stages and 2 cable stages. If you want to increase the transmission distance, you need to analyze the delay time of each stage.

For CAN transceivers, the process involves converting the digital stream input from TXD into corresponding analog bus signals, while the transceiver monitors the bus and converts the analog bus signals back into corresponding digital bit streams output from RXD. CAN transceiver manufacturers typically specify a "cycle delay," which includes both driver and receiver delays. The magnitude of this delay is determined by the transceiver's inherent characteristics. For example, the TJA1051 transceiver, as shown in its datasheet, has a maximum propagation delay of 220 ns and a minimum propagation delay of 40 ns. Transceiver cycle delay is a mandatory test item in the CAN bus specification. Selecting a high-performance transceiver can reduce transmission delay and increase transmission distance.

To improve the reliability of CAN nodes, the underlying CAN hardware typically employs an isolation design. A common solution is to use optocouplers + CAN transceivers, such as the 6N137 optocoupler and the TJA1051 CAN transceiver. The 6N137 optocoupler has a typical 60ns unidirectional delay, while all bidirectional signals must pass through four optocouplers, resulting in a total isolation delay of 240ns. This significantly shortens the permissible cable length of the CAN system without changing the bit time configuration. Alternatively, an isolated transceiver solution can be used, such as the CTM1051KT, which uses magnetic isolation. Magnetic isolation has a delay of 3-5ns. With the bit time configuration unchanged, the CTM1051KT's built-in isolation has virtually no impact on the permissible cable length, allowing for a transmission distance of approximately 36m at a 1Mbps rate.


Figure 2. CAN bus signal transmission delay

In practical applications, the time spent by the main CPU reading and writing data from the CAN controller and performing preliminary processing—that is, software latency—also has a certain impact on bus latency. Additionally, CAN controller latency must be considered, which is the time incurred by the CAN controller in converting information in the receive and transmit buffers and serialized information. The latency caused by software and the controller is related to the specific application, the main controller, the CAN controller, and the interface chip. Considering that the bus controller's internal processing time is already taken into account in its design, the latency should be below the nanosecond level and can be disregarded here.

Different cable types result in different latency rates and significantly affect transmission distance. Given the availability of peripheral components such as the CAN controller, transceiver, and isolation unit, the cable length can be calculated using the following method. If the cable's communication distance is L (in meters) and its communication rate is B (in units of...), then...

The propagation delay is given by bit/s, sampling position P (e.g., 75%), isolation device propagation delay tg (in ns, e.g., t3, t6), transceiver propagation delay tq (in ns, e.g., t2, t5), and cable propagation delay tx (in ns/m). The formula for estimating cable communication length is: L = [(1/B)•P–4(tg+tq)]/2tx. From this formula, it can be seen that the lower the cable delay rate, the farther the transmission distance under the same conditions. Therefore, in cable selection, it is recommended to use thicker conductors (the larger the wire diameter, the smaller the delay), or to use gold-plated or silver-plated cables.

The introduction of peripheral circuits such as isolation devices and the addition of long-term explicit shutdown functions to transceivers all increase the latency of the CAN bus. This results in newer transceivers having greater loopback delays, reducing the actual communication distance. To increase the CAN bus communication distance, it is necessary to understand the principles of CAN communication and signal line transmission. By improving the performance of transceivers and isolation devices and selecting appropriate cables, the latency of CAN signal transmission can be reduced, thereby increasing the actual communication distance.

4. Conclusion

The ability of each CAN bus node to correctly sample all points of CAN bus data is a prerequisite for effective CAN bus communication. All nodes in a network must maintain the same or similar sampling points; otherwise, incorrect reading points will occur due to bus distance and delay, resulting in CRC errors. This article details the principles, calculations, and standard recommendations for CAN sampling points, and analyzes the impact of CAN sampling points on transmission distance from the perspectives of CAN controller delay, CAN transceiver delay, cable delay, and software delay.


Read next

CATDOLL Luisa Hard Silicone Head

The head made from hard silicone does not have a usable oral cavity. You can choose the skin tone, eye color, and wig, ...

Articles 2026-02-22