Common interface communication circuit and system for ethernet devices and serial differential communication devices
By using Ethernet and serial differential communication modules with a shared RJ45 interface in industrial equipment, the connected devices are automatically identified and the communication mode is selected. This solves the problems of multiple interfaces and complex wiring in traditional equipment, enabling equipment miniaturization and convenient maintenance, and improving communication reliability.
Patent Information
- Application Number
- CN202522491220.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Utility models(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-24
- Publication Date
- 2026-11-27
- Estimated Expiration
- 2035-11-24
AI Technical Summary
Traditional industrial control equipment, by using separate RJ45 interfaces for Ethernet communication and differential interfaces for serial communication, results in large front panel space occupation, complex wiring, and difficult maintenance.
Using a shared RJ45 interface, the device automatically identifies the type of connected device and selects the communication mode through an Ethernet communication module, a serial differential conversion module, and a control module, thus realizing a unified interface for Ethernet and serial differential communication.
The number of front panel interfaces has been reduced, simplifying wiring and maintenance, improving device compatibility and ease of use, and enhancing communication reliability and stability.
Smart Images

Figure CN225033986U_ABST
Abstract
Description
Technical Field
[0001] This utility model relates to the field of electronic circuit technology, and in particular to a common interface communication circuit and system for Ethernet devices and serial differential communication devices. Background Technology
[0002] With the continuous development of industrial automation equipment, intelligent terminals, and control systems, communication methods between devices are becoming increasingly diversified. Ethernet communication, due to its high transmission rate, flexible networking, and strong protocol universality, is widely used in industrial control, monitoring equipment, and distributed systems. On the other hand, serial communication methods based on differential transmission principles, such as RS485 and RS422, are still used in many industrial scenarios, especially in systems requiring long-distance transmission, strong anti-interference capabilities, or point-to-multipoint topologies, where differential serial communication remains an irreplaceable solution. Traditional industrial control equipment typically uses separate RJ45 interfaces for Ethernet communication and separate terminal blocks or differential interfaces for RS485 or RS422 communication. While this structure can meet the needs of different communication methods, it introduces the following problems: multiple communication interfaces occupy a large amount of front panel space, hindering the miniaturization design of the equipment; the increased number of interfaces leads to increased wiring complexity, making system assembly and maintenance more difficult. Utility Model Content
[0003] This utility model provides a common interface communication circuit and system for Ethernet devices and serial differential communication devices to solve the above-mentioned technical problems.
[0004] The first aspect of this utility model provides a common interface communication circuit for Ethernet devices and serial differential communication devices, comprising: The RJ45 interface is used to connect to Ethernet devices and serial differential communication devices, respectively. An Ethernet communication module is connected to the RJ45 interface to exchange data with the Ethernet device through the RJ45 interface; A serial differential conversion module is connected to the RJ45 interface to exchange data with the serial differential communication device through the RJ45 interface; The control module is connected to the serial differential conversion module and the Ethernet communication module respectively, and is used to exchange data with the Ethernet device when the Ethernet communication module detects that the RJ45 interface is connected to the Ethernet device. Alternatively, if the serial differential conversion module detects that the RJ45 interface is connected to the serial differential communication device, it may exchange data with the serial differential communication device.
[0005] Optionally, the Ethernet communication module includes an Ethernet physical layer interface chip and a network transformer. The Ethernet physical layer interface chip is connected to the control module and the network transformer respectively. The first pair of differential signal output pins of the network transformer is connected to the first pair of differential signal pins of the RJ45 interface, and the first pair of differential signal input pins of the network transformer is connected to the second pair of differential signal pins of the RJ45 interface. The control module detects the link status of the Ethernet physical layer interface chip. When the link status is successfully established, it determines that the RJ45 interface is connected to the Ethernet device and controls the Ethernet physical layer interface chip to establish a communication connection with the Ethernet device through the network transformer for data transmission and reception.
[0006] Optionally, the serial differential conversion module is a UART to RS485 module, and a pair of RS485 differential signal pins of the UART to RS485 module are connected to the third pair of differential signal pins of the RJ45 interface. The UART to RS485 module is used to convert the first serial communication signal output by the control module into a first RS485 differential signal and output it to the RJ45 interface when the serial differential communication device is connected to the RJ45 interface, and to convert the second RS485 differential signal output by the RJ45 interface into a second serial communication signal and output it to the control module.
[0007] Optionally, the shared interface communication circuit further includes a first resistor, a second resistor, and a first capacitor. A pair of RS485 differential signal pins of the UART to RS485 module are also connected to one end of the first resistor and one end of the second resistor, respectively. The other end of the first resistor is connected to the other end of the second resistor, one end of the first capacitor, and the ground pin of the network transformer, respectively. The other end of the first capacitor is grounded.
[0008] Optionally, the shared interface communication circuit further includes a power supply module and an overcurrent protection module. The output terminal of the power supply module is connected to one end of the overcurrent protection module, the other end of the overcurrent protection module is connected to the power pin of the RJ45 interface, and the ground terminal of the power supply module is connected to the ground pin of the RJ45 interface. When the RJ45 interface is connected to the Ethernet device, the overcurrent protection module automatically cuts off the power supply connection when it detects that the current exceeds a preset value.
[0009] Optionally, the control terminal of the overcurrent protection module is also connected to the control module; When the RJ45 interface is connected to the serial differential communication device and the overcurrent protection module is disconnected, the control module controls the overcurrent protection module to restart in order to restore power output.
[0010] Optionally, the overcurrent protection module includes: A switching module, one end of which is one end of the overcurrent protection module; A current sampling module, one end of which is connected to one end of the switching module, and the other end of the current sampling module is the other end of the overcurrent protection module, to collect the power supply current flowing through the switching module; A voltage conversion module, the input of which is connected to the output of the current sampling module, converts the supply current into a voltage signal; An overstress judgment module has its first input terminal connected to the output terminal of the voltage conversion module, and its second input terminal receiving a reference voltage to output an overstress signal when the voltage value of the voltage signal is greater than the reference voltage. A latching module, the input of which is connected to the output of the overstress judgment module, and the control terminal of which is connected to the signal output of the control module, so as to latch and output the overstress signal when the enable signal output by the control module is received; The drive judgment module has its first input terminal connected to the output terminal of the latch module, and its second input terminal connected to the signal output terminal of the control module, so as to control the switch module to disconnect when the enable signal and the overstress signal are received; and to control the switch module to turn on when the enable signal is received but the overstress signal is not received.
[0011] Optionally, the serial differential conversion module is a UART to RS422 module, wherein a pair of differential output signal pins of the UART to RS422 module are connected to the third pair of differential signal pins of the RJ45 interface, and a pair of differential input signal pins of the UART to RS422 module are connected to the fourth pair of differential signal pins of the RJ45 interface. The UART to RS422 module is used to convert the third serial communication signal output by the control module into a first RS422 differential signal and output it to the RJ45 interface when the serial differential communication device is connected to the RJ45 interface, and to convert the second RS422 differential signal output by the RJ45 interface into a fourth serial communication signal and output it to the control module.
[0012] Optionally, the shared interface communication circuit further includes a third resistor, a fourth resistor, and a second capacitor. A pair of RS485 differential signal pins of the UART to RS422 module are also connected to one end of the third resistor and one end of the fourth resistor, respectively. The other end of the third resistor is connected to the other end of the four resistors, one end of the second capacitor, and the ground pin of the network transformer, respectively. The other end of the second capacitor is grounded.
[0013] A second aspect of this utility model provides a shared interface communication system for Ethernet devices and serial differential communication devices, the shared interface communication system including the shared interface communication circuit, Ethernet devices, and serial differential communication devices described in the first aspect.
[0014] The technical advantages of this utility model embodiment are as follows: By simultaneously supporting Ethernet communication and serial differential communication on the same RJ45 interface, functions that originally required multiple separate interfaces are integrated into a single physical port, significantly reducing the number of interfaces on the front panel of the device and facilitating the miniaturization and integration of the entire device. Since different communication methods share the same physical interface, the amount of internal wiring is greatly reduced, avoiding the redundancy and complexity of wiring caused by separate wiring for Ethernet and differential serial lines in traditional structures, thus simplifying product manufacturing, maintenance, and wiring arrangements. Simultaneously, the control module can automatically select Ethernet mode or serial differential mode based on the actual connection status of the RJ45 interface, eliminating the need for manual switching by the user, thereby reducing communication anomalies caused by mis-insertion and improving the device's adaptability and ease of use in various application scenarios. Attached Figure Description
[0015] To more clearly illustrate the technical solutions of the embodiments of this utility model, the drawings used in the description of the embodiments of this utility model will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this utility model. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0016] Figure 1 This is a schematic diagram of the first structure of a shared interface communication circuit for an Ethernet device and a serial differential communication device provided in Embodiment 1 of this utility model; Figure 2 This is a schematic diagram of the structure of the Ethernet communication module in the shared interface communication circuit of an Ethernet device and a serial differential communication device provided in Embodiment 1 of this utility model; Figure 3 This is a schematic diagram of the second structure of a shared interface communication circuit for an Ethernet device and a serial differential communication device provided in Embodiment 1 of this utility model; Figure 4 This is a first circuit diagram of a shared interface communication circuit for an Ethernet device and a serial differential communication device provided in Embodiment 1 of this utility model; Figure 5 This is a flowchart of the common interface communication circuit for an Ethernet device and a serial differential communication device provided in Embodiment 1 of this utility model; Figure 6 This is a schematic diagram of the third structure of a shared interface communication circuit for Ethernet devices and serial differential communication devices provided in Embodiment 1 of this utility model; Figure 7 This is a schematic diagram of the fourth structure of a shared interface communication circuit for Ethernet devices and serial differential communication devices provided in Embodiment 1 of this utility model; Figure 8 This is a schematic diagram of the overcurrent protection module in the fourth structure of the shared interface communication circuit for Ethernet devices and serial differential communication devices provided in Embodiment 1 of this utility model; Figure 9 This is a schematic diagram of the fifth structure of the shared interface communication circuit for Ethernet devices and serial differential communication devices provided in Embodiment 1 of this utility model; Figure 10 This is a second circuit diagram of a shared interface communication circuit for an Ethernet device and a serial differential communication device provided in Embodiment 1 of this utility model; In the diagram: 10. Ethernet device; 20. Serial differential communication device; 101. RJ45 interface; 102. Ethernet communication module; 103. Serial differential conversion module; 104. Control module; 111. Ethernet physical layer interface chip; 112. Network transformer; 113. UART to RS485 module; 114. Power supply module; 115. Overcurrent protection module; 116. UART to RS422 module; 201. Switch module; 202. Current sampling module; 203. Voltage conversion module; 204. Overstress judgment module; 205. Latch module; 206. Drive judgment module. Detailed Implementation
[0017] The technical solutions of the present utility model will be clearly and completely described below with reference to the accompanying drawings of the embodiments. Obviously, the described embodiments are only some embodiments of the present utility model, not all embodiments. Based on the embodiments of the present utility model, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present utility model.
[0018] It should be understood that this invention can be embodied in various forms and should not be construed as being limited to the embodiments set forth herein. Rather, providing these embodiments will make the disclosure thorough and complete, and will fully convey the scope of this invention to those skilled in the art. In the drawings, for clarity, the dimensions of layers and regions, as well as their relative dimensions, may be exaggerated. The same reference numerals denote the same elements throughout.
[0019] It should be understood that when an element or layer is referred to as "on," "adjacent to," "connected to," or "coupled to" other elements or layers, it may be directly on, adjacent to, connected to, or coupled to other elements or layers, or there may be intervening elements or layers. Conversely, when an element is referred to as "directly on," "directly adjacent to," "directly connected to," or "directly coupled to" other elements or layers, there are no intervening elements or layers. It should be understood that although the terms first, second, third, etc., may be used to describe various elements, components, areas, layers, and / or portions, these elements, components, areas, layers, and / or portions should not be limited by these terms. These terms are only used to distinguish one element, component, area, layer, or portion from another element, component, area, layer, or portion. Therefore, without departing from the teachings of this utility model, the first element, component, area, layer, or portion discussed below may be referred to as the second element, component, area, layer, or portion.
[0020] To fully understand this utility model, detailed structures and steps will be presented in the following description to illustrate the technical solution proposed by this utility model. Preferred embodiments of this utility model are described in detail below; however, in addition to these detailed descriptions, this utility model may have other embodiments.
[0021] Example 1 This embodiment provides a shared interface communication circuit for Ethernet device 10 and serial differential communication device 20, such as... Figure 1 As shown, it includes: RJ45 interface 101 is connected to Ethernet device 10 and serial differential communication device 20 respectively; Ethernet communication module 102 is connected to RJ45 interface 101 to exchange data with Ethernet device 10 through RJ45 interface 101; A serial differential conversion module 103 is connected to an RJ45 interface 101 to exchange data with a serial differential communication device 20 via the RJ45 interface 101. The control module 104 is connected to the serial differential conversion module 103 and the Ethernet communication module 102 respectively, and is used to exchange data with the Ethernet device 10 when the Ethernet communication module 102 detects that the RJ45 interface 101 is connected to the Ethernet device 10. Alternatively, when the serial differential conversion module 103 detects that the RJ45 interface 101 is connected to the serial differential communication device 20, it exchanges data with the serial differential communication device 20.
[0022] The shared interface communication circuit provided in this embodiment includes an RJ45 interface 101, which provides a unified physical access port for external devices. The RJ45 interface 101 can connect to both Ethernet device 10 and serial differential communication device 20, thereby transmitting different types of differential signals on the same physical port. The RJ45 interface 101 can adopt a standard 8-pin network interface structure, and its internal pins can be used to carry Ethernet differential signals or serial differential signals according to a preset method. The Ethernet communication module 102 is used to handle data interaction with the Ethernet device 10. Its main task is to complete the conversion between digital Ethernet data and line differential signals. The Ethernet communication module 102 is typically composed of an Ethernet physical layer interface chip and a network transformer. The physical interface chip is responsible for implementing physical layer protocols, level control, rate negotiation, and link status detection, while the network transformer 112 serves as signal isolation and differential coupling. The Ethernet communication module 102 can automatically establish a communication link according to the link status and maintain the ability to send and receive network data frames, ensuring a stable network connection in an industrial communication environment. The serial differential conversion module 103 is used to switch signal formats between the serial differential communication device 20 and the control module 104. The serial differential conversion module 103 can be implemented using a differential transceiver, a level conversion circuit, or a dedicated serial-to-differential chip. It can convert the serial signal from the control module 104 into a signal format suitable for synchronous or asynchronous differential transmission, and can also parse differential signals from external devices and convert them into serial data that the control module 104 can recognize. This module supports RS485 or RS422 communication methods, and ensures the stability and anti-interference capability of the differential line under long-distance transmission conditions through built-in transceiver control circuits, bias resistors, or protection mechanisms. The control module 104, as the core of the communication circuit, is used to determine the type of connection object of the RJ45 interface 101 and select the corresponding communication path. The control module 104 can determine whether the Ethernet device 10 is connected by querying the link status of the Ethernet physical layer interface chip 111, and can also confirm whether the serial differential communication device 20 has been inserted based on the signal activity provided by the serial differential conversion module 103. The control module 104 can be constructed using a microcontroller, a programmable logic device, or an embedded processing unit. It executes preset algorithms to perform functions such as communication mode switching, data frame processing, and fault detection. The control module 104 can also work in conjunction with a power supply circuit or a protection circuit to maintain the security and stability of the interface during communication switching.
[0023] The technical advantages of the solution provided in this embodiment are as follows: By simultaneously supporting Ethernet communication and serial differential communication on the same RJ45 interface, functions that originally required multiple separate interfaces are integrated into a single physical port. This significantly reduces the number of interfaces on the front panel of the device, facilitating the miniaturization and integration of the entire device. Since different communication methods share the same physical interface, the amount of internal wiring is greatly reduced, avoiding the redundancy and complexity of wiring caused by separate wiring for Ethernet and differential serial lines in traditional structures. This simplifies product manufacturing, maintenance, and wiring arrangements. Simultaneously, the control module can automatically select Ethernet mode or serial differential mode based on the actual connection status of the RJ45 interface, eliminating the need for manual switching by the user. This reduces communication anomalies caused by mis-insertion and improves the device's adaptability and ease of use in various application scenarios. Through the above optimizations, this technical solution not only improves interface utilization efficiency but also enhances the device's scalability and overall communication reliability in industrial environments.
[0024] As one implementation method, such as Figure 2 As shown, the Ethernet communication module 102 includes an Ethernet physical layer interface chip 111 and a network transformer 112. The Ethernet physical layer interface chip 111 is connected to the control module 104 and the network transformer 112 respectively. The first pair of differential signal output pins of the network transformer 112 is connected to the first pair of differential signal pins of the RJ45 interface 101, and the first pair of differential signal input pins of the network transformer 112 is connected to the second pair of differential signal pins of the RJ45 interface 101. The control module 104 detects the link status of the Ethernet physical layer interface chip 111. When the link status is successfully established, it determines that the RJ45 interface 101 is connected to the Ethernet device 10, and controls the Ethernet physical layer interface chip 111 to establish a communication connection with the Ethernet device 10 through the network transformer 112 to send and receive data.
[0025] The Ethernet physical layer interface chip 111 converts Ethernet digital data into differential electrical signals and restores the differential signals received from external devices into Ethernet data that the control module 104 can process. This chip typically possesses capabilities such as automatic rate negotiation, link status feedback, signal shaping, and physical layer protocol parsing, and supports register-level status interaction with the control module 104. The Ethernet physical layer interface chip 111 can be a single-chip structure with a built-in clock circuit, or it can be used in conjunction with an external crystal oscillator to meet clock accuracy requirements at different speeds. The network transformer 112 provides electrical isolation between the differential signals output by the Ethernet physical layer interface chip 111 and the RJ45 interface 101. Its main function is to ensure that the ground potential difference between the two does not affect signal quality, while suppressing common-mode interference in the transmission path. This device typically consists of multiple coupling coils, providing impedance matching and high-voltage isolation capabilities, enabling stable transmission of Ethernet signals even in complex external cabling environments. The network transformer 112 can be integrated into the RJ45 interface 101 or soldered onto a circuit board in a separate package. The control module 104 detects the access method of external devices and selects an appropriate communication path. Its core function is to read the link status register of the Ethernet physical layer interface chip 111 to determine whether the RJ45 interface 101 has established a physical layer connection with the Ethernet device 10. When the link is successfully established, the control module 104 initiates the Ethernet communication process and completes data transmission and reception through a preset protocol stack. The control module 104 can be composed of a microcontroller, a logic controller, or a processing unit with multiple protocol interfaces. Internally, it can run judgment algorithms for link determination and mode switching to ensure a smooth transition between different communication methods.
[0026] The technical advantages of this implementation are as follows: By establishing a collaborative working mechanism among the Ethernet physical layer interface chip 111, network transformer 112, control module 104, and RJ45 interface 101, the system can automatically identify the type of external device and select the corresponding communication method. Through link status judgment logic, the establishment or exit of Ethernet mode can be completed automatically without manual intervention, thereby achieving dual protocol multiplexing on the same physical interface, effectively reducing the number of interfaces, reducing hardware costs, and improving the assembly flexibility and communication reliability of industrial equipment.
[0027] As one implementation method, such as Figure 3As shown, the serial differential conversion module 103 is a UART to RS485 module 113. A pair of RS485 differential signal pins of the UART to RS485 module 113 are connected to the third pair of differential signal pins of the RJ45 interface 101. The UART to RS485 module 113 is used to convert the first serial communication signal output by the control module 104 into a first RS485 differential signal and output it to the RJ45 interface 101 when the serial differential communication device 20 is connected to the RJ45 interface 101, and to convert the second RS485 differential signal output by the RJ45 interface 101 into a second serial communication signal and output it to the control module 104.
[0028] The UART-to-RS485 module 113 is used to achieve bidirectional conversion between serial data and differential signals. When the control module 104 outputs serial communication data, this module converts the serial level into an RS485 differential signal suitable for long-distance transmission through its internal transmit / receive logic, thereby enabling transmission to the external serial differential communication device 20 via the RJ45 interface 101. Conversely, differential signals sent by external devices are restored to standard serial data by the module's receiving circuit and processed by the control module 104, thus completing bidirectional communication.
[0029] The technical advantages of this embodiment are as follows: By connecting the UART to RS485 module 113 to the RJ45 interface 101, serial differential communication functionality is compatible on the same physical interface. The differential conversion circuit inside the module can automatically switch data formats when external devices are connected, significantly improving the system's adaptability to various industrial devices. Simultaneously, the differential transmission structure maintains high anti-interference performance during long-distance data transmission, thereby enhancing the stability and reliability of the entire communication system.
[0030] In one implementation, the shared interface communication circuit also includes a first resistor, a second resistor, and a first capacitor. A pair of RS485 differential signal pins of the UART to RS485 module 113 are also connected to one end of the first resistor and one end of the second resistor, respectively. The other end of the first resistor is connected to the other end of the second resistor, one end of the first capacitor, and the ground pin of the network transformer 112, respectively. The other end of the first capacitor is grounded.
[0031] The first resistor provides a stable bias path for the RS485 differential lines, ensuring the differential bus maintains a defined static level when no data is being transmitted, thus preventing misinterpretation by the receiver due to the lines being in a floating state. One end of the first resistor is connected to the differential signal line, and the other end forms a reference loop with the ground of the network transformer 112, ensuring the differential lines maintain a clear common reference potential when idle. By establishing a bias network for the differential channel, the first resistor effectively improves the stability and signal integrity of RS485 communication. The second resistor, together with the first resistor, forms a DC bias network for the differential signal, maintaining a preset differential potential difference between the two differential lines in a static state, thereby enhancing the receiver's ability to identify the signal start edge. Furthermore, the second resistor reduces common-mode interference on the lines, making it easier for the receiver to distinguish between real signals and noise. The first capacitor provides an AC bypass path for the RS485 differential lines, filtering out high-frequency interference components and maintaining the electrical stability of the differential bus. Because industrial environments have many sources of interference, this capacitor can create a temporary charge buffer between the signal line and ground, absorbing sudden spikes in noise and converting them into smooth voltage changes. The first capacitor, together with the bias resistor, forms a basic filter network that helps improve signal waveform quality and reduce communication errors caused by transient interference.
[0032] The technical advantage of this embodiment is that the grounding and filtering network composed of the first resistor, the second resistor, and the first capacitor ensures that the RS485 differential line maintains stable electrical conditions under idle, transmit / receive switching, and noise interference environments, thereby effectively improving the reliability of serial differential communication. This network, together with the grounding of the network transformer 112, forms a low-noise reference structure, ensuring the differential line's anti-interference capability even when the system multiplexes Ethernet and RS485 communication on the same RJ45 interface 101, thus improving overall communication performance and stability.
[0033] As an example, such as Figure 4 As shown, the control module 104 is an MCU, the Ethernet physical layer interface chip 111 is an Ethernet PHY chip (PHY refers to the Ethernet physical interface), the network transformer 112 is chip U1, the first resistor is resistor R1, the second resistor is resistor R2, and the first capacitor is capacitor C1. In the interface between the network transformer 112 and the RJ45 interface 101, TD+ is the positive terminal for transmitting differential signals, TD- is the positive terminal for transmitting differential signals, RD+ is the positive terminal for receiving differential signals, and RD- is the negative terminal for receiving differential signals. In the interface between the UART to RS485 module 113 and the RJ45 interface 101, RS485+ is the positive terminal for RS485 differential signals, and RS485- is the negative terminal for RS485 differential signals.
[0034] like Figure 5As shown, the working process of this circuit structure is as follows: Step S11: Ethernet Link status detection detection period is T=100ms; Step S12: Determine if the Ethernet link is successful. If the link is successful, proceed to step S13; if the link fails, proceed to step S16. Step S13: Set Ethernet connection failure count LinkFail_Times to 0; reset Link failure count. Step S14: Initialize Ethernet communication, establish a connection, and perform data transmission and reception; Step S15: Ethernet communication status check. If communication is normal, return to step S14. Step S16: Accumulate the Ethernet connection failure count ETHLinkFail_Times, and increment the failure detection count by 1. Step S17: Determine if the number of Ethernet connection failures ETHLinkFail_Times is greater than 10. If no, return to step S16. If yes, proceed to step S18. Step S18: Switch to RS485 communication; Step S19: RS485 communication status detection; Step S20: Communication determination. If communication is normal, proceed to step S21. If communication is disconnected, proceed to step S22. Step S21: Set RS485 connection failure count LinkFail_Times to 0; reset Link failure count. Step S22: Accumulate the number of RS485 connection failures (LinkFail_Times), and increment the failure detection count by 1. Step S23: Determine if the number of RS485 connection failures LinkFail_Times is greater than 10. If yes, disconnect the communication and proceed to step S24. Step S24: Lengthen the detection period T (e.g., T=1s), RS485 connection failure count LinkFail_Times=0; Ethernet connection failure count ETHLinkFail_Times=0; Return to step S11.
[0035] As one implementation method, such as Figure 6 As shown, the shared interface communication circuit also includes a power supply module 114 and an overcurrent protection module 115. The output terminal of the power supply module 114 is connected to one end of the overcurrent protection module 115, the other end of the overcurrent protection module 115 is connected to the power supply pin of the RJ45 interface 101, and the ground terminal of the power supply module 114 is connected to the ground pin of the RJ45 interface 101. When the RJ45 interface 101 is connected to the Ethernet device 10, the overcurrent protection module 115 automatically cuts off the power supply connection when it detects that the current exceeds the preset value.
[0036] The power supply module 114 provides a stable operating voltage for the external serial differential communication device 20. Its output is connected to the power pin of the RJ45 interface 101 via the overcurrent protection module 115, enabling power supply when the serial device is connected. The power supply module 114 converts the system's internal input voltage into a DC voltage suitable for the external device and provides sufficient current drive capability at its output to meet the load requirements of various industrial devices. The power supply module 114 can be constructed using a voltage regulator chip, a buck converter, or a linear power supply structure. Internally, it typically includes a voltage regulation loop, a ripple filter circuit, and a power-on protection unit to ensure the continuity and stability of the power supply process. The overcurrent protection module 115 is located between the power supply module 114 and the RJ45 interface 101. It quickly cuts off the power supply path when an abnormal increase in current is detected, preventing power overload due to short circuits or incorrect wiring. The overcurrent protection module 115 can be constructed using a resettable fuse, an electronic current limiting circuit, or a fast-cutoff protection chip, and can automatically determine whether the detected current change exceeds a preset range. When the RJ45 interface 101 is connected to the Ethernet device 10, since the circuit on the other end does not require power, if its power supply pin is grounded, it may cause a short circuit. The overcurrent protection module 115 will immediately disconnect the output after detecting abnormal current, thereby avoiding damage to the power module 114 or the line.
[0037] The technical advantage of this embodiment is that by adding an overcurrent protection module 115 between the power module 114 and the RJ45 interface 101, power can be provided to serial differential devices on a unified interface, while avoiding the risk of short circuits and overcurrents caused by mis-plugging Ethernet devices 10, thus making the power supply behavior safer and more intelligent. This protection mechanism improves the reliability of the system under scenarios of frequent plugging and unplugging of different devices, making the interface multiplexing structure more stable in industrial applications.
[0038] As one implementation method, such as Figure 7 As shown, the overcurrent protection module 115 is also connected to the control module 104; when the RJ45 interface 101 is connected to the serial differential communication device 20 and the overcurrent protection module 115 is disconnected, the control module 104 controls the overcurrent protection module 115 to restart in order to restore power output.
[0039] The overcurrent protection module 115 not only has the ability to detect and disconnect overcurrent in the power supply line, but also can restore the output state under the command of the control module 104, thereby realizing controllable management of the power supply process. The overcurrent protection module 115, connected to the control module 104, can receive control signals from the control module 104 to reclose the power supply channel when specific conditions are met. Internally, it can employ electronic switching devices, restart trigger circuits, or logic-controllable current-limiting chips, enabling the protection device to be powered on again after disconnection. When the RJ45 interface 101 detects that a serial differential communication device 20 is connected, the control module 104, after confirming that there is no short circuit in the line and that the communication mode requires external power supply, will send a reset command to the overcurrent protection module 115 to restore normal power output, ensuring that the serial differential device can obtain a stable operating power supply.
[0040] The technical advantages of this implementation are as follows: By adding a controllable restart function to the overcurrent protection module 115, not only can the power supply be cut off in a timely manner when an overcurrent event occurs to prevent damage to the power supply line, but the control module 104 can also actively restore power supply after confirming that the connected device is normal, thereby avoiding long-term power outages caused by misjudgment or plug-and-play switching. This design enhances the power supply safety of the system when different devices are frequently connected, and also gives the shared interface higher fault tolerance and automatic recovery capability, improving the overall stability of the communication system.
[0041] As one implementation method, such as Figure 8 As shown, the overcurrent protection module 115 includes: The switch module 201 has one end connected to the overcurrent protection module 115. The current sampling module 202 is connected at one end to one end of the switch module 201, and the other end of the current sampling module 202 is the other end of the overcurrent protection module 115, so as to collect the power supply current flowing through the switch module 201. The voltage conversion module 203 has its input terminal connected to the output terminal of the current sampling module 202 to convert the supply current into a voltage signal; The overstress judgment module 204 has its first input terminal connected to the output terminal of the voltage conversion module 203, and its second input terminal receives the reference voltage Vref, so as to output an overstress signal when the voltage value of the voltage signal is greater than the reference voltage Vref. The latch module 205 has its input terminal connected to the output terminal of the overstress judgment module 204, and its control terminal connected to the signal output terminal of the control module 104, so as to latch and output the overstress signal when the enable signal output by the control module 104 is received. The drive judgment module 206 has its first input terminal connected to the output terminal of the latch module 205, and its second input terminal connected to the signal output terminal of the control module 104, so as to control the switch module 201 to disconnect when an enable signal and an overstress signal are received; and to control the switch module 201 to turn on when an enable signal is received but no overstress signal is received.
[0042] The switching module 201 serves as the main conducting element in the power supply path, controlling the power supply to external devices through its on / off actions. The switching module 201 can be composed of a metal-oxide-semiconductor device, a bidirectional electronic switch, or a relay, and can rapidly change its conduction state according to control signals, thereby promptly cutting off the power output when an abnormal condition is detected, protecting the system from overcurrent damage. The current sampling module 202 detects the magnitude of the current flowing through the switching module 201 to identify whether there is an abnormal load in the power supply line. The current sampling module 202 can be implemented using a sampling resistor, a Hall effect current sensing element, or a current mirror structure, converting the actual current into a proportional detection signal and outputting it to the subsequent processing unit. The voltage conversion module 203 converts the current information generated by the current sampling module 202 into a voltage signal that can be compared and judged. The voltage conversion module 203 can be composed of an operational amplifier, a gain adjustment circuit, or a voltage amplifier, performing a linear transformation on the detection signal to adapt it to the input requirements of the overload judgment module 204. The overstress judgment module 204 compares the signal output by the voltage conversion module 203 to a threshold to confirm whether the current supply current exceeds the safe range. The overstress judgment module 204 has two input terminals: one receives the actual voltage, and the other receives a reference voltage. A comparator or judgment logic determines whether the current is in an abnormal state. When the voltage value exceeds the reference voltage, the overstress judgment module 204 outputs an overstress signal to trigger subsequent protection actions. The latch module 205 retains the protection signal output by the overstress judgment module 204, preventing it from being mistakenly cleared before the control module 104 intervenes. The latch module 205 can be implemented using a trigger, a level latch, or a controllable holding circuit. Its input terminal receives the overstress signal, and it stores the current judgment result when the control module 104 issues an enable signal. The design of the latch module 205 ensures that the protection signal remains stable in the short term, avoiding false or missed triggering of protection actions due to jitter or transient interference. The drive judgment module 206 is used to generate control commands for the switch module 201 based on the output of the latch module 205 and the enable signal issued by the control module 104. The drive judgment module 206 can be composed of logic gates, level judgment circuits, or combinational logic units to analyze the input signals: when both the overstress signal from the latch module 205 and the enable signal from the control module 104 are detected simultaneously, the drive judgment module 206 outputs a disconnect command to cut off the power supply to the switch module 201; if only the enable signal is received and no overstress signal is detected, a conduction command is generated to keep the power supply line in normal working condition.
[0043] The technical advantage of this embodiment is that by setting up a switching module 201, a current sampling module 202, a voltage conversion module 203, an overstress judgment module 204, a latching module 205, and a drive judgment module 206, a complete overcurrent protection circuit is constructed that can automatically detect overcurrent, judge abnormalities, execute power-off, and maintain the protection signal. This structure can not only quickly cut off the power supply when a short circuit or abnormal load occurs, but also realize recovery and restart after the control module 104 intervenes, making the power supply control safer, more intelligent, and adaptable to the dynamic working environment of various external devices.
[0044] As one implementation method, such as Figure 9 As shown, the serial differential conversion module 103 is a UART to RS422 module 116. A pair of differential output signal pins of the UART to RS422 module 116 are connected to the third pair of differential signal pins of the RJ45 interface 101, and a pair of differential input signal pins of the UART to RS422 module 116 are connected to the fourth pair of differential signal pins of the RJ45 interface 101. The UART to RS422 module 116 is used to convert the third serial communication signal output by the control module 104 into a first RS422 differential signal and output it to the RJ45 interface 101 when the serial differential communication device 20 is connected to the RJ45 interface 101, and to convert the second RS422 differential signal output by the RJ45 interface 101 into a fourth serial communication signal and output it to the control module 104.
[0045] The serial differential conversion module 103 employs a UART to RS422 module 116 to adapt to external devices requiring full-duplex differential communication. The UART to RS422 module 116 converts the serial data output by the control module 104 into RS422 standard differential signals and simultaneously restores the differential data from the other end of the line to a normal serial format. The UART to RS422 module 116 typically consists of independent transmit driver circuits and receive conversion units. The transmit driver encodes the third serial communication signal and outputs it as paired RS422 differential signals for transmission to external devices via the RJ45 interface 101. The receive circuit parses the differential signals received from the external device and outputs them as a fourth serial communication signal for processing by the control module 104, thus achieving simultaneous full-duplex transmission and reception. The differential output of the UART to RS422 module 116 is connected to the third pair of differential signal pins of the RJ45 interface 101, serving as the path for transmitting RS422 signals. The differential input of the UART to RS422 module 116 is connected to the fourth pair of differential signal pins of the RJ45 interface, forming the RS422 receiving channel. The UART to RS422 module 116 may internally include a level conversion unit, a differential drive symmetrical circuit, and a signal voltage regulation network to ensure sufficient drive capability and anti-interference capability of the differential signal during high-speed transmission. By setting up a directional independent transmit / receive structure in the module, long-distance, full-duplex industrial-grade serial communication can be supported.
[0046] The technical advantage of this embodiment is that by using the UART to RS422 module 116 in conjunction with the RJ45 interface 101, full-duplex RS422 differential communication capability can be provided on a unified interface, enabling the system to simultaneously send and receive data, which is suitable for industrial applications with high requirements for real-time performance and stability. This structure not only achieves highly reliable transmission of differential signals but also improves the compatibility of external devices, extending the shared interface from Ethernet support to RS422 support, thereby significantly enhancing interface multiplexing capability and system flexibility.
[0047] As one implementation method, such as Figure 10 As shown, the shared interface communication circuit also includes a third resistor R3, a fourth resistor R4, and a second capacitor C2. A pair of RS485 differential signal pins of the UART to RS422 module 116 are also connected to one end of the third resistor R3 and one end of the fourth resistor R4, respectively. The other end of the third resistor R3 is connected to the other end of the fourth resistor R4, one end of the second capacitor C2, and the ground pin of the network transformer 112, respectively. The other end of the second capacitor C2 is grounded.
[0048] The third resistor R3 is directly connected to the differential line at one end, and its other end forms a fixed reference potential through the ground of the network transformer 112. This ensures that the differential signal maintains a clear level when the system is idle, which helps improve the reliability of signal recognition. The fourth resistor R4 forms a symmetrical bias network with the third resistor R3, making the differential line pair exhibit balanced characteristics under DC conditions, thereby ensuring the stability of the reference point of the RS422 drive output. This resistor is connected to the differential signal line and can be finely adjusted according to the line conditions, so that the two differential lines maintain a reasonable common-mode voltage in the static state, thereby reducing the noise sensitivity of the line in high-interference environments. Through its combined action with the third resistor R3, the fourth resistor R4 further improves the receiver's ability to determine the starting data. The second capacitor C2 is placed between the differential line and the ground to absorb high-frequency interference components on the line, thereby reducing the impact of sudden noise on the differential signal. Under AC conditions, the second capacitor C2 provides a low-impedance path, which can quickly attenuate spike signals in the line and maintain a stable electrical environment for the differential channel. The second capacitor C2, together with the bias resistor, forms a filter structure that can reduce common-mode interference and improve the stability of data transmission during transmission.
[0049] The technical advantages of this embodiment are as follows: Through the bias and filtering network formed by the third resistor, the fourth resistor, and the second capacitor, a stable level reference and an effective high-frequency noise suppression mechanism can be established on the RS422 differential line, ensuring good waveform quality of the differential signal under idle, switching, and long-distance transmission conditions. Combined with the grounding function of the network transformer 112, this structure effectively improves the anti-interference capability of RS422 communication, enabling the shared interface to maintain high stability and reliability while being compatible with Ethernet, RS485, and RS422 communication.
[0050] Example 2 This second embodiment provides a shared interface communication system for Ethernet devices and serial differential communication devices. The shared interface communication system includes the shared interface communication circuit, Ethernet devices, and serial differential communication devices provided in this embodiment.
[0051] The above embodiments are only used to illustrate the technical solutions of this utility model, and are not intended to limit it. Although this utility model has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications 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 utility model, and should all be included within the protection scope of this utility model.
Claims
1. A shared interface communication circuit for Ethernet devices and serial differential communication devices, characterized in that, include: The RJ45 interface is used to connect to Ethernet devices and serial differential communication devices, respectively. An Ethernet communication module is connected to the RJ45 interface to exchange data with the Ethernet device through the RJ45 interface; A serial differential conversion module is connected to the RJ45 interface to exchange data with the serial differential communication device through the RJ45 interface; The control module is connected to the serial differential conversion module and the Ethernet communication module respectively, and is used to exchange data with the Ethernet device when the Ethernet communication module detects that the RJ45 interface is connected to the Ethernet device. Alternatively, if the serial differential conversion module detects that the RJ45 interface is connected to the serial differential communication device, it may exchange data with the serial differential communication device.
2. The shared interface communication circuit as described in claim 1, characterized in that, The Ethernet communication module includes an Ethernet physical layer interface chip and a network transformer. The Ethernet physical layer interface chip is connected to the control module and the network transformer respectively. The first pair of differential signal output pins of the network transformer is connected to the first pair of differential signal pins of the RJ45 interface, and the first pair of differential signal input pins of the network transformer is connected to the second pair of differential signal pins of the RJ45 interface. The control module detects the link status of the Ethernet physical layer interface chip. When the link status is successfully established, it determines that the RJ45 interface is connected to the Ethernet device and controls the Ethernet physical layer interface chip to establish a communication connection with the Ethernet device through the network transformer for data transmission and reception.
3. The shared interface communication circuit as described in claim 2, characterized in that, The serial differential conversion module is a UART to RS485 module, and a pair of RS485 differential signal pins of the UART to RS485 module are connected to the third pair of differential signal pins of the RJ45 interface. The UART to RS485 module is used to convert the first serial communication signal output by the control module into a first RS485 differential signal and output it to the RJ45 interface when the serial differential communication device is connected to the RJ45 interface, and to convert the second RS485 differential signal output by the RJ45 interface into a second serial communication signal and output it to the control module.
4. The shared interface communication circuit as described in claim 3, characterized in that, The shared interface communication circuit also includes a first resistor, a second resistor, and a first capacitor. A pair of RS485 differential signal pins of the UART to RS485 module are respectively connected to one end of the first resistor and one end of the second resistor. The other end of the first resistor is connected to the other end of the second resistor, one end of the first capacitor, and the ground pin of the network transformer. The other end of the first capacitor is grounded.
5. The shared interface communication circuit as described in claim 3, characterized in that, The shared interface communication circuit also includes a power supply module and an overcurrent protection module. The output terminal of the power supply module is connected to one end of the overcurrent protection module, the other end of the overcurrent protection module is connected to the power pin of the RJ45 interface, and the ground terminal of the power supply module is connected to the ground pin of the RJ45 interface. When the RJ45 interface is connected to the Ethernet device, the overcurrent protection module automatically cuts off the power supply connection when it detects that the current exceeds a preset value.
6. The shared interface communication circuit as described in claim 5, characterized in that, The control terminal of the overcurrent protection module is also connected to the control module; When the RJ45 interface is connected to the serial differential communication device and the overcurrent protection module is disconnected, the control module controls the overcurrent protection module to restart in order to restore power output.
7. The shared interface communication circuit as described in claim 6, characterized in that, The overcurrent protection module includes: A switching module, one end of which is one end of the overcurrent protection module; A current sampling module, one end of which is connected to one end of the switching module, and the other end of the current sampling module is the other end of the overcurrent protection module, to collect the power supply current flowing through the switching module; A voltage conversion module, the input of which is connected to the output of the current sampling module, converts the supply current into a voltage signal; An overstress judgment module has its first input terminal connected to the output terminal of the voltage conversion module, and its second input terminal receiving a reference voltage to output an overstress signal when the voltage value of the voltage signal is greater than the reference voltage. A latching module has its input terminal connected to the output terminal of the overstress judgment module, and its control terminal connected to the signal output terminal of the control module, so as to latch and output the overstress signal when it receives the enable signal output by the control module. The drive judgment module has its first input terminal connected to the output terminal of the latch module, and its second input terminal connected to the signal output terminal of the control module, so as to control the switch module to disconnect when the enable signal and the overstress signal are received; and to control the switch module to turn on when the enable signal is received but the overstress signal is not received.
8. The shared interface communication circuit as described in claim 2, characterized in that, The serial differential conversion module is a UART to RS422 module. A pair of differential output signal pins of the UART to RS422 module are connected to the third pair of differential signal pins of the RJ45 interface, and a pair of differential input signal pins of the UART to RS422 module are connected to the fourth pair of differential signal pins of the RJ45 interface. The UART to RS422 module is used to convert the third serial communication signal output by the control module into a first RS422 differential signal and output it to the RJ45 interface when the serial differential communication device is connected to the RJ45 interface, and to convert the second RS422 differential signal output by the RJ45 interface into a fourth serial communication signal and output it to the control module.
9. The shared interface communication circuit as described in claim 8, characterized in that, The shared interface communication circuit also includes a third resistor, a fourth resistor, and a second capacitor. A pair of RS485 differential signal pins of the UART to RS422 module are respectively connected to one end of the third resistor and one end of the fourth resistor. The other end of the third resistor is connected to the other end of the fourth resistor, one end of the second capacitor, and the ground pin of the network transformer. The other end of the second capacitor is grounded.
10. A communication system with a shared interface for Ethernet devices and serial differential communication devices, characterized in that, The shared interface communication system includes the shared interface communication circuit, Ethernet device, and serial differential communication device as described in any one of claims 1 to 9.
