Communication gateway for converting modbus to canopen

CN221886512UActive Publication Date: 2024-10-22BEIJING JUYING ELECTRONICS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202323539734.0
Authority / Receiving Office
CN · China
Patent Type
Utility models(China)
Current Assignee / Owner
Filing Date
2023-12-25
Publication Date
2024-10-22
Estimated Expiration
2033-12-25

AI Technical Summary

Technical Problem

[0002]在现有的工业控制系统中,Modbus总线和CAN总线是两种常见的数据通信方式,然而,由于两者之间的传输协议不同,在采用CAN总线传输的设备无法和采用RS485总线传输的设备之间实现相互通信,同时现有的网关的通信接口相对单一,在使用时极为不便,无法满足便捷的使用需求,因此,亟需一种modbus转canopen的通讯网关

Benefits of technology

[0024] By setting up the CAN interface, 485 communication interface and USB interface, and cooperating with the CAN bus transceiver circuit, 485 communication control circuit and MCU module, the utility model can realize the simultaneous use of the CAN interface, the 485 communication interface and the USB interface, and meet the requirements of USB to 485, USB It has three different working modes: CAN to CAN and 485 to CAN. It also supports access to modbus slave devices through the can bus and access to canopen node information through the modbus protocol, meeting the mutual communication needs of modbus to canopen, so that the equipment can better collaborative work;

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN221886512U_ABST
    Figure CN221886512U_ABST
Patent Text Reader

Abstract

The utility model discloses a modbus-to-canopen communication gateway, comprising an MCU module, a power supply module, a CAN interface, a 485 communication interface and a USB interface, the CAN interface is electrically connected with the MCU module through a CAN bus transmit-receive circuit, the 485 communication interface is electrically connected with the MCU module through a 485 communication control circuit, and the USB interface is electrically connected with the MCU module; the MCU module is used for forwarding data among the CAN interface, the 485 communication interface and the USB interface; and the power supply module is used for supplying power to the MCU module, the CAN bus transceiver circuit and the 485 communication control circuit. According to the utility model, simultaneous use of the CAN interface, the 485 communication interface and the USB interface can be realized, and three different working modes of USB-to-485, USB-to-CAN and 485-to-CAN can be satisfied.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The utility model relates to the technical field of communication gateways, in particular to a Modbus-to-Canopen communication gateway. Background Art

[0002] In the existing industrial control systems, Modbus bus and CAN bus are two common data communication methods. However, due to the different transmission protocols between the two, devices using CAN bus transmission cannot communicate with devices using RS485 bus transmission. At the same time, the communication interface of the existing gateway is relatively single, which is extremely inconvenient to use and cannot meet the convenient use requirements. Therefore, a Modbus to CANopen communication gateway is urgently needed. Utility Model Content

[0003] In view of the deficiencies in the prior art, the utility model provides a Modbus to Canopen communication gateway.

[0004] The utility model discloses a communication gateway from Modbus to CANopen, including an MCU module, a power module, a CAN interface, a 485 communication interface and a USB interface:

[0005] The CAN interface is electrically connected to the MCU module via a CAN bus transceiver circuit, the 485 communication interface is electrically connected to the MCU module via a 485 communication control circuit, and the USB interface is electrically connected to the MCU module;

[0006] The MCU module is used to forward data between the CAN interface, the 485 communication interface and the USB interface;

[0007] The power supply module is used to supply power to the MCU module, the CAN bus transceiver circuit and the 485 communication control circuit.

[0008] As a further improvement of the present invention, the MCU module includes a single chip microcomputer.

[0009] As a further improvement of the present utility model, the CAN bus transceiver circuit includes a CAN transceiver circuit and a first isolation circuit electrically connected in sequence; the CAN transceiver circuit includes a CAN transceiver, and the first isolation circuit includes a first dual-channel digital isolator;

