Method for monitoring, reading and recording serial communication line data by using upper computer

Through the upper computer monitoring data reading circuit and the isolated power supply circuit, the problem of multiple and complex serial communication equipment in the existing technology is solved, and low-cost, safe and practical serial communication data monitoring and recording are achieved.

CN119201600APending Publication Date: 2024-12-27ZHEJIANG ZHONGHAO ELECTRONIC TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411209026.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-30
Publication Date
2024-12-27

AI Technical Summary

Technical Problem

In the prior art, serial communication requires more equipment and more complex circuits, resulting in huge and high cost of communication networks.

Method used

Adopt the upper computer monitoring data reading circuit, and connects to the serial communication lines TX and RX through the parallel monitoring data reading circuit, and uses the optocoupler to read the level signal, and converts it into the 485 communication signal through the 485 chip, and isolates the power supply circuit. Power supply to realize data reading and recording.

Benefits of technology

The monitoring and recording of serial communication line data is realized, the circuit cost is reduced, the safety and practicality are improved, and the problem of excessive equipment and complex circuits is avoided.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119201600A_ABST
    Figure CN119201600A_ABST
Patent Text Reader

Abstract

The invention discloses a method for monitoring, reading and recording serial port communication line data by using an upper computer, which is characterized in that two monitoring data reading circuits which are connected in parallel are respectively connected with a communication line TX and a communication line RX which are used for communicating and mutually transmitting data; optocouplers on the two monitoring data reading circuits respectively read high and low levels of a level signal from a communication line TX and a level signal from a communication line RX, the read high and low levels are converted into 485 communication signals through a 485 chip, and the monitoring data reading circuits are connected with a 485 communication interface of an upper computer through lines. The upper computer reads and records a 485 communication signal from the monitoring data reading circuit, and further reads, records and stores the content, information and data of mutual communication on the monitored serial port communication line; therefore, data reading, monitoring and recording can be carried out on a serial port circuit in communication, and the circuit has the characteristics of low circuit cost, high practicability, difficulty in damage and the like.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the field of serial port communication, and in particular to a method for monitoring, reading and recording serial port communication line data by using a host computer. Background Art

[0002] In current technology, many single-chip microcomputers use serial port communication for communication with each other. For example, the prior art with announcement number CN201114143Y discloses a converter from a universal serial port to a CAN bus interface, including an interface circuit of a universal serial port connected to a physical bus, an interface circuit of a CAN bus interface, and a CPU main control module with a built-in CAN controller. The CAN bus interface is connected to the CPU main control module via a CAN photoelectric isolator, and the interface circuit of the universal serial port is connected to the CPU main control module via a serial port photoelectric isolator; a DC / DC module is connected to the interface circuits of the CAN bus interface and the universal serial port; and an external data register and a reset circuit are connected to the CPU main control module.

[0003] In the prior art, in order to achieve communication, more equipment, more complex circuits, and a larger communication network are required. Summary of the invention

[0004] In order to solve the problems in the prior art, the purpose of the present invention is to provide a method for monitoring, reading and recording serial communication line data using a host computer, which method has simpler implementation operations, fewer equipment requirements and lower costs.

[0005] In order to achieve the above-mentioned purpose, the present invention adopts the following technical scheme: a method for monitoring, reading and recording serial communication line data using a host computer, wherein two parallel monitoring data reading circuits are respectively connected to the communication line TX and the communication line RX for communicating and sending data, and the optical couplers on the two monitoring data reading circuits respectively read the level signal from the communication line TX and the level signal from the communication line RX for high and low levels, and the read high and low levels are converted into 485 communication signals through a 485 chip, and the monitoring data reading circuit is connected to the 485 communication interface of the host computer through a line, and the host computer reads and records the 485 communication signal from the monitoring data reading circuit, and then reads, records and saves the content, information and data of the mutual communication on the monitored serial communication line; wherein the monitoring data reading circuit controls the acceptance of the data enable of the 485 chip through a transistor, and supplies power to the two monitoring data reading circuits through an isolation power supply circuit.

[0006] Preferably, the two monitoring data reading circuits have the same structure.

[0007] Preferably, the monitoring data reading circuit includes an optocoupler, the communication line is connected to pin 2 of the optocoupler, the power isolation circuit is connected to pin 1 of the optocoupler, and the power isolation circuit is connected to the communication line; pin 4 of the optocoupler is connected to the DI end of the 485 chip, and pin 4 of the optocoupler is connected to the DE end of the 485 chip and the RE end of the 485 chip through a transistor; pin 3 of the optocoupler is connected to the cold ground end GND of the circuit.

