RS232 serial port line sequence passive detection device and detection method

By designing the RS232 serial line sequence passive detection device, using LED indicator lights and dial switches to intuitively identify line sequences, the problem of unintuitive and error-prone line sequence recognition in the existing technology is solved, the recognition efficiency and accuracy are improved, and the risk of equipment damage is reduced.

CN119291573BActive Publication Date: 2025-02-28广东省气象数据中心
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411832627.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-13
Publication Date
2025-02-28
Estimated Expiration
2044-12-13

AI Technical Summary

Technical Problem

The existing RS232 serial port line sequence recognition method is not intuitive enough. Operators need to determine the line sequence through trial and error, which is prone to errors and has the risk of short circuit, which increases equipment maintenance costs and failure rates.

Method used

A RS232 serial line sequence passive detection device is designed, including a three-wire serial port connection interface, a six-digit dial switch and an encoding detection circuit. The line sequence is intuitively identified through the LED indicator light and the brightness difference, and the dial switch is used to quickly try all possible line sequence combinations.

Benefits of technology

It greatly improves the efficiency and accuracy of line sequence recognition, reduces the risk of equipment damage caused by line sequence errors, simplifies the operation process, and is suitable for all devices with RS232 serial ports, without external power supply.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 00000000_0000_ABST
    Figure 00000000_0000_ABST
Patent Text Reader

Abstract

The invention discloses a passive detection device and method for RS232 serial port line sequence. The device comprises a three-wire serial port connection interface, a six-bit dial switch and a coding detection circuit; the six-bit dial switch comprises a first switch, a second switch and a third switch, the first switch, the second switch and the third switch are all provided with a sliding electrode and six fixed electrodes, the fixed electrodes are arranged and connected in sequence, the sliding electrode is slidably arranged on a sliding track formed by the arrangement of the fixed electrodes and contacts the fixed electrodes, and the sliding electrode is electrically connected to the fixed electrodes at the same position when the sliding electrode is stationary; the coding detection circuit is electrically connected to the six-bit dial switch, and a first LED indicator light, a second LED indicator light, a first resistor and a second resistor are arranged on the coding detection circuit; the above device can improve the efficiency and accuracy of line sequence recognition in actual use, reduce the risk of equipment damage caused by line sequence errors, and ensure equipment operation and data transmission.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of electronic communications, and in particular to a RS232 serial port line sequence passive detection device and detection method. Background Art

[0002] The existing RS232 serial port line sequence identification method is often not intuitive enough. The operator needs to determine the correct line sequence by trial and error, which is not only time-consuming but also prone to errors, affecting the rapid deployment and maintenance of the equipment. When trying to connect the RS232 serial port, due to the lack of effective protection measures, there is a risk of short circuit, which may cause damage to the serial port chip, increase the maintenance cost and failure rate of the equipment. The traditional line sequence identification method requires the operator to have certain professional knowledge, which is a big challenge for non-professional users and limits the popularization and application of the technology. In the traditional line sequence identification process, due to the need for multiple attempts and verifications, the entire identification process is inefficient, which is not conducive to rapid response in emergency situations. Due to the uncertainty of line sequence identification, incorrect connections may be caused, resulting in equipment failures or even safety accidents. Therefore, the existing line sequence identification method may not be suitable for all types of RS232 serial port devices, and different identification strategies need to be adopted for different devices, lacking a universal solution. Summary of the invention

[0003] The embodiment of the present invention provides a RS232 serial port line sequence passive detection device and detection method, aiming to solve the problem of low accuracy of RS232 serial port line sequence passive detection in the prior art method.