[0010] The CANH end of the CAN transceiver is connected in parallel with the cathode of the diode D6 and then electrically connected to one end of the resistor R12. The CANL end of the CAN transceiver is connected in parallel with the cathode of the diode D7 and then electrically connected to one end of the resistor R15. The anode of the diode D6, the anode of the diode D7 and one end of the capacitor C19 are connected in parallel and then connected to a common ground terminal. The other end of the capacitor C19, one end of the resistor R13 and one end of the resistor R14 are connected in parallel and then electrically connected to the VREF end of the CAN transceiver. The other end of the resistor R13 is connected in parallel with the other end of the resistor R12 and then electrically connected to the CANH pin of the CAN interface. The other end of the resistor R14 is connected in parallel with the other end of the resistor R15 and then electrically connected to the CANL pin of the CAN interface.

[0011] The TXD terminal of the CAN transceiver is electrically connected to the VO2 terminal of the first dual-channel digital isolator, the RXD terminal of the CAN transceiver is electrically connected to the VI 1 terminal of the first dual-channel digital isolator, the VO1 terminal of the first dual-channel digital isolator is electrically connected to the PB8 terminal of the microcontroller, and the VI2 terminal of the first dual-channel digital isolator is electrically connected to the PB9 terminal of the microcontroller.

[0012] As a further improvement of the utility model, the 485 communication control circuit includes an optocoupler isolation circuit, a second isolation circuit and a 485 transceiver circuit, the optocoupler isolation circuit includes a photocoupler, the 485 transceiver circuit includes a MAX485 transceiver, and the second isolation circuit includes a second dual-channel digital isolator;

[0013] The A end of the MAX485 transceiver and the cathode of the diode D8 are connected in parallel and electrically connected to one end of the resistor R18, the B end of the MAX485 transceiver and the cathode of the diode D9 are connected in parallel and electrically connected to one end of the resistor R21, the other end of the resistor R18 and the other end of the resistor R21 are electrically connected to the 485 communication interface respectively, and the anode of the diode D8 and the anode of the diode D9 are connected in parallel and connected to the common ground terminal;

[0014] The RO terminal of the MAX485 transceiver is electrically connected to the VI1 terminal of the second dual-channel digital isolator, the DI terminal of the MAX485 transceiver is electrically connected to the VO2 terminal of the second dual-channel digital isolator, the VO1 terminal of the second dual-channel digital isolator is electrically connected to the PA10 terminal of the single-chip microcomputer, and the VI2 terminal of the second dual-channel digital isolator is electrically connected to the PA9 terminal of the single-chip microcomputer;

[0015] Pin 1 of the photocoupler is connected in series with resistor R16 and then electrically connected to the PB12 terminal of the single-chip computer. The RE terminal and DE terminal of the MAX485 transceiver are connected in parallel with one end of resistor R17 and then connected to pin 4 of the photocoupler. The other end of the resistor R17 is connected to the common ground terminal.

[0016] As a further improvement of the present invention, the DP pin of the USB interface is electrically connected to the PA12 terminal of the single-chip microcomputer, and the DM pin of the USB interface is electrically connected to the PA11 terminal of the single-chip microcomputer.

[0017] As a further improvement of the utility model, it also includes a CAN status indicator light, a 485 status indicator light and a power indicator light;

[0018] The positive electrode of the CAN status indicator light is electrically connected to the PA4 terminal of the single-chip microcomputer through the resistor R3, and the positive electrode of the 485 status indicator light is electrically connected to the PA3 terminal of the single-chip microcomputer through the resistor R4.

[0019] The positive pole of the power indicator light is electrically connected to the power module, and the negative poles of the CAN status indicator light, the negative pole of the 485 status indicator light, and the negative pole of the power indicator light are connected to the GND terminal respectively.

[0020] As a further improvement of the utility model, it also includes a housing;

[0021] The MCU module, the CAN bus transceiver circuit and the 485 communication control circuit are centrally installed on a control mainboard, and the control mainboard is placed in the housing;

[0022] The CAN interface, 485 communication interface and USB interface are respectively installed on the side of the shell, the CAN interface is used to connect to the CAN bus, the 485 communication interface is used to connect to the RS485 bus, and the USB interface is used to connect to the USB line.

