“In the CAN bus test, you will encounter errors for which no cause can be found. Then you may have overlooked a sharp tool to solve the abnormalities-terminal resistors. What is the important role and influence of the terminal resistance on the CAN bus?
In the CAN bus test, you will encounter errors for which no cause can be found. Then you may have overlooked a sharp tool to solve the abnormality-terminal resistance. What is the important role and influence of the terminal resistance on the CAN bus?
The propagation of electrical signals in cables is similar to light. When light enters water from the air, light emission and refraction will occur. Electrical signals will be emitted when the impedance is discontinuous or abrupt. The reflection process is more complicated, and even multiple reflections may occur. The transmitted signal may be confused with the normal signal, causing level changes and causing errors in data transmission.
1. What is a terminal resistance?
Keeping the impedance of the transmission cable continuous can effectively eliminate the emission, but the cable always has an end point, and the end point impedance will definitely change abruptly. In order to keep the end point impedance continuous, CAN-bus stipulates that matching resistors are connected to both ends or one end of the cable. ――Terminal resistance, as shown in Figure 1, the connection method of high-speed CAN-bus terminal resistance.
Figure 1 Connection of high-speed CAN-bus terminal resistance
1. The function of the terminal resistance is to absorb reflections and echoes. The biggest source of signal reflections is impedance discontinuity and mismatch.
2. If it is added to two separate wires, it is equivalent to an open loop state. Depending on the source of the signal reflection, that is, this connection method will cause the impedance of the single wire to be more discontinuous and suddenly become 0 at the end. Will cause reflections to increase exponentially.
3. The two 120Ω resistors added by the high-speed CAN actually simulate the characteristic impedance (not the actual impedance) generated on the transmission line when the harness is connected to infinity. This is a typical empirical value, and the specific value depends on the harness used. type.
2. Disaster scene where the terminal resistance does not match the bus
After understanding the role of terminal resistance, what is the actual impact on the CAN bus?
1. If the terminal resistance is too small, the signal amplitude is too small, which leads to signal recognition problems, and the data of the entire network is chaotic. Sometimes communication is possible, but it is extremely unstable, as shown in Figure 2.
2. If the terminal resistance is too large, the signal amplitude will be too large, the driving force will be too large, the signal will overshoot, the signal falling edge will slow down, that is, the discharge time will be longer, and the final bit width will be recognized incorrectly, as shown in Figure 3.
When encountering the above situation in the field, add the StressZ expansion board through CANScope and connect it to the bus under test in parallel. First, perform an analog resistance test to find the resistance value that matches the bus impedance, and then add it to the end of the bus. The signal is normal, as shown in Figure 4.
The terminal resistance at the end of the bus cannot be ignored, and the terminal internal resistance value of each node cannot be ignored. Many car manufacturers’ CAN node test specifications have a special internal resistance test item, including: CAN_H internal resistance, power supply and The internal resistance of CAN_L that is normally connected to the ground, the input internal resistance of the node under test when the positive pole is lost, the input internal resistance of the node under test when the ground is lost, and the differential resistance between CAN_H and CAN_L. The size of the internal resistance of the node is one of the factors that determine whether the bus has enough driving force to drive each node. The internal resistance test is also an effective method to directly determine whether the internal resistance of the node is faulty.
3. Principle and method of internal resistance test
Figure 5 Connection diagram of internal resistance test
In Figure 5, Rtest is the test resistance, which is 5KΩ. According to the internal resistance test standard, the test is carried out. In the CANH-to-ground and CANL-to-ground internal resistance test, U=-2V and 7V are tested once respectively, then CANH and CANL are opened, and the ground voltages VCAN_H and VCAN_L are tested. Then adjust U to -2V and 7V, respectively, connect to the test once, calculate with the following formula, and take the average value (VCAN_H and VCAN_L are open-circuit CANH and CANL voltages to ground):
Rin_H=Rtest×(VCAN_H CV)/(VC U)
Rin_L=Rtest×(VCAN_L CV)/(VC U)
When testing the differential internal resistance of CANH to CANL, U=5V, then open CANH and CANL to test the differential voltage Vdiff. Then adjust U to 5V for connection test. Calculate with the following formula (Vdiff is the open-circuit differential voltage):
Rdiff =Rtest×(Vdiff CV)/(VC U)
The current technical status of the industry is to manually complete the test through external voltage sources, current sources and other peripheral devices. The main problems are complicated wiring, multiple links, and low test efficiency, but the accuracy of the test data cannot be guaranteed. How can the test be convenient, accurate and fast?
Look here ☟☟☟
Four, CANDT conformance test system
The CANDT conformance test system can automatically complete CAN node physical layer, link layer and application layer conformance tests. It is the only instrument in the current CAN bus test field that can perform complete physical layer automated tests and export reports. The detailed architecture is shown in Figure 6. .
ISO11898-2 internal resistance standard test standard
According to the test standard, CANDT is used to test the internal resistance of each node on the bus, and the test result can be generated as a report, as shown in Figure 7.
l After the test is completed, the user can export the automated test report. For the failed test items, the CAN bus analyzer can be used to troubleshoot the fault and perform reliability testing to enhance the robustness of the device under test, and Zhiyuan Electronics’ CAN Bus experts will assist users to analyze failed projects and give suggestions for rectification;
l According to the test report, you can also track the standard source of test items, test procedures and judgment basis, etc.;
l OEMs can evaluate the quality of CAN nodes based on this report as a basis for OEMs’ admission.