[0008] Preferably, pin 4 of the optocoupler is connected to the base of the transistor through a resistor, the transmitting electrode of the transistor is connected to the cold ground GND of the circuit, the collector of the transistor is respectively connected to the RE and DE ends of the 485 chip, and the +VIN end of the chip U3 of the isolation power supply circuit is connected to the collector of the transistor through a resistor.

[0009] Preferably, the A end of the 485 chip is connected to the pin 1 of the green terminal through the bus A equipped with a resettable fuse, and the B end of the 485 chip is connected to the pin 2 of the green terminal through the bus B equipped with a resettable fuse.

[0010] Preferably, bus A is connected to the cold end GND of the circuit through a transient voltage suppression diode, and bus B is connected to the cold ground end GND of the circuit through a transient voltage suppression diode.

[0011] Preferably, the isolated power supply circuit includes a chip U3, and the chip U3 includes a -VIN terminal, a +VOUT terminal, a +VIN terminal and a -VOUT terminal; the -VIN terminal of the chip U3 is connected to the cold ground terminal GND, and the -VIN terminal of the chip U3 is connected to the +VIN terminal of the chip U3 through a line equipped with a capacitor C2; the -VOUT terminal of the chip U3 is connected to the hot ground terminal SGND, and the -VOUT terminal of the chip U3 and the +VOUT terminal of the chip U3 are connected through a line equipped with a capacitor.

[0012] Preferably, the +VOUT terminal of the chip U3 is connected to the pin 1 of the optocoupler and the communication line.

[0013] Preferably, the +VIN terminal of the chip U3 is connected to the 485 chip and the transistor.

[0014] The technical solution of the present invention has the beneficial effects of being able to read, monitor and record data from a serial port circuit that is communicating, and has the characteristics of low circuit cost, safe isolation, high practicality and not prone to damage. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] Figure 1 It is a schematic diagram of the structure of two monitoring data reading circuits; Figure 2 It is a structural schematic diagram of an isolated power supply circuit; Figure 3 This is a schematic diagram of the structure of the wiring terminal. DETAILED DESCRIPTION

[0016] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present invention, and should not be construed as limiting the present invention.

[0017] In the description of the present invention, it should be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "clockwise", "counterclockwise" and the like indicate orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the referred device or element must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as limiting the present invention.

[0018] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of the present invention, unless otherwise specified, "plurality" means two or more, unless otherwise clearly specified.

[0019] In the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", "connected", "fixed" and the like should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be an indirect connection through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0020] In the present invention, unless otherwise clearly specified and limited, a first feature being "above" or "below" a second feature may include that the first and second features are in direct contact, or may include that the first and second features are not in direct contact but are in contact through another feature between them. Moreover, a first feature being "above", "above" and "above" a second feature includes that the first feature is directly above and obliquely above the second feature, or simply indicates that the first feature is higher in level than the second feature. A first feature being "below", "below" and "below" a second feature includes that the first feature is directly below and obliquely below the second feature, or simply indicates that the first feature is lower in level than the second feature. Example

[0021] like Figure 1-3 A method for monitoring, reading and recording serial communication line data using a host computer is shown. Two parallel monitoring data reading circuits are respectively connected to the communication line TX and the communication line RX for communicating and sending data. The optocouplers on the two monitoring data reading circuits respectively read the level signal from the communication line TX and the level signal from the communication line RX. The read high and low levels are converted into 485 communication signals through a 485 chip. The monitoring data reading circuit is connected to the 485 communication interface of the host computer through a line. The host computer reads and records the 485 communication signal from the monitoring data reading circuit, and then reads, records and saves the content, information and data of the mutual communication on the monitored serial communication line; wherein the monitoring data reading circuit controls the data enable acceptance of the 485 chip through a transistor, and supplies power to the two monitoring data reading circuits through an isolated power supply circuit.

[0022] With such an arrangement, data reading, monitoring and recording can be performed on the serial port circuit in communication, and the circuit has the characteristics of low circuit cost, isolation safety, high practicality and not easy to damage.