[0023] Compared with the prior art, the beneficial effects of the utility model are:

[0024] The utility model can realize the simultaneous use of the CAN interface, the 485 communication interface and the USB interface by setting the CAN interface, the 485 communication interface and the USB interface, and cooperate with the CAN bus transceiver circuit, the 485 communication control circuit and the MCU module, so as to meet the three different working modes of USB to 485, USB to CAN and 485 to CAN, and at the same time support the access to the modbus slave device through the CAN bus and the access to the canopen node information through the modbus protocol, so as to meet the mutual communication requirements of modbus to canopen, and enable the devices to work better together;

[0025] The utility model isolates the power module, the 485 communication control circuit and the CAN bus transceiver circuit. By setting a first isolation circuit in the CAN bus transceiver circuit and a second isolation circuit and an optocoupler isolation circuit in the 485 communication control circuit, circuit safety can be effectively guaranteed, and noise and surges on the data bus or other circuits can be prevented from entering the local ground terminal, thereby avoiding interference and damage to sensitive circuits. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] Figure 1 A schematic diagram of the structure of a Modbus to Canopen communication gateway disclosed in an embodiment of the utility model;

[0027] Figure 2 A schematic diagram of a power module circuit of a Modbus to Canopen communication gateway disclosed in an embodiment of the utility model;

[0028] Figure 3 This is a schematic diagram of the MCU module circuit of a Modbus to Canopen communication gateway disclosed in an embodiment of the utility model;

[0029] Figure 4 A schematic diagram of a CAN bus transceiver circuit of a Modbus to Canopen communication gateway disclosed in an embodiment of the utility model;

[0030] Figure 5 A schematic diagram of a 485 communication control circuit of a Modbus to Canopen communication gateway disclosed in an embodiment of the utility model;

[0031] Figure 6 A schematic diagram of the CAN interface and 485 communication interface of a modbus-to-canopen communication gateway disclosed in an embodiment of the utility model;

[0032] Figure 7 The present invention discloses a circuit diagram of a CAN status indicator light, a 485 status indicator light and a power indicator light of a Modbus to Canopen communication gateway disclosed in an embodiment of the present invention.

[0033] In the figure:

[0034] 1. MCU module; 2. Power module; 3. CAN interface; 4. 485 communication interface; 5. USB interface; 6. CAN bus transceiver circuit; 7. 485 communication control circuit. DETAILED DESCRIPTION

[0035] In order to make the purpose, technical solution and advantages of the embodiment of the utility model clearer, the technical solution in the embodiment of the utility model will be clearly and completely described below in conjunction with the drawings in the embodiment of the utility model. Obviously, the described embodiment is a part of the embodiment of the utility model, not all of the embodiments. Based on the embodiment of the utility model, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the utility model.

[0036] In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicating the orientation or positional relationship, are based on the orientation or positional relationship shown in the 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 limiting the present invention. In addition, the terms "first", "second", and "third" are used for descriptive purposes only, and cannot be understood as indicating or implying relative importance.

[0037] In the description of the present invention, it is also necessary to explain that, unless otherwise clearly specified and limited, the terms "installation", "connection" and "connection" 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.

[0038] The utility model is further described in detail below in conjunction with the accompanying drawings:

[0039] like Figure 1 As shown, a Modbus to CANopen communication gateway provided by the utility model includes an MCU module 1, a power module 2, a CAN interface 3, a 485 communication interface 4 and a USB interface 5: the CAN interface 3 is electrically connected to the MCU module 1 through a CAN bus transceiver circuit 6, the 485 communication interface 4 is electrically connected to the MCU module 1 through a 485 communication control circuit 7, and the USB interface 5 is electrically connected to the MCU module 1; the MCU module 1 is used to forward data between the CAN interface 3, the 485 communication interface 4 and the USB interface 5; the power module 2 is used to power the MCU module 1, the CAN bus transceiver circuit 6 and the 485 communication control circuit 7.