[0004] In the first aspect, an embodiment of the present invention discloses a passive detection device for RS232 serial port line sequence, the device comprising a three-wire serial port connection interface, a six-position dial switch, and a coding detection circuit; the three-wire serial port connection interface is provided with three wiring terminals; the six-position dial switch comprises a first switch, a second switch and a third switch, the first switch, the second switch and the third switch are provided with a sliding electrode and six fixed electrodes, the fixed electrodes are arranged and connected in sequence, the sliding electrode is slidably arranged on a sliding track formed by the arrangement of the fixed electrodes and contacts the fixed electrodes, and the sliding electrode is electrically connected to the fixed electrode at the same position as the sliding electrode when the sliding electrode is stationary; the coding detection circuit is connected to the six-position dial switch The coding detection circuit is electrically connected, a first LED indicator light, a second LED indicator light, a first resistor and a second resistor are arranged on the coding detection circuit, the first LED indicator light and the first resistor are connected in series to form a first detection circuit, and the second LED indicator light and the second resistor are connected in series to form a second detection circuit; the coding detection circuit also includes an arbitrator, an output end of the arbitrator is connected to a first collection end arranged in a six-position dial switch, a second collection end arranged in the six-position dial switch is connected to one end of the first resistor, a third collection end arranged in the six-position dial switch is connected to one end of the second resistor, and two input ends of the arbitrator are respectively connected to the first LED indicator light and the second LED indicator light.

[0005] Furthermore, the first hub end integrates the first switch, the second switch and the transmitting data line set in the third switch, the second hub end integrates the first switch, the second switch and the ground line set in the third switch, and the third hub end integrates the first switch, the second switch and the receiving data line set in the third switch.

[0006] Furthermore, two transmission data lines, two ground lines and two reception data lines are respectively arranged in the first switch, the second switch and the third switch, and each of the transmission data line, the ground line and the reception data line is respectively connected to a corresponding fixed electrode.

[0007] Furthermore, the three-wire serial port connection interface includes a first interface, a second interface and a third interface, the first interface is electrically connected to the sliding electrode set in the first switch, the second interface is electrically connected to the sliding electrode set in the second switch, and the third interface is electrically connected to the sliding electrode set in the third switch.

[0008] Furthermore, the first hub terminal is set as a common low-level terminal, and the second hub terminal and the third hub terminal are set as high-level terminals.

[0009] Furthermore, the sliding electrodes arranged in the first switch, the second switch and the third switch are connected via a connecting rod.

[0010] In the second aspect, an embodiment of the present invention discloses a RS232 serial port line sequence passive detection method, which is applied to the above-mentioned RS232 serial port line sequence passive detection device, and the method includes controlling the RS232 serial port of the device to be detected to standby according to the RS232 serial port information of the device to be detected obtained; judging whether the RS232 serial port of the device to be detected is connected to the three-wire serial port connection interface; if the RS232 serial port of the device to be detected is connected to the three-wire serial port connection interface, controlling the sliding electrodes set on the first switch, the second switch and the third switch to be turned on; judging whether the first LED indicator and the second LED indicator are both on and the brightness of the first LED indicator is greater than that of the second LED indicator, and obtaining a first judgment result; if the first judgment result is yes, obtaining the identification information of the fixed electrode corresponding to each sliding electrode; defining the identification information as the line sequence identification of the RS232 serial port and generating identification information; and obtaining the corresponding detection result according to the identification information.

[0011] The RS232 serial port line sequence passive detection device and detection method solve the technical problem that connection errors often occur during the use of traditional RS232 serial port equipment due to inconsistent line sequences, resulting in the equipment being unable to communicate normally. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying any creative work.

[0013] Figure 1 The overall structure diagram of the RS232 serial port line sequence passive detection device provided by the embodiment of the present invention;

[0014] Figure 2 The present invention provides a flowchart of a method for detecting passive RS232 serial port line sequence.

[0015] Figure Number:

[0016] 1. Three-wire serial port connection interface; 2. Six-digit dip switch; 3. Encoding detection circuit; 21. First switch; 22. Second switch; 23. Third switch; 200. Sliding electrode; 300. Fixed electrode; 5. First LED indicator; 6. Second LED indicator; 7. First resistor; 8. Second resistor; 9. Arbitrator; 10. First hub terminal; 11. Second hub terminal; 12. Third hub terminal; 13. First interface; 14. Second interface; 15. Third interface. DETAILED DESCRIPTION

[0017] 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 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.

[0018] It should be understood that when used in this specification and the appended claims, the terms "include" and "comprises" indicate the presence of described features, integers, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.

[0019] It should also be understood that the terms used in the present specification are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the present specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.

[0020] It should be further understood that the term "and / or" used in the present description and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.