[0023] In this embodiment, Figure 1 As shown, the structures of the two monitoring data reading circuits are the same. Taking the monitoring data reading circuit with the RX communication line as an example, the monitoring data reading circuit with the RX communication line includes an optocoupler U1; the RX communication line is connected to pin 2 of the optocoupler U1, the power isolation circuit is connected to pin 1 of the optocoupler U1D, and the power isolation circuit is connected to the RX communication line; pin 4 of the optocoupler U1 is connected to the DI terminal of the 485 chip IC1, and pin 4 of the optocoupler U1 is connected to the DE terminal and RE terminal of the 485 chip IC1 through the transistor Q1; pin 3 of the optocoupler U1 is connected to the cold ground terminal GND of the circuit.

[0024] Furthermore, the RX communication line is connected to pin 2 of the optocoupler U1 through resistor R1, the power isolation circuit is connected to pin 1 of the optocoupler U1 through resistor R3, and the power isolation circuit is connected to the RX communication line; pin 4 of the optocoupler U1 is connected to the DI terminal of the 485 chip IC1 through resistor R11, pin 4 of the optocoupler U1 is connected to the transistor through resistor R5, and pin 4 of the optocoupler U1 is connected to the DE terminal and RE terminal of the 485 chip IC1 through transistor Q1; pin 3 of the optocoupler U1 is connected to the cold ground terminal GND of the circuit.

[0025] Furthermore, the specification of the transistor is Q-NPN, and the specification of the optocoupler U1 is O-PC817.

[0026] In this embodiment, the B terminal of the 485 chip IC1 is connected to the pin 1 of the green terminal X1 through the bus B, and the A terminal of the 485 chip IC1 is connected to the pin 2 of the green terminal X1 through the bus A; the green terminal X1 is connected to the host computer.

[0027] Furthermore, the A end of the 485 chip IC1 is connected to pin 1 of the green terminal X1 through bus A equipped with a resettable fuse PCT2, and the B end of the 485 chip IC1 is connected to pin 2 of the green terminal X1 through bus B of the resettable fuse PCT1; bus A is connected to the cold end GND of the circuit through a transient voltage suppression diode TVS2, and bus B is connected to the cold ground end GND of the circuit through a transient voltage suppression diode TVS1.

[0028] In this implementation, if Figure 2 As shown, two parallel monitoring data reading circuits are powered by an isolation circuit. Specifically, the isolation power supply circuit includes a chip U3, and the chip U3 includes a -VIN terminal, a +VOUT terminal, a +VIN terminal, and a -VOUT terminal; the -VIN terminal of the chip U3 is connected to the cold ground terminal GND, and the -VIN terminal of the chip U3 is connected to the +VIN terminal of the chip U3 through a line equipped with a capacitor C2; the -VOUT terminal of the chip U3 is connected to the hot ground terminal SGND, and the -VOUT terminal of the chip U3 is connected to the +VOUT terminal of the chip U3 through a line equipped with a capacitor C21.

[0029] Furthermore, the model of chip U3 is B0505S-1WR3.

[0030] Furthermore, the +VOUT terminal of the chip U3 is connected to the pin 1 of the optocoupler U1 through the resistor R3, and the +VOUT terminal of the chip U3 is connected to the pin 2 of the optocoupler U1 through the resistor R1.

[0031] Further, the +VIN terminal of the chip U3 is connected to the line between the pin 4 of the optocoupler U1 and the DI terminal of the 485 chip IC1 through the resistor R6; Pin 4 of the optocoupler U1 is connected to the base of the transistor Q1 through the resistor R7, the transmitter of the transistor Q1 is connected to the cold ground GND of the circuit, the collector of the transistor Q1 is connected to the RE and DE terminals of the 485 chip IC1 respectively, and the +VIN terminal of the chip U3 is connected to the collector of the transistor Q1 through the resistor R9; The +VIN terminal of chip U3 is connected to the cold ground terminal of the circuit through capacitor C1. The line between the +VIN terminal of chip U3 and capacitor C1 is connected to the Vcc terminal of 485 chip IC1 and bus A respectively. Bus B is connected to the cold ground terminal GND of the circuit through resistor R13. The GND terminal of 485 chip IC1 is connected to the cold ground terminal GND of the circuit.

[0032] In this embodiment, a wiring terminal is also included, wherein pin 1 of the wiring terminal is connected to the +VOUT terminal of the isolated power supply circuit, pin 2 of the wiring terminal is connected to the RX communication line and pin 2 of the optocoupler U1, pin 1 of the wiring terminal is connected to the TX communication line and pin 2 of the optocoupler U2, and pin 1 of the wiring terminal is connected to the hot ground terminal SGND.

