A multi-in-one interface circuit automatically identifies communication modes
By using an all-in-one interface circuit that automatically identifies communication methods, the design complexity and space utilization issues caused by multiple communication interfaces in miniaturized devices are solved. This achieves compatibility with multiple communication protocols, reduces device size and cost, and improves portability.
Patent Information
- Application Number
- CN202522822728.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Utility models(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-31
- Publication Date
- 2026-11-24
- Estimated Expiration
- 2035-12-31
AI Technical Summary
In miniaturized devices, the integration of multiple communication interfaces increases design complexity, maintenance difficulty, and upgrade costs, and requires higher integration and space utilization.
The multi-in-one interface circuit with automatic communication mode identification includes a main control MCU, a detection circuit, an EMC circuit, and first and second switching circuits. The detection circuit identifies the communication protocol, and the switching circuit guides the signal to the corresponding electrical layer processing circuit, thus achieving compatibility of multiple communication protocols.
It reduces the physical space occupied by the communication interface, lowers the device size and cost, makes it suitable for use in space-constrained environments, and improves the portability of the device.
Smart Images

Figure CN225018741U_ABST
Abstract
Description
Technical Field
[0001] This utility model relates to the field of industrial electronic equipment technology, and in particular to an all-in-one interface circuit that automatically identifies communication methods. Background Technology
[0002] Communication interfaces serve as bridges for data transmission between devices, playing a crucial role in various application scenarios. Commonly used communication interfaces include RS-232, RS-485, CAN, UART, and USB. They allow different hardware devices (such as computers, peripherals, sensors, and controllers) to connect and exchange information. Device communication interfaces offer diverse data transmission solutions to meet various data exchange needs, tailored to different application requirements and environmental conditions.
[0003] However, integrating multiple communication interfaces into a system increases design complexity, system maintenance difficulty, and upgrade costs. Multiple factors such as signal integrity, electromagnetic compatibility (EMC), and power management need to be considered during the design process. These factors are particularly prominent in miniaturized devices, which require communication interfaces to have higher integration to integrate more functions in a limited space. This requires communication interface technology to develop towards higher density packaging technology. Summary of the Invention
[0004] This utility model provides an all-in-one interface circuit that automatically identifies communication methods, aiming to solve the problems of insufficient space, EMC, power consumption, and main control interface caused by devices having multiple interfaces.
[0005] This utility model provides an all-in-one interface circuit for automatically identifying communication methods, including: Main control MCU; The detection circuit has its input terminal connected to the device interface J3 and its output terminal connected to the main control MCU. The main control MCU obtains the communication protocol with the device interface J3 through the detection circuit. EMC circuit, wherein the input terminal of the EMC circuit is connected to the device interface J3; The first switching circuit has its output terminal connected to the input terminal of the EMC circuit, its output terminal connected to the input terminal of the electrical layer processing circuit, and its connection to the main control MCU. The main control MCU drives the first switching circuit, which guides the signal to the electrical layer processing circuit that is consistent with the device interface J3 communication protocol. The second switching circuit has its output terminal connected to the input terminal of the electrical layer processing circuit, and its output terminal connected to the main control MCU.
[0006] As a further improvement of this utility model, the EMC circuit includes a bidirectional trigger diode D3 and a common-mode inductor L1. Pin 1 of the device interface J3 is connected to one end of resistor R3, and the other end of resistor R3 is connected to pin 1 of common-mode inductor L1. Pin 2 of the device interface J3 is connected to one end of resistor R4, and the other end of resistor R4 is connected to pin 2 of common-mode inductor L1. One end of the bidirectional trigger diode D3 is connected to the other end of resistor R3, and the other end of the bidirectional trigger diode D3 is connected to the other end of resistor R4.
[0007] As a further improvement of this utility model, the first switching circuit includes a first switching chip U1 and a second switching chip U4. Pin 2 of the first switching chip U1 is connected to pin 4 of the common mode inductor L1, and pin 2 of the second switching chip U4 is connected to pin 3 of the common mode inductor L1.
[0008] As a further improvement of this utility model, pin 9 of the first switching chip U1 is connected to pin 38 of the main control MCU, pin 10 of the first switching chip U1 is connected to pin 5 of the main control MCU, pin 11 of the first switching chip U1 is connected to pin 4 of the main control MCU, pin 9 of the second switching chip U4 is connected to pin 3 of the main control MCU, pin 10 of the second switching chip U4 is connected to pin 2 of the main control MCU, and pin 11 of the second switching chip U4 is connected to pin 1 of the main control MCU.
[0009] As a further improvement of this utility model, the electrical layer processing circuit includes a CAN protocol chip U2, pin 2 of the CAN protocol chip U2 is connected to pin 1 of the second switching chip U4, and pin 3 of the CAN protocol chip U2 is connected to pin 1 of the first switching chip U1.
[0010] As a further improvement of this utility model, the electrical layer processing circuit also includes a 485 protocol chip U3, pin 3 of the 485 protocol chip U3 is connected to pin 3 of the second switching chip U4, and pin 4 of the 485 protocol chip U3 is connected to pin 3 of the first switching chip U1.
[0011] As a further improvement of this utility model, the second switching circuit includes a third switching chip U5 and a fourth switching chip U6. Pin 1 of the third switching chip U5 is connected to pin 6 of the CAN protocol chip U2, pin 2 of the third switching chip U5 is connected to pin 11 of the 485 protocol chip U3, pin 1 of the fourth switching chip U6 is connected to pin 7 of the CAN protocol chip U2, and pin 2 of the fourth switching chip U6 is connected to pin 14 of the 485 protocol chip U3.
[0012] As a further improvement of this utility model, pin 9 of the third switching chip U5 is connected to pin 41 of the main control MCU, pin 10 of the third switching chip U5 is connected to pin 40 of the main control MCU, pin 11 of the third switching chip U5 is connected to pin 39 of the main control MCU, pin 9 of the fourth switching chip U6 is connected to pin 44 of the main control MCU, pin 10 of the fourth switching chip U6 is connected to pin 43 of the main control MCU, and pin 11 of the fourth switching chip U6 is connected to pin 42 of the main control MCU.
[0013] As a further improvement of this utility model, the detection circuit includes resistors R6, R7, R8, R9, R10, and R11. One end of resistor R6 is connected to pin 1 of device interface J3, and the other end of resistor R6 is connected to one end of resistor R7. The other end of resistor R7 is grounded. One end of resistor R8 is connected to one end of resistor R7, and the other end of resistor R8 is connected to one end of resistor R2. The other end of resistor R2 is connected to pin 58 of the main control MCU. One end of resistor R9 is connected to pin 2 of device interface J3, and the other end of resistor R9 is connected to one end of resistor R10. The other end of resistor R10 is grounded. One end of resistor R11 is connected to one end of resistor R10, and the other end of resistor R11 is connected to one end of resistor R1. The other end of resistor R1 is connected to pin 57 of the main control MCU.
[0014] As a further improvement of this utility model, the main control MCU chip model is STM32F207VET6.
[0015] The beneficial effects of this utility model are: by selecting switching circuits and detection circuits, the physical interfaces of various communication interfaces are greatly reduced, and more communication protocols are compatible. The reduction of communication interfaces greatly simplifies the product size and shell design, making the interface occupy less space and the equipment more compact, which is suitable for use in space-constrained environments. Attached Figure Description
[0016] Figure 1 This is a schematic diagram showing the relationship between the various circuits in this utility model; Figure 2 This is a circuit diagram of the main control MCU of this utility model; Figure 3 This is a circuit diagram of the device interface J3 of this utility model; Figure 4 This is a circuit diagram of the EMC circuit of this utility model; Figure 5 This is a circuit diagram of the first switching circuit of this utility model; Figure 6 This is a circuit diagram of the second switching circuit of this utility model; Figure 7 This is a circuit diagram of the detection circuit of this utility model; Figure 8 This is a circuit diagram of the CAN protocol chip U2 of this utility model; Figure 9 This is a circuit diagram of the 485 protocol chip U3 of this utility model. Detailed Implementation
[0017] To make the objectives, technical solutions, and advantages of this utility model clearer, the present utility model will be further described in detail below with reference to the accompanying drawings and embodiments.
[0018] like Figure 1 As shown, this utility model provides an all-in-one interface circuit for automatically identifying communication methods, including: Main control MCU; The detection circuit has its input terminal connected to the device interface J3 and its output terminal connected to the main control MCU. The main control MCU obtains the communication protocol with the device interface J3 through the detection circuit. EMC circuit, wherein the input terminal of the EMC circuit is connected to the device interface J3; The first switching circuit has its output terminal connected to the input terminal of the EMC circuit, its output terminal connected to the input terminal of the electrical layer processing circuit, and its connection to the main control MCU. The main control MCU drives the first switching circuit, which guides the signal to the electrical layer processing circuit that is consistent with the device interface J3 communication protocol. The second switching circuit has its output terminal connected to the input terminal of the electrical layer processing circuit, and its output terminal connected to the main control MCU.
[0019] In one embodiment of this utility model, the EMC circuit includes a bidirectional trigger diode D3 and a common-mode inductor L1. Pin 1 of the device interface J3 is connected to one end of resistor R3, and the other end of resistor R3 is connected to pin 1 of common-mode inductor L1. Pin 2 of the device interface J3 is connected to one end of resistor R4, and the other end of resistor R4 is connected to pin 2 of common-mode inductor L1. One end of the bidirectional trigger diode D3 is connected to the other end of resistor R3, and the other end of the bidirectional trigger diode D3 is connected to the other end of resistor R4.
[0020] EMC circuits are passive circuits, physical protection networks composed of passive / active filtering, shielding, grounding, isolation, and other technologies. Their goal is to control common-mode / differential-mode noise current paths, block high-frequency interference coupling, reduce radiated emissions, and enhance immunity. When interference (noise / surge / radiation) attempts to enter or escape from the equipment, the EMC circuit guides, absorbs, reflects, or isolates the harmful energy within a certain timeframe, thereby ensuring that the equipment neither interferes with nor is interfered with by other equipment, and preventing damage to the circuitry behind the interface.
[0021] In another embodiment of this utility model, the first switching circuit includes a first switching chip U1 and a second switching chip U4. Pin 2 of the first switching chip U1 is connected to pin 4 of the common-mode inductor L1, and pin 2 of the second switching chip U4 is connected to pin 3 of the common-mode inductor L1. The chip model of the first switching chip U1 and the second switching chip U4 is CD4051.
[0022] In another embodiment of this utility model, pin 9 of the first switching chip U1 is connected to pin 38 of the main control MCU, pin 10 of the first switching chip U1 is connected to pin 5 of the main control MCU, pin 11 of the first switching chip U1 is connected to pin 4 of the main control MCU, pin 9 of the second switching chip U4 is connected to pin 3 of the main control MCU, pin 10 of the second switching chip U4 is connected to pin 2 of the main control MCU, and pin 11 of the second switching chip U4 is connected to pin 1 of the main control MCU. In another embodiment of this utility model, the electrical layer processing circuit includes a CAN protocol chip U2, pin 2 of the CAN protocol chip U2 is connected to pin 1 of the second switching chip U4, and pin 3 of the CAN protocol chip U2 is connected to pin 1 of the first switching chip U1. The chip model of the CAN protocol chip U2 is NSI1050DDBR.
[0023] In another embodiment of this utility model, the electrical layer processing circuit further includes a 485 protocol chip U3. Pin 3 of the 485 protocol chip U3 is connected to pin 3 of the second switching chip U4, and pin 4 of the 485 protocol chip U3 is connected to pin 3 of the first switching chip U1. The chip model of the 485 protocol chip U3 is NSI83086.
[0024] In another embodiment of this utility model, the second switching circuit includes a third switching chip U5 and a fourth switching chip U6. Pin 1 of the third switching chip U5 is connected to pin 6 of the CAN protocol chip U2, and pin 2 of the third switching chip U5 is connected to pin 11 of the 485 protocol chip U3. Pin 1 of the fourth switching chip U6 is connected to pin 7 of the CAN protocol chip U2, and pin 2 of the fourth switching chip U6 is connected to pin 14 of the 485 protocol chip U3. The chip model of the third switching chip U5 and the fourth switching chip U6 is CD4051.
[0025] In another embodiment of this utility model, pin 9 of the third switching chip U5 is connected to pin 41 of the main control MCU, pin 10 of the third switching chip U5 is connected to pin 40 of the main control MCU, pin 11 of the third switching chip U5 is connected to pin 39 of the main control MCU, pin 9 of the fourth switching chip U6 is connected to pin 44 of the main control MCU, pin 10 of the fourth switching chip U6 is connected to pin 43 of the main control MCU, and pin 11 of the fourth switching chip U6 is connected to pin 42 of the main control MCU.
[0026] After the main control MCU learns the device's communication protocol through the detection circuit, it controls the first switching chip U1 and the second switching chip U4 to guide the signal to the electrical layer processing circuit that matches the device's communication protocol. In this embodiment, two implementations are provided: CAN bus protocol and RS-485 communication protocol. In practical applications, other communication protocol chips can also be added. Through the cooperation of the detection circuit and the first switching circuit, the communication protocol can be adjusted in a timely manner to complete signal transmission regardless of which communication protocol chip is connected, without the need to set up multiple different device interfaces for different devices.
[0027] In the main control MCU, pins 1-5 and PIN38 are I / O ports controlling the address of the first switching circuit chip, while pins 39-44 are I / O ports controlling the address of the second switching circuit chip. Different addresses correspond to different channels Yx being activated, while the common channel Z is activated. The main control MCU switches communication protocols by assigning values to the I / O ports and activating the corresponding communication protocol ports.
[0028] For example, the three pins ADDR1_A, ADDR1_B, and ADDR1_C in the main control MCU are three addresses controlling the second switching chip U4. The ADDR1_C pin in the second switching chip U4 can be configured to correspond to the CAN_H pin, and the ADDR1_A pin can be configured to correspond to the 485_TX pin. When the ADDR1_C pin is set to 1, it indicates switching to the CAN communication protocol; when the ADDR1_A pin is set to 1, it indicates switching to the 485 communication protocol. Switching between different communication protocols is achieved through the main control MCU. The above example is just one embodiment; the specific pin correspondences can be adjusted accordingly. The first switching chip U1, the third switching chip U5, and the fourth switching chip U6 can all be configured with pins according to the above example.
[0029] In another embodiment of this utility model, the detection circuit includes resistors R6, R7, R8, R9, R10, and R11. One end of resistor R6 is connected to pin 1 of device interface J3, and the other end of resistor R6 is connected to one end of resistor R7. The other end of resistor R7 is grounded. One end of resistor R8 is connected to one end of resistor R7, and the other end of resistor R8 is connected to one end of resistor R2. The other end of resistor R2 is connected to pin 58 of the main control MCU. One end of resistor R9 is connected to pin 2 of device interface J3, and the other end of resistor R9 is connected to one end of resistor R10. The other end of resistor R10 is grounded. One end of resistor R11 is connected to one end of resistor R10, and the other end of resistor R11 is connected to one end of resistor R1. The other end of resistor R1 is connected to pin 57 of the main control MCU.
[0030] The communication line voltage information in idle / no data transmission states is acquired by ADC. Different voltage information corresponds to different communication protocols. For example, in RS-232, the voltage level on the two data lines is negative in idle state; in CAN, the voltage difference on the two data lines is approximately 0V; and in RS-485, the voltage difference on the two data lines in idle state depends on the voltage difference between the A and B lines on the bus and the pull-up / pull-down levels (generally, line A is pulled up to 5V and line B is pulled down to ground). However, the definite state is that the voltage difference between the A and B lines is positive, generally V. AB =V A -V B ≥0.2V (0.3V or higher is recommended for better reliability), meaning the two lines of RS-232 are negative, the CAN voltage difference is 0, and the RS-485 voltage difference is positive. The communication protocol can be detected by sampling the voltage between the two lines using an ADC. Therefore, by measuring the voltage difference between the two data lines of the device interface J3, the main control MCU can determine the communication protocol used by the connected device.
[0031] In another embodiment of this utility model, the main control MCU chip model is STM32F207VET6.
[0032] The path architecture in this solution is as follows: Figure 1 As shown, after the device interface J3 passes through the detection circuit, it transmits the information to the main control MCU for processing. The main control MCU determines the communication protocol based on the electrical characteristics of the connected communication line. After the electrical signal is processed by the EMC circuit, the main control MCU drives the first switching circuit to transmit the input signal to the electrical layer processing circuit. After the electrical layer processing, it passes through the second switching circuit. The main control MCU selects the corresponding channel to access the corresponding communication interface. Finally, the main control MCU or CPU parses the communication, reducing the size of the EMC circuit and the IO port occupation of the MCU.
[0033] When a signal is input to device interface J3, the signal is input from the interface and EMC circuit to the first switching circuit. At this time, the first switching circuit is not electrically connected to the subsequent electrical layer processing circuit. The detection circuit samples the signal and sends it to the main control MCU. After the main control MCU matches the sampled data with the communication protocol corresponding to the device, it drives the first switching circuit to make the communication signal enter the corresponding electrical layer processing circuit. After electrical layer processing, the communication signal is connected to the second switching circuit. At this time, the main control MCU drives the second switching circuit to input the corresponding communication signal into the main control MCU according to the communication mode determined by the detection circuit. The main control MCU then processes the communication protocol, realizing that one interface is compatible with multiple protocols.
[0034] By using a detection circuit to determine the electrical characteristics corresponding to the communication protocol, different electrical protocols can be input into the device through the same interface. A switching circuit connects the corresponding communication circuit to the corresponding communication processing circuit, reducing the size of the EMC circuit and allowing different communication protocols to share the same interface and the same EMC circuit. This solution, by adding detection and switching circuits, achieves the effect of a single physical interface compatible with multiple communication protocols, significantly reducing the number of physical interfaces corresponding to multiple communication protocols and greatly reducing the PCB footprint. The switching circuit can use MOSFETs, relays, analog switches, etc. for switching.
[0035] By selecting appropriate switching and detection circuits, the physical interfaces of various communication interfaces are significantly reduced. Furthermore, by adding electrical characteristics of the communication protocol to the detection circuit and MCU, compatibility with more communication protocols can be achieved. Reducing the number of communication interfaces lowers product costs. Secondly, the reduction in communication interfaces greatly simplifies the product's size and housing design, resulting in a smaller footprint and more compact device, suitable for use in space-constrained environments. For mobile devices, the multi-in-one interface helps reduce weight and size, improving portability.
[0036] In this scheme, the switching circuit can be switched using mechanical switches such as DIP switches, and the detection circuit can be replaced by a polling circuit.
[0037] The above description, in conjunction with specific preferred embodiments, provides a further detailed explanation of the present invention. It should not be construed that the specific implementation of the present invention is limited to these descriptions. For those skilled in the art, various simple deductions or substitutions can be made without departing from the concept of the present invention, and all such modifications and substitutions should be considered within the protection scope of the present invention.
Claims
1. A multi-functional interface circuit for automatically identifying communication methods, characterized in that, include: Main control MCU; The detection circuit has its input terminal connected to the device interface J3 and its output terminal connected to the main control MCU. The main control MCU obtains the communication protocol with the device interface J3 through the detection circuit. EMC circuit, wherein the input terminal of the EMC circuit is connected to the device interface J3; The first switching circuit has its output terminal connected to the input terminal of the EMC circuit, its output terminal connected to the input terminal of the electrical layer processing circuit, and its connection to the main control MCU. The main control MCU drives the first switching circuit, which guides the signal to the electrical layer processing circuit that is consistent with the device interface J3 communication protocol. The second switching circuit has its output terminal connected to the input terminal of the electrical layer processing circuit, and its output terminal connected to the main control MCU.
2. The multi-functional interface circuit for automatically identifying communication methods according to claim 1, characterized in that, The EMC circuit includes a bidirectional trigger diode D3 and a common-mode inductor L1. Pin 1 of the device interface J3 is connected to one end of resistor R3, and the other end of resistor R3 is connected to pin 1 of common-mode inductor L1. Pin 2 of the device interface J3 is connected to one end of resistor R4, and the other end of resistor R4 is connected to pin 2 of common-mode inductor L1. One end of the bidirectional trigger diode D3 is connected to the other end of resistor R3, and the other end of the bidirectional trigger diode D3 is connected to the other end of resistor R4.
3. The all-in-one interface circuit for automatically identifying communication methods according to claim 2, characterized in that, The first switching circuit includes a first switching chip U1 and a second switching chip U4. Pin 2 of the first switching chip U1 is connected to pin 4 of the common mode inductor L1, and pin 2 of the second switching chip U4 is connected to pin 3 of the common mode inductor L1.
4. The all-in-one interface circuit for automatically identifying communication modes according to claim 3, characterized in that, Pin 9 of the first switching chip U1 is connected to pin 38 of the main control MCU, pin 10 of the first switching chip U1 is connected to pin 5 of the main control MCU, pin 11 of the first switching chip U1 is connected to pin 4 of the main control MCU, pin 9 of the second switching chip U4 is connected to pin 3 of the main control MCU, pin 10 of the second switching chip U4 is connected to pin 2 of the main control MCU, and pin 11 of the second switching chip U4 is connected to pin 1 of the main control MCU.
5. The all-in-one interface circuit for automatically identifying communication modes according to claim 3, characterized in that, The electrical layer processing circuit includes a CAN protocol chip U2, pin 2 of which is connected to pin 1 of the second switching chip U4, and pin 3 of which is connected to pin 1 of the first switching chip U1.
6. The all-in-one interface circuit for automatically identifying communication modes according to claim 5, characterized in that, The electrical layer processing circuit also includes a 485 protocol chip U3, pin 3 of which is connected to pin 3 of the second switching chip U4, and pin 4 of which is connected to pin 3 of the first switching chip U1.
7. The all-in-one interface circuit for automatically identifying communication methods according to claim 6, characterized in that, The second switching circuit includes a third switching chip U5 and a fourth switching chip U6. Pin 1 of the third switching chip U5 is connected to pin 6 of the CAN protocol chip U2, pin 2 of the third switching chip U5 is connected to pin 11 of the 485 protocol chip U3, pin 1 of the fourth switching chip U6 is connected to pin 7 of the CAN protocol chip U2, and pin 2 of the fourth switching chip U6 is connected to pin 14 of the 485 protocol chip U3.
8. The multi-in-one interface circuit for automatically identifying communication methods according to claim 7, characterized in that, Pin 9 of the third switching chip U5 is connected to pin 41 of the main control MCU, pin 10 of the third switching chip U5 is connected to pin 40 of the main control MCU, pin 11 of the third switching chip U5 is connected to pin 39 of the main control MCU, pin 9 of the fourth switching chip U6 is connected to pin 44 of the main control MCU, pin 10 of the fourth switching chip U6 is connected to pin 43 of the main control MCU, and pin 11 of the fourth switching chip U6 is connected to pin 42 of the main control MCU.
9. The multi-in-one interface circuit for automatically identifying communication modes according to claim 1, characterized in that, The detection circuit includes resistors R6, R7, R8, R9, R10, and R11. One end of resistor R6 is connected to pin 1 of device interface J3, and the other end of resistor R6 is connected to one end of resistor R7. The other end of resistor R7 is grounded. One end of resistor R8 is connected to one end of resistor R7, and the other end of resistor R8 is connected to one end of resistor R2. The other end of resistor R2 is connected to pin 58 of the main control MCU. One end of resistor R9 is connected to pin 2 of device interface J3, and the other end of resistor R9 is connected to one end of resistor R10. The other end of resistor R10 is grounded. One end of resistor R11 is connected to one end of resistor R10, and the other end of resistor R11 is connected to one end of resistor R1. The other end of resistor R1 is connected to pin 57 of the main control MCU.
10. The all-in-one interface circuit for automatically identifying communication modes according to claim 1, characterized in that, The main control MCU chip model is STM32F207VET6.