[0021] like Figure 1As shown, in the first aspect, an embodiment of the present invention discloses a passive detection device for RS232 serial port line sequence, the device comprising: a three-wire serial port connection interface 1, a six-digit dial switch 2, and a coding detection circuit 3; the three-wire serial port connection interface 1 is provided with three wiring terminals; the six-digit dial switch 2 comprises a first switch 21, a second switch 22 and a third switch 23, the first switch 21, the second switch 22 and the third switch 23 are each provided with a sliding electrode 200 and six fixed electrodes 300, the fixed electrodes 300 are arranged and connected in sequence, the sliding electrode 200 is slidably arranged on a sliding track formed by the arrangement of the fixed electrodes 300 and contacts with the fixed electrode 300, the sliding electrode 200 is electrically connected to the only fixed electrode 300 at the same position as it is when it is stationary; the coding The detection circuit 3 is electrically connected to the six-bit dial switch 2. A first LED indicator light 5, a second LED indicator light 6, a first resistor 7 and a second resistor 8 are arranged on the coding detection circuit 3. The first LED indicator light 5 and the first resistor 7 are connected in series to form a first detection circuit, and the second LED indicator light 6 and the second resistor 8 are connected in series to form a second detection circuit; the coding detection circuit 3 includes an arbitrator 9, an output end of the arbitrator 9 is connected to a first collection end 10 arranged on the six-bit dial switch 2, a second collection end 11 arranged in the six-bit dial switch 2 is connected to one end of the first resistor 7, a third collection end 12 arranged in the six-bit dial switch 2 is connected to one end of the second resistor 8, and two input ends of the arbitrator 9 are respectively connected to the first LED indicator light 5 and the second LED indicator light 6.

[0022] In the actual usage scenario, first, the RX, TX and GND lines of the RS232 serial port device to be detected are respectively connected to the three wiring terminals of the three-wire serial port connection interface 1 of the detection device. Since the line sequence of the RS232 serial port may be inconsistent, it is necessary to determine the specific line sequence through the detection device. Make sure that the six-position dial switch 2 is in the initial position, at which time the sliding electrode 200 and the corresponding fixed electrode 300 do not establish a specific electrical connection. The operator starts to control the sliding electrode 200 of the six-position dial switch 2 to connect the first collection terminal 10, the second collection terminal 11 and the third collection terminal 12 in different combinations. The sliding electrode 200 of each switch can slide between the six fixed electrodes 300 to try all possible line sequence combinations. While dialing, observe the status of the first LED indicator 5 and the second LED indicator 6 on the coding detection circuit 3. According to the design, when the correct line sequence is dialed, the two LED indicators will light up, and the brightness of the first LED indicator 5 will be greater than that of the second LED indicator 6. When the brightness and state of the two LED indicators meet expectations, the position of the fixed electrode 300 corresponding to the sliding electrode 200 is recorded. These position information are the line sequence identification of the RS232 serial port. In order to ensure the accuracy of the test results, the dialing operation can be repeated to verify whether the state of the LED indicator is consistent. If the results of multiple operations are the same, it can be confirmed that the line sequence identification is correct. According to the identified line sequence, the RS232 serial port of the device to be detected is correctly connected to the target device or interface to ensure the correct correspondence between the data transmission lines. The device uses the potential difference of the serial port to be detected to drive the LED, without the need for additional power supply, which is convenient for on-site use. The on and off and brightness difference of the LED indicator intuitively display the line sequence information, which is easy for the operator to understand. Through the fast switching of the six-position dial switch 2, all possible line sequence combination tests can be completed in a short time, which improves the detection efficiency. The current limiting resistor protects the serial port and LED, and prevents hardware damage caused by misoperation. It is suitable for all devices with RS232 serial ports, such as industrial control equipment, communication equipment, measuring instruments, etc. Through the above steps, the RS232 serial port line sequence passive detection device of the present invention can greatly improve the efficiency and accuracy of line sequence recognition in actual use, reduce the risk of equipment damage caused by line sequence errors, and ensure the normal operation of the equipment and the reliability of data transmission.

