Fault detection circuit and device
By designing a fault detection circuit for circuits, using comparator and fault identification module to detect motherboard failures, and outputting signals through an IO port, the problem of high fault detection resources in the existing technology is solved, and the reliability of the motherboard is improved. Fault location capability.
Patent Information
- Application Number
- CN201910637661.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-07-15
- Publication Date
- 2024-11-19
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing circuit fault detection occupies a lot of resources, which can easily lead to damage to the motherboard, and it is difficult to effectively solve the fault when the logic is not processed.
A fault detection circuit is designed, including a comparator, a fault identification module and a fault signal output module. It detects the motherboard circuit fault through multiple fault identification pins, and outputs the fault signal through an IO port, triggers fault protection and simplifies control logic. Position the fault location.
It realizes detection of multiple faults by one IO port, simplifies control logic, improves the reliability of the motherboard, avoids excessive resource usage, and ensures the normal operation of the motherboard.
Smart Images

Figure CN110208685B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of circuit technology, and in particular to a fault detection circuit and device. Background Art
[0002] At present, the fault protection function of the circuit mainboard is becoming more and more perfect. Each fault in the circuit mainboard requires a separate chip IO port for fault identification, which takes up more resources; when the fault logic is not handled properly, it is easy to cause damage to the mainboard.
[0003] With regard to the problem that circuit fault detection in the prior art occupies a lot of resources, no effective solution has been proposed yet. Summary of the invention
[0004] The embodiments of the present invention provide a fault detection circuit and device to solve the problem that circuit fault detection occupies a lot of resources in the prior art.
[0005] In order to solve the above technical problems, the present invention provides a fault detection circuit, comprising: a comparator, a fault identification module and a fault signal output module;
[0006] The first input terminal of the comparator inputs a first reference signal, the second input terminal of the comparator is connected to the output terminal of the fault identification module, and the output terminal of the comparator is connected to the input terminal of the fault signal output module;
[0007] The fault identification module comprises at least two fault identification pins, which are respectively connected to the fault detection points of at least two circuits to be detected in the mainboard, and the fault identification module is used to input a second reference signal to the second input terminal of the comparator according to the circuit fault condition;
[0008] The fault signal pin of the fault signal output module is connected to an input IO port of the control chip. The fault signal output module is used to output a first level through the fault signal pin when there is a circuit fault on the mainboard, and output a second level when there is no circuit fault on the mainboard.
[0009] Optionally, the fault detection circuit further includes: a signal generating module, configured to output the first reference signal;
[0010] The signal generating module comprises: a first resistor and a second resistor;
[0011] One end of the first resistor is connected to a first power supply pin, and the other end is connected to a first input terminal of the comparator and is grounded through the second resistor;
[0012] The first power pin is used to connect the power supply of the circuit to be tested.
[0013] Optionally, a first capacitor is connected in parallel across both ends of the second resistor.
[0014] Optionally, the signal generating module further includes: an operational amplifier,
[0015] The inverting input terminal of the operational amplifier is connected to the output terminal, and the non-inverting input terminal is connected to the connection point between the first resistor and the second resistor;
[0016] The output terminal of the operational amplifier is connected to the first input terminal of the comparator.
[0017] Optionally, the connection point between the first resistor and the second resistor, or the output end of the operational amplifier, is connected to the first input end of the comparator through a third resistor; and one end of the third resistor connected to the first input end of the comparator is grounded through a second capacitor.
[0018] Optionally, the fault identification module further includes: a fourth resistor, a fifth resistor and at least two diodes;
[0019] The cathodes of the at least two diodes are respectively connected to the at least two fault identification pins, the anodes of the at least two diodes are both connected to one end of the fourth resistor, and the other end of the fourth resistor is connected to the second power supply pin;
[0020] The second power supply pin is used to connect the power supply of the circuit to be tested;
[0021] One end of the fourth resistor connected to the anodes of the at least two diodes is also connected to the second input end of the comparator and is grounded through the fifth resistor.
[0022] Optionally, the fault identification module further includes: a sixth resistor, one end of the sixth resistor being connected to a connection point between the fourth resistor and the fifth resistor, and the other end of the sixth resistor being connected to positive electrodes of the at least two diodes.
[0023] Optionally, the fault signal output module includes:
[0024] A pull-up resistor, one end of which is connected to a third power pin, and the third power pin is used to connect to a power supply of the control chip;
[0025] The other end of the pull-up resistor is connected to the fault signal pin and to the output end of the comparator.
[0026] Optionally, the second reference signal is a first value or a second value, and the value of the first reference signal is greater than the first value and less than the second value.
[0027] The present invention also provides a device comprising the above fault detection circuit.
[0028] By applying the technical solution of the present invention, different circuit faults of the mainboard are detected respectively through multiple fault identification pins, and a signal indicating fault or normal is obtained through a comparator, which is then output to an IO port of the MCU through a fault signal pin to trigger fault protection, and the fault position can be located through the fault identification pin, thereby realizing the detection of multiple faults by one IO port, simplifying the control logic, and improving the reliability of the mainboard. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 FIG. 1 is a schematic diagram of a fault detection circuit according to an embodiment of the present invention. Figure 1 ;
[0030] Figure 2 FIG. 1 is a schematic diagram of a fault detection circuit according to an embodiment of the present invention. Figure 2 ;
[0031] Figure 3 FIG. 1 is a schematic diagram of a fault detection circuit according to an embodiment of the present invention. Figure 3 ;
[0032] Figure 4 FIG. 1 is a schematic diagram of a fault detection circuit according to an embodiment of the present invention. Figure 4 ;
[0033] Figure 5 is a specific schematic diagram of a fault detection circuit according to an embodiment of the present invention. DETAILED DESCRIPTION
[0034] In order to make the purpose, technical scheme and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all 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.
[0035] It should be understood that although the terms first, second, third, etc. may be used to describe resistors and signals in the embodiments of the present invention, these resistors and signals should not be limited to these terms. These terms are only used to distinguish resistors and signals. For example, without departing from the scope of the embodiments of the present invention, the first resistor may also be referred to as the second resistor, and similarly, the second resistor may also be referred to as the first resistor.
[0036] It should also be noted that the term "includes", "comprising" or any other variation thereof is intended to cover non-exclusive inclusion, so that a commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprising a ..." do not exclude the existence of other identical elements in the commodity or device including the elements.
[0037] The optional embodiments of the present invention are described in detail below with reference to the accompanying drawings.
[0038] The embodiment of the present invention provides a fault detection circuit for detecting circuit faults of a mainboard, and the fault detection circuit only occupies one IO port of a control chip (MCU) to detect multiple different faults of the mainboard. The embodiment of the present invention is applicable to the case where various circuits to be detected in the mainboard share the same power supply.
[0039] like Figure 1 As shown, the fault detection circuit includes: a comparator 100 , a fault identification module 200 and a fault signal output module 300 .
[0040] The first reference signal is input to the first input terminal X1 of the comparator 100 . The second input terminal X2 of the comparator 100 is connected to the output terminal of the fault identification module 200 . The output terminal of the comparator 100 is connected to the input terminal of the fault signal output module 300 .
[0041] The fault identification module 200 includes at least two fault identification pins (Y1 to YN), which are respectively connected to the fault detection points of at least two circuits to be detected in the mainboard. The fault identification module 200 is used to input a second reference signal to the second input terminal X2 of the comparator 100 according to the circuit fault situation. The number of fault identification pins can be set according to the specific situation of the mainboard circuit. The circuit to be detected in the mainboard can generally be an overcurrent detection circuit, an overvoltage detection circuit, an overtemperature detection circuit, an undervoltage detection circuit, and the like.
[0042] The fault signal pin F of the fault signal output module 300 is connected to an input IO port of the control chip. The fault signal output module 300 is used to output a first level through the fault signal pin F when there is a circuit fault in the mainboard, and output a second level when there is no circuit fault in the mainboard.
[0043] Among them, the fault identification pin detects a preset level and considers that the circuit to be tested connected to it has a fault. Of course, whether the low level indicates a fault or the high level indicates a fault can be set according to the specific circuit situation, and this embodiment does not limit this. Taking the fault identification pin detecting a low level to indicate a circuit fault as an example, if the circuit to be tested fails, the fault identification pin connected to the circuit to be tested detects a low level; if the circuit to be tested operates normally, the fault identification pin connected to the circuit to be tested detects a high level. In this embodiment, the fault identification module outputs different signals when there is a circuit fault on the main board and when there is no circuit fault on the main board. The second reference signal can be a first value or a second value, and the second value is greater than the first value. Exemplarily, according to the circuit fault situation identified by the fault identification pin, if there is a fault in the circuit to be tested, the fault identification module outputs a first value, and if all circuits to be tested are not faulty, that is, there is no circuit fault on the main board, the fault identification module outputs a second value.
[0044] The comparator includes two input terminals, a positive input terminal and an inverting input terminal. The function of the comparator is to compare the signals (such as voltage signals) of the two input terminals. When the signal of the positive input terminal is greater than the signal of the inverting input terminal, the internal triode of the comparator output port is cut off; when the signal of the positive input terminal is less than the signal of the inverting input terminal, the internal triode of the comparator output port is turned on. In this embodiment, the value of the first reference signal is between the first value and the second value. Therefore, the comparator can control the cut-off or conduction of the internal triode of the output port according to the magnitude relationship between the first reference signal and the second reference signal.
[0045] The fault signal pin F of the fault signal output module 300 outputs a corresponding high level or low level to the IO port of the MCU according to the state of the internal transistor of the output port of the comparator 100. For example, the fault signal pin F outputs a low level, indicating a fault. This can inform the MCU mainboard of a circuit fault, and the specific fault location can be determined through the specific fault identification pin.
[0046] When any one of the at least two fault identification pins detects a preset level, the fault protection can be triggered. The fault identification module outputs different signals to trigger the fault protection when there is a circuit fault on the mainboard and when there is no circuit fault on the mainboard.
[0047] This embodiment uses multiple fault identification pins to detect different circuit faults of the mainboard respectively, obtains a signal indicating fault or normality through a comparator, and then outputs it to an IO port of the MCU through a fault signal pin to trigger fault protection. The fault position can also be located through the fault identification pin, thereby realizing the detection of multiple faults by one IO port, simplifying the control logic and improving the reliability of the mainboard.
[0048] Optional, such as Figure 2As shown, the fault detection circuit may further include: a signal generating module for outputting a first reference signal. The signal generating module includes: a first resistor R1 and a second resistor R2. One end of the first resistor R1 is connected to a first power supply pin VCC1, and the other end is connected to a first input terminal X1 of the comparator 100 and grounded through the second resistor R2; the first power supply pin VCC1 is used to connect a power supply of the circuit to be detected (its value is recorded as VCC).
[0049] Wherein, the first resistor and the second resistor are both voltage-dividing resistors, so that the value of the first reference signal input to the first input terminal of the comparator is between the first value and the second value of the fault identification module. The first resistor and the second resistor need to meet the following conditions: when the circuit is working normally, R2×VCC / (R1+R2)<VCC. Preferably, the resistance value of the first resistor is equal to the resistance value of the second resistor.
[0050] In some embodiments, Figure 3 As shown, the two ends of the second resistor R2 can be connected in parallel with the first capacitor C1. The first capacitor C1 is used for filtering to improve anti-interference capability.
[0051] In some embodiments, the connection point between the first resistor R1 and the second resistor R2 can be connected to the first input terminal of the comparator 100 through the third resistor R3, and one end of the third resistor R3 connected to the first input terminal of the comparator 100 can be grounded through the second capacitor C2. RC filtering is implemented by the third resistor R3 and the second capacitor C2.
[0052] In another alternative embodiment, reference Figure 4 The signal generation module includes: a first resistor R1, a second resistor R2 and an operational amplifier U1. One end of the first resistor R1 is connected to a first power supply pin VCC1, and the other end is grounded through the second resistor R2; the first power supply pin VCC1 is used to connect the power supply of the circuit to be tested (its value is recorded as VCC). The inverting input terminal of the operational amplifier U1 is connected to the output terminal, and the non-inverting input terminal is connected to the connection point of the first resistor R1 and the second resistor R2; the output terminal of the operational amplifier is connected to the first input terminal of the comparator 100.
[0053] The operational amplifier can improve the anti-interference ability of the signal, so that the first reference signal can be accurately and interference-free input to the first input terminal of the comparator, so as to compare it with the second reference signal representing the fault, obtain a reliable comparison result, and then realize fault detection and protection, with a simple structure.
[0054] In some embodiments, the output terminal of the operational amplifier U1 can be connected to the first input terminal of the comparator 100 through the third resistor R3, and one end of the third resistor R3 connected to the first input terminal of the comparator 100 can be grounded through the second capacitor C2. RC filtering is achieved through the third resistor R3 and the second capacitor C2.
[0055] refer to Figure 2 The fault identification module 200 may include: a fourth resistor R4, a fifth resistor R5 and at least two diodes (D1 to DN). The number of diodes is equal to the number of fault identification pins, and they correspond one to one.
[0056] The cathodes of at least two diodes are connected to at least two fault identification pins, respectively, the anodes of at least two diodes are connected to one end of a fourth resistor R4, and the other end of the fourth resistor R4 is connected to a second power supply pin VCC2. The second power supply pin VCC2 is used to connect the power supply of the circuit to be tested. One end of the fourth resistor R4 connected to the anodes of the at least two diodes is also connected to the second input end of the comparator 100 and is grounded through a fifth resistor R5.
[0057] The fourth resistor and the fifth resistor are both voltage divider resistors. The fourth resistor and the fifth resistor need to meet the following conditions: when a fault occurs, R2×VCC / (R1+R2)>R5×VCC / (R4+R5). On the above basis, the design margin is considered to ensure reliable output of the comparator 100.
[0058] Specifically, the cathode of the diode is connected to the fault identification pin, and the anode of the diode is connected to the fourth resistor R4. When the mainboard is working normally, the fault identification pins Y1 to YN are all high level, and the corresponding diodes D1 to DN are in the cut-off state. VCC2 is divided by resistors R4 and R5 (the resistance of R5 is much larger than that of R4), and a high level VCC (i.e., the second value, for example, its value is VCC) is input to the second input terminal of the comparator. If the mainboard fails, assuming that the circuit corresponding to Y1 fails, Y1 outputs a low level, at which time the diode D1 is turned on, and VCC2 forms a loop through R4 and D1, and a low level VCC (i.e., the first value, that is, the output voltage of the fault identification module is lower than the minimum high level recognizable by the MCU, for example, 0.8V) is input to the second input terminal of the comparator.
[0059] Since the diode has a unidirectional conduction characteristic, the diode plays an isolating role between different fault identification pins (corresponding to fault identification signals), so that different fault identification signals will not affect each other.
[0060] In some embodiments, the fault identification module 200 may further include: a sixth resistor R6, one end of the sixth resistor R6 is connected to the connection point between the fourth resistor R4 and the fifth resistor R5, and the other end of the sixth resistor R6 is connected to the positive electrodes of the at least two diodes.
[0061] The sixth resistor R6 plays a role of current limiting to prevent the current passing through the diode from being too large. In practical applications, if the fourth resistor R4 can meet the current limiting requirement, the sixth resistor R6 does not need to be provided.
[0062] Optionally, the fault signal output module 300 includes: a pull-up resistor R7, one end of the pull-up resistor R7 is connected to a third power pin VCC3, and the third power pin VCC3 is used to connect to the power supply of the control chip (its value is recorded as VCC_MCU); the other end of the pull-up resistor R8 is connected to the fault signal pin F and is connected to the output end of the comparator 100.
[0063] If the internal transistor of the output port of the comparator 100 is turned off, the fault signal pin F obtains a high level through the VCC_MCU pull-up power supply. If the internal transistor of the output port of the comparator 100 is turned on, the VCC_MCU power supply is pulled down through the transistor. At this time, the voltage detected by the fault signal pin F is the conduction voltage drop of the internal transistor of the comparator, which is generally about 0.3V and can be considered as a low level.
[0064] In this embodiment, if the level output by the fault signal pin F indicates that there is a circuit fault in the mainboard, the MCU will cut off the control signal of the faulty circuit after receiving the level signal, so that the faulty circuit stops working and implements fault protection.
[0065] It should be noted that, in the embodiment of the present invention, the non-phase input terminal and the inverting input terminal of the comparator have different corresponding relationships with the first reference signal and the second reference signal, which will cause the fault signal output module to output different levels for the fault, that is, a high level indicates a fault, or a low level indicates a fault. The following is an example of inputting the second reference signal to the non-phase input terminal of the comparator and inputting the first reference signal to the inverting input terminal for explanation. The opposite situation will not be repeated.
[0066] like Figure 5 As shown, VCC1 and VCC2 are both connected to the power supply of the circuit to be tested, which is denoted as VCC. Assuming that R1=R2, VCC is divided by resistors R1 and R2, and the output of the operational amplifier U1 is VCC / 2.
[0067] When the mainboard works normally, the fault identification signals Y1, Y2, and Y3 are high level, and the corresponding diodes D1, D2, and D3 are in the cut-off state. VCC is divided by resistors R4 and R5 (the resistance of R5 is much larger than that of R4 in the selection), and a high level VCC (i.e., a value equal to the power supply VCC of the circuit to be tested) is output at the positive input terminal (+ terminal) of the comparator U2.
[0068] At this time, the internal transistor of the comparator U2 output port is cut off, and F obtains a high level through the VCC_MCU pull-up power supply.
[0069] When the mainboard fails, assuming that the circuit corresponding to Y1 fails, Y1 outputs a low level, and diode D1 is turned on. VCC forms a loop through R4 and D1, and a low level VCC (for example, 0.3V) is output at the + end of comparator U2. Diodes D1, D2, and D3 play an isolating role between different fault identification signals.
[0070] At this time, the internal transistor of the comparator U2 output port is turned on, the VCC_MCU pull-up power supply is pulled down, and F is detected as a low level, which is judged as a fault and protection is performed. In the event of a fault, any low level output of the fault identification signal Y1, Y2, or Y3 will trigger protection. There may also be multiple faults that occur simultaneously or at different times. At this time, the circuit that first fails will trigger F for protection.
[0071] An embodiment of the present invention also provides a device, which includes the above-mentioned fault detection circuit to implement mainboard fault detection and protection through an IO port, avoid excessive resource occupation, simplify the control logic, improve the reliability of the mainboard, and thus ensure the normal operation of the device using the mainboard.
[0072] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A fault detection circuit, characterized in that: include: Comparator, fault identification module and fault signal output module; The first input terminal of the comparator inputs a first reference signal, the second input terminal of the comparator is connected to the output terminal of the fault identification module, and the output terminal of the comparator is connected to the input terminal of the fault signal output module; The fault identification module comprises at least two fault identification pins, which are respectively connected to the fault detection points of at least two circuits to be detected in the mainboard, and the fault identification module is used to input a second reference signal to the second input terminal of the comparator according to the circuit fault condition; The fault signal pin of the fault signal output module is connected to an input IO port of the control chip, and the fault signal output module is used to output a first level through the fault signal pin when there is a circuit fault on the mainboard, and output a second level when there is no circuit fault on the mainboard; The fault identification module further includes: a fourth resistor, a fifth resistor and at least two diodes; The cathodes of the at least two diodes are connected to the at least two fault identification pins respectively, the anodes of the at least two diodes are connected to one end of the fourth resistor, and the other end of the fourth resistor is connected to the second power supply pin; The second power supply pin is used to connect the power supply of the circuit to be tested; One end of the fourth resistor connected to the anodes of the at least two diodes is also connected to the second input end of the comparator and is grounded through the fifth resistor.
2. The fault detection circuit according to claim 1, characterized in that: The fault detection circuit further includes: a signal generating module, configured to output the first reference signal; The signal generating module comprises: a first resistor and a second resistor; One end of the first resistor is connected to a first power supply pin, and the other end is connected to a first input terminal of the comparator and is grounded through the second resistor; The first power pin is used to connect the power supply of the circuit to be tested.
3. The fault detection circuit according to claim 2, characterized in that: The two ends of the second resistor are connected in parallel with a first capacitor.
4. The fault detection circuit according to claim 2, characterized in that: The signal generation module further includes: an operational amplifier, The inverting input terminal of the operational amplifier is connected to the output terminal, and the non-inverting input terminal is connected to the connection point between the first resistor and the second resistor; The output terminal of the operational amplifier is connected to the first input terminal of the comparator.
5. The fault detection circuit according to claim 2, characterized in that: A connection point between the first resistor and the second resistor is connected to a first input terminal of the comparator through a third resistor; One end of the third resistor connected to the first input end of the comparator is grounded through a second capacitor.
6. The fault detection circuit according to claim 4, characterized in that: The output terminal of the operational amplifier is connected to the first input terminal of the comparator through a third resistor; One end of the third resistor connected to the first input end of the comparator is grounded through a second capacitor.
7. The fault detection circuit according to claim 1, characterized in that: The fault identification module further includes: a sixth resistor, one end of which is connected to a connection point between the fourth resistor and the fifth resistor, and the other end of which is connected to anodes of the at least two diodes.
8. The fault detection circuit according to claim 1, characterized in that: The fault signal output module comprises: A pull-up resistor, one end of which is connected to a third power pin, and the third power pin is used to connect to a power supply of the control chip; The other end of the pull-up resistor is connected to the fault signal pin and to the output end of the comparator.
9. The fault detection circuit according to claim 1, characterized in that: The second reference signal has a first value or a second value, and the value of the first reference signal is greater than the first value and less than the second value.
10. A device, characterized in that: The method comprises the fault detection circuit according to any one of claims 1 to 9.