[0040] In this embodiment, by setting the CAN interface 3, 485 communication interface 4 and USB interface 5, cooperating with the CAN bus transceiver circuit 6, 485 communication control circuit 7 and MCU module 1, the CAN interface 3, 485 communication interface 4 and USB interface 5 can be used simultaneously, satisfying the three different working modes of USB to 485, USB to CAN and 485 to CAN. At the same time, it supports access to the Modbus slave device through the CAN bus and access to the CANopen node information through the Modbus protocol, meeting the needs of mutual communication between Modbus and CANopen, so that the devices can work better together.

[0041] Specific:

[0042] like Figure 2 As shown, in the above embodiment, preferably, the power module 1 includes a main power circuit (such as Figure 2 As shown in A), 5.0V isolated power supply circuit (as shown in Figure 2 B) and the 3.3V power supply circuit of the microcontroller (as shown in Figure 2 As shown in C), the main power circuit includes the XL1509-5.0 power buck chip, the VI of the XL1509-5.0 power buck chip The N pin is respectively connected in parallel with one end of capacitor C23, one end of capacitor C25, the negative electrode of diode D2, and one end of capacitor C1, and then connected in series with fuse F1 and electrically connected to the negative electrode of diode D1. The anode of diode D2 is connected to the input power supply. In this embodiment, the input power supply can be 7-28V. The OUT end of the XL1509-5.0 power buck chip is connected in parallel with the negative electrode of diode D3 and then electrically connected to one end of inductor L1. The other end of inductor L1 is connected in parallel with the FB pin of the XL1509-5.0 power buck chip and then connected in parallel with one end of capacitor C2 and capacitor C3 and outputs a voltage of 5.0V to the outside. The other end of capacitor C1, the negative electrode of diode D2, the other end of capacitor C25, the other end of capacitor C23, the CE end of the XL1509-5.0 power buck chip, the GND end, and the positive electrode of diode D3 are connected in parallel with the other ends of capacitor C2 and capacitor C3 and then connected to GND.

[0043] In the above embodiment, preferably, the 5.0V isolated power supply circuit includes a B0505S-1W chip, the VCC terminal of the B0505S-1W chip is connected in parallel with one end of the capacitor C13 and then connected to a 5.0V voltage, the GND terminal of the B0505S-1W chip is connected in parallel with the other end of the capacitor C13 and then connected to GND, the V- pin of the B0505S-1W chip, one end of the capacitor C14, one end of the capacitor C15, and one end of the resistor R10 are connected in parallel and then connected to COMGND (common ground), and the V+ pin of the B0505S-1W chip, the other end of the capacitor C14, the other end of the capacitor C15, and the other end of the resistor R10 are connected in parallel to output COMVCC.

[0044] In the above embodiment, preferably, the 3.3V power supply circuit of the single-chip microcomputer includes an MD5-33 chip, two IN pins of the MD5-33 chip and one end of capacitor C24 are connected in parallel and then connected to a 5.0V voltage, the other end of capacitor C24 is connected to GND, the GND end of the MD5-33 chip is connected to GND, the OUT end of the MD5-33 chip, capacitor C4, capacitor C5, and one end of capacitor C6 are connected in parallel and then output a 3.3V voltage value, the other end of capacitor C4, the other end of capacitor C5, and the other end of capacitor C6 are connected in parallel and then connected to GND.

[0045] In the above embodiment, preferably, the communication gateway disclosed in this embodiment supports USB power supply and external power supply.

[0046] like Figure 3 As shown, in the above embodiment, preferably, the MCU module 1 includes a single-chip microcomputer. In this embodiment, the single-chip microcomputer is preferably a STM32F103C8T6 high-performance single-chip microcomputer to meet the high-speed data processing requirements.