[0023] In summary, this technical solution realizes RS232 serial port line sequence detection without external power supply, and drives the LED indicator light by utilizing the potential difference of the serial port to be tested, thereby reducing the complexity and cost of the detection equipment. By observing the on and off state and brightness difference of the LED indicator light, the operator can intuitively identify the definition of the three lines of RX, TX, and GND, avoiding the trial and error process in the traditional method, and improving the accuracy and efficiency of identification. By using the six-position dial switch 2, the operator can quickly try different line sequence combinations, and the line sequence can be identified by dialing the code up to 6 times, which simplifies the operation process and shortens the detection time. By connecting a current-limiting resistor in series in the LED indicator light circuit, the serial port and LED are protected from damage by excessive current, thereby improving the safety of the detection process. The RS232 serial port of many devices is not a standard DB9 structure, and the line sequence is not standardized. The RS232 serial port line sequence of different devices is often different. This technical solution provides a simple and intuitive method to accurately identify the line sequence, solving the problem of communication failure caused by line sequence errors. Traditional line sequence detection methods may require additional power supplies and RS232 serial communication equipment. This technical solution uses a passive design and does not require an external power supply, which reduces the dependence on detection equipment and makes on-site detection more convenient. Traditional line sequence detection methods may require professional knowledge and complex operating steps. This technical solution uses the design of dip switches and LED indicator lights to allow non-professional operators to easily complete line sequence detection, reducing the difficulty of operation. This technical solution uses low-cost passive components, simplifies the structure of the detection device, and reduces manufacturing costs, making the detection device more economically feasible and easy to promote and apply.

[0024] Furthermore, the first hub terminal 10 integrates the transmitting data line set in the first switch 21, the second switch 22 and the third switch 23, the second hub terminal 11 integrates the ground line set in the first switch 21, the second switch 22 and the third switch 23, and the third hub terminal 12 integrates the receiving data line set in the first switch 21, the second switch 22 and the third switch 23.

[0025] Furthermore, two transmission data lines, two ground lines and two reception data lines are respectively disposed in the first switch 21 , the second switch 22 and the third switch 23 , and each transmission data line, ground line and reception data line is respectively connected to a corresponding fixed electrode 300 .

[0026] Furthermore, the three-wire serial port connection interface 1 includes a first interface 13, a second interface 14 and a third interface 15. The first interface 13 is electrically connected to the sliding electrode 200 set in the first switch 21, the second interface 14 is electrically connected to the sliding electrode 200 set in the second switch 22, and the third interface 15 is electrically connected to the sliding electrode 200 set in the third switch 23.

[0027] Specifically, the first hub terminal 10 integrates the transmission data line (TX line) set in the first switch 21, the second switch 22 and the third switch 23. This means that all connections related to the transmission data line are uniformly managed through the first hub terminal 10, which simplifies the circuit design, improves the reliability of the connection and facilitates maintenance. The second hub terminal 11 integrates the ground line (GND) set in the first switch 21, the second switch 22 and the third switch 23. Similarly, this integrated design makes the connection of the ground line more centralized, which helps to reduce line confusion and improve the neatness of the detection device. The third hub terminal 12 integrates the reception data line (RX line) set in the first switch 21, the second switch 22 and the third switch 23. This design is also conducive to the unified management and connection of the reception data line. Two transmission data lines, two ground lines and two reception data lines are respectively set in each switch, and each line is connected to a fixed electrode 300. Such a design allows all possible line sequence combinations to be tried through different positions of the dip switch, ensuring the comprehensiveness and accuracy of the detection. The three-wire serial port connection interface 1 includes a first interface 13, a second interface 14 and a third interface 15, which are electrically connected to the sliding electrodes 200 provided in the first switch 21, the second switch 22 and the third switch 23, respectively. This design ensures that the RS232 serial port line to be detected can be correctly connected to the detection circuit through different combinations of the dial switch, thereby realizing the detection of the line sequence. Through the integrated design of the line collection end and the line in the switch, the connection points are reduced and the reliability of the circuit is improved. The dual-line design in each switch ensures that all possible line sequence combinations can be detected, thereby improving the comprehensiveness of the detection. By electrically connecting the serial port connection interface to the sliding electrode 200 of the dial switch, the operator can easily test different line sequences through the dial switch without complicated circuit adjustment. The design of the line collection end and the switch makes the detection device have good modular characteristics and is easy to produce and maintain. In summary, these technical details further enhance the innovation and practicality of the present invention in the RS232 serial port line sequence passive detection device.

