Test device and test system for can bus driving capability
By designing a test device for CAN bus driving capability, and utilizing a microprocessor-controlled load selection module and CAN communication module, automated testing of the device under test under different resistive and capacitive load conditions was achieved. This solved the problems of low efficiency and poor consistency in existing testing methods, and improved testing efficiency and consistency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Utility models(China)
- Current Assignee / Owner
- HOLLEY METERING LTD
- Filing Date
- 2025-08-11
- Publication Date
- 2026-07-24
AI Technical Summary
Existing CAN bus communication testing methods are inefficient and difficult to guarantee consistency. Furthermore, existing test circuits are complex and have low integration, making it difficult to meet the requirements for portability and rapid verification.
A test device for CAN bus driving capability was designed. Through a microprocessor-controlled load selection module and CAN communication module, the device under test can be automatically tested under different resistive and capacitive load conditions. The relay control unit can quickly switch the load, and the device's communication capability can be automatically determined by combining the communication response status and differential voltage waveform.
It enables automated testing and evaluation of the driving capability of CAN devices under different resistive and capacitive load conditions, improving testing efficiency and consistency, and meeting the requirements of modern high-consistency testing.
Smart Images

Figure CN224555636U_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of testing technology, and in particular to a testing device and system for testing CAN bus driving capability. Background Technology
[0002] CAN (Controller Area Network) bus, as a widely used differential communication bus, is used to achieve reliable data transmission between devices, such as communication between electricity meters and charging piles, or communication between smart circuit breakers and smart locks in meter boxes. As the number of nodes and wiring complexity increase in a system, the communication quality of the CAN bus is easily affected by the matching of node input capacitance and terminating resistors.
[0003] Existing testing methods typically rely on oscilloscopes and manual addition of resistors and capacitors to analyze the driving capability of CAN communication. These methods require repeated component replacements, resulting in low testing efficiency and difficulty in ensuring consistency under different test conditions. Furthermore, some manufacturers implement automatic load switching by building dedicated test circuits, but these circuits are complex, have low integration, and fail to meet the requirements for portability and rapid verification. Utility Model Content
[0004] In view of this, the purpose of this application is to provide a test device and test system for CAN bus driving capability, which can realize automated testing of the CAN bus driving capability of the device under test under different resistive and capacitive load conditions, thereby improving test efficiency and consistency.
[0005] In a first aspect, this utility model provides a testing device for CAN bus driving capability, comprising: a microprocessor, a load selection module and a CAN communication module respectively connected to the microprocessor; the CAN communication module is connected to the device under test via a CAN communication bus; the load selection module is connected in parallel between two differential signal lines of the CAN communication bus and includes at least one test load; the load selection module is used to respond to the load selection signal of the microprocessor and turn on the specified test load; the microprocessor is used to send test data to the device under test via the CAN communication module and determine the CAN bus driving capability of the device under test based on the differential voltage or communication status between the differential signal lines.
[0006] In an optional implementation, the load selection module includes a relay control unit; the test load includes at least one resistive load and at least one capacitive load; a first input terminal of the relay control unit is connected to a microprocessor, and a second input terminal is connected to a first differential signal line of the CAN communication bus; a first output terminal of the relay control unit is connected to the input terminal of the resistive load, and a second output terminal is connected to the input terminal of the capacitive load; the output terminals of both the resistive and capacitive loads are connected to a second differential signal line of the CAN communication bus; the relay control unit is used to respond to a load selection signal sent by the microprocessor, select and connect the corresponding test load, so that the test load is connected between the first differential signal line and the second differential signal line.
[0007] In an optional implementation, the relay control unit includes at least one relay circuit; the relay circuit includes a current-limiting resistor, a filter capacitor, a freewheeling diode, a relay drive switch, and a relay; the control terminal of the relay drive switch is used to receive a load selection signal sent by the microprocessor; the current-limiting resistor is connected between the microprocessor and the control terminal of the relay drive switch; the filter capacitor is connected between the control terminal of the relay drive switch and the ground terminal; the controlled terminal of the relay drive switch is connected in series with the coil of the relay; the freewheeling diode is connected in reverse parallel across the coil of the relay.
[0008] In an optional implementation, the relay circuit includes a main control subcircuit, a load type selection subcircuit, a resistive load selection subcircuit, and a capacitive load selection subcircuit. The input terminal of the main control subcircuit is connected to a first differential signal line. The input terminal of the load type selection subcircuit is connected to the output terminal of the main control subcircuit. The input terminal of the resistive load selection subcircuit is connected to the first output terminal of the load type selection subcircuit, and its output terminal is connected to a second differential signal line. The input terminal of the capacitive load selection subcircuit is connected to the second output terminal of the load type selection subcircuit, and its output terminal is connected to the second differential signal line. The main control subcircuit is used to connect or disconnect the connection with the first differential signal line according to a load selection signal. The load type selection subcircuit is used to connect the output terminal of the main control subcircuit to either the first or second output terminal according to the load selection signal. The resistive load selection subcircuit is used to select and connect a resistive load according to the load selection signal. The capacitive load selection subcircuit is used to select and connect a capacitive load according to the load selection signal.
[0009] In an optional implementation, the CAN communication module includes a CAN communication chip, a first optocoupler isolation circuit, a second optocoupler isolation circuit, and a bus protection circuit; the input terminal of the CAN communication chip is connected to the transmitting terminal of the microprocessor through the first optocoupler isolation circuit; the output terminal of the CAN communication chip is connected to the receiving terminal of the microprocessor through the second optocoupler isolation circuit; the differential signal pin of the CAN communication chip is connected to the CAN communication bus, and the bus protection circuit is connected between the differential signal pin and the ground terminal.
[0010] In an optional implementation, the CAN bus driving capability testing device further includes a power supply module; the power supply module is used to power the microprocessor and load selection module; the power supply module includes a battery power supply unit and an external power supply unit.
[0011] In an optional implementation, the CAN bus driving capability testing device further includes an interaction module; the interaction module includes a display screen and / or indicator lights for displaying the test status, and buttons for receiving user operation commands.
[0012] In an optional implementation, the CAN communication module includes a test interface, through which the CAN communication bus is connected to the device under test.
[0013] In an optional implementation, the CAN bus driving capability testing device further includes a housing; the microprocessor, load selection module, and CAN communication module are all located inside the housing.
[0014] Secondly, this utility model provides a testing system, including a CAN bus driving capability testing device according to any of the foregoing embodiments; and a host computer communicatively connected to the CAN bus driving capability testing device.
[0015] This application provides a testing device and system for CAN bus driving capability. By setting up a microprocessor, a CAN communication module, and a load selection module, and connecting the load selection module in parallel between the differential signal lines of the CAN communication bus, the CAN communication performance of the device under test under different resistive and capacitive load conditions can be automatically tested. This allows for accurate evaluation of the CAN bus driving capability of the device under test under complex load environments, thereby improving testing efficiency and consistency and meeting the large-scale, standardized testing needs of various CAN devices.
[0016] Other features and advantages of this application will be set forth in the following description and will be apparent in part from the description or may be learned by practicing the application.
[0017] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0018] To more clearly illustrate the technical solutions in the specific embodiments of this application or the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0019] Figure 1 The terminal signal waveform diagram provided in this application embodiment when no load is applied to the terminal;
[0020] Figure 2 The signal waveform at the end of the embodiment provided in this application is shown in the diagram below.
[0021] Figure 3 A schematic diagram of the test system provided in the embodiments of this application;
[0022] Figure 4 A schematic diagram of a test apparatus for CAN bus driving capability provided in an embodiment of this application;
[0023] Figure 5 A schematic diagram of resistive and capacitive loads provided for embodiments of this application;
[0024] Figure 6 A schematic diagram of a relay circuit provided in an embodiment of this application;
[0025] Figure 7 A schematic diagram of a CAN communication module provided in an embodiment of this application.
[0026] Icons: 1-CAN bus drive capability test device; 2-Host computer; 3-DUT; 11-Load selection module; 12-CAN communication module; 111-Resistive load; 112-Capacitive load; 113-Main control sub-circuit; 114-Load type selection sub-circuit; 115-Resistive load selection sub-circuit; 116-Capacitive load selection sub-circuit; MCU-Microprocessor; U1-CAN communication chip. Detailed Implementation
[0027] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0028] To facilitate understanding of this embodiment, the application scenarios and design concepts of this application will be briefly introduced.
[0029] In CAN bus communication systems, communication quality is affected by multiple physical factors, especially the settings of node input capacitors and terminating resistors. Improper parameter settings can lead to problems such as bus waveform distortion, increased signal reflection, and higher communication error rates, and in severe cases, even communication interruption. Therefore, how to reasonably evaluate and verify the CAN bus driving capability of the device under test under different load conditions has become one of the key technologies for ensuring the stable operation of the CAN network.
[0030] Input capacitance is one of the key factors affecting CAN communication performance. The superposition of capacitance from multiple nodes on the bus can lead to excessively high overall parasitic capacitance, causing slower signal rise and fall times, resulting in waveform distortion and communication anomalies. Therefore, in practical testing, it is necessary to measure the input capacitance of the first differential signal line to ground, the second differential signal line to ground, and the first differential signal line to the second differential signal line of the device under test (DUT) to assess their impact on the bus.
[0031] In addition, terminating resistors are also a key element in CAN network design. They are usually placed at both ends of the bus to improve the system's anti-interference capability, speed up the recovery of hidden states, and optimize signal integrity.
[0032] When the bus is in a recessive state, without a differential load resistor, external electromagnetic interference can cause the bus to mistakenly enter a dominant state with only a small amount of energy. Therefore, placing a terminating resistor of appropriate value in parallel between the first and second differential signal lines helps stabilize the recessive state and suppress false triggering.
[0033] During the dominant state, parasitic capacitance on the bus is charged, and it needs to be discharged quickly to return to the recessive state. Without a resistive path, this discharge process relies solely on the transceiver's internal resistance, resulting in slower switching speeds. This is especially problematic in high-speed communication or high-capacitor scenarios, directly impacting communication reliability. Connecting terminating resistors in parallel between the differential lines effectively accelerates the discharge process, ensuring timely signal recovery.
[0034] The CAN bus uses high-speed differential signal lines. If the terminal does not match its characteristic impedance, the signal will be reflected during propagation, causing waveform ringing and affecting communication accuracy. Especially at the physical ends of the bus, if a matching resistor is not connected, signal energy will generate echoes at the edges.
[0035] like Figure 1As shown, under the condition of a bit rate of 1 Mbit / s, CAN communication is connected to the terminal through a 10-meter twisted pair cable. When no matching resistor is added at the end, the signal waveform exhibits obvious ringing phenomenon and severe edge reflection, which is not conducive to signal decision.
[0036] To address the above issues, adding a resistor at the end that matches the cable's characteristic impedance (typically 120Ω) can significantly improve waveform quality. (Refer to...) Figure 2 After adding a terminating resistor, the ringing phenomenon was greatly eliminated, the signal edges became smoother, and the communication quality was significantly improved.
[0037] In a typical linear topology, both ends of the CAN bus usually function as both transmitters and receivers. Therefore, a terminating resistor matching the cable's characteristic impedance needs to be connected in parallel at each end. The characteristic impedance of the cable can be determined experimentally: connect a square wave generator to one end of the cable and an adjustable resistor in series at the other end. By observing the waveform across the resistor, the resistance value corresponding to the waveform with no reflection and smooth edges is the characteristic impedance of the cable.
[0038] In summary, the driving capability test of CAN communication should comprehensively consider key factors such as load capacitance and terminating resistance. However, existing testing methods generally rely on manually adding or subtracting resistors and capacitors and observing waveforms with an oscilloscope. They lack structural integration and automatic switching capabilities, resulting in low testing efficiency and poor repeatability, making it difficult to meet the requirements of modern high-consistency testing.
[0039] To address this, this application proposes a testing device and system for CAN bus driving capability, enabling automated testing and evaluation of the driving capability of CAN devices under different resistive-capacitive load conditions. The CAN bus driving capability testing device uses a relay array to control the rapid switching of multiple loads and, combined with communication response status or differential voltage waveforms, automatically determines the device's communication capability, exhibiting scalability, portability, and test consistency.
[0040] After introducing the application scenarios and design concepts of this application, the technical solutions provided by this application will be described in detail below.
[0041] This application provides a testing system, referring to... Figure 3 The testing system includes a CAN bus driving capability testing device 1 and a host computer 2 that is communicatively connected to the CAN bus driving capability testing device 1.
[0042] Here, the CAN bus driving capability test device 1 is responsible for performing load simulation, bus communication and signal measurement, while the host computer 2 (usually a personal computer with dedicated test software installed) is responsible for providing a graphical user interface, issuing test commands, and receiving and displaying test results.
[0043] Specifically, the operator first physically connects the CAN interface of the device under test (DUT) to the test interface of the CAN bus drive capability test device 1, thereby connecting the DUT to the CAN communication bus inside the CAN bus drive capability test device 1. Simultaneously, the CAN bus drive capability test device 1 is connected to the host computer 2 via a data cable (e.g., USB cable) to establish a communication link between the two. Finally, the power supply to the CAN bus drive capability test device 1 is turned on, or it is powered by its internal battery power unit, putting the entire system into standby mode.
[0044] Based on the above embodiments, this application provides a test device for CAN bus driving capability, referring to... Figure 4 The CAN bus drive capability test device 1 includes:
[0045] The device includes a microprocessor (MCU), a load selection module 11 connected to the MCU, and a CAN communication module 12. The CAN communication module 12 is connected to the device under test (DUT) 3 via a CAN communication bus. The load selection module 11 is connected in parallel between two differential signal lines of the CAN communication bus and includes at least one test load.
[0046] The load selection module 11 is used to respond to the load selection signal of the microprocessor MCU and connect the specified test load.
[0047] The microprocessor (MCU) is used to send test data to the device under test (DUT) 3 via the CAN communication module 12, and to determine the CAN bus driving capability of the DUT 3 based on the differential voltage or communication status between the differential signal lines.
[0048] Specifically, the operator configures the test task on the dedicated test software interface of the host computer 2. This interface provides multiple options, such as:
[0049] Device under test information: Enter or select the product model of device under test 3.
[0050] Test item selection: Select from the drop-down menu, such as room temperature resistive load test, room temperature capacitive load test, or communication success rate test.
[0051] Test parameter settings: After selecting the room temperature resistive load test, you can further select or enter a specific load value, such as 60Ω.
[0052] After the operator confirms the settings and clicks the start test button, the host computer 2 converts these configuration information into one or more test instructions in a predetermined format and sends them to the microprocessor MCU inside the CAN bus drive capability test device 1 via the data line.
[0053] The microprocessor (MCU) of the CAN bus drive capability testing device 1 receives and parses the test instructions from the host computer 2. When the parsed instruction is to apply a 60Ω resistive load, the microprocessor (MCU) immediately sends the corresponding load selection signal to the load selection module 11 connected to it.
[0054] The signal will drive the relay circuit inside the load selection module 11 to perform a series of precise actions: First, the main control sub-circuit 113 closes to connect the load switching system to the CAN bus; then, the load type selection sub-circuit 114 switches the path to the resistive load 111 side; finally, the resistive load selection sub-circuit 115 connects a 60Ω test resistor in parallel between the two differential signal lines of the CAN communication bus according to the signal command.
[0055] After the specified 60Ω test load is connected to the circuit, the microprocessor MCU begins to execute the test. It controls the CAN communication module 12 to send preset CAN test data to the CAN communication bus through its internal CAN communication chip U1.
[0056] During this process, the microprocessor (MCU) monitors whether a correct and timely response signal can be received from the device under test (DUT) 3. If a correct response is received within the specified time, the communication status is determined to be successful.
[0057] At the instant the bus is in a dominant state and is pulled by a 60Ω load, the microprocessor (MCU) measures the differential voltage between the two differential signal lines on the CAN communication bus. This voltage value is the driving capability of the device under test (DUT) 3 under this load.
[0058] After the test is completed, the microprocessor (MCU) determines the driving capability of the device under test 3 under a 60Ω load based on the test results.
[0059] Subsequently, the microprocessor (MCU) packages this structured test result data and transmits it back to host computer 2 via a data cable. Upon receiving this data, the test software on host computer 2 displays it intuitively on the user interface. Simultaneously, the software can save the result to a log file for subsequent data analysis and test report generation.
[0060] In one embodiment, the load selection module 11 includes a relay control unit; see reference Figure 5 The test load includes at least one resistive load 111 and at least one capacitive load 112.
[0061] Here, resistive load 111 includes at least one test resistor, such as commonly used values like 60Ω or 50Ω as specified in industry standards. Capacitive load 112 includes at least one test capacitor, such as commonly used values like 1nF, 5nF, 10nF, or 22nF in the nF range.
[0062] The first input terminal of the relay control unit is connected to the microprocessor MCU, and the second input terminal is connected to the first differential signal line of the CAN communication bus.
[0063] The first output terminal of the relay control unit is connected to the input terminal of the resistive load 111, and the second output terminal is connected to the input terminal of the capacitive load 112; the output terminals of both the resistive load 111 and the capacitive load 112 are connected to the second differential signal line of the CAN communication bus.
[0064] The relay control unit responds to the load selection signal sent by the microprocessor (MCU) to select and connect the corresponding test load, thereby connecting the test load between the first differential signal line and the second differential signal line. The first differential signal line is a high-level differential signal line, and the second differential signal line is a low-level differential signal line. Figure 7 In this context, CAN_H and CAN+ both represent high-level differential signal lines; they are simply different naming conventions and are functionally equivalent. Similarly, CAN_L and CAN- are the same, both representing low-level differential signal lines.
[0065] Here, the first input terminal (control signal input) of the relay control unit is a set of control signal lines connected to the microprocessor MCU. The microprocessor MCU sends load selection signals through these signal lines, for example, via a dedicated control signal (such as...). Figure 6 The RLY_C / R signal in the command prompts the relay control unit to select either resistive load 111 or capacitive load 112.
[0066] The second input terminal (the input of the main signal path) of the relay control unit is connected to the first differential signal line of the CAN communication bus. The first differential signal line is the main path carrying the CAN signal and serves as the current input to the relay control unit.
[0067] Inside the relay control unit, there is a load type selection switch (by... Figure 6 (Implemented by the RLY2 relay). The input terminal of the load type selection switch is connected to the second input terminal.
[0068] When the load selection signal sent by the microprocessor (MCU) indicates that resistive load 111 is selected, the internal contacts of the load type selection switch will activate, connecting the CAN+ main path to the first output terminal. This first output terminal is then further connected to the branch circuit where all resistive loads 111 are located.
[0069] When the load selection signal indicates that capacitive load 112 is selected, the switch will switch the CAN+ main path to its second output, which is connected to the branch circuit where all capacitive loads 112 are located.
[0070] Whether the signal current is directed to the resistive load 111 branch or the capacitive load 112 branch, after passing through a selected specific test resistor or test capacitor, the end of its path (i.e., the output terminal of the resistive load 111 or the output terminal of the capacitive load 112) is uniformly connected to the second differential signal line of the CAN communication bus.
[0071] With the above structure, the relay control unit responds to the instructions of the microprocessor MCU, and can not only connect one of multiple loads, but also switch between the two major categories of resistive load 111 and capacitive load 112, so as to accurately connect a test load of a specified type and specification in parallel between the first differential signal line and the second differential signal line of the CAN bus for automatic load simulation.
[0072] In one embodiment, reference is made to Figure 6 The relay control unit includes at least one relay circuit.
[0073] The relay circuit includes a current-limiting resistor, a filter capacitor, a freewheeling diode, a relay drive switch, and a relay.
[0074] Here, the relay driver switch is preferably a transistor. Its control terminal (i.e., the base of the transistor) receives the load selection signal (usually a high / low level signal) from the microprocessor (MCU). Its controlled terminal (i.e., the collector-emitter circuit of the transistor) is connected in series in the relay's drive circuit. The core function of the relay driver switch is to use a small control current from the microprocessor (MCU) to control the on / off state of the operating current required to drive the relay coil.
[0075] The control terminal of the relay drive switch is used to receive the load selection signal sent by the microprocessor MCU; the current limiting resistor is connected between the microprocessor MCU and the control terminal of the relay drive switch; the filter capacitor is connected between the control terminal of the relay drive switch and the ground terminal; the controlled terminal of the relay drive switch is connected in series with the coil of the relay; the freewheeling diode is connected in reverse parallel across the coil of the relay.
[0076] A current-limiting resistor is connected in series between the signal output pin of the microprocessor MCU and the control terminal of the relay drive switch. Its main function is to limit the current flowing into the control terminal of the drive switch, preventing excessive current from damaging the I / O (input / output) ports of the microprocessor MCU or the drive switch itself, thus providing protection and voltage division.
[0077] The filter capacitor is connected between the control terminal and the ground terminal of the relay drive switch. The filter capacitor is used to filter out any glitches or high-frequency noise that may exist in the control signal, preventing the drive switch from making unexpected or erroneous switching actions due to interference signals, thereby enhancing the stability of the entire control circuit.
[0078] A relay mainly consists of two parts: a coil and contacts. When its coil is turned on and current flows through it under the control of the relay drive switch, the resulting electromagnetic effect drives the internal mechanical contacts to close, thereby connecting the test load or the next stage circuit.
[0079] The freewheeling diode is connected in reverse parallel across the relay coil. Since the relay coil is essentially an inductor, the magnetic energy stored in the coil generates a very high reverse induced electromotive force (voltage spike) the instant the current is cut off (i.e., the relay drive switch changes from on to off). This high voltage is sufficient to break down and damage the relay drive switch that controls it. At this instant, the freewheeling diode is forward-biased, providing a safe, short-circuit release path for the coil's energy, thus clamping the reverse voltage to a very low level and effectively protecting the drive switch.
[0080] Specifically, when the microprocessor (MCU) sends a high-level load selection signal, current flows through the current-limiting resistor to trigger the drive switch to close, energizing the relay coil and closing its contacts, completing one connection action. When the MCU sends a low-level signal, the drive switch turns off, the relay coil is de-energized, and it is safely disconnected under the protection of the freewheeling diode, its contacts returning to their original position, completing one disconnection action.
[0081] Furthermore, refer to Figure 6 ,by Figure 6 Taking a relay circuit containing RLY1 as an example, the relay circuit includes: relay drive switch Q1, current limiting resistor R5, filter capacitor C1, freewheeling diode D1, relay RYL1, first resistor R1 and second resistor R2.
[0082] The base of Q1 is used to receive the load selection signal RLY_ON sent from the microprocessor MCU.
[0083] R5 is connected between the microprocessor MCU pin that sends the RLY_ON signal and the base of Q1.
[0084] One end of C1 is connected to the base of Q1, and the other end is grounded.
[0085] The controlled terminal of Q1 (i.e., its collector-emitter circuit) is connected in series with the coil of RLY1. The emitter of Q1 is grounded, its collector is connected to one end of the RLY1 coil, and the other end of the RLY1 coil is connected to the power supply.
[0086] D1 is connected in reverse parallel to the coil of RLY1. That is, the negative terminal of D1 is connected to the power supply, and the positive terminal is connected to the collector terminal of Q1.
[0087] The resistor path formed by R1 and R2 connected in series is connected in parallel with the contacts (switching part) of RLY1. When RLY1 is closed (for testing), the relay contacts close, forming a path with extremely low resistance. At this time, R1 and R2 are short-circuited.
[0088] When RLY1 is disconnected (default state), the relay contacts open, and the direct path for the CAN+ signal is cut off. At this time, R1 and R2 form a weak high-impedance path, preventing the downstream circuit of RLY1 (i.e., CAN+) from being completely floating.
[0089] In one embodiment, reference is made to Figure 6 The relay circuit includes a main control sub-circuit 113, a load type selection sub-circuit 114, a resistive load selection sub-circuit 115, and a capacitive load selection sub-circuit 116.
[0090] The input terminal of the main control sub-circuit 113 is connected to the first differential signal line; the input terminal of the load type selection sub-circuit 114 is connected to the output terminal of the main control sub-circuit 113; the input terminal of the resistive load selection sub-circuit 115 is connected to the first output terminal of the load type selection sub-circuit 114, and its output terminal is connected to the second differential signal line; the input terminal of the capacitive load selection sub-circuit 116 is connected to the second output terminal of the load type selection sub-circuit 114, and its output terminal is connected to the second differential signal line.
[0091] The main control sub-circuit 113 is used to connect or disconnect the connection with the first differential signal line according to the load selection signal.
[0092] Here, refer to Figure 6 The main control sub-circuit 113 consists of a relay circuit including relay RLY1, serving as the main switch for the entire load selection module 11. Its input is connected to the first differential signal line of the CAN communication bus. The microprocessor (MCU) controls the opening and closing of RLY1 by sending the RLY_ON signal, thereby determining whether to connect the entire load selection system to the CAN bus. By default, RLY1 is open, and no load is applied.
[0093] The load type selection sub-circuit 114 is used to connect the output terminal of the main control sub-circuit 113 to the first output terminal or the second output terminal according to the load selection signal.
[0094] Here, the load type selection sub-circuit 114 is composed of a relay circuit including relay RLY2. Its input is connected to the output of the previous-level main control sub-circuit 113. The microprocessor (MCU) controls RLY2 by sending the RLY_C / R signal, causing it to switch between two outputs. Its first output is connected to the resistive load selection sub-circuit 115, and its second output is connected to the capacitive load selection sub-circuit 116, thereby enabling the selection of the load type (resistive or capacitive). By default, the resistive load 111 is selected for connection.
[0095] The resistive load selection sub-circuit 115 is used to select and connect a resistive load 111 according to the load selection signal.
[0096] Here, the resistive load selection sub-circuit 115 is a combination containing multiple relay circuits (e.g., RLY3, RLY5, and RLY6). Its input is connected to the first output of the load type selection sub-circuit 114. It employs a two-stage selection structure:
[0097] The first-level selection (implemented by RLY3) selects one of two groups of resistive loads (the first group RL1 / RL2, the second group RL3 / RL4) based on the RLY_R signal of the microprocessor MCU.
[0098] The second-level selection (implemented by RLY5 and RLY6) selects and connects a specific resistive load from the load group selected in the previous stage based on the RLY_OUT1 and RLY_OUT2 signals of the microprocessor MCU.
[0099] The output of the resistive load selection sub-circuit 115, which is the other end of the selected resistive load 111, is uniformly connected to the second differential signal line of the CAN communication bus.
[0100] The capacitive load selection sub-circuit 116 is used to select and connect a capacitive load 112 according to the load selection signal.
[0101] Here, the structure of the capacitive load selection sub-circuit 116 is similar to that of the resistive load selection sub-circuit 115, consisting of multiple relay circuits including RLY4, RLY7, and RLY8. Its input terminal is connected to the second output terminal of the load type selection sub-circuit 114. It also employs a two-stage selection structure, responding to the RLY_C, RLY_OUT3, and RLY_OUT4 signals of the microprocessor MCU respectively, ultimately selecting one from the multiple capacitive loads 112 (CL1-CL4) and connecting it to the second differential signal line.
[0102] Taking the loading of a capacitive load as an example, the specific workflow is as follows:
[0103] After receiving the test command to load CL3, the microprocessor (MCU) sends a specific set of load selection signals.
[0104] First, the microprocessor (MCU) sends a high-level RLY_ON signal, which closes RLY1 in the main control sub-circuit 113, thus turning on the first differential signal line.
[0105] Next, the microprocessor MCU sends the RLY_C / R signal, which switches RLY2 in the load type selection sub-circuit 114, guiding the path to the second output terminal of the capacitive load selection sub-circuit 116.
[0106] Then, the microprocessor MCU sends the RLY_C signal, and RLY4 in the capacitive load selection sub-circuit 116 is activated to select the load group containing CL3 and CL4.
[0107] Finally, the microprocessor (MCU) controls the RLY_OUT4 signal, causing RLY8 to select and connect the CL3 load. At this time, one end of CL3 is connected to the first differential signal line through the aforementioned path, and the other end is directly connected to the second differential signal line, thus connecting CL3 in parallel to the CAN bus.
[0108] Through this hierarchical control strategy, this application can accurately connect any specified test load to the circuit.
[0109] In one embodiment, reference is made to Figure 7 The CAN communication module 12 includes a CAN communication chip U1, a first optocoupler isolation circuit, a second optocoupler isolation circuit, and a bus protection circuit.
[0110] The input terminal of the CAN communication chip U1 is connected to the transmitting terminal of the microprocessor MCU through the first optocoupler isolation circuit.
[0111] The output of the CAN communication chip U1 is connected to the receiver of the microprocessor MCU through a second optocoupler isolation circuit.
[0112] The differential signal pins of the CAN communication chip U1 are connected to the CAN communication bus, and the bus protection circuit is connected between the differential signal pins and the ground terminal.
[0113] Here, the CAN communication chip U1 receives the logic level signal (TXD) from the microprocessor MCU side and converts it into the differential signal required by the CAN bus for transmission. Simultaneously, it continuously monitors the differential signal on the bus, restores it to the logic level signal (RXD), and transmits it to the microprocessor MCU.
[0114] To prevent electrical faults (such as high voltage or surges) on the device under test (DUT) from being transmitted to the microprocessor (MCU) of the test equipment via signal lines, electrical isolation is provided between the MCU and the CAN communication chip U1. This isolation is achieved through two independent optocoupler isolation circuits.
[0115] The first optocoupler isolation circuit is located between the transmitting end of the microprocessor MCU and the transmit data input (TXD) of the CAN communication chip U1. When the microprocessor MCU needs to transmit data, the level signal output by its transmit pin drives the LED inside the optocoupler GR2 to light up or turn off. The light signal passes through the transparent insulating medium, is received by the phototransistor on the other side of the optocoupler, and is converted into a corresponding level signal input to the TXD pin of the CAN communication chip U1.
[0116] The second optocoupler isolation circuit is located between the receive data output terminal (RXD) of the CAN communication chip U1 and the receive terminal of the microprocessor MCU. Its working principle is the opposite of that of the first optocoupler isolation circuit. When the CAN communication chip U1 receives data from the bus and outputs a logic level from its RXD pin, the signal drives the LED inside the optocoupler GR1. The resulting light signal is then converted into a level signal by the phototransistor on the other side and transmitted to the receive pin of the microprocessor MCU.
[0117] With these two optocouplers, there is no direct electrical connection between the microprocessor MCU and the CAN communication chip U1, which improves the robustness of the test device in the face of external electrical interference and faults.
[0118] A bus protection circuit is installed on the differential signal pins of the CAN communication chip U1 to protect the transceiver chip from damage caused by electrostatic discharge (ESD), surges, or other transient overvoltage events on the CAN communication bus. The bus protection circuit is preferably composed of a transient voltage suppressor diode (TVS), a gas discharge tube (GDT), or a combination array thereof. When a transient high voltage exceeding the normal operating voltage occurs on the bus, this protection circuit quickly conducts, discharging the excess current to the ground terminal, thereby clamping the voltage on the differential signal pins to a safe level and protecting the downstream CAN communication chip U1.
[0119] In one embodiment, the CAN bus driving capability testing device 1 further includes a power supply module; the power supply module is used to supply power to the microprocessor MCU and the load selection module 11; the power supply module includes a battery power supply unit and an external power supply unit.
[0120] Here, the power supply module provides operating power to the microprocessor MCU, the relay circuit in the load selection module 11, and other functional modules.
[0121] The external power supply unit can be an external power adapter, which can power the test device when it is used in a fixed location (such as a test bench). In this mode, the internal rechargeable battery can also be charged simultaneously.
[0122] The battery power unit can be a rechargeable battery (such as a lithium battery). When the device needs to be taken to a field where there is no external power source for testing, or when the external power source is disconnected for easy movement, the device will automatically switch to battery power mode.
[0123] In one embodiment, the CAN bus driving capability testing device 1 further includes an interaction module; the interaction module includes a display screen and / or indicator lights for displaying the test status, and buttons for receiving user operation commands.
[0124] Here, the interaction module is the interface for realizing local human-computer interaction, which can consist of a display screen (such as an LCD screen) and / or indicator lights (LEDs).
[0125] The display screen is used to visually present detailed information to the user in the form of graphics or text, such as the currently selected test load type (resistive / capacitive) and its specific specifications, test progress, and real-time test results (such as communication success / failure, measured differential voltage value, etc.).
[0126] Indicator lights provide quick and concise status indications. For example, different colored indicator lights can represent power-on status, normal CAN communication status, and communication failure alarm status, respectively.
[0127] The interactive module also includes one or more physical buttons. Users can use these buttons to power on / off, navigate between menus on the display screen, select or switch between different test items, and start or stop the test process.
[0128] In one embodiment, the CAN communication module 12 includes a test interface, through which the CAN communication bus is connected to the device under test 3.
[0129] Here, the test interface can be an industry-standard connector (e.g., the DB9 interface widely used in industrial applications) or a terminal block for flexible wiring. The test interface provides a stable and reliable electrical connection, ensuring that the CAN communication bus inside this device can interface seamlessly with the CAN bus of the device under test (DUT) 3.
[0130] In one embodiment, the CAN bus driving capability testing device 1 further includes a housing; the microprocessor MCU, the load selection module 11 and the CAN communication module 12 are all disposed inside the housing.
[0131] Here, the outer casing provides precise mounting and fixing positions for the internal circuit boards, batteries, and external interactive modules (display screens, indicator lights, buttons) and test interfaces.
[0132] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the system and apparatus described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0133] Furthermore, in the description of the embodiments of this application, unless otherwise expressly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in this application based on the specific circumstances.
[0134] In the description of this application, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are used only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this application. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.
[0135] Finally, it should be noted that the above embodiments are merely specific implementations of this application, used to illustrate the technical solutions of this application, and not to limit them. The protection scope of this application is not limited thereto. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments within the scope of the technology disclosed in this application, or make equivalent substitutions for some of the technical features. Such modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be covered within the protection scope of this application.
Claims
1. A testing device for CAN bus driving capability, characterized in that, include: A microprocessor, a load selection module and a CAN communication module respectively connected to the microprocessor; The CAN communication module is connected to the device under test via the CAN communication bus; the load selection module is connected in parallel between the two differential signal lines of the CAN communication bus and includes at least one test load. The load selection module is used to respond to the load selection signal of the microprocessor and connect the specified test load. The microprocessor is used to send test data to the device under test through the CAN communication module, and to determine the CAN bus driving capability of the device under test based on the differential voltage or communication status between the differential signal lines.
2. The CAN bus driving capability testing device according to claim 1, characterized in that, The load selection module includes a relay control unit; the test load includes at least one resistive load and at least one capacitive load; The first input terminal of the relay control unit is connected to the microprocessor, and the second input terminal is connected to the first differential signal line of the CAN communication bus; The first output terminal of the relay control unit is connected to the input terminal of the resistive load, and the second output terminal is connected to the input terminal of the capacitive load; both the output terminals of the resistive load and the capacitive load are connected to the second differential signal line of the CAN communication bus. The relay control unit is configured to respond to the load selection signal sent by the microprocessor, select and connect the corresponding test load, so that the test load is connected between the first differential signal line and the second differential signal line.
3. The CAN bus driving capability testing device according to claim 2, characterized in that, The relay control unit includes at least one relay circuit; The relay circuit includes a current-limiting resistor, a filter capacitor, a freewheeling diode, a relay drive switch, and a relay. The control terminal of the relay drive switch is used to receive the load selection signal sent by the microprocessor; the current limiting resistor is connected between the microprocessor and the control terminal of the relay drive switch; the filter capacitor is connected between the control terminal of the relay drive switch and the ground terminal; the controlled terminal of the relay drive switch is connected in series with the coil of the relay; the freewheeling diode is connected in reverse parallel across the coil of the relay.
4. The CAN bus driving capability testing device according to claim 3, characterized in that, The relay circuit includes a main control subcircuit, a load type selection subcircuit, a resistive load selection subcircuit, and a capacitive load selection subcircuit; The input terminal of the main control sub-circuit is connected to the first differential signal line; the input terminal of the load type selection sub-circuit is connected to the output terminal of the main control sub-circuit; the input terminal of the resistive load selection sub-circuit is connected to the first output terminal of the load type selection sub-circuit, and its output terminal is connected to the second differential signal line; the input terminal of the capacitive load selection sub-circuit is connected to the second output terminal of the load type selection sub-circuit, and its output terminal is connected to the second differential signal line. The main control sub-circuit is used to connect or disconnect the connection with the first differential signal line according to the load selection signal. The load type selection sub-circuit is used to connect the output terminal of the main control sub-circuit to the first output terminal or the second output terminal according to the load selection signal. The resistive load selection sub-circuit is used to select and connect a resistive load according to the load selection signal; The capacitive load selection sub-circuit is used to select and connect a capacitive load according to the load selection signal.
5. The CAN bus driving capability testing device according to claim 1, characterized in that, The CAN communication module includes a CAN communication chip, a first optocoupler isolation circuit, a second optocoupler isolation circuit, and a bus protection circuit. The input terminal of the CAN communication chip is connected to the transmitting terminal of the microprocessor through the first optocoupler isolation circuit; The output terminal of the CAN communication chip is connected to the receiving terminal of the microprocessor through the second optocoupler isolation circuit; The differential signal pin of the CAN communication chip is connected to the CAN communication bus, and the bus protection circuit is connected between the differential signal pin and the ground terminal.
6. The CAN bus driving capability testing device according to claim 1, characterized in that, The CAN bus driving capability testing device also includes a power supply module; the power supply module is used to power the microprocessor and the load selection module; the power supply module includes a battery power supply unit and an external power supply unit.
7. The CAN bus driving capability testing device according to claim 1, characterized in that, The CAN bus driving capability testing device also includes an interaction module; the interaction module includes a display screen and / or indicator lights for displaying the test status, and buttons for receiving user operation commands.
8. The CAN bus driving capability testing device according to claim 1, characterized in that, The CAN communication module includes a test interface, and the CAN communication bus is connected to the device under test through the test interface.
9. The CAN bus driving capability testing device according to claim 1, characterized in that, The CAN bus driving capability testing device also includes a housing; the microprocessor, the load selection module, and the CAN communication module are all located inside the housing.
10. A testing system, characterized in that, The device includes a test apparatus for CAN bus driving capability as described in any one of claims 1-9; and also includes a host computer that is communicatively connected to the test apparatus for CAN bus driving capability.