[0047] like Figure 4 As shown, in the above embodiment, preferably, the CAN bus transceiver circuit 6 includes a CAN transceiver circuit and a first isolation circuit electrically connected in sequence; the CAN transceiver circuit includes a CAN transceiver, and the first isolation circuit includes a first dual-channel digital isolator; the CANH end of the CAN transceiver is connected in parallel with the cathode of the diode D6 and then electrically connected to one end of the resistor R12, the CANL end of the CAN transceiver is connected in parallel with the cathode of the diode D7 and then electrically connected to one end of the resistor R15, the anode of the diode D6, the anode of the diode D7 and one end of the capacitor C19 are connected in parallel to the public The common ground end is connected, the other end of the capacitor C19, one end of the resistor R13, and one end of the resistor R14 are connected in parallel and electrically connected to the VREF end of the CAN transceiver, the other end of the resistor R13 and the other end of the resistor R12 are connected in parallel and electrically connected to the CANH pin of the CAN interface, the other end of the resistor R14 and the other end of the resistor R15 are connected in parallel and electrically connected to the CANL pin of the CAN interface; the TXD end of the CAN transceiver is electrically connected to the VO2 end of the first dual-channel digital isolator, the RXD end of the CAN transceiver is electrically connected to the VI 1 end of the first dual-channel digital isolator, the VO1 end of the first dual-channel digital isolator is electrically connected to the PB8 end of the microcontroller, and the VI2 end of the first dual-channel digital isolator is electrically connected to the PB9 end of the microcontroller.

[0048] In the above embodiment, preferably, the first dual-channel digital isolator is preferably a CA-IS3722HS digital isolator, which can help prevent noise and surges on the data bus or other circuits from entering the local ground terminal, thereby interfering with or damaging sensitive circuits; the CAN transceiver is preferably a TJA1050T / CM, 118 transceiver, wherein the s enable terminal of the TJA1050T / CM, 118 transceiver is low or floating, both of which are enabled, and the VREF terminal of the TJA1050T / CM, 118 transceiver is the output reference voltage, outputting 0.5Vcc. It is preferably connected to the midpoint of the resistor R13 and the resistor R14, and the resistor R13 and the resistor R14 exist as terminal resistors in this embodiment.

[0049] like Figure 5 As shown, the 485 communication control circuit 7 includes an optocoupler isolation circuit, a second isolation circuit and a 485 transceiver circuit, the optocoupler isolation circuit includes a photocoupler, the 485 transceiver circuit includes a MAX485 transceiver, and the second isolation circuit includes a second dual-channel digital isolator; the A end of the MAX485 transceiver and the cathode of the diode D8 are connected in parallel and electrically connected to one end of the resistor R18, the B end of the MAX485 transceiver and the cathode of the diode D9 are connected in parallel and electrically connected to one end of the resistor R21, the other end of the resistor R18 and the other end of the resistor R21 are respectively electrically connected to the 485 communication interface, the anode of the diode D8 and the anode of the diode D9 are connected in parallel and connected to the common ground terminal; the RO end of the MAX485 transceiver is connected to the VI of the second dual-channel digital isolator 1 end is electrically connected, the DI end of the MAX485 transceiver is electrically connected to the VO2 end of the second dual-channel digital isolator, the VO1 end of the second dual-channel digital isolator is electrically connected to the PA10 end of the single-chip microcomputer, and the VI2 end of the second dual-channel digital isolator is electrically connected to the PA9 end of the single-chip microcomputer; pin 1 of the optocoupler is electrically connected to the PB12 end of the single-chip microcomputer after being connected in series with resistor R16, the RE end and DE end of the MAX485 transceiver are connected in parallel with one end of resistor R17 and then connected to pin 4 of the optocoupler, and the other end of resistor R17 is connected to the common ground end.

[0050] In the above embodiment, preferably, the second dual-channel digital isolator is preferably a CA-IS3722HS digital isolator, which can help prevent noise and surges on the data bus or other circuits from entering the local ground terminal, thereby interfering with or damaging sensitive circuits. In this embodiment, the first dual-channel digital isolator and the second dual-channel digital isolator both use high-speed dual-channel digital isolators, the isolation voltage can be as high as 5KV, the isolation barrier life is greater than 40 years, and the signal transmission rate can be as high as 150Mbps.