[0028] Furthermore, the first hub terminal 10 is set as a common low-level terminal, and the second hub terminal 11 and the third hub terminal 12 are set as high-level terminals.

[0029] Furthermore, the sliding electrodes 200 provided in the first switch 21 , the second switch 22 and the third switch 23 are connected via a sliding connecting rod.

[0030] The arrangement sequence of the transmission data line, the ground line and the reception data line is set to be constrained, and the constraint condition is: when the sliding electrode 200 is electrically connected to the fixed electrode 300 by sliding, the fixed electrode 300 connected to the sliding electrode 200 should be electrically connected to the first collection terminal 10, the second collection terminal 11, and the third collection terminal 12 in any order, and there should not be more than one sliding electrode 200 connected to the same collection terminal. For example, after arranging the 6 fixed electrodes 21 in any order, if the first bit is TX, the first bit of 22 can only be RX or GND, and if the first bit of 22 is GND, the first bit of 23 can only be RX.

[0031] like Figure 2 As shown, in the second aspect, an embodiment of the present invention discloses a RS232 serial port line sequence passive detection method, which is applied to the above-mentioned RS232 serial port line sequence passive detection device, and the method includes: S110, controlling the RS232 serial port standby of the device to be detected according to the RS232 serial port information of the device to be detected obtained; S120, judging whether the RS232 serial port of the device to be detected is connected to the three-wire serial port connection interface; S130, if the RS232 serial port of the device to be detected is connected to the three-wire serial port connection interface, controlling the sliding electrodes set on the first switch, the second switch and the third switch to be turned on; S140, judging whether the first LED indicator light and the second LED indicator light are both on and the brightness of the first LED indicator light is greater than that of the second LED indicator light, and obtaining a first judgment result; S150, if the first judgment result is yes, obtaining the identification information of the fixed electrodes corresponding to each sliding electrode; S160, defining the identification information as the line sequence identification of the RS232 serial port and generating the identification information; S170, obtaining the corresponding detection result according to the identification information.

[0032] Specifically, the device is composed of two LEDs, two current-limiting resistors, a three-wire serial port connection interface 1 , a triple six-position dial switch 2 and a coding detection circuit 3 .

[0033] The two LEDs, namely the first LED indicator light 5 (L1) and the second LED indicator light 6 (L2), are the same product with the same parameters.

[0034] The two current limiting resistors, namely the first resistor 7 (R1) and the second resistor 8 (R2), are the same product with the same parameters. The calculation method of the current limiting resistor is: R=((V RX -V TX )-V LED ) / I LED , where (V RX -V TX ) is the potential difference between RX and TX, which is 5V~15V. The potential difference between GND and TX is also in this range. V LED is the LED clamping voltage, ILED This is the working current for the normal lighting of the LED. To ensure that the LED and serial port chip are not burned out, the calculation parameters are selected so that the resistance of the current limiting resistor tends to be slightly larger.

[0035] The three-wire serial port connection interface 1 (P1) has three wiring terminals, namely, PX, PY, and PZ, which are respectively connected to the three sliding electrodes 200, namely, SX, SY, and SZ, of the triple six-position dial switch 2 (S1) through circuits.

[0036] The triple six-position dial switch 2 S1 is composed of three groups of six-position dial switches (21, 22, 23) 2, each group of six-position dial switches 2 has one sliding electrode 200 and six fixed electrodes 300, and each sliding electrode 200 is simultaneously connected with only one of the fixed electrodes 300 by sliding left and right. The three sliding electrodes 200 (SX, SY, SZ) have the same initial position relative to their respective fixed electrodes 300, and are bound together to achieve synchronous linkage left and right sliding, so that the three sliding electrodes 200 are synchronously connected with their respective fixed electrodes 300 of the same code position.

