A power failure protection circuit and its application

By designing power, detection and logic control circuits, controlling the conduction state of the thyristor circuit, the problem of automatic restart of household appliances after power outage is solved, and the safety and energy-saving effects of electrical appliances are achieved.

CN111884191BActive Publication Date: 2024-11-19SHAANXI UNIV OF SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010838444.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-08-19
Publication Date
2024-11-19
Estimated Expiration
2040-08-19

AI Technical Summary

Technical Problem

Existing household appliances automatically restart after a sudden power outage, which poses safety hazards and causes power waste to the lighting circuit. It is necessary to design a new circuit with power outage protection function.

Method used

Design a power outage protection circuit including power supply circuit, detection circuit and logic control circuit. By detecting the power grid and switching state with non-logic controller and delay circuit, the conduction state of the thyristor circuit is controlled to ensure that no power outage is performed after the power outage is not performed. Automatically restart, and the power supply will not be restored until the switch is turned off and closed.

Benefits of technology

It realizes that no automatic restart after power outage is achieved, which improves the safety and energy-saving effect of electrical appliances, avoids waste of electricity, and ensures that the circuit operates normally after power outage is restored.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111884191B_ABST
    Figure CN111884191B_ABST
Patent Text Reader

Abstract

The invention discloses a power failure protection circuit and its application, including a main circuit, a power supply circuit, a detection circuit and a logic control circuit, wherein the main circuit is a bidirectional thyristor switch circuit with a photoelectric isolator U4; the power supply circuit is a half-wave rectifier circuit; a switch SW1 is arranged between the power supply circuit and the detection circuit, the detection circuit includes a delay circuit and a switch state detection circuit, and can realize the state detection of the power grid and the switch SW1; the logic control circuit includes a non-AND logic controller U1, U2, and U3, which controls the level of the input pin 2 of U4, thereby controlling the voltage difference between the "1" and "2" pins of U4 to realize the control of the bidirectional thyristor. When the working circuit is running, the power is suddenly cut off, the power grid and the switch detection signals are abnormal, the circuit stops running, and the switch SW1 is not disconnected; after power-on, the power grid detection is normal, but it is detected that the switch is in a closed state, the logic control circuit will not output a trigger signal, start the main circuit, and the switch needs to be disconnected and then closed before it can run normally.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of power electronic protection, and in particular relates to a power failure protection circuit and application thereof. Background Art

[0002] Common household appliances such as electric stoves, electric lights, and power tools use ordinary on-off switches as the main components for connecting and closing the circuit. When the power is turned on again after a sudden power outage, the circuit will automatically restart. This poses a great safety hazard to electric stoves and power tools, and will cause a waste of electric energy for lighting circuits. Therefore, it is necessary to design a new circuit with power outage protection function. Summary of the invention

[0003] The purpose of the present invention is to provide a power failure protection circuit and its application, which solves the problem of automatic restart of the circuit after power failure.

[0004] The present invention is achieved through the following technical solutions:

[0005] A power failure protection circuit comprises a power supply circuit, a detection circuit, a logic control circuit and a main circuit;

[0006] Power circuits, used to convert alternating current into direct current;

[0007] A switch SW1 is provided between the power supply circuit and the detection circuit. The detection circuit includes a delay circuit and a switch state detection circuit. The delay circuit is used to detect the state of the power grid, and the switch state detection circuit is used to detect the state of the switch SW1.

[0008] The logic control circuit includes a NAND logic controller U1, a NAND logic controller U2 and a NAND logic controller U3, wherein the NAND logic controller U1 includes an input pin 1, an input pin 2 and an output pin 3, the NAND logic controller U2 includes an input pin 4, an input pin 5 and an output pin 6, and the NAND logic controller U3 includes an input pin 9, an input pin 10 and an output pin 11;

[0009] The switch SW1 is connected to the input pin 4 and the input pin 9 through the switch state detection circuit, the delay circuit is connected to the input pin 2, the output pin 3 is connected to the input pin 5, the input pin 1 is connected to the output pin 6, and the input pin 10 is connected to the output pin 6;

