Background
Embedded systems such as digital images, IT devices, instrument products, and vehicle-mounted electronic systems generally require multiple power supplies or multiple power modules, and therefore, the output of each power supply or power module needs to be monitored and diagnosed to prevent other components from working abnormally due to power supply or power module failure.
The PGOOD signal is a power supply normal indication signal, and a general power supply module or a control chip is provided with a PGOOD output port, where when an output voltage of the power supply module or the control chip is normal, the PGOOD output port outputs a high level, and if the output voltage is abnormal, the PGOOD output port outputs a low level.
In an application system, a PGOOD signal is very important, a certain time is required from power on to power output of a stable voltage, in order to avoid damage to a circuit by abnormal voltage, the power supply will first check whether the output voltage is normal, if so, the PGOOD output port outputs a high level, and the application system can control to start a core component or other modules, otherwise, the system is not started and is in a shutdown protection state.
The PGOOD output port is generally connected with a GPIO port of a main control chip of the application system through a pull-up resistor, and when the PGOOD outputs a low level, the main control chip can know that the power supply is abnormal; if the power that application system needs to detect includes the multiunit, the GPIO port that means the main control chip is occupied includes a plurality ofly, appears the condition that the main control chip port can't satisfy the user demand easily, directly influences the model selection of product design or main control chip, indirectly influences the cost of manufacture of product.
It is seen that improvements and enhancements to the prior art are needed.
Disclosure of Invention
In view of the foregoing disadvantages of the prior art, an object of the present invention is to provide a power supply abnormality detection circuit, in which a control chip detects a voltage at an AD port to determine whether there is an abnormality in a first power supply, a second power supply, and a third power supply, so as to improve the stability of an application system during operation.
In order to achieve the purpose, the invention adopts the following technical scheme:
a power supply abnormity detection circuit comprises a first power supply, a second power supply, a third power supply, a pull-up part, a first pull-down part, a second pull-down part, a third pull-down part and a control chip; one end of the pull-up part is connected with a power supply port of the control chip, the other end of the pull-up part is respectively connected with an AD port of the control chip and one end of the first pull-down part, the other end of the first pull-down part is respectively connected with a PG port of the first power supply and one end of the second pull-down part, the other end of the second pull-down part is respectively connected with a PG port of the second power supply and one end of the third pull-down part, and the other end of the third pull-down part is connected with a PG port of the third power supply; the AD port of the control chip is used for receiving a signal fed back by the PG port of the first power supply, a signal fed back by the PG port of the second power supply and a signal fed back by the PG port of the third power supply, and the control chip is used for judging the working states of the first power supply, the second power supply and the third power supply.
In the power supply abnormality detection circuit, the pull-up portion includes a first resistor R1, one end of the first resistor R1 is connected to a power supply port of the control chip, and the other end of the first resistor R1 is connected to an AD port of the control chip and one end of the first pull-down portion, respectively.
In the power supply abnormality detection circuit, the first pull-down unit includes a second resistor R2, one end of the second resistor R2 is connected to the other end of the first pull-up unit and the AD port of the control chip, and the other end of the second resistor R2 is connected to the PG port of the first power supply and one end of the second pull-down unit.
In the power supply abnormality detection circuit, the second pull-down part includes a third resistor R3, one end of the third resistor R3 is connected to the other end of the second pull-down part, and the other end of the third resistor R3 is connected to the PG port of the second power supply and one end of the third pull-down part, respectively.
In the power supply abnormality detection circuit, the third pull-down unit includes a fourth resistor R4, one end of the fourth resistor R4 is connected to the other end of the second pull-down unit, and the other end of the fourth resistor R4 is connected to the PG port of the third power supply.
The invention also correspondingly provides a PCB board, and the PCB board is printed with the power supply abnormity detection circuit.
The invention also correspondingly provides a power supply abnormity detection method, which is used for realizing the power supply abnormity detection of the power supply abnormity detection circuit; the power supply abnormality detection method includes the steps of:
the control chip acquires a voltage value U1 of the AD port;
if the voltage value U1 of the AD port and the voltage V output by the power supply port of the control chipCCIf the power supply is consistent with the power supply, the control chip determines that all the power supplies are normal and starts other components or other modules of the application system according to a preset sequence;
if the voltage value of the AD port
The control chip identifies the first power supply abnormality and outputs a control instruction of the first power supply abnormality;
if the voltage value of the AD port
The control chip identifies the second power supply abnormality and outputs a control instruction of the second power supply abnormality.
If the voltage value of the AD port
The control chip identifies the third power supply abnormality and outputs a control instruction of the third power supply abnormality.
Has the advantages that:
the invention provides a power supply abnormity detection circuit, through a specific voltage dividing resistor design, a control chip can judge whether a fault power supply exists in a first power supply, a second power supply and a third power supply according to the voltage value detected by an AD port, if the fault power supply exists, the control chip can close the fault power supply or does not open other components or modules of an application system, the circuit is prevented from being damaged by abnormal voltage, and the stability and the reliability of the application system during working are improved.
Detailed Description
The invention provides a power supply abnormality detection circuit, a PCB and a detection method, and in order to make the purpose, technical scheme and effect of the invention clearer and clearer, the invention is further described in detail below by referring to the attached drawings and embodiments.
In the description of the present invention, it is to be understood that the terms "mounted," "connected," and the like are to be interpreted broadly, and those skilled in the art can understand the specific meanings of the above terms in the present invention according to specific situations.
The power supply abnormity detection circuit is used for an application system which needs a plurality of groups of power supplies or a plurality of groups of power supply modules to provide working voltage, the control chip is a main control chip of the application system and can control other components or other modules of the application system to work, and the first power supply, the second power supply and the third power supply can be power supply sources or power supply modules.
Referring to fig. 1, the present application discloses a power supply abnormality detection circuit, which includes a first power supply, a second power supply, a third power supply, a pull-up portion 1, a first pull-down portion 2, a second pull-down portion 3, a third pull-down portion 4, and a control chip; one end of the pull-up part 1 is connected with a power supply port of a control chip, the other end of the pull-up part 1 is respectively connected with an AD port of the control chip and one end of the first pull-down part 2, the other end of the first pull-down part 2 is respectively connected with a PG port of a first power supply and one end of the second pull-down part 3, the other end of the second pull-down part 3 is respectively connected with a PG port of a second power supply and one end of the third pull-down part 4, and the other end of the third pull-down part 4 is connected with a PG port of a third power supply; the AD port of the control chip is used for receiving a signal fed back by the PG port of the first power supply, a signal fed back by the PG port of the second power supply and a signal fed back by the PG port of the third power supply, and the control chip is used for judging the working states of the first power supply, the second power supply and the third power supply; in one embodiment, the control chip is an MCU micro control unit.
The power supply abnormity detection circuit disclosed by the application comprises a first pull-down part 2, a second pull-down part 3, a third pull-down part 4 and a pull-up part 1 which are connected in series, wherein the first power supply, the second power supply and the third power supply share one pull-up circuit; the AD port of the control chip can receive a signal fed back by the PG port of the first power supply, a signal fed back by the PG port of the second power supply and a signal fed back by the PG port of the third power supply; when the first power supply, the second power supply and the third power supply are in a normal working state, the PG ports corresponding to the power supplies are in a high-resistance state, the current consumption of the pull-up circuit is low, the influence of the pull-up circuit on the voltage of the AD ports can be ignored, and the voltage of the AD ports is consistent with the voltage of the power supply port of the control chip; when the first power supply, the second power supply or the third power supply is abnormal, the PG port of the fault power supply outputs low level, the pull-down part corresponding to the fault power supply and the pull-up part 1 divide the voltage, and the voltage value of the AD port of the control chip is changed, namely the control chip can judge whether the first power supply, the second power supply and the third power supply are abnormal or not according to the voltage value of the AD port; the abnormal detection of a plurality of power supplies can be realized by adopting one AD port of the control chip, so that the port occupation amount of the control chip is reduced, the use flexibility of the control chip is improved, and the manufacturing cost of an application system is indirectly reduced.
In addition, the voltage value of the AD port may reflect which power supply is abnormal, and in the power supply abnormality detection circuit, the resistance value of the pull-up
portion 1 is R1, the resistance value of the first pull-down
portion 2 is R2, the resistance value of the second pull-down
portion 3 is R3, the voltage of the AD port is U1, and the voltage output by the power supply port is V1
CCWhen the first power supply is abnormal, the voltage value of the AD port
When the second power supply is abnormal, the voltage value of the AD port
When the third power supply is abnormal, the voltage value of the AD port
According to the specific value of the voltage of the AD port, the fact that the first power supply is abnormal or the second power supply is abnormal or the third power supply is abnormal is judged, the control chip can close the power supply with the abnormal fault or does not open other modules or components of the application system, the circuit is prevented from being damaged by the abnormal voltage, and the stability and the reliability of the application system during working are improved.
Further, referring to fig. 1, the pull-up unit 1 includes a first resistor R1, one end of the first resistor R1 is connected to the power supply port of the control chip, and the other end of the first resistor R1 is connected to the AD port of the control chip and one end of the first pull-down unit 2, respectively.
Further, referring to fig. 1, the first pull-down unit 2 includes a second resistor R2, one end of the second resistor R2 is connected to the other end of the first pull-up unit 1 and the AD port of the control chip, and the other end of the second resistor R2 is connected to the PG port of the first power supply and one end of the second pull-down unit 3.
Further, referring to fig. 1, the second pull-down unit 3 includes a third resistor R3, one end of the third resistor R3 is connected to the other end of the second pull-down unit 3, and the other end of the third resistor R3 is connected to the PG port of the second power supply and one end of the third pull-down unit 4, respectively.
Further, referring to fig. 1, the third pull-down part 4 includes a fourth resistor R4, one end of the fourth resistor R4 is connected to the other end of the second pull-down part 3, and the other end of the fourth resistor R4 is connected to the PG port of the third power supply.
In the actual working process of the power supply abnormality detection circuit, according to the same rule, the AD port of the control chip can be respectively connected with the PG ports of a plurality of power supplies through voltage dividing resistors, the PG port of each power supply is externally connected with a pull-down part, the pull-down parts are connected in series, and the AD port of the control chip is connected and then connected with the pull-up part 1 in series, so that each power supply shares one pull-up circuit; by obtaining the voltage value of the AD port of the control chip, whether the power supply is abnormal or not can be judged, and specifically which power supply is abnormal can be judged, the control chip can close the power supply with abnormal fault, so that an abnormal voltage loss circuit is avoided, and the stability and the reliability of an application system during working are improved.
In the actual working process of the power supply abnormality detection circuit, when the voltage of the AD port of the control chip is inconsistent with the voltage of the power supply port of the control chip, if the voltage value of the AD port of the control chip is larger, the longer the distance between the power supply with the abnormal fault and the pull-up part 1 is, the power supply can be sorted according to the priority level of the power supply, and the main power supply is preferentially detected.
In one embodiment, the size of the second resistor R2 is 0 Ω, and when the first power supply fails, the voltage value of the AD port of the control chip is 0V, which is suitable for detecting the abnormality of different power supplies related above and below; for example, if the second power supply and the third power supply are both generated by the first power supply, when the voltage of the AD port is 0V, it indicates that the first power supply, the second power supply, and the third power supply all have a fault abnormality, and it is not necessary to perform state judgment on the second power supply and the third power supply, so that the abnormality detection efficiency is improved.
The invention also correspondingly provides a PCB board, and the PCB board is printed with the power supply abnormity detection circuit.
Referring to fig. 2, the present invention further provides a power supply abnormality detection method, which is used to implement the power supply abnormality detection of the power supply abnormality detection circuit described above; the power supply abnormality detection method includes the steps of:
s100, the control chip obtains a voltage value U1 of the AD port;
s200, if the voltage value U1 of the AD port and the voltage V output by the power supply port of the control chipCCControl and agreeThe chip manufacturing determines that all power supplies are normal and starts other components or other modules of the application system according to a preset sequence;
s300, if the voltage value of the AD port
The control chip identifies the first power supply abnormality and outputs a control instruction of the first power supply abnormality;
s400, if the voltage value of the AD port
The control chip identifies the second power supply abnormality and outputs a control instruction of the second power supply abnormality.
S500, if the voltage value of the AD port
The control chip identifies the third power supply abnormality and outputs a control instruction of the third power supply abnormality.
In the actual use process, the fault voltage value corresponding to each power supply when abnormal occurs can be input into the control chip in advance through a programming mode.
According to the power supply abnormity detection method, the voltage value of the AD port of the control chip is obtained, whether the detected power supply is abnormal or not can be judged, and which power supply is abnormal can be judged, the control chip can close the power supply with abnormal fault, the circuit is prevented from being damaged by abnormal voltage, and the stability and the reliability of an application system during working are improved.
It should be understood that equivalents and modifications of the technical solution and inventive concept thereof may occur to those skilled in the art, and all such modifications and alterations should fall within the protective scope of the present invention.