Open circuit detection methods, circuits, devices, electronic equipment and storage media
By acquiring voltage signals and calculating the difference through an analog-to-digital conversion unit, the problem of detecting open circuits in IO signal ports in traditional signal acquisition modules is solved, enabling rapid identification and alarm, and reducing the difficulty of troubleshooting and maintenance costs.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-15
- Publication Date
- 2026-03-13
AI Technical Summary
Traditional signal acquisition modules do not have open circuit detection capabilities for I/O signal ports, which makes troubleshooting difficult and increases equipment maintenance costs when an open circuit occurs at the I/O signal port of an electronic control product.
The voltage signal of the target signal port is obtained by the analog-to-digital conversion unit. The difference between the first voltage signal and the second voltage signal is determined. If the difference is greater than or equal to a preset voltage threshold, it is determined to be an open circuit state, and a level signal is output to represent the open circuit state.
It enables rapid determination of the open circuit status of IO signal ports without the need to power off the device for troubleshooting, thus reducing the difficulty of troubleshooting and maintenance costs.
Smart Images

Figure CN114124071B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of system diagnostic technology, and in particular to an open circuit detection method, circuit, device, electronic device and storage medium. Background Technology
[0002] When using traditional signal acquisition modules to acquire signals from electronic control products, the lack of open-circuit detection capabilities for I / O signal ports makes it difficult to quickly determine the cause of the fault when loose connections between different devices within the electronic control product lead to open circuits in the I / O signal ports. Furthermore, professional personnel are required to power off and inspect the equipment, and measurements are needed for diagnosis, resulting in significant troubleshooting difficulties and high equipment maintenance costs. Therefore, there is an urgent need to design an open-circuit detection method to detect open circuits in the I / O signal ports of electronic control products. Summary of the Invention
[0003] This application provides an open-circuit detection method, circuit, device, electronic device, and storage medium to solve the problems of high difficulty in troubleshooting and high equipment maintenance costs when an open circuit occurs at the IO signal port of an electronic control product in the prior art.
[0004] Firstly, this application provides an open-circuit detection method, the method comprising:
[0005] The voltage signal of the target signal port is obtained through an analog-to-digital conversion unit. When the external signal is a differential signal, the target signal port includes a first signal port and a second signal port. The first signal port is used to receive the first voltage signal of the first channel of the differential signal, and the second signal port is used to receive the second voltage signal of the second channel of the differential signal.
[0006] Determine the difference between the first voltage signal and the second voltage signal;
[0007] If the difference between the first voltage signal and the second voltage signal is greater than or equal to a preset voltage threshold, it is determined that the target signal port is in an open circuit state.
[0008] Output a first level signal, which is used to indicate that the target signal port is in an open circuit state.
[0009] Optionally, the analog-to-digital conversion unit includes a register, an analog-to-digital converter, and a reference voltage source;
[0010] The acquisition of the voltage signal at the target signal port through the analog-to-digital conversion unit includes:
[0011] When the external signal is a differential signal, the configuration information in the register is obtained;
[0012] Based on the configuration information, the current detection channel of the differential signal is determined, wherein the current detection channel is either the first channel or the second channel of the differential signal;
[0013] The reference voltage source is controlled to provide the target detection voltage to the current detection channel, and the analog-to-digital converter is controlled to acquire the voltage signal of the current detection channel.
[0014] If the acquisition time of the voltage signal of the current detection channel reaches a preset time threshold, another channel other than the current detection channel is taken as the new current detection channel, and the following steps are executed: control the reference voltage source to provide the target detection voltage to the current detection channel, and control the analog-to-digital converter to acquire the voltage signal of the current detection channel.
[0015] Optionally, when the external signal is a single-ended signal, the target signal port includes a third signal port, which is used to receive the first voltage signal of the first channel of the single-ended signal, and the second voltage signal of the second channel of the single-ended signal is zero.
[0016] Optionally, after determining the difference between the first voltage signal and the second voltage signal, the method further includes:
[0017] If the difference between the first voltage signal and the second voltage signal is less than a preset voltage threshold, the target signal port is determined to be in a normal state.
[0018] Output a second-level signal, which indicates that the target signal port is in a normal state. Optionally, after outputting the first-level signal, the method further includes:
[0019] The relay is driven to close by the first level signal, so that the alarm indicator light is turned on, wherein the relay is electrically connected to the alarm indicator light.
[0020] Secondly, this application also provides an open-circuit detection circuit, the circuit comprising: a signal port, an analog-to-digital converter, and a microprocessor unit connected in sequence;
[0021] The signal port is used to receive external signals.
[0022] The analog-to-digital conversion unit is used to acquire the voltage signal of the target signal port. When the external signal is a differential signal, the target signal port includes a first signal port and a second signal port. The first signal port is used to receive the first voltage signal of the first channel of the differential signal, and the second signal port is used to receive the second voltage signal of the second channel of the differential signal.
[0023] The microprocessor unit is configured to determine the difference between the first voltage signal and the second voltage signal; if the difference between the first voltage signal and the second voltage signal is greater than or equal to a preset voltage threshold, it is determined that the target signal port is in an open circuit state; and output a first level signal, which is used to characterize that the target signal port is in an open circuit state.
[0024] Optionally, the circuit further includes: a relay and an alarm indicator light;
[0025] The relay is electrically connected to the microprocessor unit and the alarm indicator light. The microprocessor unit is used to drive the relay to close via the first level signal, so that the alarm indicator light is turned on.
[0026] Thirdly, this application also provides an open-circuit detection device, the device comprising:
[0027] The acquisition module is used to acquire the voltage signal of the target signal port through the analog-to-digital conversion unit. When the external signal is a differential signal, the target signal port includes a first signal port and a second signal port. The first signal port is used to receive the first voltage signal of the first channel of the differential signal, and the second signal port is used to receive the second voltage signal of the second channel of the differential signal.
[0028] The first determining module is used to determine the difference between the first voltage signal and the second voltage signal;
[0029] The second determining module is used to determine that the target signal port is in an open circuit state when the difference between the first voltage signal and the second voltage signal is greater than or equal to a preset voltage threshold.
[0030] The first output module is used to output a first level signal, which is used to indicate that the target signal port is in an open circuit state.
[0031] Fourthly, this application also provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus;
[0032] Memory, used to store computer programs;
[0033] When a processor executes a program stored in memory, it implements the steps of the open-circuit detection method described in any embodiment of the first aspect.
[0034] Fifthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the open-circuit detection method as described in any embodiment of the first aspect.
[0035] In this embodiment, the voltage signal of the target signal port is acquired through an analog-to-digital conversion unit. When the external signal is a differential signal, the target signal port includes a first signal port and a second signal port. The first signal port receives a first voltage signal from a first channel of the differential signal, and the second signal port receives a second voltage signal from a second channel of the differential signal. The difference between the first and second voltage signals is determined. If the difference between the first and second voltage signals is greater than or equal to a preset voltage threshold, the target signal port is determined to be in an open-circuit state. A first level signal is output, which characterizes that the target signal port is in an open-circuit state. In this way, the voltage signal of the target signal port can be acquired, and the open-circuit state can be determined based on the acquired voltage signal, thus eliminating the need for power-off troubleshooting and repair, greatly reducing the difficulty of fault diagnosis and significantly lowering equipment maintenance costs. Attached Figure Description
[0036] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0037] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0038] Figure 1 This is one of the flowcharts illustrating the open-circuit detection method provided in the embodiments of this application;
[0039] Figure 2 This is a schematic diagram of the open-circuit detection circuit provided in an embodiment of this application;
[0040] Figure 3 This is a second schematic flowchart of the open-circuit detection method provided in the embodiments of this application;
[0041] Figure 4 This is a schematic diagram of the open circuit detection device provided in the embodiments of this application;
[0042] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0043] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0044] In traditional signal acquisition modules, open-circuit detection is often overlooked. The focus is more on detecting overvoltage and overcurrent in the module's input voltage and current, as well as short circuits. However, with the increasing complexity of electronic information technology, various sensor signals, analog, pulse, and encoder signals are being used more extensively in industrial robotics. Consequently, the types and types of signals are becoming increasingly complex and diverse, leading to more and more intricate electrical control cabinets and internal control circuits. Therefore, when equipment malfunctions, troubleshooting becomes difficult and time-consuming. Even with appropriate detection circuits, signal acquisition devices in industrial control environments have high requirements for the control accuracy and reliability of the target equipment. Conventional external detection devices are prone to measurement errors and failures. To address this issue, this patent primarily utilizes microcontrollers (MCU controller chips) and analog-to-digital converters (ADC chips) within the signal acquisition module. Through software calculation and detection, open-circuit voltage detection is achieved, thereby enabling the identification and alarm of open-circuit conditions.
[0045] See Figure 1 , Figure 1 This is a schematic flowchart illustrating the open-circuit detection method provided in an embodiment of this application. Figure 1 As shown, the open circuit detection method may include the following steps:
[0046] Step 101: Obtain the voltage signal of the target signal port through the analog-to-digital conversion unit. When the external signal is a differential signal, the target signal port includes a first signal port and a second signal port. The first signal port is used to receive the first voltage signal of the first channel of the differential signal, and the second signal port is used to receive the second voltage signal of the second channel of the differential signal.
[0047] The open-circuit detection method provided in this application can be applied to signal acquisition modules, such as... Figure 2 As shown. This signal acquisition module has an open-circuit detection circuit, which may include an analog-to-digital converter (ADC) and a microcontroller unit (MCU). The ADC is electrically connected to the target signal port and is used to acquire the voltage signal of the I / O signal port. The ADC is integrated with an internal inter-integrated circuit (I / O circuit). 2 C) The communication interface or Serial Peripheral Interface (SPI) connects to the microprocessor unit via I... 2 The acquired voltage signal is transmitted to the microprocessor unit via either the C or SPI communication interface. This microprocessor unit analyzes the acquired voltage signal to determine whether the I / O signal port connected to the analog-to-digital converter is in an open-circuit state. The open-circuit detection circuit may also include an alarm display interface or an alarm indicator light. The microprocessor unit can output high and low levels to the alarm display interface or the alarm indicator light to display that the target signal port is in an open-circuit state, or to indicate this state via the alarm indicator light, prompting the user to check.
[0048] Specifically, when the external signal is a differential signal, the differential signal can enter the open circuit detection circuit through the first signal port and the second signal port. The analog-to-digital conversion unit collects the analog voltage signals of the first signal port and the second signal port respectively, and performs analog-to-digital conversion to obtain the first voltage signal of the first channel and the second voltage signal of the second channel of the differential signal. The first voltage signal of the first channel and the second voltage signal of the second channel of the differential signal are used as the voltage signal of the target signal port.
[0049] Step 102: Determine the difference between the first voltage signal and the second voltage signal.
[0050] After acquiring the first voltage signal and the second voltage signal, the microprocessor unit can calculate the difference between the first voltage signal and the second voltage signal, thereby obtaining the difference between the first voltage signal and the second voltage signal.
[0051] Step 103: If the difference between the first voltage signal and the second voltage signal is greater than or equal to a preset voltage threshold, the target signal port is determined to be in an open circuit state.
[0052] It should be noted that, according to the characteristics of the external detection impedance circuit, if the first and second signal ports of the differential signal are floating (without a sensor or signal source connected), the voltage difference between the first and second signal ports will be large due to their relatively high impedance. This means the voltage difference between the first and second signal ports will be greater than or equal to the preset voltage threshold, and this can be marked as an open circuit. Conversely, if the first and second signal ports of the differential signal are not floating (with a sensor or signal source connected), the voltage difference between the first and second signal ports will be small due to their relatively low impedance. This means the voltage difference between the first and second signal ports will be less than the preset voltage threshold, and this can be marked as normal.
[0053] Step 104: Output a first level signal. The first level signal is used to indicate that the target signal port is in an open circuit state.
[0054] When the microprocessor unit detects that the target signal port is in an open-circuit state, it can output a first-level signal of corresponding level to indicate that the target signal port is currently in an open-circuit state. Specifically, the first-level signal can be high or low, and can be set according to actual needs; this application does not impose specific limitations. In one embodiment, the microprocessor unit can output a "mark" signal, which outputs a first-level signal through its own general-purpose input / output (GPIO) port to trigger a relay to engage and drive an alarm indicator light to display an alarm state.
[0055] In this embodiment, the voltage signal of the target signal port can be collected, and the target signal port can be determined as to be in an open circuit state based on the collected voltage signal. This eliminates the need to power off the equipment for troubleshooting and repair, reducing the difficulty of troubleshooting and lowering the equipment maintenance cost.
[0056] Furthermore, the aforementioned analog-to-digital conversion unit includes a register, an analog-to-digital converter, and a reference voltage source;
[0057] Step 101 above, acquiring the voltage signal of the target signal port through the analog-to-digital conversion unit, may specifically include the following steps:
[0058] When the external signal is a differential signal, the configuration information in the register is obtained;
[0059] Based on the configuration information, determine the current detection channel of the differential signal, where the current detection channel is either the first channel or the second channel of the differential signal;
[0060] The reference voltage source is controlled to provide the target detection voltage to the current detection channel, and the analog-to-digital converter is controlled to acquire the voltage signal of the current detection channel.
[0061] If the acquisition time of the voltage signal of the current detection channel reaches the preset time threshold, another channel other than the current detection channel is taken as the new current detection channel, and the following steps are executed: control the reference voltage source to provide the target detection voltage to the current detection channel, and control the analog-to-digital converter to acquire the voltage signal of the current detection channel.
[0062] Specifically, the preset time threshold, the reference voltage source, and the target detection voltage can be set according to actual conditions, and this application does not impose specific limitations. The analog-to-digital conversion unit includes a register, an analog-to-digital converter, and a reference voltage source. The analog-to-digital converter is responsible for converting the acquired analog voltage into a binary digital quantity and transmitting it to the subsequent controller. The register is responsible for the ADC chip's mode selection, status, communication, selection of external reference voltage, and configuration of pin levels. The reference voltage source is responsible for providing the reference voltage and internal excitation current required by the analog-to-digital converter.
[0063] In one embodiment, when the external signal is a differential signal, the analog-to-digital converter (ADC) can be controlled by a microprocessor unit to acquire voltage signals from the first and second signal ports. Specifically, the microprocessor unit can enable parameters such as data, status, input buffer, mode, and reference voltage source in the corresponding registers of the ADC to pre-configure the register configuration information. When voltage signal acquisition via the ADC is required, the microprocessor unit can determine the current detection channel based on the register configuration information. Assuming the current detection channel is the first channel, the reference voltage source can be controlled to provide the target detection voltage to the first channel, and the ADC can be controlled to acquire the voltage signal of the first channel. When the acquisition time of the voltage signal of the first channel reaches a preset time threshold, the second channel is selected as the new current detection channel. The reference voltage source is controlled to provide the target detection voltage to the second channel, and the ADC is controlled to acquire the voltage signal of the second channel. This process is repeated cyclically to achieve periodic acquisition of the voltage signals of the first and second channels. Finally, the first and second voltage signals acquired are transmitted to the microprocessor unit, which calculates the voltage difference between the first and second channels in the differential signal to determine whether there is an open circuit.
[0064] This embodiment provides a system-level diagnostic that can detect when an external sensor or source signal is disconnected from the system input. A microprocessor unit configures the registers of the analog-to-digital converter (ADC) unit, uses the ADC's internal reference voltage to set the target detection voltage for the current detection channel, and detects the voltage magnitude of the input signal to determine if an open circuit exists. This enables the detection and alarm of line connection status, significantly improving the difficulty of troubleshooting after a fault occurs and saving on line maintenance costs and manpower. Furthermore, since this solution utilizes the existing microprocessor unit and ADC unit within the signal acquisition module, compared to adding diodes, resistors, and other components to the external signal acquisition module to construct an open circuit detection circuit, this embodiment avoids the accuracy degradation caused by lead resistance and temperature drift errors from external diodes and resistors, reducing the risk of device failure.
[0065] Furthermore, when the external signal is a single-ended signal, the target signal port includes a third signal port, which is used to receive the first voltage signal of the first channel of the single-ended signal, and the second voltage signal of the second channel of the single-ended signal is zero.
[0066] In one embodiment, the open-circuit state of the target signal port connected to the single-ended signal can also be detected. When the external signal is a single-ended signal, the single-ended signal can enter the open-circuit detection circuit through the third signal port. The analog-to-digital conversion unit collects the analog voltage signal of the third signal port and performs analog-to-digital conversion to obtain the first voltage signal of the first channel of the single-ended signal. The first voltage signal of the first channel of the single-ended signal is used as the voltage signal of the target signal port. The second channel of the single-ended signal is electrically connected to the ground terminal, so the second voltage signal of the second channel of the single-ended signal is zero by default and does not need to be collected. If the input of the third signal port of the single-ended signal is floating (no sensor or signal source is connected), then there will be a voltage difference between the third signal port and the ground terminal that is greater than or equal to the preset voltage threshold, which can be marked as an open circuit. If the input of the third signal port of the single-ended signal is not floating (a sensor or signal source is connected), then there will be a voltage difference between the third signal port and the ground terminal that is less than the preset voltage threshold, which can be marked as normal. This allows for the detection of the open-circuit status of the target signal port receiving a single-ended signal, eliminating the need for power-off troubleshooting and repair, thus reducing the difficulty of fault diagnosis and lowering equipment maintenance costs.
[0067] Furthermore, after determining the difference between the first voltage signal and the second voltage signal in step 102 above, the open-circuit detection method further includes:
[0068] If the difference between the first voltage signal and the second voltage signal is less than a preset voltage threshold, the target signal port is determined to be in a normal state.
[0069] Output a second-level signal, which is used to indicate that the target signal port is in a normal state.
[0070] Specifically, when the microprocessor unit detects that the difference between the first voltage signal and the second voltage signal is less than a preset voltage threshold, it can output a second level signal to indicate that the target signal port is currently in a normal state. This second level signal is different from the first level signal; if the first level signal is high, the second level signal is low; conversely, if the first level signal is low, the second level signal is high. This allows the alarm display interface to show that the target signal port is in a normal state, or an alarm indicator light to indicate that the target signal port is in a normal state.
[0071] Furthermore, after step 104 above, where the first level signal is output, the open-circuit detection method further includes:
[0072] The relay is driven to close by a first-level signal, so that the alarm indicator light is turned on. The relay is electrically connected to the alarm indicator light.
[0073] In one embodiment, a microprocessor unit, a relay, and an alarm indicator light are electrically connected in sequence. After calculating the difference between a first voltage signal and a second voltage signal, the microprocessor unit compares this difference with a preset voltage threshold. Based on the comparison result, it determines the valid level of the marker and triggers its internal register to output a first-level signal. This first-level signal can then drive the relay to close, thereby turning on the alarm indicator light to alert the user that the target signal port is currently open and requires immediate maintenance.
[0074] In practical applications, the flowchart of this open-circuit detection method is as follows: Figure 3 As shown, the specific steps include the following:
[0075] Step 301: When an external signal is connected, the analog voltage of the signal port connected to the external signal is collected;
[0076] Step 302: Convert the acquired analog voltage into digital voltage;
[0077] This open-circuit detection is a system-level diagnostic that detects whether an external sensor or source signal is disconnected from the system input. Its basic control and detection logic involves configuring the registers of an analog-to-digital converter (ADC) chip. Based on the characteristics of the external detection impedance circuit, the target detection voltage can be precisely set using the chip's internal reference voltage. Due to the characteristics of the ADC chip, the analog voltage signal values acquired from the two channels can be converted into decimal or binary digital voltage signals, which are then processed using I... 2 The signal is transmitted to the microprocessor unit (MCU) via a C-interface or SPI communication port. The analog-to-digital converter (ADC) chip's function is to: acquire the input signal, configure the target detection voltage, and convert the decimal or binary digital voltage signal through an I-channel interface. 2 The data is transmitted to the microprocessor unit (MCU) via the C communication interface or SPI communication port for calculation, judgment, and marking.
[0078] Step 303: Calculate the difference in data voltage between the two channels of the external signal;
[0079] Step 304: Determine whether the difference between the data voltages of the two channels of the external signal is greater than or equal to a preset voltage threshold.
[0080] The microprocessor unit (MCU) software program calculates the difference between the digital voltage signals from the two input channels. If the difference exceeds a preset voltage threshold, the software flags it as an open circuit. The MCU records the open circuit flag and outputs a valid level to drive an external relay or LED to trigger an alarm, achieving an alarm display effect. The MCU's function is to process the data acquired by the upstream ADC (Analog-to-Digital Converter) chip, calculate the voltage difference between the first and second channels, and compare the result with a preset voltage threshold. If the voltage difference between the first and second channels is greater than or equal to the preset voltage threshold, step 305 is executed; if the voltage difference is less than the preset voltage threshold, the process returns to step 301.
[0081] Step 305: Mark as open circuit, output valid level;
[0082] The microprocessor unit compares the voltage difference between the first channel and the second channel with a preset voltage threshold. If the voltage difference between the first channel and the second channel is greater than or equal to the preset voltage threshold, the target signal port is determined to be in an open circuit state. At this time, a valid level is marked, and the internal register is triggered to output a first level signal.
[0083] Step 306: Issue an alarm notification.
[0084] The software program was improved by leveraging the existing chip resources of the signal acquisition module. The improvements primarily involved two aspects: first, rationally configuring the registers of the ADC (Analog-to-Digital Converter) chip to set the target detection voltage; and second, designing an open-circuit detection program for the microprocessor unit (MCU), which mainly includes functions such as calculating the acquired SPI bus data, judging it against a preset voltage threshold, marking the open-circuit state, and outputting alarm levels. In this way, by using the MEU and ADC chip to acquire, calculate, judge, and mark signals, open-circuit detection of signal port connection lines is achieved, improving equipment fault diagnosis efficiency, reducing the impact of peripheral circuits on signal acquisition accuracy, reducing equipment maintenance difficulty, decreasing product size, saving equipment maintenance costs, reducing product failure risk, and increasing fault coverage.
[0085] See also Figure 2 , Figure 2 This is a schematic diagram of the open-circuit detection circuit provided in an embodiment of this application. Figure 2 As shown, the open-circuit detection circuit includes: a signal port, an analog-to-digital converter, and a microprocessor unit that are connected in sequence.
[0086] The signal port is used to connect to external signals.
[0087] An analog-to-digital conversion unit is used to acquire the voltage signal of a target signal port. When the external signal is a differential signal, the target signal port includes a first signal port and a second signal port. The first signal port is used to receive the first voltage signal of the first channel of the differential signal, and the second signal port is used to receive the second voltage signal of the second channel of the differential signal.
[0088] The microprocessor unit is used to determine the difference between the first voltage signal and the second voltage signal; if the difference between the first voltage signal and the second voltage signal is greater than or equal to a preset voltage threshold, it is determined that the target signal port is in an open circuit state; and outputs a first level signal, which is used to characterize that the target signal port is in an open circuit state.
[0089] In this way, the analog-to-digital conversion unit uses an internal integrated circuit (I-Integrated Circuit, abbreviated as I) 2 C) The communication interface or Serial Peripheral Interface (SPI) connects to the microprocessor unit via I... 2The acquired voltage signal is transmitted to the microprocessor unit via a C-type or SPI communication interface. The microprocessor unit analyzes the acquired voltage signal to determine whether the I / O signal port connected to the analog-to-digital converter is in an open-circuit state. This open-circuit detection circuit may also include an alarm display interface or an alarm indicator light. The microprocessor unit can output high and low levels to the alarm display interface or the alarm indicator light to display that the target signal port is in an open-circuit state, or to indicate that the target signal is in an open-circuit state via the alarm indicator light, reminding the user to check. Specifically, this open-circuit detection circuit can implement the steps of the open-circuit detection method provided in any of the aforementioned method embodiments, which will not be elaborated further here. This open-circuit detection circuit can acquire the voltage signal of the target signal port and determine whether the target signal port is in an open-circuit state based on the acquired voltage signal, thus eliminating the need for power-off troubleshooting and repair, reducing the difficulty of fault diagnosis, and lowering equipment maintenance costs.
[0090] Optionally, the open-circuit detection circuit may also include: a relay and an alarm indicator light;
[0091] The relay is electrically connected to the microprocessor unit and the alarm indicator light. The microprocessor unit is used to drive the relay to close via a first level signal so that the alarm indicator light is turned on.
[0092] In this way, after calculating the difference between the first and second voltage signals, the microprocessor unit compares this difference with a preset voltage threshold. Based on the comparison result, it determines the valid level of the marker and triggers the internal register to output a first-level signal. This first-level signal can then drive a relay to close, thereby turning on an alarm indicator light to notify the user that the target signal port is currently open and requires immediate maintenance. (See also...) Figure 4 , Figure 4 This is a schematic diagram of the open circuit detection device provided in the embodiments of this application, as shown below. Figure 4 As shown, the open circuit detection device 400 includes:
[0093] The acquisition module 401 is used to acquire the voltage signal of the target signal port through the analog-to-digital conversion unit. When the external signal is a differential signal, the target signal port includes a first signal port and a second signal port. The first signal port is used to receive the first voltage signal of the first channel of the differential signal, and the second signal port is used to receive the second voltage signal of the second channel of the differential signal.
[0094] The first determining module 402 is used to determine the difference between the first voltage signal and the second voltage signal;
[0095] The second determining module 403 is used to determine that the target signal port is in an open circuit state when the difference between the first voltage signal and the second voltage signal is greater than or equal to a preset voltage threshold.
[0096] The first output module 404 is used to output a first level signal, which is used to indicate that the target signal port is in an open circuit state.
[0097] Optionally, the analog-to-digital conversion unit includes a register, an analog-to-digital converter, and a reference voltage source; the acquisition module 401 includes:
[0098] The acquisition submodule is used to acquire configuration information from the register when the external signal is a differential signal;
[0099] The determination submodule is used to determine the current detection channel of the differential signal based on the configuration information, wherein the current detection channel is either the first channel or the second channel of the differential signal;
[0100] The control submodule is used to control the reference voltage source to provide the target detection voltage to the current detection channel, and to control the analog-to-digital converter to acquire the voltage signal of the current detection channel;
[0101] The processing submodule is used to, when the acquisition time of the voltage signal of the current detection channel reaches a preset time threshold, take another channel outside the current detection channel as the new current detection channel and execute the following steps: control the reference voltage source to provide the target detection voltage to the current detection channel, and control the analog-to-digital converter to acquire the voltage signal of the current detection channel.
[0102] Optionally, when the external signal is a single-ended signal, the target signal port includes a third signal port, which is used to receive the first voltage signal of the first channel of the single-ended signal, and the second voltage signal of the second channel of the single-ended signal is zero.
[0103] Optionally, the open circuit detection device 400 also includes:
[0104] The third determining module is used to determine that the target signal port is in a normal state when the difference between the first voltage signal and the second voltage signal is less than a preset voltage threshold.
[0105] The second output module is used to output a second-level signal, which is used to indicate that the target signal port is in a normal state.
[0106] Optionally, the open circuit detection device 400 also includes:
[0107] The driving module is used to drive the relay to close via a first level signal, so that the alarm indicator light is turned on. The relay is electrically connected to the alarm indicator light.
[0108] It should be noted that the open circuit detection device 400 can implement the steps of the open circuit detection method provided in any of the aforementioned method embodiments and achieve the same technical effect, which will not be elaborated here.
[0109] like Figure 5 As shown in the figure, this application provides an electronic device, including a processor 511, a communication interface 512, a memory 513, and a communication bus 514, wherein the processor 511, the communication interface 512, and the memory 513 communicate with each other through the communication bus 514.
[0110] Memory 513 is used to store computer programs;
[0111] In one embodiment of this application, when the processor 511 executes the program stored in the memory 513, it implements the steps of the open-circuit detection method provided in any of the foregoing method embodiments, including:
[0112] The voltage signal of the target signal port is obtained through an analog-to-digital conversion unit. When the external signal is a differential signal, the target signal port includes a first signal port and a second signal port. The first signal port is used to receive the first voltage signal of the first channel of the differential signal, and the second signal port is used to receive the second voltage signal of the second channel of the differential signal.
[0113] Determine the difference between the first voltage signal and the second voltage signal;
[0114] If the difference between the first voltage signal and the second voltage signal is greater than or equal to a preset voltage threshold, it is determined that the target signal port is in an open circuit state.
[0115] Output a first-level signal, which is used to indicate that the target signal port is in an open-circuit state.
[0116] This application also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the open-circuit detection method provided in any of the foregoing method embodiments.
[0117] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0118] The above description is merely a specific embodiment of the present invention, enabling those skilled in the art to understand or implement the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the present invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features claimed herein.
Claims
1. An open circuit detection method, characterized by, The method comprises: obtaining a voltage signal of a target signal port through an analog-to-digital conversion unit, wherein, in the case that an external signal is a differential signal, the target signal port comprises a first signal port and a second signal port, the first signal port is used for receiving a first voltage signal of a first channel of the differential signal, and the second signal port is used for receiving a second voltage signal of a second channel of the differential signal; determining a difference between the first voltage signal and the second voltage signal; in the case that the difference between the first voltage signal and the second voltage signal is greater than or equal to a preset voltage threshold, determining that the target signal port is in an open circuit state; outputting a first level signal, the first level signal being used for representing that the target signal port is in the open circuit state; wherein the analog-to-digital conversion unit comprises a register, an analog-to-digital converter and a reference reference voltage source; the voltage signal of the target signal port is collected through the analog-to-digital conversion unit, comprising: in the case that the external signal is a differential signal, obtaining configuration information in the register; determining a current detection channel of the differential signal according to the configuration information, wherein the current detection channel is a first channel or a second channel in the differential signal; controlling the reference reference voltage source to provide a target detection voltage to the current detection channel, and controlling the analog-to-digital converter to collect a voltage signal of the current detection channel; in the case that a collection time of the voltage signal of the current detection channel reaches a preset time threshold, another channel outside the current detection channel is taken as a new current detection channel, and the step of controlling the reference reference voltage source to provide a target detection voltage to the current detection channel, and controlling the analog-to-digital converter to collect a voltage signal of the current detection channel is executed.
2. The method of claim 1, wherein, in the case that the external signal is a single-ended signal, the target signal port comprises a third signal port, the third signal port is used for receiving a first voltage signal of a first channel of the single-ended signal, and a second voltage signal of a second channel of the single-ended signal is zero.
3. The method of claim 1, wherein, after the difference between the first voltage signal and the second voltage signal is determined, the method further comprises: in the case that the difference between the first voltage signal and the second voltage signal is less than a preset voltage threshold, determining that the target signal port is in a normal state; outputting a second level signal, the second level signal being used for representing that the target signal port is in the normal state.
4. The method of claim 1, wherein, after the first level signal is outputted, the method further comprises: driving a relay to be closed through the first level signal, so that an alarm prompt lamp is in an open state, wherein the relay is electrically connected with the alarm prompt lamp.
5. An open circuit detection circuit, characterized by The circuit comprises: a signal port, an analog-to-digital conversion unit and a micro-processing unit which are electrically connected in sequence; wherein the signal port is used for accessing an external signal; The analog-to-digital conversion unit is configured to acquire a voltage signal of a target signal port, wherein, in a case where the external signal is a differential signal, the target signal port comprises a first signal port and a second signal port, the first signal port is configured to receive a first voltage signal of a first channel of the differential signal, and the second signal port is configured to receive a second voltage signal of a second channel of the differential signal; the analog-to-digital conversion unit comprises a register, an analog-to-digital converter and a reference reference voltage source; the analog-to-digital conversion unit is specifically configured to, in a case where the external signal is a differential signal, acquire configuration information in the register; determine a current detection channel of the differential signal according to the configuration information, wherein the current detection channel is the first channel or the second channel of the differential signal; control the reference reference voltage source to provide a target detection voltage for the current detection channel, and control the analog-to-digital converter to collect a voltage signal of the current detection channel; in a case where a collection time of the voltage signal of the current detection channel reaches a preset time threshold, another channel other than the current detection channel is taken as a new current detection channel, and the following steps are performed: controlling the reference reference voltage source to provide a target detection voltage for the current detection channel, and controlling the analog-to-digital converter to collect a voltage signal of the current detection channel; The micro-processing unit is configured to determine a difference between the first voltage signal and the second voltage signal; in a case where the difference between the first voltage signal and the second voltage signal is greater than or equal to a preset voltage threshold, determine that the target signal port is in an open circuit state; and output a first level signal, the first level signal being used to represent that the target signal port is in the open circuit state.
6. The open circuit detection circuit of claim 5, wherein, The circuit further comprises a relay and an alarm prompt lamp; The relay is electrically connected with the micro-processing unit and the alarm prompt lamp, and the micro-processing unit is configured to drive the relay to be closed through the first level signal, so that the alarm prompt lamp is in an open state.
7. An open circuit detection device, characterized by The device comprises: An acquisition module is configured to acquire, by an analog-to-digital conversion unit, a voltage signal of a target signal port, wherein, in a case where an external signal is a differential signal, the target signal port comprises a first signal port and a second signal port, the first signal port is configured to receive a first voltage signal of a first channel of the differential signal, and the second signal port is configured to receive a second voltage signal of a second channel of the differential signal; A first determination module is configured to determine a difference between the first voltage signal and the second voltage signal; A second determination module is configured to, in a case where the difference between the first voltage signal and the second voltage signal is greater than or equal to a preset voltage threshold, determine that the target signal port is in an open circuit state; A first output module is configured to output a first level signal, the first level signal being used to represent that the target signal port is in the open circuit state; The analog-to-digital conversion unit comprises a register, an analog-to-digital converter and a reference reference voltage source; the acquisition module comprises: An acquisition sub-module is configured to acquire configuration information in the register when the external signal is a differential signal; A determination sub-module is configured to determine a current detection channel of the differential signal according to the configuration information, wherein the current detection channel is a first channel or a second channel in the differential signal; A control sub-module is configured to control the reference voltage source to provide a target detection voltage to the current detection channel, and control the ADC to collect a voltage signal of the current detection channel; A processing sub-module is configured to, when a collection time of the voltage signal of the current detection channel reaches a preset time threshold, take another channel outside the current detection channel as a new current detection channel, and perform the steps of controlling the reference voltage source to provide a target detection voltage to the current detection channel, and controlling the ADC to collect a voltage signal of the current detection channel.
8. An electronic device, comprising: The device comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; The memory is configured to store a computer program; The processor is configured to execute the program stored in the memory, and implement the steps of the open circuit detection method in any one of claims 1-4.
9. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the open circuit detection method in any one of claims 1-4.
Citation Information
Patent Citations
Analog quantity input module disconnection detection method, apparatus, and system thereof
CN110632890A