[0010] The main circuit is a bidirectional thyristor circuit with drive. One input end of the main circuit is connected to the output end of the power supply circuit, and the other input end is connected to the output pin 11 of the NAND logic controller U3. When the output pin 11 outputs a high level, the bidirectional thyristor circuit is not conducting; when the output pin 11 outputs a low level, the bidirectional thyristor circuit is conducting and is used to power the load.

[0011] Further, when the switch SW1 is in the open state, the switch state detection circuit outputs a low level, and the input pin 4 and the input pin 9 are at a low level; when the switch SW1 is in the closed state, the switch state detection circuit outputs a high level, and the input pin 4 and the input pin 9 are at a high level;

[0012] When the input end of the power supply circuit is not connected to the power grid, the input pin 2 is at a low level. When the input end of the power supply circuit is connected to the power grid, the input pin 2 is at a high level.

[0013] Further, the power supply circuit includes a diode D1, a resistor R1, a voltage stabilizing diode D2 and a capacitor C1, the diode D1, the resistor R1 and the capacitor C1 are connected in sequence, and the voltage stabilizing diode D2 is arranged in parallel with the capacitor C1;

[0014] The diode D1 is used to convert AC power into DC power, the resistor R1 and the internal resistance of the circuit itself form a voltage divider circuit, the capacitor C1 is used for filtering, and the voltage regulator diode D2 is used to protect the subsequent circuit.

[0015] Further, the main circuit includes a photoelectric isolator U4 and a bidirectional thyristor TRIAC1, an input pin 1 of the photoelectric isolator U4 is connected to the output end of the power supply circuit through a resistor R5, and an input pin 2 of the photoelectric isolator U4 is connected to an output pin 11 of the NAND logic controller U3;

[0016] The output pin 4 of the photoelectric isolator U4 is connected to one end of the bidirectional thyristor TRIAC1 through the resistor R7, and the output pin 6 of the photoelectric isolator U4 is connected to the other end of the bidirectional thyristor TRIAC1;

[0017] The resistor R5, the photoelectric isolator U4 and the resistor R7 form a driving circuit of the bidirectional thyristor TRIAC1.

[0018] Furthermore, the model of the bidirectional thyristor TRIAC1 is BAT06-600.

[0019] Furthermore, the delay circuit includes a resistor R4 and a capacitor C3, the input end of the resistor R4 is connected to the output end of the power circuit, the output end of the resistor R4 is respectively connected to one end of the capacitor C3 and the input pin 2 of U1, and the other end of the capacitor C3 is connected to the negative electrode of the power supply.

[0020] Further, the switch state detection circuit includes a diode D3, a resistor R3, a capacitor C2 and a resistor R6, the diode D3, the resistor R3 and the resistor R6 are connected in sequence, the resistor R6 is arranged in parallel with the capacitor C2, and the output end of the resistor R3 is connected to the input pin 4 of U2 and the input pin 9 of U3;

[0021] The diode D3 is used to convert the alternating current into direct current, the resistor R3 and the resistor R6 form a voltage divider circuit; the capacitor C2 is used for filtering to obtain a flat switching signal.

[0022] Furthermore, the NAND logic controller U1, the NAND logic controller U2 and the NAND logic controller U3 all use Schmitt NAND gates.

[0023] The present invention also discloses the application of the power failure protection circuit, wherein the switch SW1 is used as a control switch of an electrical appliance to control the on and off of the circuit of the electrical appliance.

[0024] Compared with the prior art, the present invention has the following beneficial technical effects:

[0025] The invention discloses a power failure protection circuit, including a main circuit, a power supply circuit, a detection circuit and a logic control circuit. The main circuit is a bidirectional thyristor circuit with a driver. The detection circuit includes a delay circuit and a switch state detection circuit, which can realize the state detection of the power grid and the switch SW1; the logic control circuit includes NAND logic controllers U1, U2 and U3, and its working mode is determined according to the high and low level signals of each pin of U1, U2 and U3. When the output pin 11 of U3 outputs a high level, the bidirectional thyristor is not turned on; when the output pin 11 of U3 outputs a low level, the bidirectional thyristor is turned on to supply power to the load. When the working circuit is running, there is a sudden power failure, the power grid and the switch detection signals are abnormal, the circuit stops running, and the switch SW1 is not disconnected; after power-on, the power grid detection is normal, but it is detected that the switch is in a closed state, the logic control circuit will not output a trigger signal, start the main circuit, and the switch needs to be opened and closed before it can run normally.

[0026] Furthermore, the main circuit includes a photoelectric isolator U4 and a bidirectional thyristor TRIAC1. One of the two input pins of the photoelectric isolator is connected to the power supply circuit, and the other is connected to the output pin of the NAND logic controller U3. The bidirectional thyristor is controlled by controlling the voltage difference between the two input pins of U4.

[0027] Furthermore, diode D1 converts AC power into DC power, and the grid voltage converts AC power into DC power through diode D1; since the amplitude of the grid voltage is relatively high after rectification, a voltage divider circuit is used to reduce the voltage. The voltage divider circuit is composed of resistor R1 and the internal resistance of the circuit itself. Resistor R1 and the internal resistance of the circuit itself are used to divide the voltage to obtain the required voltage level; the DC power after rectification is pulsating DC power, and the stable operation of the circuit requires DC power with smaller fluctuations. Capacitor C1 is a filtering circuit to reduce the pulsation of DC power; after filtering by capacitor C1, a flat DC power is obtained. In order to prevent sudden surges in the grid voltage, a voltage regulator diode D2 is used to protect the subsequent circuit, so that the subsequent circuit can be protected in the event of an instantaneous overvoltage in the circuit. The voltage regulator diode D2 is an overvoltage protection to prevent grid surges.

[0028] The invention also discloses the application of the power failure protection circuit, which can realize the safety, stability and energy saving of household appliances or circuits. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] Figure 1 The present invention is a schematic diagram of the circuit structure of the power failure protection circuit. DETAILED DESCRIPTION

[0030] The present invention is further described in detail below in conjunction with specific embodiments, which are intended to explain the present invention rather than to limit it.

[0031] like Figure 1 As shown, a power failure protection circuit disclosed in the present invention includes a main circuit, a power supply circuit, a detection circuit and a logic control circuit. The main circuit is a bidirectional thyristor circuit with a driver; the power supply circuit is a half-wave rectifier circuit for converting AC power into DC power; a switch SW1 is provided between the power supply circuit and the detection circuit, the detection circuit includes a delay circuit and a switch state detection circuit, the delay circuit is used to detect the state of the power grid, and the switch state detection circuit is used to detect the state of the switch SW1; the logic control circuit includes three NAND logic controllers, and the "2" pin level of the photoelectric isolator U4 is controlled by connecting the three NAND logic controllers, thereby controlling the voltage difference between the "1" and "2" pins of U4 to achieve control of the bidirectional thyristor.

[0032] The main circuit includes a photoelectric isolator U4 and a bidirectional thyristor TRIAC1. The input pin 1 of the photoelectric isolator U4 is connected to the power circuit, the input pin 2 of the photoelectric isolator U4 is connected to the output pin 11 of the non-AND logic controller U3, and the output pin of the photoelectric isolator U4 is connected to the bidirectional thyristor TRIAC1. The photoelectric isolator U4 is used as a driving device. The "2" pin level of the photoelectric isolator U4 is controlled through three connections with the non-AND logic controller, thereby controlling the voltage difference between the "1" and "2" pins of U4 to achieve control of the bidirectional thyristor.

[0033] Specifically, the logic control circuit includes a NAND logic controller U1, a NAND logic controller U2 and a NAND logic controller U3. The NAND logic controller U1 includes an input pin 1, an input pin 2 and an output pin 3. The NAND logic controller U2 includes an input pin 4, an input pin 5 and an output pin 6. The NAND logic controller U3 includes an input pin 9, an input pin 10 and an output pin 11.