[0051] In the above embodiment, the power module 1, the 485 communication control circuit 7, and the CAN bus transceiver circuit 6 are isolated. By setting a first isolation circuit in the CAN bus transceiver circuit 6 and a second isolation circuit and an optocoupler isolation circuit in the 485 communication control circuit 7, the circuit safety can be effectively guaranteed, and noise and surges on the data bus or other circuits can be prevented from entering the local ground terminal, thereby avoiding interference and damage to sensitive circuits.

[0052] like Figure 6 As shown, in the above embodiment, preferably, the CANL pin and CANH pin of the CAN interface and the A+ pin and B- pin of the 485 communication interface can be integrated into one terminal block, which saves space and facilitates user wiring.

[0053] like Figure 7 As shown, in the above embodiment, preferably, it also includes a CAN status indicator LED1, a 485 status indicator LED2 and a power indicator LED3, wherein the positive electrode of the CAN status indicator LED1 is electrically connected to the PA4 terminal of the single-chip computer after passing through a resistor R3, the positive electrode of the 485 status indicator LED2 is electrically connected to the PA3 terminal of the single-chip computer after passing through a resistor R4, the positive electrode of the power indicator LED3 is electrically connected to the 5.0V voltage terminal, and the negative electrode of the CAN status indicator LED1, the negative electrode of the 485 status indicator LED2, and the negative electrode of the power indicator LED3 are respectively connected to the GND terminal.

[0054] In the above embodiment, preferably, in order to better facilitate operators to grasp the status of different interfaces and power supplies, in this embodiment, the CAN status indicator LED1 and the 485 status indicator LED2 are both green indicators, and the power indicator LED3 is a red indicator.

[0055] In the above embodiment, preferably, it also includes a shell, which can be a rectangular shell, wherein the MCU module 1, the CAN bus transceiver circuit 6 and the 485 communication control circuit 7 are centrally installed on the control main board, the control main board is placed in the shell, and the CAN interface 3, the 485 communication interface 4 and the USB interface 5 are respectively installed on the sides of the shell. In this embodiment, the CAN interface 3, the 485 communication interface 4 and the USB interface 5 can be respectively installed on the top and bottom of the shell, and a label is posted on the front of the shell so that the operator can understand the wiring requirements of different interfaces. The label can be a text or pattern label.

[0056] In the above embodiment, preferably, both sides of the back plate of the shell can also extend outward horizontally to form hanging ears to facilitate the installation of the shell.

[0057] In the above embodiment, preferably, the CAN interface 3 is used to connect to the CAN bus, the 485 communication interface 5 is used to connect to the RS485 bus, and the USB interface 5 is used to connect to the USB line.

[0058] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention may be subject to various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A communication gateway from modbus to canopen, characterized in that: Including MCU module, power module, CAN interface, 485 communication interface and USB interface: The CAN interface is electrically connected to the MCU module via a CAN bus transceiver circuit, the 485 communication interface is electrically connected to the MCU module via a 485 communication control circuit, and the USB interface is electrically connected to the MCU module; The MCU module is used to forward data between the CAN interface, the 485 communication interface and the USB interface; The power supply module is used to supply power to the MCU module, the CAN bus transceiver circuit and the 485 communication control circuit.

2. The communication gateway according to claim 1, characterized in that: The MCU module includes a single chip microcomputer.

