Power-off protection method and circuit for single-chip microcomputer system
By designing a power-off protection method for microcontroller systems using the first and second power supply, the operational abnormalities and data loss of microcontrollers during power supply are solved when the power supply is unstable or powered off, and the stable operation of the system and safe storage of data are achieved.
Patent Information
- Application Number
- CN202411925899.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-25
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2044-12-25
AI Technical Summary
When the power supply voltage of the microcontroller is unstable or suddenly powered off, it may lead to abnormal operating status or data loss. It is necessary to design a power outage protection circuit to prevent misoperation and data damage.
A method for power-off protection of single-chip computer systems is designed, power-off is provided by using the first power supply and the second power supply. By detecting the current power supply and output voltage in real time, it is determined whether it is less than the preset threshold voltage, and switching or power supply is performed uninterrupted to ensure the stable operation of the system.
It effectively avoids erroneous operations and data damage caused by unstable power supply, ensures that the microcontroller system can switch back-up power supply in time when the power supply is insufficient, save data and shut down normally, and prevent hardware damage and data loss.
Smart Images

Figure CN119882973A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of single-chip microcomputers, and in particular to a power-off protection method and circuit for a single-chip microcomputer system. Background Art
[0002] When the power supply voltage of the MCU is unstable or suddenly powered off, if no protective measures are taken, the running state of the MCU may be affected, resulting in abnormal program operation or data loss. For example, if the power supply voltage suddenly drops to a certain level, the output of the MCU may be abnormal, resulting in misoperation or data damage. In order to solve this problem, it is necessary to design a power-off protection circuit to prevent misoperation and data damage. Summary of the invention
[0003] The present invention provides a single chip computer system power failure protection method and circuit to solve at least one of the above technical problems.
[0004] The technical solution of the present invention to solve the above technical problem is as follows: a power-off protection method for a single-chip microcomputer system, using a first power supply and a second power supply to power the single-chip microcomputer system; wherein the default power supply of the single-chip microcomputer system is the first power supply; the power-off protection method for the single-chip microcomputer system comprises:
[0005] S1, real-time detection of the current power supply of the single-chip computer system; and real-time detection of the output voltage of the first power supply to obtain the current detection voltage, and determine whether the current detection voltage is less than a preset threshold voltage; then execute S2;
[0006] S2, if the current power supply is the first power supply and the current detection voltage is not less than the preset threshold voltage, then keep the first power supply supplying power and return to S1;
[0007] If the current power supply is the first power supply, and the current detection voltage is less than the preset threshold voltage, the second power supply is switched to supply power without interruption, and the process returns to S1;
[0008] If the current power supply is the second power supply, and the current detection voltage is not less than the preset threshold voltage, the first power supply is switched to supply power without interruption, and the process returns to S1;
[0009] If the current power supply is the second power supply, and the current detection voltage is less than the preset threshold voltage, execute S3;
[0010] S3, determining whether the power supply duration of the second power supply exceeds a preset duration, and then executing S4;
[0011] S4, if the power supply duration exceeds the preset duration, controlling the single-chip microcomputer system to sequentially save the current running data, exit the current running program, and shut down, and then cut off the second power supply;
[0012] If the power supply duration does not exceed the preset duration, the process returns to S1.
[0013] Based on the above technical solution, the present invention can also be improved as follows.
[0014] Furthermore, when the current power supply is the first power supply, the method further includes: controlling the first power supply to charge the second power supply.
[0015] Based on the above-mentioned single-chip computer system power-off protection method, the present invention also provides a single-chip computer system power-off protection circuit.
[0016] A single-chip computer system power-off protection circuit, applied to the single-chip computer system power-off protection method as described above, comprises:
[0017] A power switching circuit, connected to the first power supply, the second power supply and the single-chip computer system, for uninterruptedly switching the first power supply or the second power supply to power the single-chip computer system;
[0018] A power detection circuit, connected to the power switching circuit, for detecting the current power supply of the single-chip microcomputer system in real time;
[0019] a voltage detection circuit, connected to the first power supply, and used to detect the output voltage of the first power supply in real time to obtain a current detection voltage;
[0020] A voltage judgment circuit, connected to the voltage detection circuit, for judging whether the current detection voltage is less than a preset threshold voltage;
[0021] The single-chip computer system is connected to the power detection circuit and the voltage judgment circuit, and the single-chip computer system is used to control the power switching circuit to keep the first power supply if the current power supply is the first power supply and the current detection voltage is not less than the preset threshold voltage; if the current power supply is the first power supply and the current detection voltage is less than the preset threshold voltage, control the power switching circuit to switch the second power supply without interruption; if the current power supply is the second power supply and the current detection voltage is not less than the preset threshold voltage, control the power switching circuit to switch the first power supply without interruption;
[0022] a time judgment circuit, connected to the power detection circuit and the voltage judgment circuit, and used to judge whether the power supply duration of the second power supply exceeds a preset duration when the current power supply is the second power supply and the current detection voltage is less than the preset threshold voltage;
[0023] The single-chip microcomputer system is connected to the time judgment circuit, and the single-chip microcomputer system is also used to sequentially save the current running data, exit the current running program and shut down if the power supply duration exceeds the preset duration, and then control the power switching circuit to cut off the second power supply;
[0024] If the power supply time does not exceed the preset time, the process returns to the beginning.
[0025] Based on the above technical solution, the present invention can also be improved as follows.
[0026] Furthermore, it also includes:
[0027] A charging circuit is connected to the first power supply, the second power supply and the single-chip computer system, and is used to control the first power supply to charge the second power supply under the control of the single-chip computer system when the current power supply is the first power supply.
[0028] Furthermore, the second power supply is a super capacitor.
[0029] Further, the power switching circuit includes:
[0030] A first resistor, one end of which is connected to an IO port of the single-chip computer system;
[0031] A first capacitor connected in parallel with the first resistor;
[0032] A first switch tube, a base of which is connected to the other end of the first resistor;
[0033] a second resistor, one end of which is connected to the first power supply, and the other end of which is connected to the collector of the first switch tube;
[0034] A second capacitor, one end of which is connected to the emitter of the first switch tube, and the other end of which is grounded;
[0035] A third resistor, one end of which is connected to another IO port of the single-chip computer system;
[0036] A third capacitor is connected in parallel with the third resistor;
[0037] A second switch tube, the base of which is connected to the other end of the third resistor;
[0038] a fourth resistor, one end of which is connected to the second power supply, and the other end of which is connected to the collector of the second switch tube;
[0039] a fourth capacitor, one end of which is connected to the emitter of the second switch tube, and the other end of which is grounded;
[0040] The first diode has an anode connected to the emitters of the first switch tube and the second switch tube, and a cathode connected to the power port of the single-chip computer system.
[0041] Further, the power detection circuit comprises:
[0042] a fifth resistor, one end of which is connected to the emitter of the second switch tube;
[0043] a sixth resistor, one end of which is connected to the emitter of the first switch tube;
[0044] a seventh resistor, one end of which is connected to the other end of the fifth resistor, and the other end of which is grounded;
[0045] an eighth resistor, one end of which is connected to the other end of the sixth resistor, and the other end of which is grounded;
[0046] The first voltage comparator has a non-phase input terminal connected to the other end of the fifth resistor, an inverting input terminal connected to the other end of the sixth resistor, and an output terminal connected to the single chip computer system.
[0047] Further, the voltage detection circuit comprises:
[0048] a ninth resistor, one end of which is connected to the first power supply;
[0049] a tenth resistor, one end of which is connected to the other end of the ninth resistor, and the other end of which is grounded;
[0050] The voltage judgment circuit comprises:
[0051] The second voltage comparator has an inverting input terminal connected to the other end of the ninth resistor, a non-inverting input terminal connected to a reference voltage, and an output terminal connected to the single-chip computer system.
[0052] Further, the time judgment circuit includes:
[0053] An AND gate, one input end of which is connected to the output end of the first voltage comparator, and the other input end of which is connected to the output end of the second voltage comparator;
[0054] A timer, wherein the input end is connected to the second power supply, the trigger end is connected to the output end of the AND gate, and the output end is connected to the single-chip computer system.
[0055] Furthermore, the timer is specifically a 555 timer.
[0056] The beneficial effects of the present invention are as follows: in a single-chip microcomputer system power-off protection method and circuit of the present invention, the power supply to be switched is determined according to the current power supply and the current detection voltage, thereby avoiding erroneous operation of the single-chip microcomputer system caused by unstable power supply of the first power supply; at the same time, when the first power supply is insufficient to maintain the operation of the single-chip microcomputer system, the single-chip microcomputer system is powered by uninterrupted switching of the standby second power supply, so that the single-chip microcomputer system has enough time to save the current running data, exit the current running program and shut down normally, thereby avoiding damage to the hardware of the single-chip microcomputer system and preventing data damage. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] Figure 1 A flowchart of a single-chip computer system power-off protection method of the present invention;
[0058] Figure 2 It is a structural block diagram of a single-chip computer system power-off protection circuit of the present invention;
[0059] Figure 3 is the schematic diagram of the power switching circuit;
[0060] Figure 4 This is the schematic diagram of the power detection circuit;
[0061] Figure 5 It is the schematic diagram of the voltage detection circuit and the voltage judgment circuit;
[0062] Figure 6 This is the schematic diagram of the time judgment circuit. DETAILED DESCRIPTION
[0063] The principles and features of the present invention are described below in conjunction with the accompanying drawings. The examples given are only used to explain the present invention and are not used to limit the scope of the present invention.
[0064] like Figure 1 As shown, a power-off protection method for a single-chip microcomputer system uses a first power supply and a second power supply to power the single-chip microcomputer system; wherein the default power supply of the single-chip microcomputer system is the first power supply; the power-off protection method for the single-chip microcomputer system includes:
[0065] S1, real-time detection of the current power supply of the single-chip computer system; and real-time detection of the output voltage of the first power supply to obtain the current detection voltage, and determine whether the current detection voltage is less than a preset threshold voltage; then execute S2;
[0066] S2, if the current power supply is the first power supply and the current detection voltage is not less than the preset threshold voltage, then keep the first power supply supplying power and return to S1;
[0067] If the current power supply is the first power supply, and the current detection voltage is less than the preset threshold voltage, the second power supply is switched to supply power without interruption, and the process returns to S1;
[0068] If the current power supply is the second power supply, and the current detection voltage is not less than the preset threshold voltage, the first power supply is switched to supply power without interruption, and the process returns to S1;
[0069] If the current power supply is the second power supply, and the current detection voltage is less than the preset threshold voltage, execute S3;
[0070] S3, determining whether the power supply duration of the second power supply exceeds a preset duration, and then executing S4;
[0071] S4, if the power supply duration exceeds the preset duration, controlling the single-chip microcomputer system to sequentially save the current running data, exit the current running program, and shut down, and then cut off the second power supply;
[0072] If the power supply duration does not exceed the preset duration, the process returns to S1.
[0073] In addition, when the current power supply is the first power supply, the method further includes: controlling the first power supply to charge the second power supply.
[0074] In a power-off protection method for a single-chip microcomputer system of the present invention, the power supply to be switched is determined according to the current power supply and the current detection voltage, thereby avoiding erroneous operation of the single-chip microcomputer system caused by unstable power supply of the first power supply; at the same time, when the first power supply is insufficient to maintain the operation of the single-chip microcomputer system, the single-chip microcomputer system is powered by uninterrupted switching of the standby second power supply, so that the single-chip microcomputer system has enough time to save the current running data, exit the current running program and shut down normally, thereby avoiding damage to the hardware of the single-chip microcomputer system and preventing data damage.
[0075] Based on the above-mentioned single-chip computer system power-off protection method, the present invention also provides a single-chip computer system power-off protection circuit.
[0076] like Figure 2 As shown, a single-chip computer system power-off protection circuit is applied to the single-chip computer system power-off protection method as described above, comprising:
[0077] A power switching circuit, connected to the first power supply, the second power supply and the single-chip computer system, for uninterruptedly switching the first power supply or the second power supply to power the single-chip computer system;
[0078] A power detection circuit, connected to the power switching circuit, for detecting the current power supply of the single-chip microcomputer system in real time;
[0079] a voltage detection circuit, connected to the first power supply, and used to detect the output voltage of the first power supply in real time to obtain a current detection voltage;
[0080] A voltage judgment circuit, connected to the voltage detection circuit, for judging whether the current detection voltage is less than a preset threshold voltage;
[0081] The single-chip computer system is connected to the power detection circuit and the voltage judgment circuit, and the single-chip computer system is used to control the power switching circuit to keep the first power supply if the current power supply is the first power supply and the current detection voltage is not less than the preset threshold voltage; if the current power supply is the first power supply and the current detection voltage is less than the preset threshold voltage, control the power switching circuit to switch the second power supply without interruption; if the current power supply is the second power supply and the current detection voltage is not less than the preset threshold voltage, control the power switching circuit to switch the first power supply without interruption;
[0082] a time judgment circuit, connected to the power detection circuit and the voltage judgment circuit, and used to judge whether the power supply duration of the second power supply exceeds a preset duration when the current power supply is the second power supply and the current detection voltage is less than the preset threshold voltage;
[0083] The single-chip microcomputer system is connected to the time judgment circuit, and the single-chip microcomputer system is also used to sequentially save the current running data, exit the current running program and shut down if the power supply duration exceeds the preset duration, and then control the power switching circuit to cut off the second power supply;
[0084] If the power supply time does not exceed the preset time, the process returns to the beginning.
[0085] In some embodiments, Figure 2 As shown, the single chip computer system power-off protection circuit of the present invention also includes:
[0086] A charging circuit is connected to the first power supply, the second power supply and the single-chip computer system, and is used to control the first power supply to charge the second power supply under the control of the single-chip computer system when the current power supply is the first power supply.
[0087] In some embodiments, the second power supply is a super capacitor.
[0088] Specifically, a supercapacitor is used as the second power supply. It is small in size and can meet the temporary power supply needs of the single-chip microcomputer system. The power supply time is sufficient to ensure that the single-chip microcomputer system saves the current running data, exits the current running program, and shuts down normally, thereby avoiding damage to the single-chip microcomputer system hardware and data damage.
[0089] In some embodiments, Figure 3 As shown, the power switching circuit includes:
[0090] A first resistor R1, one end of which is connected to an IO port of the single-chip computer system;
[0091] A first capacitor C1, connected in parallel with the first resistor R1;
[0092] A first switch tube Q1, a base of which is connected to the other end of the first resistor R1;
[0093] A second resistor R2, one end of which is connected to the first power supply, and the other end of which is connected to the collector of the first switch tube Q1;
[0094] A second capacitor C2, one end of which is connected to the emitter of the first switch tube Q1, and the other end of which is grounded;
[0095] A third resistor R3, one end of which is connected to another IO port of the single chip computer system;
[0096] A third capacitor C3 is connected in parallel with the third resistor R3;
[0097] A second switch tube Q2, a base of which is connected to the other end of the third resistor R3;
[0098] a fourth resistor R4, one end of which is connected to the second power supply, and the other end of which is connected to the collector of the second switch tube Q2;
[0099] A fourth capacitor C4, one end of which is connected to the emitter of the second switch tube Q1, and the other end of which is grounded;
[0100] The first diode D1 has an anode connected to the emitters of the first switch tube Q1 and the second switch tube Q2 , and a cathode connected to the power port of the single-chip computer system.
[0101] Specifically, the single-chip computer system comprehensively judges the power supply that needs to be switched according to the current power supply, the current detection voltage and the power supply duration of the second power supply, so as to output the switching signal to the first switch tube Q1 and the second switch tube Q2, thereby controlling the uninterrupted switching of the first power supply or the second power supply to continuously supply power to the single-chip computer system. In order to reduce the delay of the switch tube, the first capacitor C1 and the third capacitor C3 are respectively connected in parallel to the first resistor R1 and the third resistor R3 used for current limiting, so as to add a short-term reverse voltage to make the junction capacitance of the switch tube discharge quickly, thereby reducing the switching delay and ensuring uninterrupted switching. In order to ensure normal and stable power supply to the single-chip computer system at the moment of power supply switching, the second capacitor C2 and the fourth capacitor C4 are set, and the electric energy released by them is used to compensate for the voltage fluctuation at the moment of power supply switching, thereby ensuring that the voltage provided to the single-chip computer system is normal and stable. In addition, the present invention uses the control function of the single-chip computer itself to control the switching of the power supply, and there is no need to set up another control system. Therefore, the present invention has a simple structure and is easy to implement.
[0102] In some embodiments, Figure 4 As shown, the power detection circuit includes:
[0103] a fifth resistor R5, one end of which is connected to the emitter of the second switch tube Q2;
[0104] a sixth resistor R6, one end of which is connected to the emitter of the first switch tube Q1;
[0105] a seventh resistor R7, one end of which is connected to the other end of the fifth resistor R5, and the other end of which is grounded;
[0106] an eighth resistor R8, one end of which is connected to the other end of the sixth resistor R6, and the other end of which is grounded;
[0107] The first voltage comparator A1 has a non-phase input terminal connected to the other end of the fifth resistor R5, an inverting input terminal connected to the other end of the sixth resistor R6, and an output terminal connected to the single chip computer system.
[0108] Specifically, the power detection circuit compares the emitter voltage of the first switch tube Q1 and the emitter voltage of the second switch tube Q2 through the first voltage comparator A1 to determine whether it is powered by the first power supply or the second power supply. If the current power supply is the second power supply, the emitter voltage of the second switch tube Q2 is higher, and the emitter voltage of the first switch tube Q1 is close to zero, so the first voltage comparator A1 outputs a high level; if the current power supply is the first power supply, the emitter voltage of the second switch tube Q2 is close to zero, and the emitter voltage of the first switch tube Q1 is higher, so the first voltage comparator A1 outputs a low level. Whether the current power supply is the first power supply or the second power supply can be determined by the level of the output of the first voltage comparator A1. The power detection circuit in the present invention can realize the power detection function through only one voltage comparator, and its structure is simple and easy to implement.
[0109] In some embodiments, Figure 5 As shown, the voltage detection circuit includes:
[0110] a ninth resistor R9, one end of which is connected to the first power supply;
[0111] a tenth resistor R10, one end of which is connected to the other end of the ninth resistor R9, and the other end of which is grounded;
[0112] The voltage judgment circuit comprises:
[0113] The second voltage comparator A2 has an inverting input terminal connected to the other end of the ninth resistor R9, a non-inverting input terminal connected to the reference voltage Vref, and an output terminal connected to the single chip computer system.
[0114] Specifically, the voltage detection circuit detects the voltage of the first power supply through the voltage dividing function of the ninth resistor R9 and the tenth resistor R10; the voltage judgment circuit compares the detected voltage with the reference voltage Vref through the second voltage comparator A2, and the reference voltage is the preset threshold voltage, that is, the minimum voltage at which the single-chip microcomputer system can work normally.
[0115] In some embodiments, Figure 6 As shown, the time judgment circuit includes:
[0116] An AND gate A, one input end of which is connected to the output end of the first voltage comparator A1, and the other input end of which is connected to the output end of the second voltage comparator A2;
[0117] The timer has an input end connected to the second power supply, a trigger end connected to the output end of the AND gate &, and an output end connected to the single-chip microcomputer system. The timer is specifically a 555 timer.
[0118] Specifically, when the current power supply is the second power supply, the first voltage comparator A1 outputs a high level, and when the current detection voltage is less than the preset threshold voltage, the second voltage comparator A2 outputs a high level; therefore, when the first voltage comparator A1 outputs a high level and the second voltage comparator A2 outputs a high level, the output of the AND gate & is also a high level, and in other cases, a low level is output; therefore, through an AND gate &, it can be easily determined that the current power supply is the second power supply and the current detection voltage is less than the preset threshold voltage.
[0119] The output of the AND gate & triggers the timer. When the time recorded by the timer exceeds the preset duration, it indicates that a power failure occurs in the first power supply and cannot be restored temporarily. Since the power supply duration of the second power supply is limited, in order to ensure the safety of the single-chip microcomputer system, at this time, under the power supply of the second power supply, the single-chip microcomputer system controls itself to execute the execution of saving the current running data, exiting the current running program and shutting down in sequence, and then cutting off the second power supply.
[0120] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A power-off protection method for a single-chip microcomputer system, characterized in that: The single-chip microcomputer system is powered by a first power supply and a second power supply; wherein the default power supply of the single-chip microcomputer system is the first power supply; and the single-chip microcomputer system power-off protection method includes: S1, real-time detection of the current power supply of the single-chip computer system; and real-time detection of the output voltage of the first power supply to obtain the current detection voltage, and determine whether the current detection voltage is less than a preset threshold voltage; then execute S2; S2, if the current power supply is the first power supply and the current detection voltage is not less than the preset threshold voltage, then keep the first power supply supplying power and return to S1; If the current power supply is the first power supply, and the current detection voltage is less than the preset threshold voltage, the second power supply is switched to supply power without interruption, and the process returns to S1; If the current power supply is the second power supply, and the current detection voltage is not less than the preset threshold voltage, the first power supply is switched to supply power without interruption, and the process returns to S1; If the current power supply is the second power supply, and the current detection voltage is less than the preset threshold voltage, execute S3; S3, determining whether the power supply duration of the second power supply exceeds a preset duration, and then executing S4; S4, if the power supply duration exceeds the preset duration, controlling the single-chip microcomputer system to sequentially save the current running data, exit the current running program, and shut down, and then cut off the second power supply; If the power supply duration does not exceed the preset duration, the process returns to S1.
2. The single chip computer system power-off protection method according to claim 1, characterized in that: When the current power supply is the first power supply, the method further includes: controlling the first power supply to charge the second power supply.
3. A single chip computer system power-off protection circuit, characterized in that: The power-off protection method for a single-chip microcomputer system as claimed in claim 1 or 2 comprises: A power switching circuit, connected to the first power supply, the second power supply and the single-chip computer system, for uninterruptedly switching the first power supply or the second power supply to power the single-chip computer system; A power detection circuit, connected to the power switching circuit, for detecting the current power supply of the single-chip microcomputer system in real time; a voltage detection circuit, connected to the first power supply, and used to detect the output voltage of the first power supply in real time to obtain a current detection voltage; A voltage judgment circuit, connected to the voltage detection circuit, for judging whether the current detection voltage is less than a preset threshold voltage; The single-chip computer system is connected to the power detection circuit and the voltage judgment circuit, and the single-chip computer system is used to control the power switching circuit to keep the first power supply if the current power supply is the first power supply and the current detection voltage is not less than the preset threshold voltage; if the current power supply is the first power supply and the current detection voltage is less than the preset threshold voltage, control the power switching circuit to switch the second power supply without interruption; if the current power supply is the second power supply and the current detection voltage is not less than the preset threshold voltage, control the power switching circuit to switch the first power supply without interruption; a time judgment circuit, connected to the power detection circuit and the voltage judgment circuit, and used to judge whether the power supply duration of the second power supply exceeds a preset duration when the current power supply is the second power supply and the current detection voltage is less than the preset threshold voltage; The single-chip microcomputer system is connected to the time judgment circuit, and the single-chip microcomputer system is also used to sequentially save the current running data, exit the current running program and shut down if the power supply duration exceeds the preset duration, and then control the power switching circuit to cut off the second power supply; If the power supply time does not exceed the preset time, the process returns to the beginning.
4. The single chip computer system power-off protection circuit according to claim 3, characterized in that: Also includes: A charging circuit is connected to the first power supply, the second power supply and the single-chip computer system, and is used to control the first power supply to charge the second power supply under the control of the single-chip computer system when the current power supply is the first power supply.
5. The single chip computer system power-off protection circuit according to claim 3, characterized in that: The second power supply is a super capacitor.
6. The single chip computer system power-off protection circuit according to claim 3, characterized in that: The power switching circuit comprises: A first resistor, one end of which is connected to an IO port of the single-chip computer system; A first capacitor connected in parallel with the first resistor; A first switch tube, a base of which is connected to the other end of the first resistor; a second resistor, one end of which is connected to the first power supply, and the other end of which is connected to the collector of the first switch tube; A second capacitor, one end of which is connected to the emitter of the first switch tube, and the other end of which is grounded; A third resistor, one end of which is connected to another IO port of the single-chip computer system; A third capacitor is connected in parallel with the third resistor; A second switch tube, the base of which is connected to the other end of the third resistor; a fourth resistor, one end of which is connected to the second power supply, and the other end of which is connected to the collector of the second switch tube; a fourth capacitor, one end of which is connected to the emitter of the second switch tube, and the other end of which is grounded; The first diode has an anode connected to the emitters of the first switch tube and the second switch tube, and a cathode connected to the power port of the single-chip computer system.
7. The single chip computer system power-off protection circuit according to claim 8, characterized in that: The power detection circuit comprises: a fifth resistor, one end of which is connected to the emitter of the second switch tube; a sixth resistor, one end of which is connected to the emitter of the first switch tube; a seventh resistor, one end of which is connected to the other end of the fifth resistor, and the other end of which is grounded; an eighth resistor, one end of which is connected to the other end of the sixth resistor, and the other end of which is grounded; The first voltage comparator has a non-phase input terminal connected to the other end of the fifth resistor, an inverting input terminal connected to the other end of the sixth resistor, and an output terminal connected to the single chip computer system.
8. The single chip computer system power-off protection circuit according to claim 7, characterized in that: The voltage detection circuit comprises: a ninth resistor, one end of which is connected to the first power supply; a tenth resistor, one end of which is connected to the other end of the ninth resistor, and the other end of which is grounded; The voltage judgment circuit comprises: The second voltage comparator has an inverting input terminal connected to the other end of the ninth resistor, a non-inverting input terminal connected to a reference voltage, and an output terminal connected to the single-chip computer system.
9. The single chip computer system power-off protection circuit according to claim 8, characterized in that: The time judgment circuit comprises: An AND gate, one input end of which is connected to the output end of the first voltage comparator, and the other input end of which is connected to the output end of the second voltage comparator; A timer, wherein the input end is connected to the second power supply, the trigger end is connected to the output end of the AND gate, and the output end is connected to the single-chip computer system.
10. The single chip computer system power-off protection circuit according to claim 9, characterized in that: The timer is specifically a 555 timer.
Citation Information
Patent Citations
Power off system and method of computer
CN104111716A
Power switching system and method, computer readable storage medium and processor
CN112711320A
Power supply switching board card and power supply switching method
CN112994214A
Protection circuit and numerical control system
CN206301236U
Power supply device
US20120086416A1