[0034] Specifically, the power supply circuit includes a diode D1, a resistor R1, a Zener diode D2 and a capacitor C1. The diode D1, the resistor R1 and the capacitor C1 are connected in sequence, and the Zener diode D2 is arranged in parallel with the capacitor C1. The circuit requires a DC power supply to work, so an AC-DC conversion circuit is formed by the diode D1, the resistor R1, the Zener diode D2 and the capacitor C1 to provide a DC power supply for the system. The rectifier part of the power supply circuit uses the simplest half-wave rectifier circuit, in which diode D1 converts AC power into DC power, and the grid voltage converts AC power into DC power through diode D1; since the amplitude of the grid voltage is high after rectification, a voltage divider circuit is used to reduce the voltage. The voltage divider circuit is composed of resistor R1 and the internal resistance of the circuit itself. Resistor R1 and the internal resistance of the circuit itself are used to divide the voltage to obtain the required voltage level; the DC power after rectification is pulsating DC power, and the stable operation of the circuit requires DC power with smaller fluctuations. Capacitor C1 is a filtering circuit to reduce the pulsation of DC power; after filtering by capacitor C1, a flat DC power is obtained. In order to prevent sudden surges in the grid voltage, a voltage regulator diode D2 is used to protect the subsequent circuit, so that the subsequent circuit can be protected in the event of instantaneous overvoltage in the circuit. The voltage regulator diode D2 is an overvoltage protection to prevent grid surges.

[0035] like Figure 1 As shown, the delay circuit composed of resistor R4 and capacitor C3, the input end of resistor R4 is connected to the output end of resistor R1, the output end of resistor R4 is respectively connected to one end of capacitor C3 and input pin 2 of U1, and the other end of capacitor C3 is connected to the negative electrode of the power supply. After the AC input end is connected to the power grid, the DC power supply outputs a stable DC power supply, which can provide a DC power supply for the system, and because the DC power supply is not controlled by the switch SW1, as long as the power failure protection circuit is connected to the mains, it can work. Therefore, the delay circuit composed of resistor R4 and capacitor C3 detects the output of the DC power supply to determine the working state of the power grid (normal power supply or power failure state). When the power grid is normally powered, after the delay circuit composed of resistor R4 and capacitor C3 completes charging, the input pin 2 of U1 will be at a high level, otherwise when the power grid is out of power, the input pin 2 of U1 will be at a low level.

[0036] The switch state detection circuit composed of diode D3, resistor R3, capacitor C2 and resistor R6 will output a low level when switch SW1 is in the open state, that is, input pin 4 of U2 will be in a low level. When SW1 is in the closed state, the switch state detection circuit will output a high level, that is, input pin 4 of U2 will be in a high level.

[0037] Similar to the power supply circuit, the switch state detection circuit composed of diode D3, resistor R3, capacitor C2, and resistor R6 uses a half-wave rectifier circuit to convert AC into DC. The main part is diode D3, and a voltage divider circuit is used to reduce the voltage level. The voltage divider circuit is composed of resistor R3 and the equivalent resistor R6 of the pin. In order to reduce the voltage fluctuation, capacitor C2 is used for filtering to obtain a relatively flat switch signal. When switch SW1 is in the open state, the switch state detection circuit will output a low level, that is, the input pin 4 of U2 will be at a low level. When SW1 is in the closed state, the switch state detection circuit will output a high level, that is, the input pin 4 of U2 will be at a high level.

[0038] Resistor R5, opto-isolator U4, and resistor R7 form a bidirectional thyristor drive circuit. Input pin 1 of U4 is connected to resistor R1 through resistor R5, output pin 4 of U4 is connected to one end of bidirectional thyristor TRIAC1 through resistor R7, and output pin 6 of U4 is connected to the other end of bidirectional thyristor TRIAC1; input pin 2 of U4 is connected to output pin 11 of U3, and output pin 6 of U4 is connected to pin 3 of bidirectional thyristor. One end of resistor R7 is connected to pin 2 of bidirectional thyristor, and the other end is connected to output pin 4 of U4.

