A kind of power-fail detection circuit of direct supply
Technical field
The present invention relates to electronic applications, particularly relate to a kind of power-fail detection circuit of direct supply.
Background technology
The development of modern communication and industrial technology, more and more higher to the reliability requirement of equipment work, especially in MCU (Micro Control Unit, microcontroller) Circuits System, power-fail detection circuit is a vital part.The effect of power-fail detection circuit is the voltage moment detecting power supply, when the voltage drop of power supply is to certain limit, the output signal of power-fail detection circuit changes, after MCU Circuits System detects this output signal, just carry out corresponding a series of action, such as, in very short time, keep required data, reset etc.
In the prior art, application comparator or voltage detecting IC detection of power loss can be carried out.As shown in Figure 1, VCC1 is the first power supply anode, and VCC2 is the power supply anode of MCU, and be also the anode of the second power supply, GND is the power supply negative terminal of MCU, is also the negative terminal of the first power supply and the negative terminal of the second power supply.The negative terminal of comparer U1A connects a reference voltage Vref, the bleeder circuit of the positive termination power VCC1 to ground GND of comparer U1A.If power supply VCC1 voltage reduces, then due to the dividing potential drop relation of resistance R1 and resistance R2, the current potential of nodes X also can reduce.When the current potential of nodes X is lower than reference voltage Vref, output terminal out then by high step-down, thus realizes the object of power supply power-fail detection.If positive and negative termination is exchanged, then the current potential of nodes X and the relation of reference voltage Vref are also exchanged.
But the power-fail detection circuit formed with comparer, needs extra reference data circuit to provide reference voltage, take larger PCB surface and amass, cost is higher, and can not isolation detection.
Summary of the invention
In view of this, embodiments provide a kind of power-fail detection circuit of direct supply, when not needing extra reference circuit, with regard to realizing, isolation detection being carried out to direct supply power down, can effectively avoid interference, ensure detection system reliability service; And circuit structure is succinct, and with low cost, reliability is high, be suitable for voltage range wide.
For solving the problems of the technologies described above, the invention provides a kind of power-fail detection circuit of direct supply, comprising: partial pressure unit, connect direct supply; Switch element, connect partial pressure unit, and according to partial pressure unit export branch pressure voltage and determine whether conducting; Isolation detection unit, connecting valve unit, and export different detection signals according to the conducting state of switch element.
Wherein, isolation detection unit is light coupling relay, and it comprises: light-emitting component, connecting valve unit, and determines whether luminescence according to the conducting state of switch element; Optical coupled switch, is coupled with light-emitting component, and determines whether conducting according to the luminance of light-emitting component thus export different detection signals.
Wherein, the branch circuit parallel connection that forms of light-emitting component and switch element is between the both positive and negative polarity of direct supply; The control end of optical coupled switch and light-emitting component are coupled and determine optical coupled switch whether conducting with the luminance according to light-emitting component, first path terminal of optical coupled switch connects a high voltage, and the alternate path end of optical coupled switch is by the first resistance eutral grounding, and the alternate path end of optical coupled switch as the output terminal of isolation detection unit to export different detection signals.
Wherein, the branch road that light-emitting component and switch element form comprises the second resistance further, and it is arranged on the branch road that light-emitting component and switch element form, to limit the drive current flowing through light-emitting component.
Wherein, partial pressure unit comprises: voltage stabilizing diode; With the 3rd resistance, connect voltage stabilizing diode; Wherein, the branch circuit parallel connection that voltage stabilizing diode and the 3rd resistance form between the both positive and negative polarity of direct supply, and node between voltage stabilizing diode and the 3rd resistance as the output terminal of partial pressure unit to export branch pressure voltage to switch element.
Wherein, the node between voltage stabilizing diode and the 3rd resistance is connected to switch element by the 4th resistance.
Wherein, switch element is NPN transistor or NMOS field effect transistor.
Wherein, power-fail detection circuit comprises an electric capacity further, to provide electric energy when direct supply power down between its both positive and negative polarity being connected in parallel on direct supply.
Wherein, isolation detection unit connects a microcontroller further, the different detection signal that microcontroller exports according to isolation detection unit and perform corresponding operation.
Wherein, the detection signal that isolation detection unit exports is low level trigger pip or negative edge trigger pip.
Pass through such scheme, the invention has the beneficial effects as follows: by partial pressure unit, dividing potential drop is carried out to direct supply, the branch pressure voltage that switch element exports according to partial pressure unit determines whether conducting, isolation detection unit exports different detection signals according to the conducting state of switch element, so, do not need extra reference circuit, with regard to realizing, isolation detection is carried out to direct supply power down, effectively can avoid interference, ensure detection system reliability service; And circuit structure is succinct, and with low cost, reliability is high, be suitable for voltage range wide.
Accompanying drawing explanation
Fig. 1 is the structural representation of power-fail detection circuit in prior art;
Fig. 2 is the module diagram of the power-fail detection circuit of the direct supply of the embodiment of the present invention;
Fig. 3 is the circuit diagram of the power-fail detection circuit of direct supply in Fig. 2.
Embodiment
Refer to Fig. 2, Fig. 2 is the module diagram of the power-fail detection circuit of the direct supply of the embodiment of the present invention.As shown in Figure 2, the power-fail detection circuit 10 of the direct supply of the embodiment of the present invention comprises partial pressure unit 11, switch element 12, isolation detection unit 13.Partial pressure unit 11 connects direct supply.Switch element 12 connects partial pressure unit 11, and according to partial pressure unit 11 export branch pressure voltage and determine whether conducting.Isolation detection unit 13 connecting valve unit 12, and export different detection signals according to the conducting state of switch element 12.In addition, isolation detection unit 13 in power-fail detection circuit 10 of the present invention can also be connected to a microcontroller 14 further, such as MCU Circuits System, its different detection signal that can export according to isolation detection unit 13 and perform corresponding operation, such as, keep required data, reset etc. in very short time.Wherein, the just very VCC1 of direct supply, negative pole is PGND.The detection signal that isolation detection unit 13 exports can be low level trigger pip or negative edge trigger pip.
The circuit diagram of the power-fail detection circuit 10 that Fig. 3 is the direct supply shown in Fig. 2.As shown in Figure 3, isolation detection unit 13 is light coupling relay, and it comprises light-emitting component 15 and optical coupled switch 16.Wherein, light-emitting component 15 connecting valve unit 12, optical coupled switch 16 and light-emitting component 15 are coupled.The branch circuit parallel connection that light-emitting component 15 and switch element 12 form is between the both positive and negative polarity of direct supply.Light-emitting component 15 determines whether luminescence according to the conducting state of switch element 12.Optical coupled switch 16 determines whether conducting according to the luminance of light-emitting component 15 thus exports different detection signals.
Particularly, control end 161 and the light-emitting component 15 of optical coupled switch 16 are coupled, optical coupled switch 16 whether conducting is determined with the luminance according to light-emitting component 15, first path terminal 162 of optical coupled switch 16 connects a high voltage VCC2, the positive pole of such as another power supply, and the alternate path end 163 of optical coupled switch 16 is by the first resistance 17 ground connection GND, the negative pole of such as another power supply.At this, another power supply can be microcontroller 14 power supply used.That is, optical coupled switch 16 and the first resistance 17 can be connected in parallel on power supply between the both positive and negative polarity of the power supply of microcontroller 14.
In addition, the alternate path end 163 of optical coupled switch 16 as the output terminal of isolation detection unit 13 to export different detection signals.
The branch road that light-emitting component 15 and switch element 12 form comprises the second resistance 18 further, is arranged on branch road that light-emitting component 15 and switch element 12 form, to limit the drive current flowing through light-emitting component 15.The present invention, by carrying out isolation detection to direct supply power down, can effectively avoid interference, and ensures detection system reliability service.
Partial pressure unit 11 comprises voltage stabilizing diode 19 and the 3rd resistance 20.3rd resistance 20 connects voltage stabilizing diode 19.The branch circuit parallel connection (namely between VCC1 and PGND) between the both positive and negative polarity of direct supply that voltage stabilizing diode 19 and the 3rd resistance 20 form, and node Y between voltage stabilizing diode 19 and the 3rd resistance 20 as the output terminal of partial pressure unit 11 to export the control end of branch pressure voltage to switch element 12.Node Y between voltage stabilizing diode 19 and the 3rd resistance 20 can be connected to switch element 12 by the 4th resistance 21.Switch element 12 is NPN transistor or NMOS field effect transistor.When switch element 12 is NMOS field effect transistor, the 4th resistance 21 can omit.
In embodiments of the present invention, power-fail detection circuit 10 comprises an electric capacity 22 further.Electric capacity 22 is connected in parallel between the both positive and negative polarity of direct supply, to provide electric energy when direct supply power down, and can bypass decoupling, filtering interfering.Visible, power-fail detection circuit 10 circuit structure of the present invention is succinct, and the electronic devices and components of employing are cheap, can not increase production cost, and circuit area is little, control is simple.
The specific works process of the isolation detection circuit 10 shown in Fig. 3 is as follows:
The burning voltage VZ that voltage between the positive pole VCC1 of direct supply and negative pole PGND equals voltage stabilizing diode 19 adds the voltage U R1 at the 3rd resistance 20 two ends.When direct supply is normal, the voltage U R1 at the 3rd resistance 20 two ends is greater than the on state threshold voltage of switch element 12, make the controlled conducting of switch element 12, and then make the controlled conducting of isolated controlling unit 13, namely light-emitting component 15 is luminous, and the controlled conducting of optical coupled switch 16, then the output signal POWER_IRQ of power-fail detection circuit 10 maintains high level.
When there is power down in direct supply, voltage between DC power anode VCC1 and negative pole PGND can decline, the burning voltage VZ equaling voltage stabilizing diode 19 due to the voltage between DC power anode VCC1 and negative pole PGND adds the voltage U R1 at the 3rd resistance 20 two ends, the burning voltage VZ of voltage stabilizing diode 19 is constant, therefore the voltage U R1 at the 3rd resistance 20 two ends can decline along with the decline of the voltage between DC power anode VCC1 and negative pole PGND, voltage drop then between DC power anode VCC1 and negative pole PGND to a certain extent time, the voltage U R1 at the 3rd resistance 20 two ends can be less than the on state threshold voltage of switch element 12, make switch element 12 controlled shutdown, and then isolation detection unit 13 controlled shutdown, namely light-emitting component 15 is not luminous, and optical coupled switch 16 controlled shutdown, therefore the output signal POWER_IRQ upset of power-fail detection circuit 10 is low level.And microcontroller 14 detects that the output signal POWER_IRQ of power-fail detection circuit 10 is that namely low level illustrates direct supply power down, thus microcontroller 14 carries out a series of action, such as, in very short time, keep required data, reset etc.This whole process control is simple, and reliability is high, applied widely.
In sum, the present invention carries out dividing potential drop by partial pressure unit 11 pairs of direct supplys, the branch pressure voltage that switch element 12 exports according to partial pressure unit 11 determines whether conducting, isolation detection unit 13 exports different detection signals according to the conducting state of switch element 12, so, do not need extra reference circuit, with regard to realizing, isolation detection is carried out to direct supply power down, effectively can avoid interference, ensure detection system reliability service; And circuit structure is succinct, and with low cost, reliability is high, be suitable for voltage range wide.
The foregoing is only embodiments of the invention; not thereby the scope of the claims of the present invention is limited; every utilize instructions of the present invention and accompanying drawing content to do equivalent structure or equivalent flow process conversion; or be directly or indirectly used in other relevant technical fields, be all in like manner included in scope of patent protection of the present invention.