[0037] The coding detection circuit 3 is used to connect the LED, the current limiting resistor and the fixed electrode 300 - L1 and R1 are connected in series, L2 and R2 are connected in series, and the low-level ends of the two series circuits are connected to a common low-level end - the first collector terminal 10 T, and connected to SX-1, SX-2, SY-3, SY-4, SZ-5, and SZ-6 of the fixed electrode 300. The high-level end of the series circuit of L1 and R1 - the second collector terminal 11G is connected to SX-4, SX-5, SY-1, SY-6, SZ-2, and SZ-3 of the fixed electrode 300. The high-level end of the series circuit of L2 and R2 - the third collector terminal 12 R is connected to SX-3, SX-6, SY-2, SY-5, SZ-1, and SZ-4 of the fixed electrode 300. The SX-1, SX-2, SX-3, SX-4, SX-5, and SX-6 of the fixed electrode 300 are marked with TX, TX, RX, GND, GND, and RX, respectively; the SY-1, SY-2, SY-3, SY-4, SY-5, and SY-6 of the fixed electrode 300 are marked with GND, RX, TX, TX, RX, and GND, respectively; the SZ-1, SZ-2, SZ-3, SZ-4, SZ-5, and SZ-6 of the fixed electrode 300 are marked with RX, GND, GND, RX, TX, and TX, respectively.

[0038] The connection method of the LED, current limiting resistor and fixed electrode 300 of the coding detection circuit 3 is not unique, and the identification of the fixed electrode 300 also changes accordingly, all following specific rules. The three groups of six-position dial switches 2 of S1 each have six fixed electrodes 300, and each group has two fixed electrodes 300 connected to the first collection terminal 10 T, two fixed electrodes 300 connected to the second collection terminal 11 G, and two fixed electrodes 300 connected to the third collection terminal 12 R. The SX, SY, and SZ of the sliding electrode 200 slide in linkage, and can be connected to SX-i, SY-i, and SZ-i of the fixed electrode 300 in a total of 6 combinations, where i∈{1,2,3,4,5,6}, and the three fixed electrodes 300 of each combination are connected to the three collection terminals T, G, and R respectively. All the fixed electrodes 300 connected to the first hub terminal 10T are marked as TX, the fixed electrodes 300 connected to the second hub terminal 11G are marked as GND, and the fixed electrodes 300 connected to the third hub terminal 12R are marked as RX.

[0039] It is understandable that the connection method and identification of the fixed electrode 300 are only an example, and are only for the convenience of clearly describing the principles and methods. All the above combinations can achieve the same purpose and function. The RS232 serial port device to be tested is turned on, and the RS232 serial port to be tested is in standby working state. The RX, TX, and GND lines of the RS232 serial port to be tested are connected to the PX, PY, and PZ terminals of the detection device in any order. Control the linkage sliding electrodes 200 SX, SY, and SZ of the triple six-position dial switch 2 S1 so that they are successively connected to their corresponding fixed electrodes 300, and find the only fixed electrode 300 SX-i, SY-i, and SZ-i that makes L1 and L2 both bright, and L1 is brighter than L2, where i∈{1,2,3,4,5,6}. The driving current of the LED comes from the potential difference between the GND, RX, and TX of the RS232 serial port to be tested. After the current limiting resistor is used to limit the current, the LED can be safely lit without burning the serial port chip. If both L1 and L2 are bright, the RS232 serial port line to be tested connected by T is at a lower level, i.e., TX, and the RS232 serial port lines to be tested connected by G and R are at a higher level, i.e., GND, RX or RX, GND. The coding detection circuit 3 connects T to 6 fixed electrodes 300 marked as TX, among which there is only one fixed electrode 300 that is conducting with the sliding electrode 200, and the RS232 serial port line to be tested connected to the sliding electrode 200 through the corresponding terminal of P1 is its TX. The characteristics of the RS232 serial port chip determine that the output current of RX is limited and restricted, and its driving ability for LED is weaker than GND. When driving the same LED and current limiting resistor, the current output by RX is less than GND, and the brightness of the driven LED is dimmer. L1 is brighter and L2 is darker, so G is connected to the GND of the RS232 serial port to be tested, and R is connected to the RX of the RS232 serial port to be tested. The coding detection circuit 3 connects G to 6 fixed electrodes 300 marked as GND, among which there is only one fixed electrode 300 that is conducting with the sliding electrode 200, and the RS232 serial port line to be tested connected to the sliding electrode 200 through the corresponding terminal of P1 is its GND. The coding detection circuit 3 connects R to 6 fixed electrodes 300 marked as RX, among which there is only one fixed electrode 300 that is conducting with the sliding electrode 200, and the RS232 serial port line to be tested connected to the sliding electrode 200 through the corresponding terminal of P1 is its RX. The present invention is based on the potential properties of the three core data transmission lines of the RS232 serial port RX, TX, and GND, and the electrical characteristics that the current driving ability of RX is weaker than that of GND. By connecting LEDs and current limiting resistors with the same technical parameters in series between RX and TX, and between GND and TX, the on and off states and brightness differences of the two LEDs are used to intuitively identify the definitions of the three lines RX, TX, and GND.The present invention designs a corresponding detection circuit, proposes a detection method based on the detection circuit, and uses a triple six-position dial switch 2 to quickly and accurately identify the three core data transmission lines RX, TX, and GND by dialing the code six times at most. The detection circuit designed by the present invention is a passive device with a simple structure, low cost, and easy use. It is ahead of traditional detection methods in terms of accuracy, intuitiveness, detection efficiency, and economic cost.