3. The communication gateway according to claim 2, characterized in that: The CAN bus transceiver circuit comprises a CAN transceiver circuit and a first isolation circuit which are electrically connected in sequence; the CAN transceiver circuit comprises a CAN transceiver, and the first isolation circuit comprises a first dual-channel digital isolator; The CANH end of the CAN transceiver is connected in parallel with the cathode of the diode D6 and then electrically connected to one end of the resistor R12. The CANL end of the CAN transceiver is connected in parallel with the cathode of the diode D7 and then electrically connected to one end of the resistor R15. The anode of the diode D6, the anode of the diode D7 and one end of the capacitor C19 are connected in parallel and then connected to a common ground terminal. The other end of the capacitor C19, one end of the resistor R13 and one end of the resistor R14 are connected in parallel and then electrically connected to the VREF end of the CAN transceiver. The other end of the resistor R13 is connected in parallel with the other end of the resistor R12 and then electrically connected to the CANH pin of the CAN interface. The other end of the resistor R14 is connected in parallel with the other end of the resistor R15 and then electrically connected to the CANL pin of the CAN interface. The TXD terminal of the CAN transceiver is electrically connected to the VO2 terminal of the first dual-channel digital isolator, the RXD terminal of the CAN transceiver is electrically connected to the VI 1 terminal of the first dual-channel digital isolator, the VO1 terminal of the first dual-channel digital isolator is electrically connected to the PB8 terminal of the microcontroller, and the VI2 terminal of the first dual-channel digital isolator is electrically connected to the PB9 terminal of the microcontroller.

4. The communication gateway according to claim 2, characterized in that: The 485 communication control circuit includes an optocoupler isolation circuit, a second isolation circuit and a 485 transceiver circuit, the optocoupler isolation circuit includes a photocoupler, the 485 transceiver circuit includes a MAX485 transceiver, and the second isolation circuit includes a second dual-channel digital isolator; The A end of the MAX485 transceiver and the cathode of the diode D8 are connected in parallel and electrically connected to one end of the resistor R18, the B end of the MAX485 transceiver and the cathode of the diode D9 are connected in parallel and electrically connected to one end of the resistor R21, the other end of the resistor R18 and the other end of the resistor R21 are electrically connected to the 485 communication interface respectively, and the anode of the diode D8 and the anode of the diode D9 are connected in parallel and connected to the common ground terminal; The RO terminal of the MAX485 transceiver is electrically connected to the VI1 terminal of the second dual-channel digital isolator, the DI terminal of the MAX485 transceiver is electrically connected to the VO2 terminal of the second dual-channel digital isolator, the VO1 terminal of the second dual-channel digital isolator is electrically connected to the PA10 terminal of the single-chip microcomputer, and the VI2 terminal of the second dual-channel digital isolator is electrically connected to the PA9 terminal of the single-chip microcomputer; Pin 1 of the photocoupler is connected in series with resistor R16 and then electrically connected to the PB12 terminal of the single-chip computer. The RE terminal and DE terminal of the MAX485 transceiver are connected in parallel with one end of resistor R17 and then connected to pin 4 of the photocoupler. The other end of the resistor R17 is connected to the common ground terminal.

5. The communication gateway according to claim 2, characterized in that: The DP pin of the USB interface is electrically connected to the PA12 terminal of the single-chip microcomputer, and the DM pin of the USB interface is electrically connected to the PA11 terminal of the single-chip microcomputer.

6. The communication gateway according to claim 2, characterized in that: It also includes CAN status indicator, 485 status indicator and power indicator; The positive electrode of the CAN status indicator light is electrically connected to the PA4 terminal of the single-chip microcomputer through the resistor R3, and the positive electrode of the 485 status indicator light is electrically connected to the PA3 terminal of the single-chip microcomputer through the resistor R4. The positive pole of the power indicator light is electrically connected to the power module, and the negative poles of the CAN status indicator light, the negative pole of the 485 status indicator light, and the negative pole of the power indicator light are connected to the GND terminal respectively.

7. The communication gateway according to claim 1, characterized in that: Also includes a housing; The MCU module, the CAN bus transceiver circuit and the 485 communication control circuit are centrally installed on a control mainboard, and the control mainboard is placed in the housing; The CAN interface, 485 communication interface and USB interface are respectively installed on the side of the shell, the CAN interface is used to connect to the CAN bus, the 485 communication interface is used to connect to the RS485 bus, and the USB interface is used to connect to the USB line.