A parallel CAN matching resistor automatic identification circuit

By designing the automatic identification circuit of the parallel CAN matching resistor in the CAN parallel system, using level signals and transistor control circuits, automatically identifying the device status and controlling the inlet or disconnection of the matching resistor, the problems of low installation efficiency and high cost of matching resistors in the prior art are solved, and the automatic matching effect of high reliability and low cost is achieved.

CN109343396BActive Publication Date: 2025-04-29ILD ELECTRONICS CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN201811212858.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2018-10-18
Publication Date
2025-04-29
Estimated Expiration
2038-10-18

AI Technical Summary

Technical Problem

The installation of matching resistors in existing CAN parallel systems requires manual operation, which is inefficient and error-prone, or relies on the MCU for automatic matching, but the internal control is complex and costly.

Method used

Design a parallel CAN matching resistor automatic identification circuit. By adding a level signal to the CAN line, using multiple transistors to build a control circuit, automatically identify the device status and control the relay to cut in or disconnect the matching resistor.

Benefits of technology

Automatic identification of CAN matching resistors is realized, the circuit structure is simplified, the cost is reduced, the reliability is improved, and the errors of manual operation are avoided.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN109343396B_ABST
    Figure CN109343396B_ABST
Patent Text Reader

Abstract

The present invention discloses a parallel CAN matching resistor automatic identification circuit, which adds a level signal in the CAN parallel system and realizes the automatic identification of the parallel CAN matching resistor by using an improved control circuit. The present invention eliminates the use of MCU, greatly reduces peripheral devices, simplifies the circuit, and reduces the cost. Compared with manual matching, the present invention improves reliability and has the dual advantages of reliability and cost control.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a CAN parallel system, and in particular to a matching resistor automatic identification circuit. Background Art

[0002] CAN bus is a two-wire differential bus communication method. Multiple CAN transceiver nodes can be connected to the bus at the same time for bus data transmission. The CAN bus specification requires that a 120 ohm matching resistor be configured at both ends of the bus of each transceiver node to eliminate reflection.

[0003] The existing solutions on the market mainly include manual matching and automatic matching using MCU to achieve the installation of matching resistors.

[0004] Manual matching is to match the bus resistance by setting a dip switch or jumper on the terminal module or adding an external resistor after the system is installed. This manual method often needs to be performed after the system is installed, which is inefficient and prone to errors, resulting in communication abnormalities.

[0005] The automatic matching is realized by using MCU, which utilizes CAN transceiver, MCU control unit, terminal resistor and resistor switch. In this way, when the CAN transceiver node is connected to the bus cable, the connected CAN transceiver node is encoded after the CAN bus is powered on. The encoding of the CAN transceiver node is arranged in order of size, so that the CAN transceiver nodes at both ends of the bus cable are respectively encoded with the smallest and largest encodings. The microcontroller unit MCU controls the resistor switch of the CAN transceiver node with the smallest and largest encodings accordingly, so as to realize the automatic connection of the terminal resistor of the CAN transceiver node at both ends of the bus cable to the bus cable. This control method realizes automatic control, but the internal control is complex, the required MCU control unit cost is high, and the MCU also needs to set up peripheral circuits, which takes up a large space and volume on the PCB. Summary of the invention

[0006] The purpose of the present invention is to overcome the defects of the prior art and provide a circuit to realize automatic identification of parallel CAN matching resistors.

[0007] The present invention adopts the following technical solution:

[0008] A parallel CAN matching resistance automatic identification circuit, characterized by comprising:

[0009] A parallel input terminal: receives a level signal sent by the previous parallel device;

[0010] A parallel output terminal: sends a level signal to the next parallel device;

[0011] A matching resistor cut-in control circuit, comprising:

[0012] First input terminal: connected to the parallel input terminal;

[0013] Second input terminal: connected to the parallel output terminal;

[0014] Control output terminal: connected to a relay control circuit, the relay controls the switching on or off of the matching resistor.

[0015] A further technical solution of the present invention is:

[0016] When the parallel input terminal signal is 0 and the parallel output terminal signal is 1, the device is the host of multiple machines in parallel, and the matching resistor is switched on;

[0017] When the parallel input signal is 1 and the parallel output signal is 1, the device is the middle slave in the parallel connection of multiple machines, and the matching resistor is disconnected;

[0018] When the parallel input terminal signal is 1 and the parallel output terminal signal is 0, the device is the last slave in the parallel connection of multiple machines, and the matching resistor is switched on;

[0019] When the parallel input terminal signal is 0 and the parallel output terminal signal is 0, the device is a single unit and the matching resistor is switched on.

[0020] Beneficial Effects

[0021] The present invention adds a level signal in the CAN parallel system, and uses an improved control circuit to realize automatic identification of the parallel CAN matching resistor. The present invention eliminates the use of MCU, greatly reduces peripheral devices, simplifies the circuit, and reduces costs. Compared with manual matching, the present invention improves reliability and has the dual advantages of reliability and cost control. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] Figure 1 This is the framework diagram of the parallel CAN automatic resistance matching;