[0039] When the pin 2 of U4 is at a high level, the light-emitting diode in U4 is not turned on, and the controlled diode connected to the pin 6 and pin 4 of U4 is not turned on, and the bidirectional thyristor TRIAC1 cannot be triggered to turn on. On the contrary, if the pin 2 of U4 is at a low level, the bidirectional thyristor TRIAC1 will turn on. R7 is a current-limiting resistor to prevent excessive conduction current when the controlled diode inside U4 is turned on. The pin 3 of the bidirectional thyristor TRIAC1 is the gate of the bidirectional thyristor. As long as the pin 2 of U4 is at a low level, the pin 3 of the bidirectional thyristor TRIAC1 will have a trigger signal, and the pins 1 and 2 of the bidirectional thyristor TRIAC1 are turned on. If the pin 2 of U4 is at a high level, the pin 3 of the bidirectional thyristor TRIAC1 has no trigger signal, and the pins 1 and 2 of the bidirectional thyristor are disconnected.

[0040] U1, U2, and U3 form the logic control circuit of the power failure protection circuit. The power supply status of the grid is judged by the high and low level status of the 2nd pin of U1; the switch status of the switch SW1 is judged by judging the high and low level status of the 4th pin of U2.

[0041] Assume that 1 represents a high level and 0 represents a low level. There are the following working modes. Tables 1 to 7 show the levels of each pin of circuit U1, U2, U3 and U4 in each working state.

[0042] Mode I: When the input end of the power failure protection circuit is connected to the power grid, and the switch SW1 is in the off state. At this time, since the resistor R4 and the capacitor C3 form a delay circuit, before the voltage of the capacitor C3 reaches the threshold voltage of U1, the pin 2 of U1 is at a low level. At the same time, since the switch SW1 is in the off state, the pin 4 of U2 is also at a low level. Therefore, the pin 3 of U1 and the pin 6 of U2 both output a high level, the pin 1 of U1 is connected to the pin 6 of U2, and the pin 1 of U1 is also at a high level. Since the pin 9 of U3 is connected to the pin 4 of U2, the pin 11 of U3 also outputs a high level. Therefore, the pin 2 of U4 is at a high level, the light-emitting diode inside U4 cannot be turned on, the bidirectional thyristor TRIAC1 is in the off state, and cannot power the load. The truth table of the pins of U1, U2, and U3 is shown in Table 1.

[0043] Table 1 Truth table of U1, U2, and U3 pins in mode I

[0044]

[0045] Mode II: When the input end of the power failure protection circuit is connected to the power grid, and the switch SW1 is still in the off state. At this time, the delay circuit composed of the resistor R4 and the capacitor C3 has completed the charging process, that is, the voltage on the capacitor C3 has reached the threshold voltage of U1, and the 2nd pin of U1 is at a high level. Since the 1st pin of U1 is also at a level at this time, the 3rd pin of U1 outputs a low level at this time. Since the 5th pin of U2 is connected to the 3rd pin of U1, the 5th pin of U2 is also at a low level; since the switch SW1 is still in the off state, the 4th pin of U2 is still at a low level, so the 6th pin of U2 still outputs a high level. At the same time, the level states of the 9th and 10th pins of U3 remain unchanged, so the 11th pin of U3 still outputs a high level, and the internal light-emitting diode of U4 is disconnected. At this time, the truth table of the U1, U2, and U3 pins is shown in Table 2.

[0046] Table 2 Mode II U1, U2, U3 pin truth table

[0047]

[0048] Mode III: In the state of mode II, switch SW1 is closed. The switch state detection circuit composed of diode D3, resistor R3, capacitor C2, and resistor R6 outputs a high level. At this time, pin 4 of U2 and pin 9 of U3 are converted from low level to high level. The state of U1 remains unchanged, and pin 5 of U2 is still at a low level, so pin 6 of U2 still outputs a high level, so pin 10 of U3 is still at a high level, so pin 11 of U3 outputs a low level. The internal light-emitting diode of U4 is turned on, triggering the bidirectional thyristor TRIAC1 to turn on, and supplying power to the electrical load connected to the output end. At this time, the truth table of the pins of U1, U2, and U3 is shown in Table 3.