[0040] The present invention discloses a RS232 serial port line sequence passive detection device and detection method, wherein the detection device comprises a three-wire serial port connection interface 1, a six-position dial switch 2, and a coding detection circuit 3; the three-wire serial port connection interface 1 is provided with three wiring terminals; the six-position dial switch 2 comprises a first switch 21, a second switch 22, and a third switch 23, the first switch 21, the second switch 22, and the third switch 23 are each provided with a sliding electrode 200 and six fixed electrodes 300, the fixed electrodes 300 are sequentially arranged and connected, the sliding electrode 200 is slidably arranged on a sliding track formed by the arrangement of the fixed electrodes 300 and contacts with the fixed electrodes 300, and the sliding electrode 200 is in the same position as the fixed electrodes 300 when the sliding electrode 200 is stationary. The coding detection circuit 3 is electrically connected to the six-position dial switch 2, and the coding detection circuit 3 is provided with a first LED indicator 5, a second LED indicator 6, a first resistor 7 and a second resistor 8, the first LED indicator 5 is connected in series with the first resistor 7, and the second LED indicator 6 is connected in series with the second resistor 8; the coding detection circuit 3 includes an arbitrator 9, the arbitrator 9 is connected to a first collection terminal 10 provided in the six-position dial switch 2, a second collection terminal 11 provided in the six-position dial switch 2 is connected to one end of the first resistor 7, and a third collection terminal 12 provided in the six-position dial switch 2 is connected to one end of the second resistor 8, and the arbitrator 9 is connected to the first LED indicator 5 and the second LED indicator 6 respectively. The RS232 serial port line sequence passive detection device and detection method in the embodiment of the present invention solve the technical problem that the connection error often occurs during the use of the traditional RS232 serial port device due to the non-uniform line sequence, resulting in the inability of the device to communicate normally. The existing line sequence recognition method often relies on trial and error, which is inefficient and prone to errors. The existing line sequence detection method may require additional power supply and special detection equipment, which increases the complexity and cost of detection. For non-professional users, the existing line sequence detection method may be too complicated and requires professional knowledge to operate. The use of special detection equipment or tools for line sequence detection is costly and not suitable for large-scale promotion or frequent use. The present invention uses the design of a passive detection circuit and the on and off state and brightness difference of an LED indicator to intuitively display the line sequence of the RS232 serial port without the need for an external power supply, thereby simplifying the detection process. Through the design of a six-position dial switch 2, the user can quickly complete all possible line sequence combination tests within a maximum of six dial operations, greatly improving the detection efficiency and accuracy. The detection device of the present invention is simple to operate and does not require professional knowledge. Non-professional users can also easily perform line sequence detection. The present invention uses low-cost passive components, has a simple structure, low manufacturing cost, is easy to mass produce and promote, and reduces the user's total cost of ownership. Through the integrated design of the line collection end and the line in the switch, the connection points are reduced, the reliability of the circuit is improved, and the risk of equipment damage caused by line sequence errors is reduced.The detection device of the present invention has modular characteristics, is easy to produce and maintain, and improves the maintainability and upgrade flexibility of the product. In summary, the present invention solves the technical problems of RS232 serial port line sequence recognition difficulty, detection equipment dependence, complex operation and high economic cost, and achieves intuitive, fast, accurate, simple and economical technical effects.

