Intelligent mistaken power-off prevention protection module and method for computer
Through the intelligent anti-accidental power-off protection module, the power supply status is detected in real time to prevent computer damage in the event of a momentary power outage, extend the service life of the hard drive, and solve the problem of hard drive damage caused by a momentary power outage in the computer.
Patent Information
- Application Number
- CN202310297512.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-24
- Publication Date
- 2024-09-24
AI Technical Summary
When a computer loses power for an instant, it can easily cause damage to the hard drive and shorten the service life of the hard drive.
Design a computer-intelligent anti-accidental power-off protection module, including a power supply unit, a charge and discharge unit, a holding unit, a current measurement unit, an execution unit and a communication unit. It can determine the work of the computer by detecting the electrical signals of the power switch and external power supply in real time. status to prevent illegal shutdown and abnormal power outage of the power grid, and ensure that the computer completes normal shutdown before power outage.
It effectively prevents computer hardware such as hard disks from being damaged due to instantaneous power outages, extends the service life of hard disks, and realizes real-time detection of external power supplies and stable power supply for processor units through optocoupler detection circuits and voltage stabilizing chips.
Smart Images

Figure CN118689294A
Abstract
Description
Technical Field
[0001] The invention relates to a power-off protection module and method, and in particular to a computer intelligent anti-misfire power-off protection module and a protection method based on the protection module. Background Art
[0002] During the use of the computer, there is a hidden danger that the computer software system may crash due to a momentary power outage (illegal shutdown or abnormal power outage of the power grid). When the computer loses power momentarily, it may damage system files such as data, causing the computer to fail to start normally the next time it is turned on; in severe cases, it may cause damage to computer hardware such as the hard disk, power supply, and motherboard. In particular, it is easy to cause hard disk damage, because the hard disk is rotating at high speed during the use of the computer, generally at 7200 or 5200 rpm. If the power is suddenly cut off during such high-speed rotation, it is very easy to cause damage to the hard disk's tracks, thereby shortening the service life of the hard disk.
[0003] In summary, when the existing computer loses power instantly, the hard disk is easily damaged, thereby shortening the service life of the hard disk. Summary of the invention
[0004] The purpose of the present invention is to solve the technical problem that the hard disk of the existing computer is easily damaged when the power is cut off instantly, thereby shortening the service life of the hard disk, and to provide a computer intelligent anti-misfire protection module and method.
[0005] To achieve the above purpose, the technical solution adopted by the present invention is:
[0006] A computer intelligent anti-misfire protection module, which is special in that it includes a power supply unit, a charge and discharge unit, a holding unit, a current measurement unit, an execution unit, a processor unit and a communication unit;
[0007] The input high end of the power supply unit is connected to the high end of the external power supply through the first pair of contacts of the power switch, and the input low end is used to connect to the low end of the external power supply. The power output end of the power supply unit is used to connect to the power supply end of the computer to be powered off and connected to the power supply end of the processor unit; the input end of the charging and discharging unit is connected to the power output end of the power supply unit, and the output end is used to connect to the power supply end of the computer;
[0008] The holding unit is used to be arranged in parallel at both ends of the first pair of contacts of the power switch;
[0009] The input end of the current detection unit is connected to the power output end of the power supply unit, and is used to detect the current value provided to the computer by the power output end of the power supply unit, and the output end of the current detection unit is connected to the first signal input end of the processor unit;
[0010] One input end of the execution unit is used to connect to an external power supply, detect whether the external power supply is normal and output a power supply interruption signal, and one output end of the execution unit is connected to a second signal input end of the processor unit; another input end of the execution unit is connected to a third signal input end of the processor unit through a second pair of contacts of the power switch, and is used to detect high and low levels to determine the state of the power switch and output a switch interruption signal;
[0011] The input end of the communication unit is connected to the signal output end of the processor unit, and the output end of the communication unit is used to connect to the communication end of the computer to be powered off for protection;
[0012] The first pair of contacts and the second pair of contacts of the power switch are opened and closed at the same time.
[0013] Further, the execution unit includes a first sub-execution unit and a second sub-execution unit;
[0014] The input end of the first sub-executing unit is used to connect to the high end and the low end of the external power supply respectively;
[0015] The second sub-executing unit is connected to the third signal input terminal of the processor unit by being connected to the second pair of contacts of the power switch.
[0016] Further, the first sub-executing unit includes a comparison circuit and an optocoupler detection circuit;
[0017] The two input ends of the optical coupler detection circuit are respectively used to connect to the high end and the low end of the external power supply, and the output end is connected to the input end of the comparison circuit, and the output end of the comparison circuit is connected to the second signal input end of the processor unit.
[0018] Furthermore, the second sub-executing unit includes a fourth stabilized power supply V4; an output end of the fourth stabilized power supply V4 is connected to one end of the second pair of contacts of the power switch, and the other end of the second pair of contacts of the power switch is connected to the third signal input end of the processor unit;
[0019] The optical coupler detection circuit includes a resistor R1, a resistor R2, a resistor R3, a resistor R4, a capacitor C1, an optical coupler Q and a first regulated power supply V1;
[0020] One end of the resistor R1 is used to be connected to the high end of the external power supply, and the other end is connected to the input high end of the optocoupler Q; one end of the resistor R2 is used to be connected to the low end of the external power supply, and the other end is connected to the input low end of the optocoupler Q; the power supply end of the optocoupler Q is connected to the first regulated power supply V1, and the output end is respectively connected to one end of the resistor R3 and one end of the resistor R4, the other end of the resistor R4 and one end of the capacitor C1 are both connected to the input end of the comparison circuit, and the other end of the resistor R3 and the other end of the capacitor C1 are both grounded.
[0021] Further, the comparison circuit includes a comparator U1, a second regulated power supply V2, a third regulated power supply V3, a resistor R5, a resistor R6, a resistor R7, a resistor R8, a resistor R9, a capacitor C2, a capacitor C3, a capacitor C4, a capacitor C5, and a diode;
[0022] One end of the resistor R9 and the capacitor C2 are both connected to the inverting input terminal of the comparator U1, the other end of the resistor R9 is connected to the other end of the resistor R4, and the other end of the capacitor C2 is grounded; one end of the resistor R5 and the resistor R8 are both connected to one end of the resistor R7, the other end of the resistor R5 is connected to the second regulated power supply V2, the other end of the resistor R8 is grounded, the other end of the resistor R7 and one end of the capacitor C3 are both connected to the non-inverting input terminal of the comparator U1, and the other end of the capacitor C3 is grounded; one end of the capacitor C4 and the resistor R6 are both connected to the third regulated power supply V3 and the power supply terminal of the comparator U1, and connected to one end of the resistor R6; the positive electrode of the diode D1 and the other end of the resistor R6 are both connected to the output terminal of the comparator U1, the negative electrode of the diode and one end of the capacitor C5 are both connected to the second signal input terminal of the processor unit, and the other end of the capacitor C5 is grounded.
[0023] Further, the current detection unit includes a sampling resistor R10, a capacitor C6, a capacitor C7, a capacitor C8, a diode D3 and an operational amplifier U2;
[0024] One end of the sampling resistor R10 is connected to the power output end of the power supply unit, and is connected to one end of the capacitor C6, one end of the capacitor C7, the cathode of the diode D3, and the in-phase input end of the operational amplifier U2. The other end of the sampling resistor R10 is connected to the other end of the capacitor C7, one end of the capacitor C8, the anode of the diode D3, and the inverting input end of the operational amplifier U2. The other end of the capacitor C6 and the other end of the capacitor C8 are both grounded. The output end of the operational amplifier U2 is connected to the first signal input end of the processor unit.
[0025] Furthermore, the power supply unit includes a power converter, a diode D4 and a voltage stabilizing chip;
[0026] The two input ends of the power converter are respectively used to connect to the high end and the low end of the external power supply, the power output end of the power converter is connected to one end of the sampling resistor R10, the positive electrode of the diode D4 is connected to the other end of the sampling resistor R10, and the negative electrode is used to connect to the power supply end of the computer; the ground end of the power converter is grounded; the input end of the voltage regulator chip is used to connect to the power supply end of the computer, and the output end is connected to the power supply end of the processor unit;
[0027] The charging and discharging unit includes a relay J2, a power resistor R11, a charging current limiting resistor R12, a diode D5, a diode D6 and a capacitor;
[0028] The positive electrode of the diode D6 is connected to the power output end of the power converter, and the negative electrode is respectively connected to one end of the charging current limiting resistor R12 and the normally open end of the relay J2; the common end of the relay J2 is connected to one end of the power resistor R11, and the common end is connected to the processor unit; the other end of the charging current limiting resistor R12 and one end of the capacitor are both connected to the positive electrode of the diode D5, the negative electrode of the diode D5 is used to connect to the power supply end of the computer, and the other end of the capacitor and the other end of the power resistor R11 are grounded.
[0029] Further, the communication unit is an RS484 communication cable;
[0030] One end of the communication cable is connected to the signal output end of the processor unit, and the other end is used to connect to the communication end of the computer.
[0031] Further, the holding unit is a normally open high-voltage relay J1, and the high-voltage relay J1 is used to be connected in parallel to both ends of the first pair of contacts of the power switch, and the control end is connected to the processor unit;
[0032] Also included is thermistor R13;
[0033] One end of the thermistor R13 is used to be connected to the first pair of contacts of the power switch, and the other end is connected to the input high end of the power supply unit.
[0034] At the same time, the present invention also provides a computer intelligent anti-mistaken power-off protection method, based on a computer intelligent anti-mistaken power-off protection module, comprising the following steps:
[0035] Step 1: Connect the entire module to an external power source, turn on the power switch, and put the computer in a normal working state. At this time, keep the circuit in an on state, and the power output end of the power supply unit charges the charge and discharge unit;
[0036] Step 2: During the normal operation of the computer, the execution unit detects in real time the level of the electrical signal at both ends of the second pair of contacts of the power switch and the level of the external power supply electrical signal, and the current measurement unit detects in real time the level of the electrical signal provided to the computer by the power output end of the power supply unit;
[0037] If the execution unit detects that the electrical signal of the external power supply and the electrical signal of the second pair of contacts of the power switch are both at low levels, and the current detection unit detects that the electrical signal provided to the computer by the power output terminal of the power supply unit has a falling edge, the processor unit determines that the computer is shut down normally, keeps the circuit disconnected, and turns off the power switch, completing the normal shutdown and power-off of the computer; after the normal shutdown, the charge-discharge unit discharges;
[0038] If the execution unit detects that the electrical signal of the external power supply is at a high level and the electrical signal of the second pair of contacts of the power switch has a falling edge, and the current measurement unit detects that the electrical signal provided to the computer by the power output terminal of the power supply unit is at a high level, the execution unit sends a switch interrupt signal to the processor unit, and the processor unit determines that the power switch is illegally turned off. At this time, the circuit is kept in an on state, the power switch is disconnected, the power supply unit and the external power supply are kept in an on state, and the computer is not allowed to shut down and power off. At the same time, the processor unit sends a warning signal of illegal shutdown to the computer through the communication unit;
[0039] If the execution unit detects that the electric signal of the external power supply has a falling edge and the electric signal of the second pair of contacts of the power switch is at a high level, and the current measurement unit detects that the electric signal provided to the computer by the power output terminal of the power supply unit is at a high level, the execution unit sends a power supply interruption signal to the processor unit, and the processor unit determines that the external power supply is abnormally powered off. At this time, the processor unit sends a shutdown signal to the computer to control the computer to shut down normally, and at the same time, the computer and the processor unit are powered by the charge and discharge unit during the computer shutdown process, so as to complete the normal shutdown of the computer in the state of abnormal power failure of the power grid; after normal shutdown, the charge and discharge unit discharges;
[0040] Step 3: Complete the computer's protection against accidental power failure.
[0041] Compared with the prior art, the present invention has the following beneficial effects:
[0042] 1. The present invention forms a parallel circuit with the power switch through the setting of the holding unit, so that the computer can still be powered on when it is illegally shut down; the setting of the charging and discharging unit can briefly power the computer and the processor unit after the external power supply is abnormally powered off, so that the computer is automatically controlled by the processor unit to perform normal shutdown; the setting of the current measuring unit detects the level of the electric signal of the computer power supply circuit in real time, and the setting of the execution unit detects the level of the electric signal of the second pair of contacts of the power switch and the external power supply, and then the setting of the processor unit performs comprehensive processing, so that the computer can be powered on when it is illegally shut down, and the normal shutdown steps can be executed after the external power supply is abnormally powered off, so as to achieve the power-off protection effect of the computer and prevent the computer hardware units such as the hard disk from being damaged due to the instantaneous power off of the computer.
[0043] 2. The optocoupler detection circuit of the present invention can send a small-amplitude regulated power supply signal to the processor unit through the first regulated power supply when the external power supply is normally supplied. After the external power supply is cut off, the optocoupler is disconnected and the regulated power supply signal is stopped from being sent to the processor unit, thereby realizing real-time detection of the external power supply.
[0044] 3. The present invention can measure in real time the current amplitude provided to the computer by the power output end of the power supply unit by setting a sampling resistor at the power output end of the power supply unit (computer power supply circuit) by reading the voltage signal at both ends of the sampling resistor, thereby facilitating the detection and judgment of the level of the electrical signal provided to the computer by the power output end of the power supply unit through the processor unit.
[0045] 4. The voltage stabilizing chip provided in the present invention can provide a regulated power supply for the processor unit, thereby ensuring the working stability of the processor unit. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 It is a circuit diagram of an embodiment of a computer intelligent anti-misfire protection module of the present invention;
[0047] Figure 2 The present invention discloses a circuit diagram of a comparison circuit in an embodiment of a computer intelligent anti-misfire protection module. DETAILED DESCRIPTION
[0048] In order to make the purpose, advantages and features of the present invention clearer, the following is a further detailed description of a computer intelligent anti-misfire protection module and method proposed by the present invention in combination with the accompanying drawings and specific embodiments. According to the following specific implementation methods, the advantages and features of the present invention will be clearer. It should be noted that: the drawings are all in a very simplified form and use non-precise proportions, which are only used to conveniently and clearly assist in explaining the purpose of the embodiments of the present invention; secondly, the structure shown in the drawings is often part of the actual structure.
[0049] The present invention provides a computer intelligent anti-misfire protection module, such as Figure 1 As shown, it includes a power supply unit, a charge and discharge unit, a holding unit, a current measuring unit, an execution unit, a processor unit and a communication unit.
[0050] The high end of the input of the power supply unit is connected to the high end of the external power supply through the first pair of contacts of the power switch. In the present embodiment, the power switch is a double-contact power switch, comprising two pairs of contacts, wherein the first pair of contacts and the second pair of contacts are opened and closed at the same time, wherein the first pair of contacts is used as a main circuit switch, and the second pair of contacts is used as a status signal; the external power supply adopts a 220V single-phase AC power supply, and the low end of the input is used to be connected to the low end of the external power supply; the power output end of the power supply unit is used to be connected to the power supply end of the computer to be powered off for protection, and to the power supply end of the processor unit; the input end of the charge-discharge unit is connected to the power output end of the power supply unit, and the output end is used to be connected to the power supply end of the computer. The set charge-discharge unit can store electrical energy when the computer is working normally, and provide short-term power to the computer after the external power supply or the power supply unit is powered off; in the present embodiment, the processor unit uses a single-chip microcomputer.
[0051] Specifically, the power supply unit includes a power converter, a diode D4 and a voltage regulator chip; the power converter is an AC22V to 12V power converter, the two input ends of the power converter are respectively used to connect to the high end and the low end of the external power supply, the power output end of the power converter is connected to one end of the sampling resistor R10, the positive electrode of the diode D4 is connected to the other end of the sampling resistor R10, and the negative electrode is used to connect to the power supply end of the computer; the ground end of the power converter is grounded; since the single-chip microcomputer has high requirements for voltage stability, it is necessary to set a voltage regulator chip at the power supply end of the single-chip microcomputer to provide it with a stabilized power supply. In this embodiment, the specific model of the voltage regulator chip is AS1117U, which can output a stable voltage of 3.3V, the input end of the voltage regulator chip is used to connect to the power supply end of the computer, and the output end is connected to the power supply end of the processor unit;
[0052] The charge and discharge unit includes a relay J2, a power resistor R11, a charge current limiting resistor R12, a diode D5, a diode D6, and a capacitor; in the present embodiment, the capacitor specifically includes a capacitor C9, a capacitor C10 and a capacitor C11 arranged in parallel. In other embodiments of the present invention, two, four, five or six capacitors in parallel may also be arranged, and the arrangement may be performed according to the capacitance and specific needs; the positive electrode of the diode D6 is connected to the power output end of the power converter, and the negative electrode is respectively connected to one end of the charge current limiting resistor R12 and the normally open end of the relay J2, the common end of the relay J2 is connected to one end of the power resistor R11, and the control end is connected to the processor unit; the other end of the charge current limiting resistor R12, one end of the capacitor C9, one end of the capacitor C10 and one end of the capacitor C11 are all connected. It is connected to the positive electrode of the diode D5, and the negative electrode of the diode D5 is used to connect the power supply end of the computer. The other end of the capacitor C9, the other end of the capacitor C10, the other end of the capacitor C11, and the other end of the power resistor R11 are all grounded; wherein the capacitor C9, the capacitor C10 and the capacitor C11 are all large-capacity capacitors, and the specific capacity size can be designed according to actual needs. In this embodiment, it is 20F. The capacitors C9, C10 and C11 can store a certain amount of electricity when the external power supply is normally supplied. After the external power supply is abnormally powered off, the electricity stored in the large capacitor is used to provide short-term power supply to the computer and the processor unit, so that the computer will not be shut down immediately, so that the computer can be shut down after completing the normal shutdown steps, thereby achieving the protection effect of the computer.
[0053] The holding unit is used to be arranged in parallel at both ends of the first pair of contacts of the power switch; in a preferred embodiment of the present invention, the holding unit uses a normally open high-voltage relay J1, and the control end is connected to the processor unit by connecting the high-voltage relay J1 in parallel at both ends of the first pair of contacts of the power switch; thereby forming a parallel circuit with the power switch after power is turned on and closed. If the power switch is illegally pressed to shut down the computer, since a stable current still passes through both ends of the high-voltage relay J1, the computer can also be connected to the external power supply, so that it cannot be shut down by directly pressing the power switch; at the same time, a thermistor R13 is also provided; one end of the thermistor R13 is connected to the first pair of contacts of the power switch, and the other end is connected to the input high end of the power supply unit, thereby protecting the circuit and enhancing the safety of the module when in use; in other embodiments of the present invention, other circuits and devices can also be selected to achieve an effect equivalent to or similar to that of the normally open high-voltage relay J1.
[0054] The input end of the current detection unit is connected to the power output end of the power supply unit, and is used to detect the current value provided to the computer by the power output end of the power supply unit. The output end of the current detection unit is connected to the first signal input end of the processor unit. The current detection unit includes a sampling resistor R10, a capacitor C6, a capacitor C7, a capacitor C8, a diode D3 and an operational amplifier U2. One end of the sampling resistor R10 is connected to the power output end of the power supply unit, and is connected to one end of the capacitor C6, one end of the capacitor C7, the cathode of the diode D3 and the in-phase input end of the operational amplifier U2. The other end of the sampling resistor R10 is connected to the other end of the capacitor C7, one end of the capacitor C8, the anode of the diode D3 and the inverting input end of the operational amplifier U2. The other end of the capacitor C6 and the other end of the capacitor C8 are both grounded. The output end of the operational amplifier U2 is connected to the first signal input end of the processor unit, and is used to send a current value signal to the processor unit, by comparing, processing, judging and giving a signal of whether to allow or not to shut down the processor unit according to the preset current value in the processor unit.
[0055] An input end of the execution unit is used to connect to an external power supply, detect whether the external power supply is normal and output a power supply interruption signal, and an output end of the execution unit is connected to the second signal input end of the processor unit; the other input end of the execution unit is connected to the third signal input end of the processor unit through the second pair of contacts of the power switch, and is used to detect high and low levels to determine the state of the power switch and output a switch interruption signal; further, the execution unit includes a first sub-execution unit and a second sub-execution unit; the input end of the first sub-execution unit is respectively used to connect to the high end and low end of the external power supply; the second sub-execution unit is connected to the third signal input end of the processor unit by connecting to the second pair of contacts of the power switch; specifically, the first sub-execution unit includes a comparison circuit and an optocoupler detection circuit; the two input ends of the optocoupler detection circuit are respectively used to connect to the high end and low end of the external power supply, and the output end is connected to the input end of the comparison circuit, and the output end of the comparison circuit is connected to the second signal input end of the processor unit. The second sub-execution unit includes a fourth stabilized power supply V4; the output end of the fourth stabilized power supply V4 is connected to one end of the second pair of contacts of the power switch, and the other end of the second pair of contacts of the power switch is connected to the third signal input end of the processor unit; when the power switch is illegally turned off by an operator, the fourth stabilized power supply V4 is powered off through the second pair of contacts of the power switch, and a falling edge signal appears. After receiving the falling edge signal, the single-chip microcomputer combines the signals of the current measuring unit and the first sub-execution unit to make a comprehensive judgment on whether to send an illegal shutdown signal to the computer, and displays the illegal shutdown prompt signal on the computer screen for a preset time (3-5 seconds), so as to remind the operator to proceed. Normal shutdown is performed; the optocoupler detection circuit includes a resistor R1, a resistor R2, a resistor R3, a resistor R4, a capacitor C1, an optocoupler Q and a first regulated power supply V1; one end of the resistor R1 is used to connect to the high end of the external power supply, and the other end is connected to the input high end of the optocoupler Q; one end of the resistor R2 is used to connect to the low end of the external power supply, and the other end is connected to the input low end of the optocoupler Q; the power supply end of the optocoupler Q is connected to the first regulated power supply V1, and the output end is respectively connected to one end of the resistor R3 and one end of the resistor R4, the other end of the resistor R4 and one end of the capacitor C1 are both connected to the input end of the comparison circuit, and the other end of the resistor R3 and the other end of the capacitor C1 are both grounded.
[0056] like Figure 2As shown, the comparison circuit includes a comparator U1, a second regulated power supply V2, a third regulated power supply V3, a resistor R5, a resistor R6, a resistor R7, a resistor R8, a resistor R9, a capacitor C2, a capacitor C3, a capacitor C4, a capacitor C5, a diode D1 and a diode D2; in this embodiment, the model of the comparator is LM211; one end of the resistor R9 and the capacitor C2 are both connected to the inverting input terminal of the comparator U1, the other end of the resistor R9 is connected to the other end of the resistor R4, and the other end of the capacitor C2 is grounded; one end of the resistor R5 and the resistor R8 are both connected to the end of the resistor R7 The other end of the resistor R5 is connected to the second regulated power supply V2, the other end of the resistor R8 is grounded, the other end of the resistor R7 and one end of the capacitor C3 are both connected to the non-inverting input terminal of the comparator U1, and the other end of the capacitor C3 is grounded; the capacitor C4 and one end of the resistor R6 are both connected to the third regulated power supply V3 and the power supply terminal of the comparator U1, and are connected to one end of the resistor R6; the anode of the diode D1 and the other end of the resistor R6 are both connected to the output terminal of the comparator U1, the cathode of the diode and one end of the capacitor C5 are both connected to the second signal input terminal of the processor unit, and the other end of the capacitor C5 is grounded.
[0057] The input end of the communication unit is connected to the signal output end of the processor unit, and the output end of the communication unit is used to connect to the communication end of the computer to be powered off for protection; in a preferred embodiment of the present invention, the communication unit uses an RS484 communication cable; one end of the communication cable is connected to the signal output end of the processor unit, and the other end is used to connect to the communication end of the computer; of course, it should be noted that the specific setting of the above communication unit is only a preferred embodiment of the present invention. In other embodiments of the present invention, a MAX232 communication chip can also be used to realize the communication between the single-chip microcomputer and the computer.
[0058] Define the external power supply as S1, the second pair of contacts of the power switch as S2, and the sampling resistor as S3; Based on the above protection module, the following computer state truth table can be obtained:
[0059] Computer State Truth Table
[0060] Serial number S1 S2 S3 state 01 Low level 0 Low level 0 Low level 0 Shutdown status 02 High level 1 High level 1 High level 1 Normal operation 03 Low level 1 Low level 0 From 1 to 0 (falling edge) Normal shutdown 04 High level 1 From 1 to 0 (falling edge) High level 1 Illegal shutdown 05 From 1 to 0 (falling edge) High level 1 High level 1 Grid power failure
[0061] The present invention provides a computer intelligent anti-mistaken power-off protection method, based on the above-mentioned computer intelligent anti-mistaken power-off protection module, comprising the following steps:
[0062] Step 1: Connect the entire module to an external power source, turn on the power switch, and put the computer in a normal working state. At this time, keep the circuit in an on state, and the power output end of the power supply unit charges the charge and discharge unit;
[0063] Step 2: During the normal operation of the computer, the execution unit detects in real time the level of the electrical signal at both ends of the second pair of contacts of the power switch and the level of the external power supply electrical signal, and the current measurement unit detects in real time the level of the electrical signal provided to the computer by the power output end of the power supply unit;
[0064] If the execution unit detects that the electrical signal of the external power supply and the electrical signal of the second pair of contacts of the power switch are both at low levels, and the current detection unit detects that the electrical signal provided to the computer by the power output terminal of the power supply unit has a falling edge, the processor unit determines that the computer is shut down normally, keeps the circuit disconnected, disconnects the power switch, discharges the charge and discharge unit, supplies power to the processor unit, and the processor unit accumulates the number of normal shutdowns to complete the normal shutdown and power off of the computer; after the computer completes the normal shutdown (about half a minute), the control relay J2 is closed to complete the discharge of the charge and discharge unit;
[0065] If the execution unit detects that the electrical signal of the external power supply is at a high level and the electrical signal of the second pair of contacts of the power switch has a falling edge, and the current measurement unit detects that the electrical signal provided to the computer by the power output terminal of the power supply unit is at a high level, the execution unit sends a switch interrupt signal to the processor unit, and the processor unit determines that the power switch is illegally turned off. At this time, the circuit is kept in an on state, the power switch is disconnected, and the power supply unit remains connected to the external power supply. The computer is not allowed to shut down and power off. At the same time, the processor unit sends an illegal shutdown warning signal to the computer through the communication unit and accumulates the number of illegal shutdowns;
[0066] If the execution unit detects that the electric signal of the external power supply has a falling edge and the electric signal of the second pair of contacts of the power switch is at a high level, the current measurement unit detects that the electric signal provided to the computer by the power output terminal of the power supply unit is at a high level, the execution unit sends a power supply interruption signal to the processor unit, and the processor unit determines that the external power supply is abnormally powered off. At this time, the processor unit sends a shutdown signal to the computer to control the computer to shut down normally. At the same time, the computer and the processor unit are powered by the charge and discharge unit during the computer shutdown process. The computer is shut down through the signal interruption, and the computer is shut down normally when the power grid is abnormally powered off. The number of abnormal power outages of the power grid is accumulated through the processor unit. After the computer completes the normal shutdown (about half a minute), the control relay J2 is closed to complete the discharge of the charge and discharge unit.
[0067] Step 3: Complete the computer's protection against accidental power failure.
Claims
1. A computer intelligent anti-misfire protection module, characterized in that: It includes a power supply unit, a charging and discharging unit, a holding unit, a current measuring unit, an execution unit, a processor unit and a communication unit; The input high end of the power supply unit is connected to the high end of the external power supply through the first pair of contacts of the power switch, and the input low end is used to connect to the low end of the external power supply. The power output end of the power supply unit is used to connect to the power supply end of the computer to be powered off and connected to the power supply end of the processor unit; the input end of the charging and discharging unit is connected to the power output end of the power supply unit, and the output end is used to connect to the power supply end of the computer; The holding unit is used to be arranged in parallel at both ends of the first pair of contacts of the power switch; The input end of the current detection unit is connected to the power output end of the power supply unit, and is used to detect the current value provided to the computer by the power output end of the power supply unit, and the output end of the current detection unit is connected to the first signal input end of the processor unit; One input end of the execution unit is used to connect to an external power supply, detect whether the external power supply is normal and output a power supply interruption signal, and one output end of the execution unit is connected to a second signal input end of the processor unit; another input end of the execution unit is connected to a third signal input end of the processor unit through a second pair of contacts of the power switch, and is used to detect high and low levels to determine the state of the power switch and output a switch interruption signal; The input end of the communication unit is connected to the signal output end of the processor unit, and the output end of the communication unit is used to connect to the communication end of the computer to be powered off for protection; The first pair of contacts and the second pair of contacts of the power switch are opened and closed at the same time.
2. The computer intelligent anti-misfire protection module according to claim 1 is characterized in that: The execution unit includes a first sub-execution unit and a second sub-execution unit; The input end of the first sub-executing unit is used to connect to the high end and the low end of the external power supply respectively; The second sub-executing unit is connected to the third signal input terminal of the processor unit by being connected to the second pair of contacts of the power switch.
3. The computer intelligent anti-misfire protection module according to claim 2 is characterized in that: The first sub-execution unit includes a comparison circuit and an optocoupler detection circuit; The two input ends of the optical coupler detection circuit are respectively used to connect to the high end and the low end of the external power supply, and the output end is connected to the input end of the comparison circuit, and the output end of the comparison circuit is connected to the second signal input end of the processor unit.
4. The computer intelligent anti-misfire protection module according to claim 3 is characterized in that: The second sub-executing unit includes a fourth regulated power supply V4; the output end of the fourth regulated power supply V4 is connected to one end of the second pair of contacts of the power switch, and the other end of the second pair of contacts of the power switch is connected to the third signal input end of the processor unit; The optical coupler detection circuit includes a resistor R1, a resistor R2, a resistor R3, a resistor R4, a capacitor C1, an optical coupler Q and a first regulated power supply V1; One end of the resistor R1 is used to be connected to the high end of the external power supply, and the other end is connected to the input high end of the optocoupler Q; one end of the resistor R2 is used to be connected to the low end of the external power supply, and the other end is connected to the input low end of the optocoupler Q; the power supply end of the optocoupler Q is connected to the first regulated power supply V1, and the output end is respectively connected to one end of the resistor R3 and one end of the resistor R4, the other end of the resistor R4 and one end of the capacitor C1 are both connected to the input end of the comparison circuit, and the other end of the resistor R3 and the other end of the capacitor C1 are both grounded.
5. The computer intelligent anti-misfire protection module according to claim 4 is characterized in that: The comparison circuit includes a comparator U1, a second regulated power supply V2, a third regulated power supply V3, a resistor R5, a resistor R6, a resistor R7, a resistor R8, a resistor R9, a capacitor C2, a capacitor C3, a capacitor C4, a capacitor C5, and a diode; One end of the resistor R9 and the capacitor C2 are both connected to the inverting input terminal of the comparator U1, the other end of the resistor R9 is connected to the other end of the resistor R4, and the other end of the capacitor C2 is grounded; one end of the resistor R5 and the resistor R8 are both connected to one end of the resistor R7, the other end of the resistor R5 is connected to the second regulated power supply V2, the other end of the resistor R8 is grounded, the other end of the resistor R7 and one end of the capacitor C3 are both connected to the non-inverting input terminal of the comparator U1, and the other end of the capacitor C3 is grounded; one end of the capacitor C4 and the resistor R6 are both connected to the third regulated power supply V3 and the power supply terminal of the comparator U1, and connected to one end of the resistor R6; the positive electrode of the diode D1 and the other end of the resistor R6 are both connected to the output terminal of the comparator U1, the negative electrode of the diode and one end of the capacitor C5 are both connected to the second signal input terminal of the processor unit, and the other end of the capacitor C5 is grounded.
6. The computer intelligent anti-misfire protection module according to any one of claims 1 to 5, characterized in that: The current detection unit includes a sampling resistor R10, a capacitor C6, a capacitor C7, a capacitor C8, a diode D3 and an operational amplifier U2; One end of the sampling resistor R10 is connected to the power output end of the power supply unit, and is connected to one end of the capacitor C6, one end of the capacitor C7, the cathode of the diode D3, and the in-phase input end of the operational amplifier U2. The other end of the sampling resistor R10 is connected to the other end of the capacitor C7, one end of the capacitor C8, the anode of the diode D3, and the inverting input end of the operational amplifier U2. The other end of the capacitor C6 and the other end of the capacitor C8 are both grounded. The output end of the operational amplifier U2 is connected to the first signal input end of the processor unit.
7. The computer intelligent anti-misfire protection module according to claim 6 is characterized in that: The power supply unit includes a power converter, a diode D4 and a voltage stabilizing chip; The two input ends of the power converter are respectively used to connect to the high end and the low end of the external power supply, the power output end of the power converter is connected to one end of the sampling resistor R10, the positive electrode of the diode D4 is connected to the other end of the sampling resistor R10, and the negative electrode is used to connect to the power supply end of the computer; the ground end of the power converter is grounded; the input end of the voltage regulator chip is used to connect to the power supply end of the computer, and the output end is connected to the power supply end of the processor unit; The charging and discharging unit includes a relay J2, a power resistor R11, a charging current limiting resistor R12, a diode D5, a diode D6 and a capacitor; The positive electrode of the diode D6 is connected to the power output end of the power converter, and the negative electrode is respectively connected to one end of the charging current limiting resistor R12 and the normally open end of the relay J2; the common end of the relay J2 is connected to one end of the power resistor R11, and the control end is connected to the processor unit; the other end of the charging current limiting resistor R12 and one end of the capacitor are both connected to the positive electrode of the diode D5, the negative electrode of the diode D5 is used to connect to the power supply end of the computer, and the other end of the capacitor and the other end of the power resistor R11 are grounded.
8. The computer intelligent anti-misfire protection module according to claim 7 is characterized in that: The communication unit is a RS484 communication cable; One end of the communication cable is connected to the signal output end of the processor unit, and the other end is used to connect to the communication end of the computer.
9. The computer intelligent anti-misfire protection module according to claim 8, characterized in that: The holding unit is a normally open high-voltage relay J1, which is used to be connected in parallel to the two ends of the first pair of contacts of the power switch, and the control end is connected to the processor unit; Also included is thermistor R13; One end of the thermistor R13 is used to be connected to the first pair of contacts of the power switch, and the other end is connected to the input high end of the power supply unit.
10. A computer intelligent anti-error power-off protection method, based on the computer intelligent anti-error power-off protection module according to any one of claims 1 to 9, characterized in that: The following steps are involved: Step 1: Connect the entire module to an external power source, turn on the power switch, and put the computer in a normal working state. At this time, keep the circuit in an on state, and the power output end of the power supply unit charges the charge and discharge unit; Step 2: During the normal operation of the computer, the execution unit detects in real time the level of the electrical signal at both ends of the second pair of contacts of the power switch and the level of the external power supply electrical signal, and the current measurement unit detects in real time the level of the electrical signal provided to the computer by the power output end of the power supply unit; If the execution unit detects that the electrical signal of the external power supply and the electrical signal of the second pair of contacts of the power switch are both at low levels, and the current detection unit detects that the electrical signal provided to the computer by the power output terminal of the power supply unit has a falling edge, the processor unit determines that the computer is shut down normally, keeps the circuit disconnected, and turns off the power switch, completing the normal shutdown and power-off of the computer; after the normal shutdown, the charge-discharge unit discharges; If the execution unit detects that the electrical signal of the external power supply is at a high level and the electrical signal of the second pair of contacts of the power switch has a falling edge, and the current measurement unit detects that the electrical signal provided to the computer by the power output terminal of the power supply unit is at a high level, the execution unit sends a switch interrupt signal to the processor unit, and the processor unit determines that the power switch is illegally turned off. At this time, the circuit is kept in an on state, the power switch is disconnected, the power supply unit and the external power supply are kept in an on state, and the computer is not allowed to shut down and power off. At the same time, the processor unit sends a warning signal of illegal shutdown to the computer through the communication unit; If the execution unit detects that the electric signal of the external power supply has a falling edge and the electric signal of the second pair of contacts of the power switch is at a high level, and the current measurement unit detects that the electric signal provided to the computer by the power output terminal of the power supply unit is at a high level, the execution unit sends a power supply interruption signal to the processor unit, and the processor unit determines that the external power supply is abnormally powered off. At this time, the processor unit sends a shutdown signal to the computer to control the computer to shut down normally, and at the same time, the computer and the processor unit are powered by the charge and discharge unit during the computer shutdown process, so as to complete the normal shutdown of the computer in the state of abnormal power failure of the power grid; after normal shutdown, the charge and discharge unit discharges; Step 3: Complete the computer's protection against accidental power failure.