[0049] Table 3 Mode III U1, U2, U3 pin truth table

[0050]

[0051]

[0052] Mode IV: When the grid supplies power normally, the switch SW1 is disconnected, and the pin states of U1, U2, and U3 are restored to the pin states in Mode II, see Table 4, and the bidirectional thyristor TRIAC1 is turned off.

[0053] Table 4 Mode IV U1, U2, U3 pin truth table

[0054]

[0055] V: In the state of mode III, the power grid suddenly loses power, and the switch SW1 is still in the closed state. After a period of time, the power grid resumes power supply. Due to the existence of the delay circuit in the power grid status detection circuit, before the capacitor C3 reaches the threshold voltage of U1, the 2nd pin of U1 still maintains a low level, so the 3rd pin of U1 outputs a high level. Since the switch detection circuit outputs a high level, the 4th pin of U2 is a high level. At the same time, the 5th pin of U2 is connected to the 3rd pin of U1 and is also at a high level, so the 6th pin of U2 outputs a low level. Therefore, the 10th pin of U3 is a low level, the 11th pin of U3 outputs a high level, the light-emitting diode in U4 is not turned on, and U4 does not send a trigger signal, so the bidirectional thyristor TRIAC1 is not turned on. Therefore, even if the switch SW1 is in the closed state, it will not supply power to the electrical load. At this time, the truth table of the pins of U1, U2, and U3 is shown in Table 5.

[0056] Table 5 Modal V U1, U2, U3 pin truth table

[0057]

[0058] Mode VI: After capacitor C3 is charged for a period of time, when the voltage of capacitor C3 reaches the threshold voltage of U1, the 2nd pin of U1 changes from low level to high level. At this time, since the 1st pin of U1 is still at a low level, the levels of U2 and U3 pins do not change, so the output of U13 pin is still high level, U4 is not turned on, and the bidirectional thyristor TRIAC1 is still turned off. At this time, the truth table of U1, U2, and U3 pins is shown in Table 6.

[0059] Table 6 Modal VI U1, U2, U3 pin truth table

[0060]

[0061] Mode VII: In the state of VI, switch SW1 is disconnected, and pin 4 of U2 changes from high level to low level, so pin 6 of U2 outputs high level, pin 9 of U3 changes from high level to low level, and pin 10 of U3 changes from low level to high level, so pin 11 of U3 still outputs high level, and bidirectional thyristor TRIAC1 is turned off. At the same time, pin 1 of U1 changes from low level to high level, and pin 2 of U1 is still high level, so pin 3 of U1 outputs low level, and pin 5 of U2 also changes from high level to low level. At this time, the truth table of pins U1, U2, and U3 is shown in Table 7.

[0062] Table 7 Mode VII U1, U2, U3 pin truth table

[0063]

[0064] It can be seen from Table 7 and Table 2 that state VII has the same logic state as state II. Therefore, when the switch SW1 is closed again, the logic state of the power failure protection circuit will be in state III.

[0065] From the above analysis, we can see that Figure 1 The power failure protection circuit shown has the function of restoring power supply when power is interrupted. Even if the switch or power socket switch is in the closed state, the power supply can be cut off and the power supply is not supplied to the corresponding electrical appliances. The power supply is restored only after the switch is operated again.

[0066] The parameters of the circuit components of the present invention are shown in Table 8:

[0067] Table 8 Circuit component parameters and models

[0068]

Claims

