Voltage detection circuit
Technical field
The present invention is about a kind of voltage detecting circuit, particularly about a kind of voltage detection circuit that supply voltage is detected.
Background technology
Voltage undersupply problem can often appear in the power supply voltage of electronic system, especially makes battery-powered the time, and when battery electric quantity was not enough, cell voltage can descend by certain curve, and when brownout, system then may operation irregularity.
For above-mentioned reasons, electronic system generally all has voltage detection circuit to prevent brownout.Figure 1 shows that a kind of conventional power source voltage detecting circuit in the prior art, the conventional power source voltage detecting circuit is made up of reference voltage circuit 101, resistor voltage divider circuit 102, schmidt trigger comparer 103 and latch 104, VDD obtains voltage VIN through resistance R 1 and resistance R 2 dividing potential drops, be connected with the positive input terminal of schmidt trigger comparer 103, the negative input end of schmidt trigger comparer 103 is connected with reference voltage V REF.Its principle of work is: when VIN is lower than VREF, and schmidt trigger comparer 103 output high level, output node MRK is a high level; And when VIN is higher than VREf, schmidt trigger comparer 103 output low levels, output node MRK is a low level.The variation of VDD causes VIN magnitude of voltage linear change by resistance R 1 and resistance R 2 dividing potential drops, and reference voltage does not change with VDD, so just can change according to the level of output node MRK and realize the voltage detecting function.As seen the conventional power source voltage detecting circuit mainly is to utilize the comparer of band Schmidt's trigger comparator (Schmitt Trigger) to detect the start voltage threshold Vtph of supply voltage VDD and the voltage threshold Vtpl that shuts down;
Fig. 2 is a kind of circuit structure diagram of typical schmidt trigger comparer, can obtain following equation according to its principle:
By what typical case schmidt trigger comparer output high level V
OHWith low level V
OLCorresponding respectively start voltage threshold Vtph and shutdown voltage threshold Vtpl can obtain as drawing a conclusion according to aforesaid equation so:
Resistance ratio and reference voltage are not only depended in the accuracy that this shows start voltage threshold Vtph of the prior art and shutdown voltage threshold Vtpl, also depend on schmidt trigger comparer (Schmitt TriggerCompartor), and the high level of schmidt trigger comparer output V
OHWith low level output V
OLOften have than great fluctuation process, its value is very inaccurate.Fig. 3 is the synoptic diagram that concerns between the supply voltage of conventional power source voltage detecting circuit and the output node voltage.As seen, the start voltage threshold Vtph of different product and the consistance of shutdown voltage threshold Vtpl very poor (the oblique line part is very wide) therefore may cause testing result inaccurate.
In sum, the start voltage threshold of voltage detection circuit and shutdown voltage threshold depend on Schmidt trigger fully and cause the consistance of start voltage threshold and shutdown voltage threshold relatively poor in the prior art as can be known, cause the testing result of supply voltage inaccurate, therefore be necessary to propose improved technological means in fact, solve this problem.
Summary of the invention
For overcoming the relatively poor inaccurate shortcoming of testing result that causes of consistance that above-mentioned prior art exists owing to different product start voltage threshold and shutdown voltage threshold, fundamental purpose of the present invention is to provide a kind of voltage detection circuit, it is by dynamically sampling to supply voltage, make the start voltage threshold only relevant, can not take special process can guarantee the to start shooting accuracy of voltage threshold and the voltage threshold that shuts down with resistance ratio and reference voltage with the shutdown voltage threshold.
For reaching above-mentioned and other purpose, a kind of voltage detection circuit of the present invention comprises at least:
Reference voltage circuit is used to produce reference voltage;
Dynamic sample circuit, one end is connected to the supply voltage anode, be used for this supply voltage acquisition sample voltage of dynamically sampling, make that the sampling ratio is little when supply voltage is lower than the shutdown threshold value, and the sampling ratio is big when supply voltage is higher than the start threshold value, and order shutdown threshold voltage is lower than the start threshold voltage;
Comparator circuit, its positive input terminal are connected to this dynamic sample circuit, are used to obtain this sample voltage, its negative input end is connected to this reference voltage circuit, be used to obtain this reference voltage, this comparator circuit is exported a logical signal after this sample voltage and this reference voltage are compared;
Latch, its input end are connected to this comparator circuit output terminal, are used for this logical signal being kept and exporting the output level that meets the logical circuit requirement, and this output level is used for the detection to this supply voltage; And
Inverter circuit, its input end is connected with this latch output terminal, output terminal is connected to this dynamic sample circuit, this inverter circuit carries out anti-phase back to the output signal of this latch and generates this sampling control signal, and export this sampling control signal the grid of this nmos pass transistor to, to control the break-make of this nmos pass transistor.
Further, this dynamic sample circuit comprises a nmos pass transistor and is connected in series in first resistance, second resistance and the 3rd resistance between this supply voltage and the ground successively, this first resistance is connected with the positive input terminal of this comparator circuit with the common node of this second resistance, this second resistance is connected with the drain electrode of this nmos pass transistor with the common node of the 3rd resistance, this nmos pass transistor source ground, grid is connected with the output terminal of this inverter circuit.
In addition, this dynamic sample circuit also can be realized by a PMOS transistor and first resistance, second resistance and the 3rd resistance that are connected in series in successively between this supply voltage and the ground.This PMOS transistor source connects power supply, and drain electrode is connected with the common node of this second resistance with this first resistance, and grid is connected with the output terminal of this inverter circuit, and this second resistance is connected with the positive input terminal of comparer with the common node of the 3rd resistance.
Inverter circuit, its input end is connected with this latch output terminal, output terminal is connected to this dynamic sample circuit, this inverter circuit carries out anti-phase back to the output signal of this latch and generates this sampling control signal, and export this sampling control signal to this PMOS transistorized grid, to control the transistorized break-make of this PMOS.
Above-mentioned comparator circuit is an operational amplifier.
Compared with prior art, a kind of voltage detection circuit of the present invention is dynamically sampled to supply voltage by utilizing dynamic sample circuit, and this dynamic sample circuit is controlled by inverter circuit, make that supply voltage sampling ratio is little when supply voltage is lower than the shutdown threshold value, and be higher than start and could start shooting during threshold value when supply voltage rises to, this supply voltage sampling ratio is big after the start, when descending greatly, supply voltage just shuts down, order start voltage threshold is only relevant with resistance ratio and reference voltage with the shutdown voltage threshold, reached the purpose of not taking special process can guarantee to start shooting voltage threshold and shutdown voltage threshold accuracy, improved the accuracy that supply voltage detects, thereby guaranteeing has enough electric weight just to start shooting, and just shutdown after electric weight fully uses after the start, do not make system's confusion during with the assurance beginning because of power supply transient voltage deficiency,, electric weight do not shorten working hours during work because of using to shut down
Description of drawings
Fig. 1 is the circuit structure diagram of conventional power source voltage detecting circuit;
Fig. 2 is a kind of circuit structure diagram of typical schmidt trigger comparer;
Fig. 3 concerns synoptic diagram between supply voltage and the output node voltage in the conventional power source voltage detecting circuit;
Fig. 4 is the circuit structure diagram of a kind of voltage detection circuit first preferred embodiment of the present invention;
Fig. 5 is the synoptic diagram that concerns of supply voltage in the present invention's first preferred embodiment and output node voltage;
Fig. 6 is the circuit structure diagram of a kind of voltage detection circuit second preferred embodiment of the present invention.
Embodiment
Below by specific instantiation and accompanying drawings embodiments of the present invention, those skilled in the art can understand other advantage of the present invention and effect easily by the content that this instructions disclosed.The present invention also can be implemented or be used by other different instantiation, and the every details in this instructions also can be based on different viewpoints and application, carries out various modifications and change under the spirit of the present invention not deviating from.
Fig. 4 is the circuit structure diagram of a kind of voltage detection circuit first preferred embodiment of the present invention.As shown in Figure 4, a kind of voltage detection circuit of the present invention comprises dynamic sample circuit 201, reference voltage circuit 202, comparator circuit 203, latch 204 and inverter circuit 205, dynamically sample circuit 201 1 ends are connected with supply voltage VDD anode, other end ground connection, its output terminal is connected to comparator circuit 203, it is used for supply voltage VDD is dynamically sampled, sampling ratio little (corresponding supply voltage height) when back voltage rises so that start shooting, and start back voltage sampling ratio big (corresponding supply voltage is low) when descending, promptly the shutdown after want voltage enough the height could start shooting, to guarantee to be unlikely to because the big electric current of start makes system's confusion, and voltage is low to moderate to a certain degree just shutdown under the open state, to guarantee to work long hours the assurance user demand as far as possible, dynamically the sample voltage VIN of sample circuit 201 sampling acquisitions is sent to the positive input terminal of comparator circuit 203, simultaneously, reference voltage circuit 202 is connected to the negative input end of comparator circuit 203, the reference voltage V REF of the sample voltage VIN of sampling acquisition and reference voltage circuit 202 generations is after comparator circuit 203 compares like this, output one controls signal to latch 204 and carries out exporting the output level MRK that meets the logical circuit requirement after the shaping, simultaneously, latch 204 also feeds back to inverter circuit 205 with output level MRK, after 205 pairs of these output level negates, export dynamic sample circuit 201 to, to control the sampling of dynamic sample circuit, simultaneously, inverter circuit 205 also is used for sampling control signal and output level MRK are isolated, in order to avoid the phase mutual interference.
In the present invention's first preferred embodiment, dynamically sample circuit 201 specifically comprises first resistance R 1, second resistance R 2, the 3rd resistance R 3 and nmos pass transistor T1, first resistance R 1, second resistance R 2 and the 3rd resistance R 3 are connected in series between supply voltage VDD and the ground successively, first resistance R, 1 one ends are connected with supply voltage VDD, the other end links to each other with second resistance R 2 and the positive input terminal that is connected to comparator circuit 203 is formed first node 1, first node 1 is the output terminal of sample voltage VIN just, the common node of second resistance and the 3rd resistance is connected with the drain electrode of nmos pass transistor T1 and forms Section Point 2, nmos pass transistor T1 source ground, its grid is connected to the output terminal of inverter circuit 205; Reference voltage circuit 202 output reference voltage VREF are to the negative input end of comparator circuit 203, comparator circuit 203 is specifically as follows an operational amplifier, its output terminal is connected to the input end of latch 204, after the sample voltage VIN of 203 pairs of inputs of comparator circuit and reference voltage V REF compare, export a logical signal to latch 204, this logical signal keeps via latch 204 and exports the output level MRK that meets the logical circuit requirement, and the level state of this output level MRK can reflect the variation of supply voltage VDD; The output terminal of latch 204 also is fed back to the input end of inverter circuit 205, the output terminal of inverter circuit 205 is connected to the grid of the nmos pass transistor T1 of dynamic sample circuit 201, this phase inverter carries out anti-phase back generation sampling control signal to the MRK signal of input, and export this sampling control signal the grid of nmos pass transistor T1 to, with the break-make of control nmos pass transistor T1.
When the voltage detection circuit of the present invention's first preferred embodiment was connected with the mains, the original state of
inverter circuit 205 was the output high level, NMOS pipe T1 conducting, and the 3rd resistance R 3 is by short circuit.When supply voltage VDD when low voltage begins to rise, the sample voltage VIN voltage of the positive input terminal of
comparator circuit 203 is lower than the reference voltage V RRF of its negative terminal input, and when supply voltage VDD rises to Vtph, the sample voltage VIN voltage of first node 1 equals reference voltage, according to voltage divider principle, the sample voltage VIN of first node 1 is
The supply voltage VDD voltage threshold Vtph that promptly starts shooting of this moment, simple operation obtains
Because the comparer gain is very high, so when supply voltage is lower than Vtph, comparer is output as low level, after
latch 204 shapings, form the output level MRK that meets the logical circuit requirement, this output level MRK becomes high level after
inverter circuit 205 is anti-phase, this high level control nmos pass transistor T1 keeps conducting.
As supply voltage VDD during a little more than start voltage threshold Vtph, because the comparer gain is very high, so the comparer output voltage becomes high level rapidly, after
latch 204 shapings, form the output level MRK that meets the logical circuit requirement, this output level MRK becomes low level after
inverter circuit 205 is anti-phase, the grid that this low level is connected to nmos pass transistor T1 ends the NMOS pipe, and this moment, the voltage VIN of first node 1 was
This voltage is higher than Vref, and when supply voltage was higher than start voltage threshold Vtph, output level MRK kept high level, and when supply voltage VDD dropped to shutdown voltage threshold Vtpl, the voltage VIN of first node 1 equaled Vref, promptly
Simple operation obtains
This is shutdown voltage threshold Vtpl.
By above-mentioned start voltage threshold Vtph and shutdown voltage threshold Vtpl expression formula as can be seen, the start voltage threshold of circuit shown in the present and shutdown voltage threshold are only relevant with resistance ratio and reference voltage, though and the characteristics of integrated circuit just are device absolute value very inaccurate (may be greater than 20% as the resistance absolute value error) but relative value is very accurate, as long as reference voltage accurately promptly can guarantee the accuracy of threshold value, and reference voltage is easy to do very accurately as adopt bandgap reference voltage (Bandgap Voltage), so the present invention guarantees the accuracy of start voltage threshold and shutdown voltage threshold can not take special process the time.Fig. 5 is the synoptic diagram that concerns of the present invention first preferred embodiment supply voltage VDD and output node MRK, as seen, compared with prior art, the present invention first is greatly improved (the oblique line part obviously narrows down) with the consistance of shutdown voltage threshold Vtpl than the start voltage threshold Vtph in the preferred embodiment, and testing result can be more accurate like this.
Fig. 6 is the circuit structure diagram of a kind of voltage detection circuit second preferred embodiment of the present invention.Be that with the present invention's first preferred embodiment difference the dynamic sample circuit 201 of the present invention's second preferred embodiment comprises first resistance R 1, second resistance R 2, the 3rd resistance R 3 and PMOS transistor P1.Because its concrete principle of work part is similar to the present invention's first preferred embodiment, does not repeat them here.
As seen, the present invention dynamically samples to supply voltage by utilizing dynamic sample circuit, make that the preceding supply voltage sampling of start ratio is little, supply voltage sampling ratio in start back is big, order start voltage threshold is only relevant with resistance ratio and reference voltage with the shutdown voltage threshold, reach the purpose of not taking special process can guarantee to start shooting voltage threshold and shutdown voltage threshold accuracy, improved the accuracy that supply voltage detects.
The foregoing description is illustrative principle of the present invention and effect thereof only, but not is used to limit the present invention.Any those skilled in the art all can be under spirit of the present invention and category, and the foregoing description is modified and changed.Therefore, the scope of the present invention should be listed as claims.