Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Overview of CAN bus characteristics

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)06/01 Report--

Brief introduction of CAN bus

CAN is the abbreviation of Controller Area Network (hereinafter referred to as CAN) and is an internationally standardized serial communication protocol of ISO. In the automobile industry, for the requirements of safety, comfort, convenience, low pollution and low cost, a variety of electronic control systems have been developed. Due to the different data types and reliability requirements used in the communication between these systems, there are many cases composed of multiple buses, and the number of wire harnesses increases. In order to meet the needs of "reducing the number of wire harnesses" and "high-speed communication of large amounts of data through multiple LAN", Bosch, a German electrical company, developed a CAN communication protocol for cars in 1986. Since then, CAN has been standardized through ISO11898 and ISO11519, which has become the standard protocol of automobile network in Europe.

The high performance and reliability of CAN has been recognized, and has been widely used in industrial automation, shipping, medical equipment, industrial equipment and so on. Field bus is one of the hotspots of technology development in the field of automation, and it is known as the computer local area network in the field of automation. The emergence of it provides a strong technical support for the distributed control system to realize real-time and reliable data communication between nodes.

Characteristics of CAN Communication

CAN bus is a serial data communication protocol developed by German BOSCH company in the early 1980s to solve the data exchange between many control and testing instruments in modern automobile. It is a kind of multi-master bus, the communication medium can be twisted pair, coaxial cable or optical fiber, and the communication rate can be up to 1Mbps.

Complete the frame processing of communication data

The functions of physical layer and data link layer of CAN protocol are integrated in CAN bus communication interface, which can complete the framing processing of communication data, including bit filling, data block coding, cyclic redundancy check, priority discrimination and so on.

The number of network nodes is unlimited.

One of the most important features of CAN protocol is that it abolishes the traditional station address coding and encodes the communication data blocks instead. The advantages of this method can make the number of nodes in the network unlimited in theory, and the identifiers of data blocks can be composed of 11-bit or 29-bit binary numbers, so 2 or more different data blocks can be defined. this block coding method also enables different nodes to receive the same data at the same time, which is very useful in distributed control systems. The maximum length of the data segment is 8 bytes, which can meet the general requirements of control commands, working status and test data in the industrial field. At the same time, 8 bytes will not occupy the bus for too long, thus ensuring the real-time communication. CAN protocol adopts CRC inspection and can provide corresponding error handling function, which ensures the reliability of data communication. Because of its excellent characteristics, high reliability and unique design, CAN is especially suitable for the interconnection of industrial process monitoring equipment. Therefore, it has been paid more and more attention by the industry and has been recognized as one of the most promising fieldbuses.

Free communication between nodes

CAN bus adopts multi-master competitive bus structure, which has the characteristics of multi-master operation, distributed arbitration serial bus and broadcast communication. Any node on the CAN bus can actively send information to other nodes on the network at any time, regardless of primary or secondary, so it can communicate freely among the nodes. CAN bus protocol has been certified by the International Organization for Standardization, the technology is more mature, the control chip has been commercialized, cost-effective, especially suitable for data communication between distributed measurement and control systems. The CAN bus card can be arbitrarily inserted into the PC AT XT compatible computer to form a distributed monitoring system.

Simple structure

Only two wires are connected to the outside, and error detection and management modules are integrated internally.

Transmission distance and rate

CAN bus features:

(1) there is no master-slave distinction in data communication. Any node can initiate data communication to any other (one or more) nodes, and the communication order is determined by the priority order of the information of each node. High-priority node information communicates at 134 μ s.

(2) when multiple nodes initiate communication at the same time, the ones with low priority and high avoidance priority will not cause congestion to the communication line; (3) the communication distance can reach 10KM (the rate is lower than 5Kbps) and the rate can reach 1Mbps (the communication distance is less than 40m). (4) the CAN bus transmission medium can be twisted pair or coaxial cable. CAN bus is suitable for large amount of data short-distance communication or long-distance small amount of data, real-time requirements are relatively high, multi-master, multi-slave or equal use of each node.

Reference Model of CAN Communication

The detailed division of communication systems by the International Organization for Standardization (ISO) is shown in figure 31.

Figure 31 ISO International Organization for Standardization Division of Communication Systems

The CAN bus specification defines the physical layer and data link layer of the ISO model.

In SylixOS, a system layer is added between the application layer and the data link layer. The upper application realizes the operation and control of the underlying data link layer by calling the corresponding interface provided by the operating system.

Fig. 32 CAN bus protocol layer block diagram

Some international organizations define the application layer, such as CANopen of CIA organization, DeviceNet of ODVA organization, etc., and some users design the application layer according to their own requirements.

Bit level of CAN signal

The CAN bus has two communication standards, ISO11898 and ISO11519, in which the characteristics of the differential level are different as shown in figure 4-3.

Figure 43 ISO11898 and ISO11519 standards

The CAN_H and CAN_L levels of ISO11898 and ISO11519-2 are different (Note: the signal coming out of the CAN controller is the TTL frequency (RX and TX), and the TTL level of RX or TX is the differential signal of CAN_H and CAN_L after passing through the CAN transceiver). Most of the devices used today use the ISO11898 protocol.

Why does CAN use differential signals to transmit data?

The differential signal is transmitted on the twisted pair, and the resonance interference causes the disturbance pulse with the same amplitude and phase on the signal line as shown in figure 44.

Figure CAN_H and CAN_L level signal diagrams during 44CAN bus transmission

After the line is interfered by the common mode signal, the signal difference remains unchanged and the signal is still transmitted correctly.

Synchronization Mechanism of CAN bus

The CAN bus uses asynchronous serial communication without clock lines, and the data is sampled according to the agreed frequency as shown in figure 15.

Fig. 55 introduction to asynchronous serial communication sampling

The use of synchronous sampling will bring some, because there is no clock line, the receiver of the signal regularly collects data, due to the deviation of the system clock, or the deviation of the baud rate will cause data reading errors as shown in figure 56.

Fig. 56 Baud rate sampling deviation

How does the CAN bus synchronize? As shown in figure 57.

Figure 57CAN signal synchronization

The CAN bus takes the signal jump edge as the synchronization time, which effectively limits the cumulative error between the two jump edges.

However, there is still a problem in doing so, that is, there will still be a large cumulative error after a long period of continuous high or low level, and there will still be data errors.

The designers of the CAN bus also take this situation into account, as shown in figure 58.

Figure 58 CAN synchronization mechanism

Insert a phase after five consecutive identical bits to produce a jump edge, combined with the above with the signal jump edge as the synchronization time, effectively eliminate the cumulative error and ensure the reliability of the CAN bus data. (note: the phase filled is automatically completed on hardware without software design.)

references

Project driver-basic course of CAN-BUS fieldbus-Zhou Ligong, Huang Xiaoqing.

Fieldbus Technology and its Application second Edition-Tsinghua University Press.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Network Security

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report