1. A power failure protection circuit, characterized in that: Including power supply circuit, detection circuit, logic control circuit and main circuit; Power circuits, used to convert alternating current into direct current; A switch SW1 is provided between the power supply circuit and the detection circuit. The detection circuit includes a delay circuit and a switch state detection circuit. The delay circuit is used to detect the state of the power grid, and the switch state detection circuit is used to detect the state of the switch SW1. The logic control circuit includes a NAND logic controller U1, a NAND logic controller U2 and a NAND logic controller U3, wherein the NAND logic controller U1 includes an input pin 1, an input pin 2 and an output pin 3, the NAND logic controller U2 includes an input pin 4, an input pin 5 and an output pin 6, and the NAND logic controller U3 includes an input pin 9, an input pin 10 and an output pin 11; The switch SW1 is connected to the input pin 4 and the input pin 9 through the switch state detection circuit, the delay circuit is connected to the input pin 2, the output pin 3 is connected to the input pin 5, the input pin 1 is connected to the output pin 6, and the input pin 10 is connected to the output pin 6; The main circuit is a bidirectional thyristor circuit with a driver. One input end of the main circuit is connected to the output end of the power supply circuit, and the other input end is connected to the output pin 11 of the NAND logic controller U3. When the output pin 11 outputs a high level, the bidirectional thyristor circuit is not turned on; when the output pin 11 outputs a low level, the bidirectional thyristor circuit is turned on to supply power to the load. The power supply circuit includes a diode D1, a resistor R1, a voltage-stabilizing diode D2 and a capacitor C1. The diode D1, the resistor R1 and the capacitor C1 are connected in sequence, and the voltage-stabilizing diode D2 is arranged in parallel with the capacitor C1. The diode D1 is used to convert alternating current into direct current, the resistor R1 and the internal resistance of the circuit itself form a voltage-dividing circuit, the capacitor C1 is used for filtering, and the voltage-stabilizing diode D2 is used to protect the subsequent circuit. The main circuit includes a photoelectric isolator U4 and a bidirectional thyristor TRIAC1. The input pin 1 of the photoelectric isolator U4 is connected to the output end of the power supply circuit through a resistor R5, and the input pin 2 of the photoelectric isolator U4 is connected to the output pin 11 of the NAND logic controller U3; the output pin 4 of the photoelectric isolator U4 is connected to one end of the bidirectional thyristor TRIAC1 through a resistor R7, and the output pin 6 of the photoelectric isolator U4 is connected to the other end of the bidirectional thyristor TRIAC1; the resistor R5, the photoelectric isolator U4 and the resistor R7 constitute a driving circuit of the bidirectional thyristor TRIAC1; The delay circuit includes a resistor R4 and a capacitor C3, the input end of the resistor R4 is connected to the output end of the power supply circuit, the output end of the resistor R4 is connected to one end of the capacitor C3 and the input pin 2 of U1 respectively, and the other end of the capacitor C3 is connected to the negative electrode of the power supply; The switch state detection circuit includes a diode D3, a resistor R3, a capacitor C2 and a resistor R6, wherein the diode D3, the resistor R3 and the resistor R6 are connected in sequence, the resistor R6 is arranged in parallel with the capacitor C2, and the output end of the resistor R3 is connected to the input pin 4 of U2 and the input pin 9 of U3; The diode D3 is used to convert the alternating current into direct current, the resistor R3 and the resistor R6 form a voltage divider circuit; the capacitor C2 is used for filtering to obtain a flat switching signal.

2. The power failure protection circuit according to claim 1, characterized in that: When the switch SW1 is in the open state, the switch state detection circuit outputs a low level, and the input pin 4 and the input pin 9 are at a low level; when the switch SW1 is in the closed state, the switch state detection circuit outputs a high level, and the input pin 4 and the input pin 9 are at a high level; When the input end of the power supply circuit is not connected to the power grid, the input pin 2 is at a low level. When the input end of the power supply circuit is connected to the power grid, the input pin 2 is at a high level.

3. The power failure protection circuit according to claim 1, characterized in that: The model of bidirectional thyristor TRIAC1 is BAT06-600.

4. The power failure protection circuit according to claim 1, characterized in that: The NAND logic controller U1, the NAND logic controller U2 and the NAND logic controller U3 all use Schmitt NAND gates.

5. Application of the power failure protection circuit according to any one of claims 1 to 4, characterized in that: The switch SW1 is used as a control switch of the electrical appliance to control the on and off of the circuit of the electrical appliance.