Device for simultaneous communication of serial port and network port
By designing a serial network port simultaneous communication device including RS-232 transceiver circuit, serial Ethernet module, serial transceiver control module and main control module, the problems of poor anti-interference and short communication distance of serial port communication are solved, and the simultaneous communication function of RS-232 serial port and RJ-45 network port are realized, supporting long-distance data interaction and real-time monitoring.
Patent Information
- Application Number
- CN202411659555.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-19
- Publication Date
- 2025-02-25
AI Technical Summary
In the prior art, serial port communication has poor anti-interference and short communication distance, which cannot meet the long-distance data interaction requirements between monitoring equipment and servers, and cannot support RS-232 serial port and RJ-45 network port communication at the same time.
A device for simultaneous communication between serial ports is designed, including RS-232 transceiver circuit, serial port Ethernet module, serial port transceiver control module and main control module. Through the SP3232 transceiver chip, USR-TCP232-ED2 serial port module and STM32F103RCT6 microcontroller, the conversion of TTL and RS-232 interfaces and the direct transparent transmission of TTL-level serial port signals and RJ45 network port signals are realized.
It realizes the function of the microcontroller and the RS-232 serial port and the RJ-45 network port simultaneously. The hardware equipment can interact with the serial port hosting software and network platform software at the same time, which facilitates engineers to monitor or debug and analyze the network platform software data in real time.
Smart Images

