Low-speed CAN (Controller Area Network) bus communication system with distributed matched terminal resistors and fault positioning method thereof
By setting a terminal resistor in each CAN node and connecting it to CAN_L and CAN_H, the problem of signal transmission efficiency and stability of the CAN bus system when it fails is solved, the fault location is quickly located, and the troubleshooting efficiency is improved.
Patent Information
- Application Number
- CN202410833785.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-26
- Publication Date
- 2024-10-15
AI Technical Summary
When a partial line fault occurs in the existing CAN bus system, the entire system cannot communicate. The transmission efficiency is low and the signal is unstable, making it difficult to locate the fault location.
The low-speed CAN bus communication system uses distributed matching of terminal resistors. By setting a terminal resistor in each CAN node and connecting multiple terminal resistors to CAN_L and CAN_H respectively, it is ensured that the blocking of a single terminal resistor only affects the signal of the corresponding CAN node. transmission, maintain the signal transmission of the CAN bus, and provide a fault location method to quickly identify the fault location.
When encountering a partial fault on the line, the signal transmission efficiency and stability of the CAN bus are improved, ensuring normal communication of some nodes, enabling rapid location of the fault location, and improving the efficiency and accuracy of troubleshooting.
Smart Images

Figure CN118784394A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of CAN bus communication, and in particular to a low-speed CAN bus communication system with distributed matching of terminal resistors and a fault locating method thereof. Background Art
[0002] In modern automobiles and industrial control, Controller Area Network (CAN) bus technology is widely used for communication between various electronic devices and nodes. CAN bus systems are usually composed of multiple nodes, which can be sensors, actuators, control units, etc. In order to ensure the normal operation and communication quality of the CAN bus system, terminal resistors are usually connected at both ends of the bus. These terminal resistors are used to absorb signal reflections, improve signal quality, and ensure that the bus quickly enters the invisible state.
[0003] This dual-terminal bus network topology refers to Figure 1 , simple wiring, reliable signal, long transmission distance. The CAN bus terminal resistance is generally 120Ω, and there is a 120-ohm terminal resistor at each end of the bus to ensure reliable signal transmission, such as Figure 1 However, in a multi-node long-distance low-speed CAN bus system, typically there are 20 CAN nodes, a communication distance of 2km, and a baud rate of 20kbps.
[0004] The installation method of the double-terminal bus has the following problems. If the cable is disconnected or the terminal device is damaged, the entire system will be unable to communicate. Summary of the invention
[0005] The technical problem to be solved by the present invention is that when a local line fault occurs in the existing CAN bus system, the entire system will be unable to communicate, resulting in low transmission efficiency, unstable signals, and difficulty in locating the fault position.
[0006] To this end, the present invention provides a low-speed CAN bus communication system with distributed matching of terminal resistors and a fault locating method thereof.
[0007] The technical solution adopted by the present invention to solve its technical problem is:
[0008] A low-speed CAN bus communication system with distributed matching of terminal resistors, including CAN_L and CAN_H, and also including:
[0009] A plurality of CAN nodes, wherein the plurality of CAN nodes are arranged between CAN_L and CAN_H;
[0010] Terminal resistors, the number of which is consistent with the number of CAN nodes;
[0011] Wherein, a terminal resistor is arranged in each of the CAN nodes, and each of the terminal resistors is connected to both CAN_L and CAN_H.
[0012] By adopting the above technical solution, multiple terminal resistors are connected to CAN_L and CAN_H respectively. Therefore, the open circuit of a single terminal resistor only causes the signal transmission of the corresponding CAN node, and does not affect the signal transmission of the CAN bus. Although it will cause the signal transmission efficiency on the CAN bus to decrease, the CAN bus can still keep working. Furthermore, when encountering a local line fault, the signal transmission efficiency and stability of the CAN bus can be effectively improved.
[0013] Furthermore, the plurality of CAN nodes are sequentially and orderly arranged between CAN_L and CAN_H.
[0014] Furthermore, the number of the CAN nodes is n, the resistance of each terminal resistor is (60*n)Ω, and the resistance of the CAN bus is 60Ω.
[0015] A fault location method for a low-speed CAN bus communication system with distributed matching of terminal resistors comprises the following steps:
[0016] Step 1: Install multiple CAN nodes between CAN_L and CAN_H in sequence, and install a terminal resistor in each CAN node;
[0017] Step 2: Connect CAN_L and CAN_H to the host bus and run the system;
[0018] Step 3: When a system fault occurs, check the CAN node communication status and troubleshoot the fault.
[0019] Furthermore, after the terminal resistor is installed, a unique address is assigned to each CAN node by manual assignment or automatic assignment.
[0020] Furthermore, in step three, the CAN nodes that cannot communicate normally are found out, and it is determined that the CAN node has a single point failure or the cable is broken.
[0021] Furthermore, in step three, the number of CAN nodes that cannot work normally is first counted, and then the location of the CAN node that cannot work normally is determined through the address of the CAN node.
[0022] Furthermore, if all CAN nodes cannot communicate, it is determined that the cable is faulty.
[0023] Furthermore, when a single CAN node is unable to communicate, it is determined whether the node is the last node on the CAN bus. If the node is not the last node on the CAN bus, it is determined to be a single point failure of the CAN node; if the node is the last node on the CAN bus, further detection and judgment are performed on the node.
[0024] Furthermore, when there are multiple CAN nodes that cannot communicate, the addresses of the CAN nodes that cannot communicate are obtained. If these nodes are continuous nodes and cover the last node on the CAN bus, it is judged as a cable fault; if there are multiple CAN nodes that cannot communicate, these nodes are not continuous nodes or these nodes are continuous but do not cover the last node on the CAN bus, it is judged as a single point failure.
[0025] The beneficial effect of the present invention is that the present invention provides a low-speed CAN bus communication system with distributed matching of terminal resistors and a fault locating method thereof. In the CAN bus communication system, a distributed matching method is adopted, a terminal resistor is set in each CAN node, and multiple terminal resistors are connected to CAN_L and CAN_H respectively. Therefore, a single terminal resistor short circuit only causes the signal transmission of the corresponding CAN node, and does not affect the signal transmission of the CAN bus. Although it will cause the signal transmission efficiency on the CAN bus to decrease, the CAN bus can still keep working, and thus when encountering a local line fault, the signal transmission efficiency and signal transmission stability of the CAN bus can be effectively improved.
[0026] This CAN bus communication system has shown unique advantages when troubleshooting. When the low-speed CAN bus system encounters problems such as cable disconnection, it can ensure the normal communication of some nodes and quickly locate the fault location. For example, if the cable is disconnected between node 3 and node 4, then nodes 1, 2 and 3 can still maintain normal communication, which allows maintenance personnel to quickly and accurately locate the cable disconnection between node 3 and node 4, greatly improving the efficiency and accuracy of troubleshooting and resolution. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] The present invention is further described below in conjunction with the accompanying drawings and embodiments.
[0028] Figure 1 It is a network topology structure of a double-terminal bus in the prior art.
[0029] Figure 2 It is a schematic diagram of the low-speed CAN bus terminal resistance distribution in this application. DETAILED DESCRIPTION
[0030] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, which only illustrate the basic structure of the present invention in a schematic manner, and therefore only show the components related to the present invention.
[0031] In the description of the present invention, it should be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", "clockwise", "counterclockwise", "axial", "radial", "circumferential" and the like indicate positions or positional relationships based on the positions or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention. In addition, features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the present invention, unless otherwise specified, "multiple" means two or more.
[0032] In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0033] Reference Figure 2 A low-speed CAN bus communication system with distributed matching of terminal resistors. The CAN bus includes CAN_L and CAN_H. CAN_L is a low-level and high-impedance bus interface, and CAN_H is a high-level and high-impedance bus interface.
[0034] There are several CAN nodes arranged in order between CAN_L and CAN_H, and each node transmits differential signals through CAN_L and CAN_H. A terminal resistor is installed inside each CAN node, that is, the number of terminal resistors is consistent with the number of CAN nodes, and these terminal resistors are closely connected to CAN_L and CAN_H.
[0035] It should be noted that n is used to represent the number of CAN nodes, and multiple CAN nodes are named A1, A2...An in sequence, which means that the number of terminal resistors is n, and the corresponding terminal resistors are named R1, R2...Rn. The resistance value of the terminal resistor in each CAN node is set to (60*n)Ω. In this way, multiple terminal resistors in the CAN bus are connected in parallel, and the resistance value of the CAN bus is 60Ω. For example, if there are 30 CAN nodes on the bus, then each terminal resistor will be 1.8kΩ.
[0036] When a terminal resistor is short-circuited, take the terminal resistor in Node1 as an example, the signal transmission path between the terminal resistor R1 and CAN_L and CAN_H is disconnected. However, since there are multiple terminal resistors connected to CAN_L and CAN_H respectively, the R1 short circuit will only affect the signal transmission of CAN node A1, and will not affect the signal transmission from A2 to An. Although this situation will cause the signal transmission efficiency on the CAN bus to decrease, the CAN bus can still maintain a working state. Through such a design, the signal transmission efficiency and signal transmission stability of the CAN bus can be significantly improved when a local fault occurs in the line, thereby ensuring that the entire system can operate more reliably to a certain extent.
[0037] In the prior art, terminal resistors are set at both ends of the CAN bus mainly to prevent signal reflection. In any transmission line, when the signal is transmitted to the end of the line, if the end is not correctly matched, a reflected signal will be generated. This reflected signal will return along the original route and superimpose with the original signal, thereby causing signal distortion and affecting the correct transmission of data. In the CAN bus, by setting terminal nodes at both ends, the signal can be correctly matched when it reaches the end of the line, thereby eliminating reflection and ensuring the correct transmission of data. These two terminal nodes are usually implemented by a 120 ohm resistor, the resistance of which matches the characteristic impedance of the CAN bus, which can effectively prevent signal reflection. In the present application, the signal is transmitted to each CAN node, so that the signal can be correctly matched when it is transmitted to each CAN node, thereby greatly improving the accuracy of signal transmission.
[0038] A fault location method for a low-speed CAN bus communication system with distributed matching of terminal resistors comprises the following steps:
[0039] Step 1: Install the CAN bus
[0040] Install multiple CAN nodes in sequence between CAN_L and CAN_H, and install a terminal resistor in each CAN node;
[0041] Step 2: Assign addresses to CAN nodes
[0042] Assign a unique address to each CAN node. In a CAN network, each node needs to have a unique identifier (also called ID) so that other devices in the network can correctly identify and communicate. The address allocation method can be manual or automatic. In actual hardware design, it is usually necessary to assign the CAN address of the node through hardware pins or software. The hardware allocation method usually determines the CAN address of the node by setting the high and low levels of a certain pin, while the software allocation method is set in the node's CAN controller firmware or the CAN driver of the operating system. Preferably, a unique address is assigned to each CAN node in sequence along the CAN bus;
[0043] Step 3: Connect CAN_L and CAN_H to the host bus and run the system;
[0044] Step 4: Fault monitoring and troubleshooting
[0045] Continuously monitor multiple CAN nodes. When it is found that a CAN node cannot communicate normally, it is determined that there is a system failure. Check which CAN nodes can communicate normally and which CAN nodes cannot communicate. Determine whether there is a single point failure of the CAN node or a cable break. The specific principles for judging the fault type are as follows:
[0046] If some CAN nodes cannot communicate and some CAN nodes can communicate normally, first count the number of faulty nodes, and then determine the location of the CAN nodes that cannot communicate through the addresses of the CAN nodes.
[0047] If a single CAN node fails to communicate, and the node is not the last node on the CAN bus, it is considered a single point failure of the CAN node;
[0048] If there is a single CAN node that cannot communicate, and this node is the last node on the CAN bus, it is necessary to further judge the node and independently judge whether it can work normally in a normal cable. If the CAN node cannot work normally, it is judged as a single point failure. If the CAN node can work normally, it is judged as a cable failure. For example, assuming that the CAN bus has 10 nodes, when a system failure occurs, the address of the node that cannot communicate is obtained, and it is found that node 10 cannot communicate, then node 10 is first connected to a normal cable separately for node fault troubleshooting. If node 10 cannot work normally, it is judged as a single point failure of node 10; if node 10 is normal, it is judged that the cable between node 9 and node 10 is disconnected, which is a cable failure;
[0049] If there are multiple CAN nodes that cannot communicate, obtain the addresses of the CAN nodes that cannot communicate, and check whether these nodes are continuous nodes. If there are continuous nodes and they cover the last node on the CAN bus, it is determined to be a cable fault. For example, assuming that the CAN bus has 10 nodes, when a system failure occurs, obtain the addresses of the nodes that cannot communicate, and nodes 6-10 cannot communicate, then it is determined that the cable between node 5 and node 6 is disconnected, which is a cable fault;
[0050] If there are multiple CAN nodes that cannot communicate, and these nodes are not continuous nodes or these nodes are continuous but do not cover the last node on the CAN bus, it is judged as a single point failure. For example, if the CAN bus has 10 nodes, when a system failure occurs, the address of the node that cannot communicate is obtained, and nodes 5-8 cannot communicate, and nodes 9 and 10 are normal, then it is judged that nodes 5-8 are single point failures;
[0051] If all CAN nodes cannot communicate, it is judged that the cable is faulty. For cable faults, it is necessary to further check the cable connection and determine the location of the cable break.
[0052] In summary, the present invention presents a low-speed CAN bus communication system with distributed matching of terminal resistors and a unique fault location method thereof. In this CAN bus communication system, numerous terminal resistors are connected to CAN_L and CAN_H respectively. In this way, when a single terminal resistor is disconnected, it will only affect the signal transmission of the corresponding CAN node, and will not hinder the signal transmission of the entire CAN bus. Thus, when the CAN bus communication system encounters a terminal resistor disconnection, although it will cause the signal transmission efficiency on the CAN bus to be reduced, the CAN bus can still continue to maintain a normal working state, and then when encountering a local line fault, it can effectively improve the signal transmission efficiency of the CAN bus and the stability of signal transmission.
[0053] In addition, this CAN bus communication system has shown unique advantages when troubleshooting. When the low-speed CAN bus system encounters problems such as cable disconnection, it can ensure the normal communication of some nodes and quickly locate the fault location. For example, if the cable is disconnected between node 3 and node 4, then nodes 1, 2 and 3 can still maintain normal communication, which allows maintenance personnel to quickly and accurately locate the cable disconnection between node 3 and node 4, greatly improving the efficiency and accuracy of troubleshooting and resolution.
[0054] Based on the above ideal embodiments of the present invention, the relevant staff can make various changes and modifications without departing from the technical concept of the present invention through the above description. The technical scope of the present invention is not limited to the contents of the specification, but must be determined according to the scope of the claims.
Claims
1. A low-speed CAN bus communication system with distributed matching of terminal resistors, comprising CAN_L and CAN_H, It is characterized in that Also includes, A plurality of CAN nodes, wherein the plurality of CAN nodes are arranged between CAN_L and CAN_H; Terminal resistors, the number of which is consistent with the number of CAN nodes; Wherein, a terminal resistor is arranged in each of the CAN nodes, and each of the terminal resistors is connected to both CAN_L and CAN_H.
2. The low-speed CAN bus communication system with distributed matching of terminal resistors according to claim 1, It is characterized in that The plurality of CAN nodes are sequentially and orderly arranged between CAN_L and CAN_H.
3. The low-speed CAN bus communication system with distributed matching of terminal resistors according to claim 1, It is characterized in that The number of the CAN nodes is n, the resistance of each terminal resistor is (60*n)Ω, and the resistance of the CAN bus is 60Ω.
4. A fault location method for a low-speed CAN bus communication system with distributed matching of terminal resistors according to any one of claims 1 to 3, It is characterized in that The following steps are included: Step 1: Install multiple CAN nodes between CAN_L and CAN_H in sequence, and install a terminal resistor in each CAN node; Step 2: Connect CAN_L and CAN_H to the host bus and run the system; Step 3: When a system fault occurs, check the CAN node communication status and troubleshoot the fault.
5. The fault location method of the low-speed CAN bus communication system with distributed matching of terminal resistors according to claim 4, It is characterized in that After installing the terminal resistors, a unique address is assigned to each CAN node by manual or automatic allocation.
6. The fault location method of the low-speed CAN bus communication system with distributed matching of terminal resistors according to claim 5, It is characterized in that In step three, the CAN nodes that cannot communicate normally are found, and it is determined that the CAN node has a single point failure or the cable is broken.
7. The fault location method of the low-speed CAN bus communication system with distributed matching of terminal resistors according to claim 5, It is characterized in that In step three, the number of CAN nodes that cannot work properly is first counted, and then the location of the CAN nodes that cannot work properly is determined by the address of the CAN nodes, and the fault type is comprehensively determined based on the number and location of the CAN nodes that cannot work properly.
8. The fault location method of the low-speed CAN bus communication system with distributed matching of terminal resistors according to claim 5, It is characterized in that If all CAN nodes cannot communicate, it is determined that the cable is faulty.
9. The fault location method of the low-speed CAN bus communication system with distributed matching of terminal resistors according to claim 5, It is characterized in that When a single CAN node fails to communicate, determine whether the node is the last node on the CAN bus. If the node is not the last node on the CAN bus, determine that the CAN node has a single point failure. If the node is the last node on the CAN bus, further detection and judgment are performed on the node.
10. The fault location method of the low-speed CAN bus communication system with distributed matching of terminal resistors according to claim 5, It is characterized in that When there are multiple CAN nodes that cannot communicate, the addresses of the CAN nodes that cannot communicate are obtained. If these nodes are continuous nodes and cover the last node on the CAN bus, it is judged as a cable fault; if there are multiple CAN nodes that cannot communicate, these nodes are not continuous nodes or these nodes are continuous but do not cover the last node on the CAN bus, it is judged as a single point failure.
Citation Information
Cited By
Bus connection network and impedance matching control method thereof
CN119583242A