[0033] In this embodiment, the resistor R1 and the resistor R3 have different specifications; the specification of the resistor R1 is: 0603, 10K, 5%; the specification of the resistor R3 is: 0603, 680R, 5%.

[0034] The specifications of resistors R6, R9, R13 and R15 are: 10K / 5%; the specifications of resistor R5 are: 0603, 10K, 5%; the specifications of resistor R11 are: 1K / 5%; The specifications of capacitor C1, capacitor C2 and capacitor C3 are: C-0603, 10%, X7R, 50V, 104.

[0035] In this embodiment, the hot ground terminal SGND is shared with the ground of the communication line of the serial port being monitored and read.

[0036] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0037] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations on the present invention. A person skilled in the art may change, modify, replace and modify the above embodiments within the scope of the present invention without departing from the principles and intent of the present invention.

Claims

1. A method for monitoring, reading and recording serial communication line data using a host computer, characterized in that: Two parallel monitoring data reading circuits are respectively connected to the communication line TX and the communication line RX for communicating and sending data to each other. The optocouplers on the two monitoring data reading circuits respectively read the level signal from the communication line TX and the level signal from the communication line RX. The read high and low levels are converted into 485 communication signals through the 485 chip. The monitoring data reading circuit is connected to the 485 communication interface of the host computer through the line. The host computer reads and records the 485 communication signal from the monitoring data reading circuit, and then reads, records and saves the content, information and data of the mutual communication on the monitored serial communication line; wherein, the monitoring data reading circuit controls the data enable acceptance of the 485 chip through a transistor, and supplies power to the two monitoring data reading circuits through an isolated power supply circuit.

2. A method for monitoring, reading and recording serial communication line data using a host computer according to claim 1, characterized in that: The structures of the two monitoring data reading circuits are the same.

3. A method for monitoring, reading and recording serial communication line data using a host computer according to claim 2, characterized in that: The monitoring data reading circuit includes an optocoupler, a communication line is connected to pin 2 of the optocoupler, a power isolation circuit is connected to pin 1 of the optocoupler, and the power isolation circuit is connected to the communication line; pin 4 of the optocoupler is connected to the DI end of the 485 chip, and pin 4 of the optocoupler is connected to the DE end of the 485 chip and the RE end of the 485 chip through a transistor; pin 3 of the optocoupler is connected to the cold ground end GND of the circuit.

4. The method of using a host computer to monitor, read and record serial communication line data according to claim 3, characterized in that: Pin 4 of the optocoupler is connected to the base of the transistor through a resistor, the transmitting electrode of the transistor is connected to the cold ground GND of the circuit, the collector of the transistor is connected to the RE and DE ends of the 485 chip respectively, and the +VIN end of the chip of the isolation power supply circuit is connected to the collector of the transistor through a resistor.

5. The method of using a host computer to monitor, read and record serial communication line data according to claim 3, characterized in that: The A end of the 485 chip is connected to pin 1 of the green terminal through bus A equipped with a resettable fuse, and the B end of the 485 chip is connected to pin 2 of the green terminal through bus B equipped with a resettable fuse.

6. A method for monitoring, reading and recording serial communication line data using a host computer according to claim 5, characterized in that: The bus A is connected to the cold end GND of the circuit through a transient voltage suppression diode, and the bus B is connected to the cold ground GND of the circuit through a transient voltage suppression diode.

7. The method of using a host computer to monitor, read and record serial communication line data according to claim 1, characterized in that: The isolated power supply circuit includes a chip U3, and the chip U3 includes a -VIN terminal, a +VOUT terminal, a +VIN terminal and a -VOUT terminal; the -VIN terminal of the chip U3 is connected to the cold ground terminal GND, and the -VIN terminal of the chip U3 is connected to the +VIN terminal of the chip U3 through a line equipped with a capacitor C2; the -VOUT terminal of the chip U3 is connected to the hot ground terminal SGND, and the -VOUT terminal of the chip U3 and the +VOUT terminal of the chip U3 are connected through a line equipped with a capacitor.

8. A method for monitoring, reading and recording serial communication line data using a host computer according to claim 7, characterized in that: The +VOUT terminal of chip U3 is connected to pin 1 of the optocoupler and the communication line.

9. The method of using a host computer to monitor, read and record serial communication line data according to claim 7, characterized in that: The +VIN terminal of chip U3 is connected to the 485 chip and the transistor.