Figure CN119520178A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data communication, in particular to a device for simultaneous communication of serial ports and network ports. Background Art
[0002] The monitoring and command system of private network communication cannot adopt the method of building a public network server. It receives data uploaded by remote devices through the ground mobile network, such as the Beidou satellite short message communication command system, Tiantong satellite command and dispatch system, and private network communication system. The system platform requires high-performance hardware monitoring equipment to receive various types of data reported by the terminal, and also sends dispatch or configuration instructions through the monitoring equipment. The system platform software runs on the server, and the server must be connected to the monitoring equipment through the serial port or network port:
[0003] As the function of big data analysis becomes increasingly powerful, remote data will be sent to multiple platform software for data processing and analysis at the same time, such as location monitoring platform, Internet of Things data monitoring platform, command and dispatch platform, etc. The platform analysis software runs on different servers, which requires monitoring equipment to connect to multiple servers. Serial port expanders are usually used to achieve multiple serial port communications. In the Chinese utility model patent specification CN218996026U, a serial port expansion circuit is disclosed. This circuit is composed of a serial port expansion module, an optoelectronic isolation module and a serial port to achieve the serial port expansion function; however, RS-232 serial port communication is not resistant to The interference is poor. When transmitting at a high baud rate, the communication distance is short, which means that the monitoring equipment must be installed near the server. The network port communication adopts Ethernet, which is convenient for wiring and simple to configure. Both the monitoring equipment and the server can be connected to the local area network, and the distance is not limited. Therefore, more and more special monitoring and command equipment supports both RS-232 serial port communication and RJ-45 network port communication, and requires two communication interfaces to work at the same time. The serial port can be directly connected to the computer or industrial computer running the host software, and the network port can be connected to the local area network to achieve data interaction with the platform software through IP address access. Since the serial port and the network port work at the same time, we can use this method to realize that a single hardware device supports multiple host software or platform software, and can also realize real-time monitoring of network platform software data through the serial port host software. In response to the above problems, the inventor proposes a device for simultaneous communication of serial port and network port to solve the above problems. Summary of the invention
[0004] In order to solve the problem of the shortcomings of the communication interface expansion method in the prior art; the purpose of the present invention is to provide a device for simultaneous communication between serial ports and network ports.
[0005] To solve the above technical problems, the present invention adopts the following technical scheme: a device for simultaneous communication of serial ports and network ports, comprising an RS-232 transceiver circuit, a serial Ethernet module, a serial transceiver control module and a main control module. The RS-232 transceiver circuit adopts an SP3232 transceiver chip, and a low-voltage difference transmitter output stage circuit is adopted internally. The Ethernet module adopts a USR-TCP232-ED2 serial port module, and the TTL interface and the RJ45 network port directly transmit data transparently. The serial transceiver control module completes the expansion allocation of the TTL serial port by processing the logic function of the TTL serial port signal. The main control module realizes the transceiver communication of the serial port by a single-chip microcomputer STM32F103RCT6.
[0006] Preferably, the RS-232 transceiver circuit utilizes a dual charge pump structure, and the RS-232 transceiver external circuit can realize the conversion between TTL and RS-232 interface through 4 capacitors.
[0007] Preferably, the module in the Ethernet module integrates a 10 / 100M adaptive Ethernet interface and an integrated TCP / IP protocol stack, and supports MQTT and SSL encryption functions.
[0008] Preferably, the output end of the serial port transceiver control module is connected to the RS-232 transceiver circuit and the serial port Ethernet module respectively, and the input end is connected to the main control module.
[0009] Preferably, the main control module can be connected to the serial port transceiver control module using any serial port of the single-chip microcomputer to achieve simultaneous data interaction with the RS-232 serial port and the network port.
[0010] Compared with the prior art, the present invention has the following beneficial effects:
[0011] The communication interface expansion circuit in the present invention can realize the function of simultaneous communication between the single-chip microcomputer and the RS-232 serial port and the RJ-45 network port. The hardware device can simultaneously exchange data with the serial port host computer software and the network platform software, which is convenient for engineering personnel to perform real-time monitoring or debugging and analysis of the network platform software data through the host computer software. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0013] Figure 1 It is a schematic diagram of the overall block diagram of the present invention.
[0014] Figure 2 The figure is a schematic diagram of the structure of the RS-232 transceiver circuit of the present invention.
[0015] Figure 3 The figure is a schematic diagram of the circuit structure of the serial port Ethernet module of the present invention.
[0016] Figure 4 The figure is a schematic diagram of the circuit structure of the serial port transceiver control module of the present invention.
[0017] Figure 5 This is a schematic diagram of the circuit structure of the single-chip microcomputer of the main control module of the present invention. DETAILED DESCRIPTION
[0018] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0019] Example: Figure 1-5 As shown, the present invention provides a technical solution: a device for simultaneous communication of serial ports and network ports, comprising an RS-232 transceiver circuit, a serial Ethernet module, a serial transceiver control module and a main control module, wherein the RS-232 transceiver circuit adopts an SP3232 transceiver chip, and internally adopts a low voltage difference transmitter output stage circuit, the Ethernet module adopts a USR-TCP232-ED2 serial port module, and the TTL interface and the RJ45 network port directly transmit data transparently, the serial transceiver control module completes the expansion allocation of the TTL serial port by processing the logic function of the TTL serial port signal, and the main control module realizes the transceiver communication of the serial port by a single-chip microcomputer STM32F103RCT6.
[0020] The RS-232 transceiver circuit uses a dual charge pump structure.
[0021] By adopting the above technical solution, the RS-232 transceiver circuit adopts the SP3232 transceiver chip, and the 16th pin of the SP3232 chip is directly connected to the circuit power supply VCC terminal and is also connected to one end of the capacitor C5, and the other end of the capacitor C5 is grounded.
[0022] The external circuit of the RS-232 transceiver can realize the conversion between TTL and RS-232 interface through 4 capacitors.
[0023] By adopting the above technical solution, pins 1 and 3 of the chip are respectively connected to the two ends of capacitor C1, pins 4 and 5 are connected to the two ends of capacitor C2, pin 2 is connected to one end of capacitor C4, the other end of capacitor C4 is connected to the power supply VCC, pin 6 of the chip is connected to one end of capacitor C3, the other end of capacitor C3 is grounded, pin 11 of the chip is connected to one end of resistor R1, pin 12 of the chip is connected to one end of resistor R2, the other end of resistor R1 is connected to the TXD_MCU_TTL signal end, and the other end of resistor R2 is connected to the RXD_RS_TTL signal end. The RS-232 transceiver circuit allows TTL-level serial port signals and RS-232-level serial port signals to send and receive data to each other, thereby realizing serial port level conversion.
[0024] The Ethernet module integrates a 10 / 100M adaptive Ethernet interface and a TCP / IP protocol stack, and supports MQTT and SSL encryption functions.
[0025] By adopting the above technical solution, the Ethernet module adopts the USR-TCP232-ED2 serial port Ethernet module, the module pin 16 is directly connected to the power supply VCC, and is connected to one end of the capacitors C6 and C7, the other ends of the capacitors C6 and C7 are grounded, the module pin 6 is connected to one end of the resistor R5, the 7th pin is connected to one end of the resistor R6, the other end of the resistor R5 is connected to the RXD_RJ_TTL signal end, the other end of the resistor R6 is connected to the TXD_MCU_TTL signal end, the module pins 11 and 12 are grounded, and the other pins are connected to other places as needed. This part of the circuit realizes direct data transparent transmission of TTL level serial port signals and RJ45 network port signals.
[0026] The output end of the serial port transceiver control module is connected to the RS-232 transceiver circuit and the serial port Ethernet module respectively, and the input end is connected to the main control module.
[0027] By adopting the above technical solution, the serial port transceiver control module adopts the SN74AHC1G08 type AND gate chip, performs logic AND operation on the RXD_RS_TTL signal and the RXD_RJ_TTL signal, generates the RXD_MCU_TTL signal, the 1st pin of the chip is directly connected to the RXD_RS_TTL signal end, and is connected to one end of the resistor R3, the 2nd pin of the chip is directly connected to the RXD_RJ_TTL signal end, and is connected to one end of the resistor R4, the resistor R3 is connected to the other end of the resistor R4, and is connected to the power supply VCC, the 5th pin of the chip is connected to the power supply VCC, and the 4th pin of the chip is connected to the RXD_M The CU_TTL signal end is connected, and the chip pin 3 is grounded. When the RXD_RS_TTL signal and the RXD_RJ_TTL signal are both high-level signals, the RXD_MCU_TTL signal outputs a high-level signal; when any one of the RXD_RS_TTL signal and the RXD_RJ_TTL signal is a low-level signal, the RXD_MCU_TTL signal outputs a low-level signal. Since the transmitting signal in the serial communication maintains a high level when there is no data, through the processing of this circuit, the signal sent by the RS-232 interface and the signal sent by the Ethernet module can be sent to the serial port receiving end of the microcontroller.
[0028] The main control module can be connected to the serial port transceiver control module using any serial port of the microcontroller to achieve simultaneous data interaction with the RS-232 serial port and the network port.
[0029] By adopting the above technical solution, the main control module adopts the STM32F103RCT6 chip, the 16th pin of the chip is connected to the TXD_MCU_TTL signal terminal, the 17th pin of the chip is connected to the RXD_MCU_TTL signal terminal, the crystal oscillator U6 and the capacitors C8 and C9 are necessary peripheral circuits for the operation of the single-chip microcomputer. The single-chip microcomputer only needs one serial port to simultaneously receive the signals sent by the RS-232 interface and the signals sent by the Ethernet module, and can simultaneously send signals to the RS-232 interface and the Ethernet module.
[0030] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
Claims
1. A device for simultaneous communication between a serial port and an Ethernet port, comprising an RS-232 transceiver circuit, a serial port Ethernet module, a serial port transceiver control module and a main control module, characterized in that: The RS-232 transceiver circuit uses the SP3232 transceiver chip, which uses a low-voltage difference transmitter output stage circuit internally. The Ethernet module uses the USR-TCP232-ED2 serial port module, and the TTL interface and the RJ45 network port directly transmit data transparently. The serial port transceiver control module completes the expansion allocation of the TTL serial port by processing the logical function of the TTL serial port signal. The main control module uses the single-chip microcomputer STM32F103RCT6 to realize the serial port transceiver communication.
2. A device for simultaneous serial and network port communication as claimed in claim 1, characterized in that: The RS-232 transceiver circuit uses a dual charge pump structure.
3. A device for simultaneous serial and network port communication as claimed in claim 2, characterized in that: The external circuit of the RS-232 transceiver can realize the conversion between TTL and RS-232 interface through 4 capacitors.
4. The device for simultaneous serial and network port communication as claimed in claim 1, characterized in that: The Ethernet module integrates a 10 / 100M adaptive Ethernet interface and a TCP / IP protocol stack, and supports MQTT and SSL encryption functions.
5. The device for simultaneous serial and network port communication as claimed in claim 1, characterized in that: The output end of the serial port transceiver control module is connected to the RS-232 transceiver circuit and the serial port Ethernet module respectively, and the input end is connected to the main control module.
6. The device for simultaneous serial and network port communication as claimed in claim 1, characterized in that: The main control module can be connected to the serial port transceiver control module using any serial port of the microcontroller to achieve simultaneous data interaction with the RS-232 serial port and the network port.
Citation Information
Patent Citations
Serial port expansion circuit
CN218996026U