[0023] Figure 2 This is a circuit diagram of Embodiment 1;

[0024] Figure 3 This is a circuit diagram of Example 2. DETAILED DESCRIPTION

[0025] In order to enable those skilled in the art to better understand the technical solutions in this application, the following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the described embodiments are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this application.

[0026] Figure 1 The framework diagram of the overall parallel CAN automatic resistance matching is shown in FIG. Each parallel device is connected to the CAN bus through the network port, and the control circuit controls the switch to automatically select to cut in or cut out the matching resistance.

[0027] Embodiment 1

[0028] like Figure 2 As shown, the present invention uses multiple transistors to build a control circuit, and adds one more 5V level signal in the CAN line input and output, CAN_IN: receives the 5V level signal transmitted from the previous station and connects to the network cable; CAN_OUT: sends the 5V level signal to the next station and connects to the network cable.

[0029] This signal is used to automatically identify the status of the machine. If CAN_IN=0, CAN_OUT=1, the machine is the master machine when multiple machines are connected in parallel; if CAN_IN=1, CAN_OUT=1, the machine is the middle slave machine when multiple machines are connected in parallel; if CAN_IN=1, CAN_OUT=0, the machine is the last slave machine when multiple machines are connected in parallel; if CAN_IN=0, CAN_OUT=0, the machine is a single machine.

[0030] The working principle of the circuit is described in detail below:

[0031] The circuit for controlling the CAN terminal matching resistor is designed using the above CAN_IN and CAN_OUT 5V signals, and the automatic matching resistor cut-in function is realized according to the logic.

[0032] The cut-in control circuit includes PNP transistor Q1, NPN transistor Q2 and Q3, the CAN_IN signal is connected to the base of transistor Q1, the CAN_OUT signal is connected to the emitter of Q1, and the collector of Q1 is grounded; the base of transistor Q2 is connected to the emitter of transistor Q1, the collector of Q2 is connected to the positive electrode of the first power supply (5V power supply), and the emitter of Q2 is grounded; the base of transistor Q3 is connected to the collector of transistor Q2, the collector of Q3 is connected to the relay control end, and the emitter of Q3 is grounded.

[0033] A terminal matching resistor R1 is provided between CAN_H and CAN_L, and a relay controls the terminal matching resistor R1 between CAN_H and CAN_L to be switched in or out.

[0034] Single machine status

[0035] CAN_IN=0, CAN_OUT=0, the relay relies on its own control circuit to close and cut in the matching resistor.

[0036] Specifically: CAN_IN=0, CAN_OUT=0, the base and collector signals of transistor Q1 are both low level 0V, Q1 does not work; Q2 is NPN type high level conduction, so when the base of transistor Q2 is connected to CAN_OUT=0, Q2 is disconnected, and the 5V power supply of Q2 collector is connected to the base of Q3 to make Q3 turned on, and the relay switch on the Q3 collector circuit is closed, cutting in the matching resistor R1.

[0037] Parallel status

[0038] Host status: CAN_IN=0, CAN_OUT=1, relay closed, host cuts in matching resistor;

[0039] Specifically: CAN_IN=0, CAN_OUT=1, transistor Q1 is PNP type, Q1 base is CAN_IN=0 low level, Q1 is turned on; after Q1 is turned on, the base of transistor Q2 is low level, Q2 is NPN type, Q2 is disconnected; then the 5V power supply of Q2 collector is connected to the base of Q3 to make Q3 turned on, Q3 is turned on, the relay is closed, and the host cuts in the matching resistor R1.

[0040] Middle slave state: CAN_IN=1; CAN_OUT=1, relay disconnected, middle slave disconnects matching resistor;

[0041] Specifically: CAN_IN=1; CAN_OUT=1, Q1 is disconnected, Q2 is turned on, Q3 is disconnected, the relay is disconnected, and the middle slave disconnects the matching resistor.

[0042] The last slave state: CAN_IN=1; CAN_OUT=0, the relay is closed, and the last slave switches into the matching resistor;

[0043] Specifically: CAN_IN=1; CAN_OUT=0, Q1 is disconnected, Q2 is disconnected, Q3 is closed, the relay is closed, and the last slave is switched into the matching resistor.

[0044] Only the middle slave does not have matching resistors, while the master (the first one), the stand-alone machine and the last slave (the last one) all have middle resistors.

[0045] Regardless of how many machines are connected in parallel, the first and last machine must be connected with matching resistors.

[0046] The present invention is described in detail above by taking the triode as an example. Those skilled in the art are fully aware that other switch tubes can be used as equivalent replacements to achieve the same control function, and are not limited to the triode.

[0047] Embodiment 2:

