Long-distance UART serial port communication device and system
By using optical fiber transmission technology in UART serial communication, the problems of limited transmission distance and weak anti-interference ability are solved, and long-distance high anti-interference UART serial communication is realized, which enhances the system's anti-corruption ability.
Patent Information
- Application Number
- CN202510549522.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-29
- Publication Date
- 2025-05-30
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing UART serial communication method has limited transmission distance and weak anti-interference ability, which can easily cause damage to both ends.
A long-distance UART serial port communication device is adopted, which includes a UART serial port module, a transmitter and receiver switching device, an optical fiber transmitter and an optical fiber receiver, and the serial port communication waveform is transmitted through the optical fiber to realize long-distance communication.
Through optical fiber transmission, communication distance is significantly improved, anti-interference ability is enhanced, and physical electrical isolation between the two UART serial ports is realized, improving the system's damage resistance.
Smart Images

Figure CN120074675A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of communication debugging, and particularly relates to a long-distance UART serial communication device and system. Background Art
[0002] UART serial communication is a low-cost and efficient full-duplex communication protocol, which is very suitable for inter-module communication at low rates. However, for the existing interconnection between two boards, physical connections are mostly made using copper-core or aluminum-core cables, etc. This connection method has weak anti-interference ability and short communication distance. The communication distance is inversely proportional to the communication rate. Either the communication rate is reduced to increase the communication distance, or the communication distance is reduced to increase the communication rate. The two cannot have both. As the transmission distance increases, the communication rate can only decrease accordingly. Moreover, if one end of the serial port device is damaged, it may cause damage to the serial port device at the other connected end. Since the existing UART serial communication circuit uses electrical signals for communication, which are single-ended signals with weak anti-interference ability, it is only suitable for board-level communication interconnection.
[0003] Therefore, the existing UART serial communication method has limited transmission distance, weak anti-interference ability, and is prone to double-end damage. Summary of the Invention
[0004] In view of this, the purpose of the present invention is to provide a long-distance UART serial communication device and system to solve the problems of the existing UART serial communication method, including limited transmission distance, weak anti-interference ability, and easy double-end damage.
[0005] According to the first aspect of the embodiments of the present invention, a long-distance UART serial communication device is provided, including: A UART serial port module, a transmitting-end switching device, a receiving-end switching device, an optical fiber transmitter, and an optical fiber receiver; The UART serial port module sends a serial communication waveform to the switching pin of the transmitting-end switching device; the transmitting-end switching device is connected to the optical fiber transmitter, and the optical fiber transmitter sends an optical signal to other devices through an optical fiber; The optical fiber receiver receives the optical signal through the optical fiber, the optical fiber receiver is connected to the receiving-end switching device, and the receiving-end switching device is connected to the UART serial port module.
[0006] Preferably, the long-distance UART serial communication device further includes: A power supply module, and the power supply module is respectively connected to the power supply terminals of the UART serial port module, the transmitting-end switching device, the receiving-end switching device, the optical fiber transmitter, and the optical fiber receiver.
[0007] Preferably, the UART serial port module includes a serial port TX and a serial port RX, which are connected to the control end of the transmitting end switching device through the serial port TX and to the control end of the receiving end switching device through the serial port RX.
[0008] Preferably, the transmitting end switching device is a triode or a MOS transistor; the receiving end switching device is a triode or a MOS transistor.
[0009] Preferably, the operating frequencies of the transmitting end switching device and the receiving end switching device match the serial port communication rate.
[0010] Preferably, the input power supply of the transmitting end switching device matches the operating voltage of the optical fiber transmitter; the input power supply of the receiving end switching device matches the operating voltage of the UART serial port module.
[0011] According to a second aspect of the embodiments of the present invention, a long-distance UART serial port communication system is provided, which is characterized by including: Two long-distance UART serial port communication devices, which are connected by an optical fiber between the two devices.
[0012] The technical solutions provided by the embodiments of the present invention may include the following beneficial effects: It can be understood that in the technical solution shown in the present invention, the device uses the UART serial port module to send the serial port communication waveform to the transmitting end switching device; the transmitting end switching device sends the serial port communication waveform to the optical fiber transmitter; the optical fiber transmitter converts the serial port communication waveform into an optical signal and sends it to other devices through the optical fiber; the optical fiber receiver receives the optical signal through the optical fiber, converts the optical signal into a serial port communication waveform, and sends the serial port communication waveform to the receiving end switching device; the receiving end switching device sends the serial port communication waveform to the UART serial port module. It can be understood that in the technical solution shown in the present invention, through the characteristics of the optical fiber, the communication distance is increased, the anti-interference ability of the communication line is greatly increased, and the physical electrical isolation between two UART serial ports is achieved, increasing the anti-damage ability.
[0013] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, showing embodiments consistent with the present invention and used together with the specification to explain the principles of the present invention.
[0015] Figure 1 is a schematic block diagram of a long-distance UART serial port communication device shown according to an exemplary embodiment; Figure 2is a schematic block diagram showing the connection of a power module according to an exemplary embodiment; Figure 3 is a schematic block diagram showing a long-distance UART serial communication device according to an exemplary embodiment. Detailed implementation manners
[0016] Here, the exemplary embodiments will be described in detail, and examples thereof are shown in the drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementation manners described in the following exemplary embodiments do not represent all implementation manners consistent with the present invention. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present invention as detailed in the appended claims.
[0017] In an embodiment, Figure 1 is a schematic block diagram showing a long-distance UART serial communication device according to an exemplary embodiment. Refer to Figure 1 to provide a long-distance UART serial communication device, including: a UART serial port module 101, a transmitting-end switching device 102, a receiving-end switching device 103, an optical fiber transmitter 104, and an optical fiber receiver 105; The UART serial port module 101 sends a serial communication waveform to the switching pin of the transmitting-end switching device 102; the transmitting-end switching device 102 is connected to the optical fiber transmitter 104, and the optical fiber transmitter 104 sends an optical signal to other devices (not shown in the figure) through an optical fiber. The other device can be another long-distance UART serial communication device or other devices capable of receiving and sending optical signals. The operating voltages of the serial ports of the long-distance UART serial communication device and other devices may not be the same, and long-distance transmission can also be achieved.
[0018] The optical fiber receiver 105 receives an optical signal through an optical fiber. The optical fiber receiver 105 is connected to the receiving-end switching device 103, and the receiving-end switching device 103 is connected to the UART serial port module 101.
[0019] In specific practice, the UART serial port module 101 sends a serial communication waveform to the switching pin of the transmitting-end switching device 102. The switching device 102 converts the serial communication waveform into an electrical signal and sends the electrical signal to the optical fiber transmitter 104 in the form of an electrical signal. The optical fiber transmitter 104 then converts the electrical signal into an optical signal and sends the optical signal to other devices through an optical fiber.
[0020] It can be understood that for the technical solution shown in this embodiment, the device uses the UART serial port module to send the serial communication waveform to the transmitting-end switching device; the transmitting-end switching device sends the serial communication waveform to the fiber optic transmitter; the fiber optic transmitter converts the serial communication waveform into an optical signal and sends it to other devices through the optical fiber; the fiber optic receiver receives the optical signal through the optical fiber, converts the optical signal into a serial communication waveform, and sends the serial communication waveform to the receiving-end switching device; the receiving-end switching device sends the serial communication waveform to the UART serial port module. It can be understood that for the technical solution shown in this embodiment, due to the characteristics of the optical fiber, the communication distance is increased, the anti-interference ability of the communication line is greatly enhanced, and the physical electrical isolation between two UART serial ports is achieved, increasing the anti-damage ability.
[0021] It should be noted that, referring to Figure 2 , the long-distance UART serial port communication device further includes: A power supply module 106, and the power supply module is respectively connected to the power supply terminals of the UART serial port module 101, the transmitting-end switching device 102, the receiving-end switching device 103, the fiber optic transmitter 104, and the fiber optic receiver 105.
[0022] It should be noted that the input power supply of the transmitting-end switching device 102 matches the operating voltage of the fiber optic transmitter 104; the input power supply of the receiving-end switching device 103 matches the operating voltage of the UART serial port module 101.
[0023] It should be noted that the UART serial port module 101 includes a serial port TX and a serial port RX, and is connected to the control terminal of the transmitting-end switching device 102 through the serial port TX, and is connected to the control terminal of the receiving-end switching device 103 through the serial port RX.
[0024] It should be noted that the transmitting-end switching device 102 is a triode or a MOS transistor; the receiving-end switching device 103 is a triode or a MOS transistor. In specific practice, other switching devices can be set according to specific situations.
[0025] It should be noted that the operating frequencies of the transmitting-end switching device 102 and the receiving-end switching device 103 match the serial communication rate.
[0026] In specific practice, the operating frequency of the switching device should meet the serial communication rate to prevent abnormal output waveforms of the switching device caused by rate mismatch. If so, normal communication cannot be achieved.
[0027] In addition, the fiber optic device can be replaced with other high anti-interference media with live isolation properties. If so, the fiber optic transmitter and the fiber optic receiver should be replaced with corresponding devices that can achieve the transmitting and receiving functions.
[0028] It can be understood that in the technical solution of the present invention, optical fibers are used for interconnection between boards. Using optical fibers can greatly increase the communication distance between devices and greatly enhance the anti-interference ability of communication lines. As long as the on-board link can meet high-speed serial communication, optical fiber transmission can work at this rate without worrying about the problem of communication rate decline due to the increase in transmission distance. Since optical fibers are used, physical electrical isolation is achieved between the two devices, increasing the anti-damage ability of the system. Damage to one end of the serial port will not affect the other end. Replacing the damaged device at one end can also increase the repairability and improve the overall reliability of the system. Serial port devices with different working voltages can also be interconnected and used through this method, increasing the adaptability of the devices.
[0029] According to the second aspect of the embodiments of the present invention, refer to Figure 3 , a long-distance UART serial communication system is provided, which is characterized in that it includes: Two long-distance UART serial communication devices, which are connected by optical fibers.
[0030] In Figure 3 , the long-distance UART serial communication device 1 and the long-distance UART serial communication device 2 are shown. The long-distance UART serial communication device 2 includes a UART serial port module 201, a transmitting-end switching device 202, a receiving-end switching device 203, an optical fiber transmitter 204, and an optical fiber receiver 205. The optical fiber transmitter 204 sends an optical signal to the optical fiber receiver 105 through the optical fiber, and the optical fiber receiver 205 receives the optical signal from the optical fiber transmitter 104. In Figure 3 , the circuit structures of device 1 and device 2 are the same, and the working voltages of their serial ports can be the same or different. Serial port devices with different working voltages can be interconnected and used.
[0031] It can be understood that the same or similar parts in the above embodiments can be referred to each other, and the content not detailed in some embodiments can be referred to the same or similar content in other embodiments.
[0032] It should be noted that in the description of the present invention, the terms "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. In addition, in the description of the present invention, unless otherwise specified, the meaning of "a plurality" refers to at least two.
[0033] Any process or method description depicted in the flowchart or described otherwise herein can be understood to represent a module, segment, or portion of code including one or more executable instructions for implementing a specific logical function or process. The scope of the preferred embodiments of the present invention includes additional implementations where functions may be executed not in the order shown or discussed, including in a substantially simultaneous manner according to the involved functions or in a reverse order, which should be understood by those skilled in the art to which the embodiments of the present invention pertain.
[0034] It should be understood that various parts of the present invention can be implemented by hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, any one or a combination of the following techniques well known in the art can be used: discrete logic circuits having logic gate circuits for implementing logical functions on data signals, application specific integrated circuits having appropriate combinational logic gate circuits, programmable gate arrays (PGAs), field programmable gate arrays (FPGAs), etc.
[0035] Those of ordinary skill in the art of the present technology can understand that all or part of the steps carried by the methods of the above embodiments can be completed by instructing relevant hardware through a program. The said program can be stored in a computer-readable storage medium. When the program is executed, it includes one or a combination of the steps of the method embodiments.
[0036] In addition, in each embodiment of the present invention, the functional units can be integrated into one processing module, or each unit can exist physically alone, or two or more units can be integrated into one module. The above integrated module can be implemented in the form of hardware or in the form of a software functional module. When the above integrated module is implemented in the form of a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.
[0037] The above-mentioned storage medium can be a read-only memory, a magnetic disk, an optical disk, etc.
[0038] In the description of this specification, the descriptions referring to terms such as "one embodiment", "some embodiments", "example", "specific example", or "some examples", etc. mean that the specific features, structures, materials, or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described can be combined in a suitable manner in any one or more embodiments or examples.
[0039] Although the embodiments of the present invention have been shown and described above, it can be understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those of ordinary skill in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of the present invention.
Claims
1. A long-distance UART serial communication device, characterized in that: include: UART serial port module, transmitter switch device, receiver switch device, fiber optic transmitter and fiber optic receiver; The UART serial port module sends a serial port communication waveform to a switch pin of the transmitter switch device; the transmitter switch device is connected to the optical fiber transmitter, and the optical fiber transmitter sends an optical signal to other devices through an optical fiber; The optical fiber receiver receives an optical signal through an optical fiber, the optical fiber receiver is connected to a receiving end switch device, and the receiving end switch device is connected to the UART serial port module.
2. The long-distance UART serial communication device according to claim 1, characterized in that: Also includes: A power supply module is respectively connected to the power supply ends of the UART serial port module, the transmitting end switch device, the receiving end switch device, the optical fiber transmitter and the optical fiber receiver.
3. The long-distance UART serial communication device according to claim 1, characterized in that: The UART serial port module includes a serial port TX and a serial port RX, and is connected to the control end of the transmitting end switch device through the serial port TX, and is connected to the control end of the receiving end switch device through the serial port RX.
4. The long-distance UART serial communication device according to any one of claims 1 to 3, characterized in that: The transmitting end switch device is a triode or a MOS tube; The receiving end switch device is a triode or a MOS tube.
5. The long-distance UART serial communication device according to claim 4, characterized in that: The operating frequencies of the transmitting end switch device and the receiving end switch device match the serial port communication rate.
6. The long-distance UART serial communication device according to claim 2, characterized in that: The input power supply of the transmitting end switch device matches the operating voltage of the optical fiber transmitter; The input power supply of the receiving end switch device matches the operating voltage of the UART serial port module.
7. A long-distance UART serial communication system, characterized in that: include: Two long-distance UART serial communication devices according to any one of claims 1 to 6, the two devices are connected via optical fiber.
Citation Information
Patent Citations
Photoelectric converter having plastic optical fiber port and RS 232 communication port
CN202565275U
Intelligence concentrator with fiber communication function
CN205039823U
RS -232 interface circuit with optical fiber transmission
CN207638663U
Half-duplex optical communication module and multi-device communication system thereof
CN219322401U