Method, device and circuit for carrying out open circuit and short circuit detection on wire rod
Through the line detection method of the microcontroller and transistor or relay, using level flip and data comparison, the problems of high hardware cost and poor adaptability in the existing technology are solved, fast and accurate circuit breaking and short-circuit detection are achieved, and visualization and remote monitoring are supported.
Patent Information
- Application Number
- CN202510529481.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-25
- Publication Date
- 2025-07-22
AI Technical Summary
The existing line detection methods have high hardware dependence, high cost and poor adaptability, making it difficult to quickly and effectively distinguish between circuit breakers and short circuits.
A microcontroller is used to combine transistors or relays to collect on-state data in two detection cycles through the level flip of odd pins and even pins, and determine the line state with data comparison. The line connection is switched by relays or electronic switches, and a de-bounce delay is reserved during the detection cycle to eliminate interference.
It realizes the circuit breaker and short circuit detection with simple hardware structure and low cost, which is fast and accurate, and is suitable for batch detection of multiple lines, and can eliminate false conduction interference, and supports visual display and remote monitoring.
Smart Images

Figure CN120352806A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of line detection, and more specifically, to a method, device, and circuit for detecting open circuits and short circuits in wire materials. Background Art
[0002] With the development of the electronics industry, the use of electronic wire materials is essential, and there are relatively strict requirements for the reliability and lifespan of circuits. Due to burns, scratches, foreign objects, and stress, various circuit defects can occur, which can be roughly divided into two phenomena: short circuits and open circuits. It is very difficult for operators to distinguish defective and abnormal circuits with the naked eye. Therefore, quickly and effectively realizing the reliability test of circuits has become an important issue.
[0003] The closest prior art is the authorized publication number: CN106356013B, an array substrate, a detection circuit, and a method for detecting open circuits and short circuits thereof, which discloses that the detection circuit includes a plurality of first switching tubes, a plurality of second switching tubes, a plurality of first devices, a first input terminal to a sixth input terminal, a first output terminal, and a second output terminal. Input a first level signal to the first input terminal, the second input terminal, the fifth input terminal, and the sixth input terminal, and input a second level signal to the third input terminal and the fourth input terminal. By detecting whether the signals output from the first output terminal and the second output terminal are second level signals, it can be determined whether the trace is an open circuit; input a first level signal to the second input terminal, the fourth input terminal, and the fifth input terminal, and input a second level signal to the first input terminal. By detecting whether the signal output from the first output terminal is a second level signal, it can be determined whether the trace is a short circuit.
[0004] The existing detection methods have a high hardware dependence. It is necessary to place first and second switching tubes, namely K1 and K2, and impedance devices T at both ends of each trace, which requires high requirements for substrate wiring and processes, high costs, and relatively single application scenarios, lacking wide adaptability.
[0005] In view of this, the present invention proposes a method, device, and circuit for detecting open circuits and short circuits in wire materials, which have a simple hardware structure and can perform rapid detection. Summary of the Invention
[0006] The object of the present invention is to propose a method, device, and circuit for detecting open circuits and short circuits in wire materials, which have a simple hardware structure and can perform rapid detection.
[0007] A method for detecting open circuits and short circuits in wire materials, characterized by comprising the following steps:
[0008] Step 1: Within a preset first detection period, make the odd pins connected to the single-chip microcomputer output high level, and the even pins output low level. Collect the conduction state data of the lines corresponding to each pin and store it in the single-chip microcomputer register or external memory.
[0009] Step 2: In the second detection period adjacent to the first detection period, make the odd-numbered pins output low level and the even-numbered pins output high level, and collect the conduction state data of the lines corresponding to each pin again and store it in the single-chip microcomputer register or external memory;
[0010] Step 3: Compare the corresponding conduction state data collected in the first detection period and the second detection period. Among them, if the target line only has a conduction signal in its corresponding detection period, it is determined that the line is normal; if the target line still has a conduction signal in the detection period when it should not conduct, it is determined that there is a short circuit or pseudo-conduction fault; if no conduction signal is detected in both detection periods, it is determined that there is an open circuit fault;
[0011] Step 4: Output the detection results including open circuit, short circuit, and normal conduction information.
[0012] In some embodiments, between the first detection period and the second detection period, the connection between the pins and the line under test is switched through a relay or electronic switch, and a debounce delay is reserved before each switch to ensure the stability of the collected data.
[0013] In some embodiments, it further includes a visualization display step, which displays the level states of each collected line in the first detection period and the second detection period through a graphical interface or liquid crystal display screen, and prompts the type of fault.
[0014] In some embodiments, there is also a clearing period between adjacent detection periods, and the same level is output to all the pins to eliminate residual charges or interference signals and make the detection results more accurate.
[0015] A detection device for implementing a method for detecting open circuits and short circuits in wire materials, characterized by comprising:
[0016] A single-chip microcomputer, having multiple GPIO pins that can be configured as output or input, for outputting high level or low level in different detection periods and collecting the line level;
[0017] A driving and switching module, connected to the GPIO pins of the single-chip microcomputer and the external wire under test, for realizing the connection or disconnection of the corresponding line through a relay or triode after receiving the driving signal of the single-chip microcomputer;
[0018] A signal acquisition and logic analysis module, coupled to the internal or external circuit of the single-chip microcomputer, for comparing the line levels in the first detection period and the second detection period to determine whether there is an open circuit or short circuit;
[0019] A display or interface module that receives the determination result and outputs a visualization or data signal to indicate the fault status of each line.
[0020] In some embodiments, the single-chip microcomputer integrates a timer or interrupt module for automatically switching the pin level and reading the line voltage during the detection period to achieve periodic scanning detection.
[0021] In some embodiments, the display or interface unit is one of a touch screen, a serial communication interface, or a network interface for uploading the detection result to a remote end or presenting it on a terminal device.
[0022] Furthermore, it further includes a multi-step detection function module for further precisely locating the cross-short circuit faults of multiple lines through more than two steps of level inversion and data acquisition when complex short-circuit interference occurs.
[0023] A circuit applied to a method for detecting open circuits and short circuits in wire materials, characterized by including:
[0024] A single-chip microcomputer having multiple GPIO pins configurable as outputs or inputs for outputting high or low levels according to the requirements of the method during different detection periods and collecting the levels of external wire materials.
[0025] A driving module connected to the GPIO pins of the single-chip microcomputer, including several triodes and their base resistors. When the single-chip microcomputer outputs a high level, the triodes conduct, thereby driving a relay or an electronic switch.
[0026] A relay unit that receives the on / off signal of the driving module for switching the connection relationship between the wire material and the GPIO pins during the first detection period and the second detection period respectively.
[0027] A signal acquisition and logic analysis module that cooperates with an internal or external processing unit of the single-chip microcomputer for converting the collected level signals into 0 / 1 data and performing comparative analysis to distinguish the normal conduction, open circuit, or short circuit state of the line.
[0028] Among them, the circuit can execute at least two adjacent detection periods and perform open circuit and short circuit detections through the cooperation of level inversion between odd-pin outputs and even-pin outputs.
[0029] In some embodiments, it further includes a debouncing or clearing circuit that uniformly outputs the same level or disconnects all GPIO pins between the first detection period and the second detection period to eliminate possible residual charges or interference signals and improve the accuracy of detecting the conduction state of the wire material.
[0030] In some embodiments, a timer or an interrupt module is integrated in the single-chip microcomputer, which is used to automatically control the switching of the driving module and the relay or electronic switch unit within different detection cycles; when a suspected short circuit is detected, a certain path can be individually output with a high level, and only the input detection is enabled for adjacent lines, so as to determine whether there is a cross short circuit or a false conduction fault.
[0031] Furthermore, the single-chip microcomputer is also connected with a display or interface module, and the display or interface module automatically outputs the results of open circuit, short circuit or normal conduction after the detection is completed, and remote monitoring or fault warning can be carried out through a touch screen, a serial port or a network interface.
[0032] Advantages of the present invention:
[0033] (1) The hardware structure is simple and the cost is low. The detection can be completed by using a single-chip microcomputer in cooperation with conventional components such as triodes or relays, without separately configuring multiple switching tubes or special devices for each line, greatly reducing the wiring and material costs.
[0034] (2) Open circuit, short circuit and false conduction can be quickly detected. By flipping the levels of odd pins and even pins, it only takes two adjacent detection cycles to accurately determine whether each line is normal, open or short circuited; at the same time, combined with multi-step flipping and differential output of adjacent pins, false conduction caused by coupling interference can be excluded.
[0035] (3) Visual display and remote monitoring. The detection results can be intuitively presented on the local display screen or graphical interface, and can also realize remote data upload and fault warning through serial ports, networks, etc., which is convenient for use in automated production lines or remote maintenance scenarios.
[0036] (4) Strong scalability, applicable to multiple parallel lines, supporting the high and low level tests of multiple groups of array signals, and can perform batch detection on large-scale wire harnesses or complex circuits; when there are multi-line cross short circuits or complex couplings, the detection cycle can be increased to further accurately locate the fault point.
[0037] (5) High test reliability and controllable interference. A debounce delay or a clearing period is reserved between adjacent detection cycles, and the pins are uniformly processed in terms of level, effectively eliminating residual charges or noise interference, making the detection data more stable and accurate. Description of the drawings
[0038] Figure 1 It is a flowchart of a method for detecting open circuit and short circuit of wire harnesses in the present application.
[0039] Figure 2 It is a circuit schematic diagram of an application of a method for detecting open circuit and short circuit of wire harnesses in the present application.
[0040] The following specific embodiments will further illustrate the present invention in conjunction with the above-mentioned drawings. Specific Embodiment
[0041] The following embodiments are described to assist in the understanding of the present application, and the embodiments are not and should not be construed in any way as limiting the scope of protection of the present application.
[0042] In the following description, those skilled in the art will recognize that throughout this discussion, components may be described as separate functional units (which may include sub-units), but those skilled in the art will recognize that various components or portions thereof may be divided into separate components or integrated together (including being integrated within a single system or component).
[0043] At the same time, the connections between components or systems are not intended to be limited to direct connections. On the contrary, the data between these components may be modified, reformatted, or otherwise changed by intermediate components. Additionally, additional or fewer connections may be used. It should also be noted that the terms "coupled", "connected", or "input" should be understood to include direct connections, indirect connections through one or more intermediate devices, and wireless connections.
[0044] Embodiment 1:
[0045] As Figure 1 shown, it is a flowchart of a method for detecting open and short circuits of wire materials in the present application; as Figure 2 shown, it is a schematic circuit diagram of an application for a method of detecting open and short circuits of wire materials in the present application.
[0046] Embodiment 1 of the present invention of the present application provides a method for detecting open and short circuits of wire materials, which can perform basic open and short circuit detections on wire materials, including the following steps:
[0047] Step 1: Prepare the hardware circuit. Connect the line to be tested to the detection device. The detection device includes a single-chip microcomputer, a triode, and a relay. The odd pins and even pins of the single-chip microcomputer are respectively connected to the line to be tested through a driving module, and high or low levels are output to each pin in different cycles.
[0048] Step 2: Set the first detection cycle. In the first detection cycle, make the odd pins of the single-chip microcomputer output high levels and the even pins output low levels; if debouncing or clearing is required, the same level can be output uniformly first and then delayed, and then high and low level signals are output formally to ensure that the test data is not affected by transient interference.
[0049] Step 3: Set the second detection cycle. Immediately following, in the second detection cycle, reverse the above output: the odd pins output low levels and the even pins output high levels; switch the corresponding lines through a relay or an electronic switch, and collect the conduction state data of each line after stabilization.
[0050] Step 4: Data comparison and fault determination. Compare the conduction data collected in the first detection period and the second detection period:
[0051] If a conduction signal appears only in the conduction period of a certain line and no signal appears in the non-conduction period, it is determined that the line is normal;
[0052] If a conduction signal still appears in the non-conduction period, it is determined that there is a short circuit or pseudo-conduction in the line;
[0053] If no conduction is detected in both periods, it is determined that there is an open circuit fault;
[0054] Step 5: Result output. After summarizing the detection results of each line inside the single-chip microcomputer, output them through the display or interface module, including: the states of normal conduction, short circuit or open circuit, and upload its detection results to the remote end or present them on the terminal device.
[0055] Embodiment 2:
[0056] As Figure 1 shown, it is a method for detecting open circuit and short circuit of wire materials in the present application; as Figure 2 shown, it is a circuit applied to the method for detecting open circuit and short circuit of wire materials in the present application.
[0057] Embodiment 2 of the present invention provides a method for detecting open circuit and short circuit of wire materials, which can perform multi-group array high and low level tests on wire materials. Among them, the hardware settings are the same as those in Embodiment 1, including the following steps:
[0058] Step 1: Multi-channel output configuration. When the hardware is similar to that in Embodiment 1, the single-chip microcomputer can configure multiple GPIO pins at one time, such as 16-bit data output. For example, when outputting 0x01 to the GPIO, only the data0 channel of the signal acquisition and logic analysis module outputs a high level, and the rest remain low levels; when outputting 0x02 to the GPIO, only the data1 of the signal acquisition and logic analysis module outputs a high level; and so on, each channel can be detected in turn.
[0059] Step 2: Read and record the conduction information. When a single channel is set to a high level, collect whether the line is conducting through the read port of the signal acquisition and logic analysis module, and convert the result into 0 or 1 for storage. If a high level is detected, it means the corresponding line is conducting; if it is a low level, it means it is not conducting. Repeat this operation to test the conduction conditions of multiple lines under different combined signals respectively.
[0060] Step 3: Visual data analysis: integrate each output and the corresponding reading inside the microcontroller and convert it into recognizable binary or hexadecimal data (such as 0b0001 to 0x01), then draw a circuit conduction diagram through the display or interface module and mark the abnormal circuits.
[0061] Step 4: Adjacent line interference determination: For possible 1-to-many and many-to-1 coupling situations, different levels are output to adjacent pins, or a short clearing period is added to effectively distinguish between real short circuit and false conduction. If a level signal is detected under an output combination that should not be turned on, it is recorded as a suspicious line for further investigation.
[0062] Embodiment 3:
[0063] like Figure 1 As shown in FIG. 1 , a method for detecting a wire break and a short circuit is provided in the present application; Figure 2 As shown, a circuit of the present application is applied to the method for detecting open circuit and short circuit of wire.
[0064] Embodiment 3 of the present invention provides a method for detecting open circuit and short circuit of a wire, which can perform a false conduction troubleshooting test on a common port of the wire, wherein the hardware setting is consistent with that of embodiment 1, and includes the following steps:
[0065] Step 1: Determine the special circumstances of the circuit to be tested. If there are multiple common ports in the circuit to be tested (for example, port 1 and port 2 are both ground), misjudgment may occur during routine testing due to the common ground line. It is necessary to design a customized process at the software level.
[0066] Step 2: Input the single port in turn, set the MCU_in_0 of the MCU to high level and the MCU_in_1 of the MCU to low level, detect the conduction between port 1 and port 2 and record it; then set the MCU_in_0 of the MCU to low level and the MCU_in_1 of the MCU to high level, measure again and record it. By combining the test results twice (or more times), the false signal caused by the common ground line can be eliminated.
[0067] Step 3: Data analysis and judgment, if conduction occurs only when the port corresponds to a high-level input, and the conduction disappears after the flip, it means that the line is normal; if conduction is still detected after the flip, it is necessary to determine whether there is a short circuit or false conduction. The judgment accuracy can be improved by combining relay switching or more cycle flipping.
[0068] Step 4: Comprehensive summary and output. Multiple detection data of port 1 and port 2 are summarized and analyzed inside the MCU. If the existence of false conduction is confirmed, this line is marked as abnormal. For ports that are confirmed to be normal or open, the detection conclusions are also output separately to ensure the accuracy and stability of the overall detection.
[0069] Example 4:
[0070] As Figure 1 shown, it is a method for open - circuit and short - circuit detection of wire in this application; as Figure 2 shown, it is a circuit applied to the method for open - circuit and short - circuit detection of wire in this application.
[0071] Example 4 of the present invention provides a method for open - circuit and short - circuit detection of wire, which can detect wire short - circuit and cross - short - circuit. Among them, the hardware settings are the same as those in Example 1, including the following steps:
[0072] Step 1: The same as in Example 1, first perform conventional detection for two adjacent cycles (odd - numbered pins are high, even - numbered pins are low; then flip). If conduction data is detected in the non - conductive cycle, it is preliminarily determined as short - circuit or coupling.
[0073] Step 2: Single - channel high - level input,
[0074] For the line suspected of short - circuit (such as Figure 1 pin1 and pin2 shown in ), only apply high - level to pin1, and keep pin2 in the "read - only" state (or turn off its drive channel). If pin2 reads the same high - level signal as pin1, it indicates that there is a short - circuit between pin1 and pin2; if the same level does not appear, it may be instantaneous coupling or interference.
[0075] Step 3: Multiple - step flipping and adjacent - line checking. If suspected cross - short - circuit is detected, more steps of level flipping can be performed, such as in the third and fourth detection cycles, applying high - level to different pins respectively to further confirm whether there is mutual coupling or compound short - circuit among multiple lines. By continuously switching the relay or triode channels, the cross - fault point of the specific line can be located.
[0076] Step 4: Fault alarm and recording. Once the short - circuit is confirmed, the single - chip microcomputer will mark the faulty line on the display terminal or the host computer software, trigger the alarm and record the data.
[0077] Although this application has disclosed multiple aspects and embodiments, other aspects and embodiments will be obvious to those skilled in the art. Without departing from the concept of this application, several deformations and improvements can still be made, and these all belong to the protection scope of this application. The multiple aspects and embodiments disclosed in this application are only for illustrative purposes, and they are not intended to limit this application. The actual protection scope of this application is subject to the claims.
Claims
1. A method for detecting open circuits and short circuits in wire materials, characterized in that, It includes the following steps: Step 1: During a preset first detection period, make the odd-numbered pins connected to the single-chip microcomputer output high level, and the even-numbered pins output low level. Collect the conduction state data of the corresponding lines of each pin and store it in the single-chip microcomputer register or external memory; Step 2: During a second detection period adjacent to the first detection period, make the odd-numbered pins output low level and the even-numbered pins output high level. Collect the conduction state data of the corresponding lines of each pin again and store it in the single-chip microcomputer register or external memory; Step 3: Compare the corresponding conduction state data collected in the first detection period and the second detection period. Among them, if the target line only has a conduction signal in its corresponding detection period, it is determined that the line is normal; if the target line still has a conduction signal in the detection period when it should not conduct, it is determined that there is a short circuit or pseudo-conduction fault; If no conduction signal is detected in both detection periods, it is determined that there is an open circuit fault; Step 4: Output the detection result including open circuit, short circuit, and normal conduction information.
2. The method for detecting open circuit and short circuit of wire as claimed in claim 1, wherein: Between the first detection period and the second detection period, switch the connection between the pin and the wire under test through a relay or electronic switch, and leave a debounce delay before each switch to ensure the stability of the collected data.
3. The method for open-circuit and short-circuit detection of wire as claimed in claim 1, characterized in that: It also includes a visualization display step, which displays the level states of each collected line in the first detection period and the second detection period through a graphical interface or liquid crystal display screen, and prompts the fault type.
4. The method for open - circuit and short - circuit detection of wire materials as described in claim 1, characterized in that: There is also a clearing period between adjacent detection periods, where the same level is output for all the pins to eliminate residual charges or interference signals and make the detection result more accurate.
5. A detection device for performing the method according to claim 1, characterized in that, It includes: A single-chip microcomputer, with multiple GPIO pins that can be configured as output or input, used to output high level or low level during different detection periods and collect the line level; A driving and switching module, connected to the GPIO pins of the single-chip microcomputer and the external wire under test, used to realize the connection or disconnection of the corresponding line through a relay or triode after receiving the driving signal of the single-chip microcomputer; A signal collection and logic analysis module, coupled with the internal or external circuit of the single-chip microcomputer, used to compare the line levels in the first detection period and the second detection period to determine whether there is an open circuit or short circuit; A display or interface module, receiving the determination result and outputting a visualization or data signal to indicate the fault state of each line.
6. The detection device according to claim 5, characterized in that: The single-chip microcomputer is integrated with a timer or interrupt module, used to automatically switch the pin level and read the line voltage between detection periods to realize periodic scanning detection.
7. The detection device according to claim 5, characterized in that: The display or interface unit is one of a touch screen, a serial communication interface, or a network interface, used to upload the detection result to a remote end or present it on a terminal device.
8. The detection device according to any one of claims 5 to 7, characterized in that: It also includes a multi-step detection function module, used to further accurately locate the cross short circuit fault of multiple lines through more than two steps of level inversion and data collection when there is complex short circuit interference.
9. A circuit for the method of detecting open circuit and short circuit of wire as claimed in claim 1, characterized in that, It includes: A single-chip microcomputer, having multiple GPIO pins that can be configured as output or input, used to output high level or low level according to the requirements of the method during different detection periods and collect the level of the external wire. The driving module is connected to the GPIO pins of the single-chip microcomputer and includes several triodes and their base (gate) resistors. When the MCU outputs a high level, the triodes conduct, thereby driving a relay or an electronic switch; The relay unit receives the on / off signal of the driving module and is used to switch the connection relationship between the wire and the GPIO pin respectively within the first detection period and the second detection period; The signal acquisition and logic analysis module cooperates with the internal or external processing unit of the single-chip microcomputer and is used to convert the acquired level signal into 0 / 1 data and perform comparative analysis to distinguish the normal conduction, open circuit or short circuit state of the circuit; Among them, the circuit can execute at least two adjacent detection periods, and perform open circuit and short circuit detection through the level inversion cooperation between the odd-pin output and the even-pin output.
10. The circuit according to claim 9, characterized in that: It also includes a debouncing or clearing circuit. Between the first detection period and the second detection period, the same level is uniformly output to or the connection is disconnected from all GPIO pins, so that possible residual charges or interference signals disappear, in order to improve the accuracy of detecting the conduction state of the wire.
11. The circuit according to claim 9 or 10, characterized in that: A timer or interrupt module is integrated in the single-chip microcomputer and is used to automatically control the switching of the driving module and the relay or electronic switch unit within different detection periods; when a suspected short circuit is detected, a high level can be output to a certain path alone, and only the input detection is enabled for the adjacent circuits, so as to determine whether there is a cross short circuit or a false conduction fault.
12. The circuit according to any one of claims 9 to 11, characterized in that, The single-chip microcomputer is also connected to a display or interface module. The display or interface module can automatically output the results of open circuit, short circuit or normal conduction after the detection is completed, and can perform remote monitoring or fault warning through a touch screen, a serial port or a network interface.
Citation Information
Patent Citations
An array substrate, a detection circuit, and a method for detecting open and short circuits thereto.
CN106356013B