[0048] like Figure 3 As shown, a level signal is added to the CAN line. At the CAN input port and output port, the signal is represented as CAN_IN and CAN_OUT respectively. The control circuit of the CAN matching resistor includes an input terminal A and an input terminal B, which respectively receive level signals from the CAN input port and the output port. The high level of the level signal can be 3V or others. The control circuit mainly includes a circuit part and a non-circuit part. The circuit part includes two parallel diodes D1 and D2. The cathode of the diode D1 is connected to the input terminal A, and the cathode of the diode D2 is connected to the input terminal B. The anodes of the diodes D1 and D2 are connected to the first power supply positive electrode +Ec through a resistor R. An N-type transistor Q, the base of the transistor is connected to the node where the resistor R and the diodes D1 and D2 are connected, the collector of the transistor is connected to the power supply Ucc, and the emitter of the transistor is grounded. The collector of the transistor is also connected to a relay for controlling the relay, thereby realizing the automatic switching-in of the CAN matching resistor.

[0049] The working principle is: when one or both of the CAN_IN signal and the CAN_OUT signal are at a low level, the diode circuit is turned on, the base of the transistor Q is at a low level, the transistor is cut off, and the control end connected to the collector of the transistor is at a high level, and the control relay is closed and the matching resistor is cut in; only when the CAN_IN signal and the CAN_OUT signal are both at a high level, the diodes D1 and D2 are not turned on, the base of the transistor is at a high level, the transistor is turned on, the collector of the transistor is at a low level, the control end connected to the collector of the transistor is at a low level, the relay is disconnected, and the matching resistor is not connected.

[0050] The CAN automatic identification and switching-in matching resistor of the present invention can automatically switch in the matching resistor when a single machine is used, and can also realize automatic matching of terminal resistors when multiple machines are connected in parallel or in series in a parallel system.

Claims

1. A parallel CAN matching resistor automatic identification circuit, characterized in that include: A parallel input terminal: receives a level signal sent by the previous parallel device; A parallel output terminal: sends a level signal to the next parallel device; A matching resistor cut-in control circuit, comprising: The first input terminal is connected to the parallel input terminal and receives the level signal received by the parallel input terminal; The second input terminal is connected to the parallel output terminal and receives the level signal sent by the parallel output terminal; Control output terminal: connected to a relay control circuit, the relay controls the switching on or off of the matching resistor; The level signal is a level signal added to the CAN bus; The matching resistor cut-in control circuit comprises: A first triode: a base is connected to the first input terminal, an emitter is connected to the second input terminal, and a collector is grounded; Second transistor: the base is connected to the emitter of the first transistor, the collector is connected to the positive electrode of the first power supply and the relay control circuit, the voltage value of the positive electrode of the first power supply is equal to the high level voltage value of the level signal, and the emitter is grounded; The second transistor is connected to the relay control circuit through a third transistor, the base of the third transistor is connected to the collector of the second transistor, the collector is connected to the relay control circuit, and the emitter is grounded.

2. The parallel CAN matching resistance automatic identification circuit according to claim 1, characterized in that: When the parallel input terminal signal is 0 and the parallel output terminal signal is 1, the device is the host of multiple machines in parallel, and the matching resistor is switched on; When the parallel input signal is 1 and the parallel output signal is 1, the device is the middle slave in the parallel connection of multiple machines, and the matching resistor is disconnected; When the parallel input terminal signal is 1 and the parallel output terminal signal is 0, the device is the last slave in the parallel connection of multiple machines, and the matching resistor is switched on; When the parallel input terminal signal is 0 and the parallel output terminal signal is 0, the device is a single unit and the matching resistor is switched on.

3. A parallel CAN matching resistor automatic identification circuit, characterized in that include: A parallel input terminal: receives a level signal sent by the previous parallel device; A parallel output terminal: sends a level signal to the next parallel device; A matching resistor cut-in control circuit, comprising: The first input terminal is connected to the parallel input terminal and receives the level signal received by the parallel input terminal; The second input terminal is connected to the parallel output terminal and receives the level signal sent by the parallel output terminal; Control output terminal: connected to a relay control circuit, the relay controls the switching on or off of the matching resistor; The level signal is a level signal added to the CAN bus; The matching resistor cut-in control circuit comprises: An AND logic circuit: one input terminal of which is connected to the first input terminal, the other input terminal of which is connected to the second input terminal, and the output terminal of which is connected to the positive electrode of the first power supply, and the voltage value of the positive electrode of the first power supply is equal to the high level voltage value of the level signal; Non-logic circuit: its input end is connected to the output end of the AND logic circuit, and its output end is connected to the relay control circuit; The AND logic circuit includes two parallel diodes, the cathode of one diode is connected to the first input terminal, the cathode of the other diode is connected to the second input terminal, the anodes of the two diodes are connected to each other and connected to the positive electrode of the first power supply through a resistor; the non-logic circuit includes a transistor, the base of the transistor is connected to the node where the two diodes are connected to each other, the collector is connected to the relay control circuit, and the emitter is grounded.

4. A CAN parallel device, characterized in that The invention comprises the parallel CAN matching resistance automatic identification circuit as described in any one of claims 1 to 3.

Citation Information

Patent Citations

  • CAN bus termination resistance configured circuit

    CN207965562U

  • Parallel machine CAN matched resistance automatic identification circuit and CAN parallel machine equipment

    CN208766506U