[0041] The above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed by the present invention, and these modifications or replacements should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.

Claims

1. A RS232 serial port line sequence passive detection device, characterized in that: include: Three-wire serial port connection interface, six-bit DIP switch, and coding detection circuit; The three-wire serial port connection interface is provided with three wiring terminals; The six-position DIP switch comprises a first switch, a second switch and a third switch, each of the first switch, the second switch and the third switch is provided with a sliding electrode and six fixed electrodes, the fixed electrodes are sequentially arranged and connected, the sliding electrode is slidably arranged on a sliding track formed by the arrangement of the fixed electrodes and contacts the fixed electrodes, and the sliding electrode is electrically connected to the fixed electrodes at the same position when the sliding electrode is stationary; The coding detection circuit is electrically connected to the six-digit dial switch, and a first LED indicator, a second LED indicator, a first resistor and a second resistor are arranged on the coding detection circuit. The first LED indicator and the first resistor are connected in series to form a first detection circuit, and the second LED indicator and the second resistor are connected in series to form a second detection circuit; The coding detection circuit also includes an arbitrator, an output end of the arbitrator is connected to a first collection end arranged in the six-position dip switch, a second collection end arranged in the six-position dip switch is connected to one end of the first resistor, a third collection end arranged in the six-position dip switch is connected to one end of the second resistor, and two input ends of the arbitrator are respectively connected to the first LED indicator light and the second LED indicator light.

2. The RS232 serial port line sequence passive detection device according to claim 1, characterized in that: The first hub end integrates the first switch, the second switch, and the transmitting data line set in the third switch, the second hub end integrates the first switch, the second switch, and the ground line set in the third switch, and the third hub end integrates the first switch, the second switch, and the receiving data line set in the third switch.

3. The RS232 serial port line sequence passive detection device according to claim 2, characterized in that: Two transmission data lines, two ground lines and two reception data lines are respectively arranged in the first switch, the second switch and the third switch, and each of the transmission data line, the ground line and the reception data line is respectively connected to a corresponding fixed electrode.

4. The RS232 serial port line sequence passive detection device according to claim 3, characterized in that: The three-wire serial port connection interface includes a first interface, a second interface and a third interface, the first interface is electrically connected to the sliding electrode set in the first switch, the second interface is electrically connected to the sliding electrode set in the second switch, and the third interface is electrically connected to the sliding electrode set in the third switch.

5. The RS232 serial port line sequence passive detection device according to claim 1, characterized in that: The first hub terminal is set as a common low level terminal, and the second hub terminal and the third hub terminal are set as high level terminals.

6. The RS232 serial port line sequence passive detection device according to claim 1, characterized in that: The sliding electrodes arranged in the first switch, the second switch and the third switch are connected by a connecting rod.

7. A RS232 serial port line sequence passive detection method, characterized in that: The RS232 serial port line sequence passive detection device applied to any one of claims 1 to 6 above, the method comprising: Control the RS232 serial port of the device to be detected to standby according to the acquired RS232 serial port information of the device to be detected; Determine whether the RS232 serial port of the device to be detected is connected to the three-wire serial port connection interface; If the RS232 serial port of the device to be detected is connected to the three-wire serial port connection interface, the sliding electrodes arranged on the first switch, the second switch and the third switch are controlled to be turned on; Determine whether the first LED indicator light and the second LED indicator light are both on and the brightness of the first LED indicator light is greater than that of the second LED indicator light, and obtain a first determination result; If the first judgment result is yes, obtaining identification information of the fixed electrodes corresponding to each of the sliding electrodes; The identification information is defined as the line sequence identification of the RS232 serial port and the identification information is generated; The corresponding detection result is obtained according to the identification information.

Citation Information

Patent Citations

  • Integrated line sequence testing device and method

    CN113075589A

  • Quick switching device with indication function for serial communication test

    CN115858263A