A multi-interface system capable of quickly switching serial port protocols
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-07
- Publication Date
- 2026-08-11
AI Technical Summary
[0006]针对现有技术的不足,本发明提供了一种可快速切换串口协议的多接口系统,具备灵活调整供电电压、动态切换通信协议以及适配多种物理接口的优点,进而解决现有技术中串口通信设备兼容性差、灵活性低、维护成本高的问题
[0025](1)本发明提供的可快速切换串口协议的多接口系统通过切换模块的设计,能够自动识别采集接口与设备的连接并进行相应的供电电压切换,根据采集设备的实际需求快速切换3.3V、5V、12V等不同供电电压,克服了现有技术中单一电压供电的局限性,避免了电压不匹配导致的设备无法使用甚至损坏的问题,可以适用于多种电压场景。
Smart Images

Figure CN120803996B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of industrial serial communication technology, and more specifically, to a multi-interface system capable of quickly switching serial port protocols. Background Technology
[0002] Serial communication is widely used in industrial automation, power systems, and instrumentation due to its simple structure, low cost, and high reliability. Common physical interface types on the market include RJ45, DB9, and USB, while communication protocols cover various standards such as RS-232, RS-485, RS-422, TTL, and CAN. Because different equipment manufacturers may use different combinations of interfaces and protocols, users often need to select corresponding interface conversion modules or communication adapters based on specific scenarios. This not only increases the complexity of system integration but also limits the versatility and flexibility of the equipment. Especially in fields with high requirements for equipment compatibility, such as power automation, how to achieve rapid adaptation to multiple protocols and interfaces has become a pressing technical challenge.
[0003] Currently, solutions for multi-protocol compatibility mainly focus on serial port debugging tools or modules. Some solutions attempt to improve compatibility by integrating multiple protocols, such as supporting switching between RS-232 and RS-485 protocols in serial port debugging tools or dedicated debugging modules. However, such designs are usually only suitable for laboratory environments or temporary debugging scenarios, and their hardware structure and signal processing capabilities cannot meet the requirements for long-term stable operation in industrial settings. A more common industrial-grade solution is to use fixed protocol interface modules, such as pre-configuring the interface to a single mode like RS-485 or TTL before the device leaves the factory, with users selecting the function through jumpers or pin definitions. Although this approach can achieve basic communication functions, its protocol and interface type cannot be dynamically adjusted after deployment, resulting in extremely limited adaptability.
[0004] The core flaws of existing technologies lie in the rigidity and operational dependence of protocol switching: First, when the communication protocol or interface type needs to be changed, maintenance personnel must manually replace hardware modules or rewire, a process that not only requires equipment downtime but may also lead to production interruptions and affect system efficiency. Second, frequent manual operations not only increase maintenance costs but also easily cause problems such as poor contact and pin damage due to operational errors, increasing the risk of equipment damage. Furthermore, the fixed interface design struggles to meet the complex needs of multi-device collaboration in industrial settings; for example, the same acquisition module may need to communicate with devices supporting different protocols such as RS-232 and RS-485 at different times. Therefore, existing technologies cannot meet the core needs of the industrial sector for rapid equipment adaptation and flexible deployment, urgently requiring an innovative solution capable of dynamically switching protocols and interfaces.
[0005] No effective solutions have yet been proposed to address the problems in the relevant technologies. Summary of the Invention
[0006] To address the shortcomings of existing technologies, this invention provides a multi-interface system that can quickly switch serial port protocols. It has the advantages of flexibly adjusting the power supply voltage, dynamically switching communication protocols, and adapting to multiple physical interfaces, thereby solving the problems of poor compatibility, low flexibility, and high maintenance costs of existing serial communication devices.
[0007] To achieve the advantages of flexible power supply voltage adjustment, dynamic switching of communication protocols, and adaptation to multiple physical interfaces, the specific technical solution adopted by this invention is as follows:
[0008] A multi-interface system capable of quickly switching serial port protocols includes:
[0009] The data acquisition interface is used to connect to devices through different types of interfaces;
[0010] The switching module is used to automatically identify the connection between the acquisition interface and the device, and switch the power supply voltage and communication protocol according to the connected device to realize the power supply and communication of the acquisition module.
[0011] The data acquisition module is used to process and transmit the data collected by the device.
[0012] The switching module includes an internal circuit module for switching voltages and communication protocols, and an external connection module for protocol matching via different pin connection combinations; wherein, the internal circuit module includes:
[0013] The power switching module is used to switch the power supply voltage output by the device through the acquisition interface to ensure that the acquisition module is powered normally.
[0014] The protocol switching module is used to switch the communication protocol between the device and the acquisition module, enabling data interaction between the acquisition module and the device to complete data acquisition and forwarding.
[0015] Furthermore, the acquisition interface, switching module, and acquisition module are electrically connected via the acquisition motherboard; the acquisition interface includes network interface and serial communication interface; the external interface of the switching module includes a first type of pin and a second type of pin; wherein, the first type of pin includes a positive pin and a negative pin for power supply; the second type of pin includes a transmit pin, a receive pin, and a ground pin for data transmission.
[0016] Furthermore, when the power switching module switches the power supply voltage output by the acquisition interface of the switching device, it includes: sending a preset detection signal sequence to the external device, and simultaneously acquiring the voltage requirement characteristics and protocol type characteristics of the device based on the device's response signal; determining the voltage protocol configuration scheme based on a pre-stored correspondence table between the device manufacturer's identification code and the voltage protocol combination; and synchronously performing voltage adjustment and protocol switching according to the voltage protocol configuration scheme to avoid communication interruption during the step-by-step switching process. Among them, the preset detection signal sequence adopts a progressive voltage detection method, which is used to gradually increase the voltage from a low voltage level, and send a specific protocol detection frame at each voltage level, and simultaneously determine the voltage requirement by the device's response delay and response content.
[0017] Furthermore, the preset detection signal sequence includes a standard voltage detection sequence and a protocol identification sequence; the standard voltage detection sequence increases sequentially from low voltage to high voltage and is maintained for a predetermined time at each voltage level; the specific protocol detection frame includes different serial communication protocol detection frames, and each serial communication protocol detection frame contains a unique protocol identifier header and checksum tail to distinguish different protocol types; the response delay judgment is based on a preset time threshold table, and different voltage and protocol combinations correspond to different response time ranges. When the actual response delay falls within a specific range, it is determined to be the corresponding voltage and protocol type; the response content judgment is performed by parsing the identifier field in the data packet returned by the device and matching it with the built-in protocol feature library. When the matching degree exceeds a preset threshold, it is confirmed to be the corresponding protocol type.
[0018] Furthermore, when switching communication protocols between the device and the acquisition module, the protocol switching module includes: establishing a communication link based on a determined voltage protocol configuration scheme, monitoring data transmission status in real time, and recording communication quality indicators and device response characteristics; when a communication anomaly is detected, triggering a protocol re-matching process and attempting to restore communication using alternative protocols and voltage configurations; caching and storing parameters of successfully connected devices for rapid identification and connection of subsequent identical devices; optimizing data packet size and transmission frequency based on communication quality indicators by dynamically adjusting data transmission parameters; verifying data integrity in real time during data interaction and automatically triggering a retransmission mechanism for incomplete or abnormal data; wherein, communication quality indicators include signal strength, transmission success rate, and response time, used to assess the health status of communication.
[0019] Furthermore, the external connection module includes a first combined module and a second combined module; both the first combined module and the second combined module include power supply pin groups for different voltage power supplies, signal transmission pin groups for different protocol transmissions, signal reception pin groups for different protocol receptions, and ground pins; wherein, the power supply pin groups include pins for low-voltage power supply mode, medium-voltage power supply mode, and high-voltage power supply mode; the signal transmission pin groups include transmission pins for the first standard protocol, the second standard protocol, and the third standard protocol; and the signal reception pin groups include reception pins for the first standard protocol, the second standard protocol, and the third standard protocol.
[0020] Furthermore, the first and second combination modules are connected via different types of adapter pins, including orange, purple, red, and green adapter pins. The orange adapter pin is used to connect to a pin in the power supply pin group to switch the power supply voltage; the purple adapter pin is used to connect to a pin in the transmit protocol pin group to switch the transmit protocol; the red adapter pin is used to connect to a pin in the receive protocol pin group to switch the receive protocol; and the green adapter pin is used for grounding, connecting the negative pin of the power switching module to the ground pin of the protocol switching module.
[0021] Furthermore, in the first combined module, the positions of the power supply pin group, signal transmission pin group, signal reception pin group, and ground pin are fixed, and each pin in the first combined module is surrounded by adapter pins of different colors. The color distribution of the adapter pins can be adjusted according to the circuit board wiring rules, and the overall layout of the adapter pins remains unchanged. In the second combined module, the positions of the power supply pin group, signal transmission pin group, signal reception pin group, and ground pin are fixed, and the positions of the adapter pins around each pin in the second combined module are fixed.
[0022] Furthermore, the power supply voltage and communication protocol are switched according to the connected device to realize the power supply and communication of the acquisition module, including: selecting the interface type of the acquisition interface according to the communication interface type of the connected device; combining and connecting the first combination module and the second combination module through the adapter pins based on the communication protocol requirements of the connected device to realize communication protocol matching; after the communication protocol matching is completed, the acquisition motherboard establishes a communication connection with the device to realize data acquisition from the connected device.
[0023] Furthermore, the power switching module adapts to low-voltage, medium-voltage, and high-voltage power supply modes; the protocol switching module adapts to first, second, and third standard communication protocols; when the device is connected to the acquisition motherboard, the power switching module switches to the corresponding power supply voltage through an adapter structure to ensure that the acquisition motherboard receives a stable power supply and enables interactive connections with different devices; when the device is connected to the acquisition motherboard, the protocol switching module switches to the corresponding communication protocol through an adapter structure to ensure that the acquisition motherboard and the device establish effective data communication and enable data interaction with different devices.
[0024] Compared with the prior art, the present invention provides a multi-interface system that can quickly switch serial port protocols, and has the following beneficial effects:
[0025] (1) The multi-interface system with fast serial port protocol switching provided by the present invention can automatically identify the connection between the acquisition interface and the device and perform corresponding power supply voltage switching through the design of the switching module. It can quickly switch between different power supply voltages such as 3.3V, 5V, and 12V according to the actual needs of the acquisition device, overcome the limitations of single voltage power supply in the prior art, avoid the problem of device inability to be used or even damaged due to voltage mismatch, and can be applied to various voltage scenarios.
[0026] (2) This invention achieves rapid switching between different communication protocols such as TTL, RS232, and RS485 through the flexible combination of protocol switching modules and adapter pins. It breaks through the limitation that traditional acquisition devices can only use a single communication protocol, eliminates the trouble of having to replace hardware when the protocol changes, and significantly reduces the maintenance cost of the device. At the same time, this invention improves the compatibility and flexibility of communication. Through the connection of adapter pins of different colors such as orange, purple, red, and green, users can perform simple and quick switching operations according to the communication protocol requirements of external devices, which can be applied to a variety of communication scenarios.
[0027] (3) The multi-interface system designed in this invention supports multiple physical interface types such as RJ45 and DP9. Through the ingenious connection of the first combination module and the second combination module, it realizes flexible adaptation to different pin definitions, effectively solving the problem of communication limitation caused by fixed interface pin definitions in the prior art. It enables the device to quickly switch combinations according to different external devices and realize protocol communication with external devices, solving the problem of not being able to collect data one-to-many. In addition, this invention can be adapted to most application scenarios on the market, with high practicality and diversity. It can meet the data acquisition needs of various complex industrial environments through simple pin conversion combinations and can be applied to multiple interface scenarios. Attached Figure Description
[0028] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0029] Figure 1 This is a schematic diagram of a multi-interface system capable of quickly switching serial port protocols according to an embodiment of the present invention;
[0030] Figure 2 This is a detailed implementation diagram of a multi-interface system capable of quickly switching serial port protocols according to an embodiment of the present invention;
[0031] Figure 3 This is a schematic diagram of the workflow of a multi-interface system capable of quickly switching serial port protocols according to an embodiment of the present invention;
[0032] Figure 4 This is a connection diagram of a multi-interface system capable of quickly switching serial port protocols according to an embodiment of the present invention, in Example 1.
[0033] Figure 5 This is a schematic diagram illustrating the workflow of a power switching module in a multi-interface system capable of rapidly switching serial port protocols according to an embodiment of the present invention.
[0034] In the picture:
[0035] 100. Acquisition motherboard; 110. Acquisition interface; 120. Switching module; 130. Acquisition module; 200. Power switching module; 300. Protocol switching module; 410. Power supply module; 420. Protocol module; 430. Processing module. Detailed Implementation
[0036] To further illustrate the various embodiments, the present invention provides accompanying drawings, which are part of the disclosure of the present invention. These drawings are mainly used to illustrate the embodiments and can be used in conjunction with the relevant descriptions in the specification to explain the operating principles of the embodiments. With reference to these drawings, those skilled in the art should be able to understand other possible implementation methods and the advantages of the present invention. The components in the drawings are not drawn to scale, and similar component symbols are generally used to represent similar components.
[0037] According to an embodiment of the present invention, a multi-interface system capable of quickly switching serial port protocols is provided.
[0038] The present invention will now be further described in conjunction with the accompanying drawings and specific embodiments, such as... Figure 1 As shown, a multi-interface system capable of quickly switching serial port protocols according to an embodiment of the present invention includes:
[0039] The data acquisition interface 110 is used to connect to the device via different types of interfaces;
[0040] The switching module 120 is used to automatically identify the connection between the acquisition interface 110 and the device, and switch the power supply voltage and communication protocol according to the connected device to realize the power supply and communication of the acquisition module 130.
[0041] The acquisition module 130 is used to process and transmit the data acquired by the device.
[0042] Specifically, such as Figure 1 As shown, the present invention includes a data acquisition interface 110, a switching module 120, and a data acquisition module 130. The data acquisition interface 110 is used to connect devices; the switching module 120 is divided into an internal circuit module and an external connection module. The internal circuit module includes a power switching module 200 and a protocol switching module 300. The power switching module 200 is used to switch the power supply voltage output by the device through the data acquisition interface 110 (i.e., the power supply voltage of the data acquisition module 130). The protocol switching module 300 is used to switch the communication protocol between the device and the data acquisition module 130; the data acquisition module 130 consists of a power supply module 410, a protocol module 420, and a processing module 430, and is mainly used for processing the data acquired by the device and transmitting it externally.
[0043] In one embodiment, the switching module 120 includes an internal circuit module for switching voltage and communication protocol and an external connection module for protocol matching through different pin connection combinations; the internal circuit module includes a power switching module 200 and a protocol switching module 300; wherein, the power switching module 200 is used to switch the power supply voltage output by the device through the acquisition interface 110 to ensure that the acquisition module 130 is powered normally; the protocol switching module 300 is used to switch the communication protocol between the device and the acquisition module 130 to realize data interaction between the acquisition module 130 and the device to complete data acquisition and forwarding.
[0044] Specifically, the acquisition interface 110 is used to connect to the acquisition device, and the switching module 120 is used to switch the communication protocol between the module and the device.
[0045] Specifically, the external interfaces include RJ45 and DP9, which are divided into two types (first type pins and second type pins). These include V+ pin (positive pin) and V- pin (negative pin) for power supply, and TX pin (transmit pin), RX pin (receive pin), and GND pin (ground pin) for data transmission.
[0046] Specifically, the switching module 120 has multiple voltage modes and multiple communication protocol modes.
[0047] Specifically, the switching module 120 includes a power switching module 200, which enables the acquisition module to be powered normally by changing the power supply voltage; the switching module 120 also includes a protocol switching module 300, which enables the acquisition module 130 to interact with the device by changing the communication protocol, thereby realizing data acquisition and forwarding.
[0048] Specifically, when the identified acquisition interface 110 establishes a connection with the device, the switching module 120 switches and combines according to the power supply and communication protocol of the device to realize the power supply and communication of the acquisition module 130, thereby enabling the acquisition module 130 to communicate with the device.
[0049] In one embodiment, the acquisition interface 110, the switching module 120, and the acquisition module 130 are electrically connected through the acquisition motherboard 100; the interface type of the acquisition interface 110 includes a network interface (RJ45 in this embodiment) and a serial communication interface (DP9 in this embodiment); the external interface of the switching module 120 includes a first type of pin and a second type of pin; wherein, the first type of pin includes a positive pin and a negative pin for power supply; the second type of pin includes a transmit pin, a receive pin, and a ground pin for data transmission.
[0050] In one embodiment, such as Figure 5 As shown, when the power switching module 200 switches the device to receive the power supply voltage through the acquisition interface 110, it includes:
[0051] By sending a preset sequence of detection signals to external devices, the voltage requirement characteristics and protocol type characteristics of the devices can be obtained simultaneously based on their response signals.
[0052] Based on the pre-stored correspondence table between equipment manufacturer identification codes and voltage protocol combinations, the voltage protocol configuration scheme is determined.
[0053] According to the voltage protocol configuration scheme, voltage adjustment and protocol switching are performed synchronously to avoid communication interruption during the step-by-step switching process;
[0054] The preset detection signal sequence adopts a progressive voltage detection method, which is used to gradually increase the voltage from a low voltage level and send a specific protocol detection frame at each voltage level. The voltage requirement is determined by the device's response delay and response content.
[0055] Specifically, the preset detection signal sequence includes a standard voltage detection sequence and a protocol identification sequence. The standard voltage detection sequence increases sequentially from low voltage to high voltage and is maintained for a predetermined time at each voltage level. The specific protocol detection frame includes detection frames for different serial communication protocols, and each serial communication protocol detection frame contains a unique protocol identifier header and checksum tail to distinguish different protocol types. The response delay judgment is based on a preset time threshold table. Different voltage and protocol combinations correspond to different response time ranges. When the actual response delay falls within a specific range, it is determined to be the corresponding voltage and protocol type. The response content judgment is performed by parsing the identifier field in the data packet returned by the device and matching it with the built-in protocol feature library. When the matching degree exceeds a preset threshold, it is confirmed to be the corresponding protocol type.
[0056] Specifically, the implementation process of the preset detection signal sequence in this invention is as follows: The switching module 120 first sends a standard voltage detection sequence to the target device, starting from the lowest voltage level (usually 3.3V), and simultaneously sends detection frames for three protocols—TTL, RS-232, and RS-485—in sequence at this voltage. Each detection frame contains a specific protocol identifier header (e.g., 0xA5 for TTL, 0xB6 for RS-232, and 0xC7 for RS-485) and a corresponding checksum (e.g., CRC16 checksum). The power switching module 200 records the device's response time and response content and compares it with a preset time threshold table. For example, the normal response time range for the TTL protocol at 3.3V is 5-15ms, and the normal response time range for the RS-232 protocol at 5V is 10-25ms. If no valid response is obtained, the power switching module 200 increases the voltage to the next level (e.g., 5V) and repeats the above detection process until a suitable voltage and protocol combination is found or all possible combinations are explored. When the data packet returned by the device contains identifiable identifier fields (such as manufacturer ID, device model, etc.), the protocol switching module 300 matches this information with its built-in protocol feature library. If the match rate exceeds 80%, the corresponding protocol type can be confirmed. The entire detection process employs a progressive strategy to ensure that no electrical damage is caused to the device before a suitable voltage and protocol combination is found.
[0057] In one embodiment, when the protocol switching module 300 switches the communication protocol between the device and the acquisition module 130, it includes:
[0058] Establish a communication link based on a defined voltage protocol configuration scheme, monitor data transmission status in real time, and record communication quality indicators and device response characteristics;
[0059] When a communication anomaly is detected, a protocol rematch process is triggered, and alternative protocols and voltage configurations are used to attempt to restore communication.
[0060] Cache and store the parameters of successfully connected devices for quick identification and connection of subsequent identical devices;
[0061] By dynamically adjusting data transmission parameters, the data packet size and transmission frequency are optimized based on communication quality indicators.
[0062] During data interaction, data integrity is verified in real time, and a retransmission mechanism is automatically triggered for incomplete or abnormal data.
[0063] Among them, communication quality indicators include signal strength, transmission success rate, and response time, which are used to assess the health of communication.
[0064] Specifically, during data interaction, the protocol switching module 300 first establishes a communication link based on the determined voltage protocol configuration scheme and monitors key parameters in real time: signal strength (in dB), transmission success rate (calculated as the ratio of successfully transmitted data packets to the total number of sent data packets), and response time (recording the time interval from sending a request to receiving a response). The protocol switching module 300 judges the communication quality based on the comprehensive score of these indicators. For example, when the transmission success rate is lower than 85% or the response time consistently exceeds a preset threshold, the protocol switching module 300 triggers a protocol re-matching process. During the re-matching process, the switching module 120 attempts alternative protocols and voltage configurations according to a predetermined priority, such as first trying different protocols under the same voltage, and then trying the same protocol under different voltages. For successfully connected devices, the acquisition module 130 stores their parameters (including device ID, optimal voltage protocol combination, response characteristics, etc.) in a local cache, so that when connecting to similar devices again, the detection process can be skipped and the known optimal configuration can be applied directly. During data transmission, the protocol switching module 300 dynamically adjusts the data packet size (using larger data packets on high-quality links to improve efficiency, and using smaller data packets on low-quality links to improve reliability) and transmission frequency based on the current communication quality. Simultaneously, the acquisition module 130 implements a data integrity verification mechanism through the protocol module 420, verifying each data packet. When incomplete data is detected or verification fails, a retransmission mechanism is automatically triggered to ensure reliable data transmission.
[0065] In one embodiment, the external connection module includes a first combined module and a second combined module; both the first combined module and the second combined module include power supply pin groups for different voltage power supplies, signal transmission pin groups for different protocol transmissions, signal reception pin groups for different protocol receptions, and a ground pin; wherein, the power supply pin groups include pins for low-voltage power supply mode, medium-voltage power supply mode, and high-voltage power supply mode; the signal transmission pin groups include transmission pins for a first standard protocol, a second standard protocol, and a third standard protocol; and the signal reception pin groups include reception pins for the first standard protocol, the second standard protocol, and the third standard protocol.
[0066] In one embodiment, the first combination module and the second combination module are connected via different types of adapter pins, including orange adapter pins, purple adapter pins, red adapter pins, and green adapter pins. The orange adapter pin is used to connect to a pin in the power supply pin group to switch the power supply voltage; the purple adapter pin is used to connect to a pin in the transmit protocol pin group to switch the transmit protocol; the red adapter pin is used to connect to a pin in the receive protocol pin group to switch the receive protocol; and the green adapter pin is used for grounding and to connect the negative pin of the power switching module 200 to the ground pin of the protocol switching module 300.
[0067] In one embodiment, the positions of the power supply pin group, signal transmission pin group, signal reception pin group, and ground pin in the first combined module are fixed, and each pin in the first combined module is surrounded by adapter pins of different colors. The color distribution of the adapter pins can be adjusted according to the circuit board wiring rules, and the overall layout of the adapter pins remains unchanged. In the second combined module, the positions of the power supply pin group, signal transmission pin group, signal reception pin group, and ground pin are fixed, and the positions of the adapter pins around each pin in the second combined module are fixed.
[0068] Specifically, such as Figure 2 and Figure 3As shown, the first combined module (module 1) includes power supply pin groups for different voltage supply modes, signal transmission pin groups for different protocol transmission modes, signal reception pin groups for different protocol reception modes, and a ground pin. The power supply pin groups include pins for low-voltage power supply mode (① 3.3V), medium-voltage power supply mode (② 5V), and high-voltage power supply mode (③ 9~36V). The signal transmission pin groups include transmission pins for the first standard protocol (④ TTL-TX), the second standard protocol (⑥ RS-232-TX), and the third standard protocol (⑧ RS-485-A). The signal reception pin groups include reception pins for the first standard protocol (⑤ TTL-RX), the second standard protocol (⑦ RS-232-RX), and the third standard protocol (⑨ RS-485-B). These nine pins correspond to RJ45 or DP9 pins. The orange, purple, and red adapter pins are connected to the pins in the second combined module (module 2). The green adapter pin represents GND.
[0069] It should be noted that in this embodiment, the first standard protocol adopts the TTL standard protocol, the second standard protocol adopts the RS232 standard protocol, and the third standard protocol adopts the RS485 standard protocol. The TTL standard protocol is a communication protocol based on transistor-transistor logic levels, suitable for short-distance communication; the RS232 standard protocol is an earlier serial communication standard, suitable for medium-distance communication; the RS485 standard protocol is a differential signal transmission protocol, using the potential difference between lines A and B to represent logic states, possessing strong anti-interference capabilities and long transmission distances. In this invention, TTL-TX is the data transmitter of the TTL protocol, and TTL-RX is the data receiver of the TTL protocol; RS-232-TX is the data transmitter of the RS232 protocol, and RS-232-RX is the data receiver of the RS232 protocol; RS-485-A and RS-485-B are data transmission line pairs of the RS485 differential protocol, used for bidirectional transmission of differential signals. This invention, by flexibly switching between these three standard protocols, can adapt to the communication needs of different types of devices.
[0070] Specifically, the second combined module (module 2) includes a power supply pin group for different voltage power supply, a signal transmission pin group for different protocol transmission, a signal reception pin group for different protocol reception, and a ground pin; wherein, the power supply pin group includes pins for low voltage power supply mode (A: 3.3V), medium voltage power supply mode (B: 5V), and high voltage power supply mode (C: 9~36V); the signal transmission pin group includes a transmission pin for the first standard protocol (D: TTL-TX), a transmission pin for the second standard protocol (F: RS-232-TX), and a transmission pin for the third standard protocol (H: RS-485-A); the signal reception pin group includes a reception pin for the first standard protocol (E: TTL-RX), a reception pin for the second standard protocol (G: RS-232-RX), and a reception pin for the third standard protocol (I: RS-485-B).
[0071] Specifically, such as Figure 2 As shown, in the second combined module (module 2), A: 3.3V, B: 5V, C: 9~36V, which are the external pins V+ of the power switching module 200. The orange adapter pin is used for fast switching of the supply voltage and can be connected to one of A, B, or C; D: TTL-TX, F: RS-232-TX, H: RS-485-A, which are the external pins TX+ / TX- of the protocol switching module 300. The purple adapter pin is used for fast switching of the TX+ / TX- section. The red adapter pin is used to quickly switch between the RX+ and RX- sections of the protocol switching module 300, and can be connected to one of E, G, or I. GND is the external pin V- section of the power switching module 200 and the external pin GND section of the protocol switching module 300. The green adapter pin is used to connect the V- and GND sections.
[0072] Specifically, such as Figure 2 and Figure 4 As shown, the positions of pins ① to ⑨ in the first combination module (module 1) are fixed, and the colors of the surrounding adapter pins can be changed according to the wiring rules of the circuit board, but the overall layout remains unchanged, that is, each pin is surrounded by four adapter pins of orange, purple, red and green; the positions of pins A to I in the second combination module (module 2) are fixed, and the adapter pins are also fixed.
[0073] In one embodiment, the power supply voltage modes adapted to the power supply module 200 include low-voltage power supply mode, medium-voltage power supply mode, and high-voltage power supply mode. When the device is connected to the acquisition motherboard 100, the power supply module 200 switches to the corresponding power supply voltage through a conversion structure to ensure that the acquisition motherboard 100 obtains a stable power supply and realizes interactive connection with different devices. The communication protocols adapted to the protocol switching module 300 include a first standard protocol, a second standard protocol, and a third standard protocol. When the device is connected to the acquisition motherboard 100, the protocol switching module 300 switches to the corresponding communication protocol through a conversion structure to ensure that the acquisition motherboard 100 establishes effective data communication with the device and realizes data interaction with different devices.
[0074] It should be noted that a transition structure refers to a device used to connect electrical devices with different interface standards, change signal paths, or convert voltage levels. Common transition structures include transition boards, transition cables, and transition adapters, used to solve the problem of interface incompatibility between different devices. In this embodiment, the transition structure uses an adapter plate, which is a specific implementation of the transition structure. It is a thin sheet-like element made of metal or conductive material used to establish electrical connections between points on a circuit board. In the prior art, adapter plates are widely used in interface conversion for various electronic devices.
[0075] Specifically, the switching module 120 in this invention has three power supply voltage modes (3.3V, 5V, 9~36V). This is because the equipment models produced by different manufacturers are inconsistent, resulting in different output voltages. When the acquisition device is connected to the acquisition motherboard, the power switching module 200 of the switching module 120 must switch to the corresponding power supply voltage to ensure the normal operation of the acquisition motherboard. This invention enables rapid switching of power supply voltage via an adapter plate, allowing for interactive connections between various devices.
[0076] Specifically, the protocol switching module 300 in the switching module 120 of this invention has three modes (RS485, RS232, TTL). This is because the equipment models produced by different manufacturers are inconsistent, resulting in different communication protocols. When the acquisition device is connected to the acquisition motherboard, the protocol switching module of the switching module 120 must switch to the corresponding communication protocol to ensure the normal operation of the acquisition motherboard. This invention enables rapid switching of communication protocols via an adapter plate, allowing for interactive connections between multiple devices.
[0077] In one embodiment, switching between power supply voltage and communication protocol based on the connected device to achieve power supply and communication for the acquisition module 130 includes:
[0078] Select the interface type of the acquisition interface 110 according to the communication interface type of the connected device;
[0079] Based on the communication protocol requirements of the connected devices, the first and second combination modules are combined and connected through the adapter pins between them to achieve communication protocol matching.
[0080] Once the communication protocol is matched, the acquisition motherboard 100 establishes a communication connection with the device to acquire data from the connected device.
[0081] Specifically, such as Figure 3 As shown, the working principle of the present invention is as follows: First, the acquisition interface 110 (DP9 or RJ45) is selected according to the communication interface of the acquisition device. Then, according to the communication protocol, the first combination module (module 1) and the second combination module (module 2) are connected and combined to perform protocol matching. After the matching is completed, the acquisition motherboard 100 communicates to realize the data acquisition of the acquisition device.
[0082] Specifically, such as Figure 3 As shown, the present invention corresponds to two types of external interfaces: RJ45 and DP9. RJ45 has 8 pins, and DP9 has 9 pins. It also corresponds to three types of power supply voltages for external devices: 3.3V, 5V, and 9~36V. Furthermore, it corresponds to three types of communication protocols: RS485, RS232, and TTL. Therefore:
[0083] 1) When the external interface is RJ45 and the protocol is RS485, the wiring combinations of this invention are: =5040 types;
[0084] 2) When the external interface is RJ45 and the protocol is RS232 and TTL, the wiring combinations of this invention are: =20,160 types;
[0085] 3) When the external interface is DP9 and the protocol is RS485, the wiring combinations of this invention are: =9072 types;
[0086] 4) When the external interface is DP9 and the protocol is RS232 and TTL, the wiring combinations of this invention are: =45360 kinds.
[0087] In one embodiment, the acquisition module 130 includes a power supply module 410, a protocol module 420, and a processing module 430; the acquisition motherboard 100 also includes a conversion module and a WIFI module.
[0088] Specifically, the power supply module 410 is used to receive stable power from the power switching module 200; the protocol module 420 is used to convert the data signal transmitted by the protocol switching module 300 into a standard digital signal; and the processing module 430 is used to transmit the processed data to other devices.
[0089] Specifically, the power supply module 410 in the acquisition module 130 can be a mature DC-DC power supply module on the market (such as TI's TPS series or Mean Well standard module), the protocol module 420 can be a general protocol conversion chip such as FTDI's FT232, and the processing module 430 can be implemented based on common processor modules on the market such as STM32 series or Raspberry Pi RP2040.
[0090] Specifically, the acquisition motherboard 100 is a combination of existing acquisition modules, conversion modules, WIFI modules, etc., which can be purchased and optimized from common existing modules on the market.
[0091] To facilitate understanding of the above-mentioned technical solution of the present invention, the following detailed description is based on connecting an external device:
[0092] like Figure 4 As shown in Example 1, when the interface of the external device is defined as RJ45, the power supply voltage is 5V, the communication protocol is 485, and the pins are defined as 1-485A, 2-485B, 4-V+, and 5-V-, then the corresponding interface pins are selected in the first combination module (module 1), namely pins ①, ②, ④, and ⑤. Pin ① is the TX+ / TX- part of the protocol module, pin ② is the RX+ / RX- part of the protocol module, pin ④ is the V+ part of the power supply module, and pin ⑤ is the V- part of the power supply module.
[0093] The wiring method is as follows: for the first combination module (module 1), pin ① connects to the purple adapter pin, pin ② connects to the red adapter pin, pin ④ connects to the orange adapter pin, and pin ⑤ connects to the green adapter pin; for the second combination module (module 2), the orange adapter pin connects to pin B, the purple adapter pin connects to pin H, and the red adapter pin can connect to pin I. This connection method allows for rapid adaptation to specific voltages and communication protocols.
[0094] In summary, by utilizing the above-mentioned technical solutions of this invention, the multi-interface system with rapidly switchable serial port protocols provided by this invention, through the design of the switching module 120, can automatically identify the connection between the acquisition interface and the device and perform corresponding power supply voltage switching. It can quickly switch between different power supply voltages such as 3.3V, 5V, and 12V according to the actual needs of the acquisition device, overcoming the limitations of single-voltage power supply in existing technologies and avoiding the problem of device malfunction or even damage caused by voltage mismatch. It is applicable to various voltage scenarios. This invention, through the flexible combination of the protocol switching module 300 and the adapter pins, achieves rapid switching between different communication protocols such as TTL, RS232, and RS485, breaking through the limitation of traditional acquisition devices that can only use a single communication protocol. It eliminates the hassle of replacing hardware when the protocol changes, significantly reducing equipment maintenance costs. At the same time, this invention improves communication compatibility and flexibility. Through the connection methods of different colored adapter pins such as orange, purple, red, and green, users can perform simple and quick switching operations according to the communication protocol requirements of external devices, making it applicable to various communication scenarios. The multi-interface system designed in this invention supports multiple physical interface types such as RJ45 and DP9. Through the ingenious connection of the first and second combination modules, it achieves flexible adaptation to different pin definitions, effectively solving the problem of communication limitations caused by fixed interface pin definitions in the prior art. This allows the device to quickly switch between different external devices and achieve protocol communication with them, solving the problem of not being able to acquire data one-to-many. In addition, this invention can be adapted to most application scenarios on the market, with high practicality and versatility. It can meet the data acquisition needs of various complex industrial environments through simple pin conversion combinations and is applicable to a variety of interface scenarios.
[0095] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A multi-interface system capable of quickly switching serial port protocols, characterized in that, include: The data acquisition interface is used to connect to devices through different types of interfaces; The switching module is used to automatically identify the connection between the acquisition interface and the device, and switch the power supply voltage and communication protocol according to the connected device to realize the power supply and communication of the acquisition module. The data acquisition module is used to process and transmit the data collected by the device. The switching module includes an internal circuit module for switching voltage and communication protocols and an external connection module for protocol matching through different pin connection combinations; wherein, the internal circuit module includes: The power switching module is used to switch the power supply voltage output by the device through the acquisition interface to ensure that the acquisition module is powered normally. The protocol switching module is used to switch the communication protocol between the device and the acquisition module, so as to realize the data interaction between the acquisition module and the device and complete the data acquisition and forwarding. The power switching module, when switching the power supply voltage output by the device through the acquisition interface, includes: By sending a preset detection signal sequence to external devices, the voltage requirement characteristics and protocol type characteristics of the devices are obtained simultaneously based on their response signals. A voltage protocol configuration scheme is determined based on a pre-stored correspondence table between device manufacturer identifiers and voltage protocol combinations. Voltage adjustment and protocol switching are performed synchronously according to the voltage protocol configuration scheme to avoid communication interruptions during the step-by-step switching process. The preset detection signal sequence employs a progressive voltage detection method, gradually increasing the voltage from a low level and sending specific protocol detection frames at each voltage level. The voltage requirement is simultaneously determined by the device's response delay and response content.
2. The multi-interface system capable of quickly switching serial port protocols according to claim 1, characterized in that, The acquisition interface, switching module, and acquisition module are electrically connected through the acquisition motherboard. The acquisition interface includes network interface and serial communication interface; the external interface of the switching module includes first type pins and second type pins. The first type of pins includes a positive pin and a negative pin for power supply; the second type of pins includes a transmit pin, a receive pin, and a ground pin for data transmission.
3. A multi-interface system capable of quickly switching serial port protocols according to claim 1, characterized in that, The preset detection signal sequence includes a standard voltage detection sequence and a protocol identification sequence; wherein, the standard voltage detection sequence is increased sequentially from low voltage to high voltage, and is maintained for a predetermined time at each voltage level; The specific protocol detection frame includes different serial communication protocol detection frames, and each serial communication protocol detection frame contains a unique protocol identifier header and check tail to distinguish different protocol types; The response delay determination is based on a preset time threshold table. Different voltage and protocol combinations correspond to different response time ranges. When the actual response delay falls into a specific range, it is determined to be the corresponding voltage and protocol type. The response content is determined by parsing the identifier field in the data packet returned by the device and matching it with the built-in protocol feature library. When the matching degree exceeds a preset threshold, it is confirmed as the corresponding protocol type.
4. A multi-interface system capable of quickly switching serial port protocols according to claim 1, characterized in that, When the protocol switching module switches the communication protocol between the device and the acquisition module, it includes: Establish a communication link based on a defined voltage protocol configuration scheme, monitor data transmission status in real time, and record communication quality indicators and device response characteristics; When a communication anomaly is detected, a protocol rematch process is triggered, and alternative protocols and voltage configurations are used to attempt to restore communication. Cache and store the parameters of successfully connected devices for quick identification and connection of subsequent identical devices; By dynamically adjusting data transmission parameters, the data packet size and transmission frequency are optimized based on communication quality indicators. During data interaction, data integrity is verified in real time, and a retransmission mechanism is automatically triggered for incomplete or abnormal data. The communication quality indicators include signal strength, transmission success rate, and response time, which are used to assess the health of the communication.
5. A multi-interface system capable of quickly switching serial port protocols according to claim 1, characterized in that, The external connection module includes a first combined module and a second combined module; Both the first and second combined modules include power supply pin groups for different voltage power supplies, signal transmission pin groups for different protocol transmissions, signal reception pin groups for different protocol receptions, and ground pins. The power supply pin group includes pins for low-voltage power supply mode, medium-voltage power supply mode and high-voltage power supply mode; The signal transmission pin group includes transmission pins for the first standard protocol, the second standard protocol, and the third standard protocol; The signal receiving pin group includes receiving pins for the first standard protocol, the second standard protocol, and the third standard protocol.
6. A multi-interface system capable of quickly switching serial port protocols according to claim 5, characterized in that, The first combination module and the second combination module are connected through different types of adapter pins, including orange adapter pins, purple adapter pins, red adapter pins and green adapter pins; The orange adapter pin is used to connect to a pin in the power supply pin group to switch the power supply voltage; The purple transition pin is used to connect to a pin in the transmission protocol pin group to switch the transmission protocol; The red transition pin is used to connect to a pin in the receive protocol pin group to switch the receive protocol; The green adapter pin is used for grounding and to connect the negative pin of the power switching module to the ground pin of the protocol switching module.
7. A multi-interface system capable of quickly switching serial port protocols according to claim 5, characterized in that, In the first combined module, the positions of the power supply pin group, signal transmission pin group, signal reception pin group and ground pin are fixed, and each pin in the first combined module is surrounded by adapter pins of different colors. The color distribution of the adapter pins can be adjusted according to the circuit board wiring rules, and the overall layout of the adapter pins remains unchanged. In the second combined module, the positions of the power supply pin group, signal transmission pin group, signal reception pin group and ground pin are fixed, and the positions of the adapter pins around each pin in the second combined module are also fixed.
8. A multi-interface system capable of quickly switching serial port protocols according to claim 1, characterized in that, The step of switching between power supply voltage and communication protocol based on the connected device to achieve power supply and communication for the acquisition module includes: Select the interface type of the data acquisition interface based on the communication interface type of the connected device; Based on the communication protocol requirements of the connected devices, the first and second combination modules are combined and connected through the adapter pins between them to achieve communication protocol matching. Once the communication protocol is matched, the acquisition motherboard establishes a communication connection with the device to acquire data from the connected device.
9. A multi-interface system capable of quickly switching serial port protocols according to claim 1, characterized in that, The power supply switching module is compatible with low-voltage power supply mode, medium-voltage power supply mode and high-voltage power supply mode; the protocol switching module is compatible with communication protocols including first standard protocol, second standard protocol and third standard protocol. When the device is connected to the acquisition motherboard, the power switching module switches to the corresponding power supply voltage through the adapter structure to ensure that the acquisition motherboard receives a stable power supply and realizes interactive connection to different devices. When the device is connected to the acquisition motherboard, the protocol switching module switches to the corresponding communication protocol through a converter structure to ensure that the acquisition motherboard and the device establish effective data communication and realize data interaction with different devices.
Citation Information
Patent Citations
Type identification method of access equipment and network equipment
CN115224766A
Protocol controller of serial agreement
CN208752611U
Data line circuit and data line
CN216437069U