# Patent

## Title
Voltage comparator

## Abstract

A voltage comparator with comparing means that are energized upon the occurrence of a clock-edge and that are de-energized when the comparison operation is completed. The comparing means are preceded by a voltage divider (D) for dividing the voltage to be compared and a switch (S8) in series with the voltage divider for preventing current flow through the voltage divider when the comparing means are de-energized.

## Background
The invention relates to a voltage comparator for comparing an input voltage with a reference voltage, said voltage comparator comprising comparing means and clock-signal controlled switching means connected to said comparing means for energizing the comparing means upon a transition of the clock-signal and means for determining the completion of a comparison and for controlling the switching means for switching off the energizing of the comparing means when the completion of a comparison is determined. A voltage comparator of this kind is known from European patent application 1.026.826.
Such comparators are of particular interest for monitoring the battery of mobile products. In such products it is of primary importance that on the one hand the battery charge is monitored with sufficient accuracy and on the other hand the voltage comparator itself draws as less current as possible from the battery. One way to minimize the consumption of the comparator is to operate the comparator with reduced bias current, however this goes at the cost of the accuracy of the measurement. Another way is to operate the comparator intermittently. This may e.g. be done by activating the comparator only on “high” states of a clock signal of 1 KHz with small duty cycle, so that the actual comparison operation takes place only during a small portion of the 1 mS clock period.
A drawback of this method is that, when the said portion is too small, the comparator is switched off when the comparison is not yet finished, so that an incorrect result is obtained. On the other hand, when the portion during which the comparator is active, is too high the power consumption of the comparator is unnecessarily high. To overcome this, the prior art voltage comparator comprises means to determine the instant of completion of the comparison and to switch the comparator off when this instant has arrived.
Conveniently, in the voltage comparators of the above described kind, the reference voltage is obtained by an arrangement which is known in the art as a “bandgap”-voltage generator. Such reference voltage is about equal to 1.2 Volt and is substantially temperature independent. However, this means tat input voltages can only be compared with 1.2 Volt. The present invention seeks to avoid this limitation while still a low power consumption of the voltage comparator is maintained and the voltage comparator of the invention is therefore characterized by a voltage divider for dividing the input voltage to be compared, the switching means comprising a switch connected in series with the voltage divider for inhibiting the flow of current through the voltage divider when the comparison means are de-energized. In this way, the power consumption of the voltage divider can be minimized to only a small fraction of the power consumption of an un-switched voltage divider. The lower power consumption also allows using a voltage divider of lower resistance with the advantage that lesser die area is occupied by the voltage divider.
The voltage comparator according to the present invention may be further characterized by said switching means comprising a Schmitt Trigger having an input which is controlled by the signal that controls said switch connected in series with the voltage divider, and whose output controls the energizing and de-energizing of the comparing means. The purpose of this Schmitt Trigger is to ensure that the said switch is fully “on” and consequently its impedance is sufficiently low, before the comparing means become operative.
The voltage comparator of the present invention may still further be characterized by said comparing means having two substantially identical outputs, said switching means being arranged to force different voltages to said outputs when the comparing means are de-energized and an exclusive OR gate connected to said two outputs for determining the completion of a comparison when the two output voltages are substantially equal and for controlling, through a clock controlled latch, the de-energizing of the comparing means and the switching off of the voltage divider. This arrangement presents a simple and reliable means for determining the conclusion of the comparing operation.


The invention will be described with reference to the accompanying FIGURE, which shows a synoptic circuit diagram of a voltage comparator according to the invention.
The voltage comparator of this figure comprises two NMOS transistor T1 and T2 whose source electrodes are interconnected to a common current source I. The gate electrode of the transistor T1 is connected to a voltage to be sensed Vs and the gate electrode of the transistor T2 is connected to a reference voltage Vr. The drain current of transistor T1 is mirrored through a first current mirror of PMOS transistors T3, T4, followed by a second current mirror of NMOS transistors T5, T6 and a third current mirror of said transistor T5 and an NMOS transistor T7. The drain current of transistor T2 is mirrored through a fourth current mirror of PMOS transistors T8, T9 and a fifth current mirror of said transistor T8 and a PMOS transistor T10. The drain electrodes of the transistors T6 and T9 are interconnected to constitute an output node N1 and the drain electrodes of transistors T7 and T10 are interconnected to constitute a second output node N2. This latter output node is coupled, to an input d of a clocked latch L1 with clock input c and output terminal q. This output terminal q is coupled to an output O of the voltage comparator. It may be observed that the nodes N1 and N2 constitute the output terminals of two output stages, which are, apart from the switches S1 and S2, identical in construction and whose output voltages consequently will end up at the same value. When this situation occurs the comparison may be considered as being finalized and the comparator may safely be cut off.
The nodes N1 and N2 are each connected through a Schmitt trigger M1 and M2 respectively to an input of a XOR-gate X. The output of the XOR gate X resets a second clock-controlled latch L2, through a third Schmitt trigger M3 and an inverter W. Equally as the latch L1, also the latch L2 comprises an input terminal d, an output terminal q, a clock input c and moreover a reset input r. The input terminal d is connected to the positive supply voltage. When a rising edge appears at the clock input c, the latch will transmit the positive voltage at the input d to its output q and when the reset input r receives a “high” from the inverter W the output q of the latch will return to “low”.
The voltage comparator of FIG. 1 further comprises switches S1, S2, S3 and S4 that are controlled by the output q of the latch L2 through a fourth Schmitt trigger M4. The connections between this Schmitt Trigger and the switches are not shown in the figure. The switch S1 connects the node N1 to the positive supply when the latch L2 is reset and the switch S2 connects the node N2 to the negative supply when this latch L2 is reset. Therefore, one of the inputs of the XOR-gate X is “high” and the other input is “low” making the output of the XOR-gate “high”. When the latch L2 is reset, the switch S3 disconnects the interconnected source electrodes of the comparator transistors T1 and T2 from the current source I and the switch S4 connects the gate electrodes of the current mirror transistors T5, T6 and T7 to the negative supply
In operation, when a rising edge appears at the clock input c of the latch L2, its output q will, through the Schmitt trigger M4, open the switches S1, S2 and S4 and close the switch S3, as shown in the figure. This will put the comparator into operation and the two nodes N1 and N2 will not be stuck anymore to the positive and negative supply voltages respectively. When the voltage to be sensed Vs is higher than the reference voltage Vr the drain current of T1, mirrored to T6, will pull the voltage of the node N1 down until this voltage is equal to the voltage of node N2. On the other hand, when the voltage Vs is lower than the reference voltage Vr, the drain current of T2, mirrored to T10 will push the voltage of the node N2 up until this voltage is equal to the voltage of node N1. In both cases the end result is that the two node voltages are equal, so that the output of the XOR-gate will fall to “low”. This will through the Schmitt trigger M3 give a “high” at the output of the inverter W. This “high” will reset the latch L2, the output of this latch becomes “low” and this will deactivate the comparator circuit until a new rising edge of the clock input appears. Consequently, when the comparison operation is completed the comparator will be shut off and any further power consumption is stopped. A standard comparator draws in operation a bias current that is typically 2 μA. The comparison time is 5 μs in the worst case. When the comparison is performed every 1000 μs, then the average consumption of the comparator is reduced to 2 μA/200=10 nA. It may be noted that the Schmitt Triggers, the XOR gate and the latches in CMOS technology, just like other gates in this technology, only draw a very short peak of current during the transition from “Low” to “High” and vice versa.
As explained in the introduction, the reference voltage Vr. often has a fixed value of 1.2V. In order to be able to compare at a plurality of voltage levels, the voltage comparator of figure 1 comprises a voltage divider D, which has a plurality of series connected resistors R1, K2, K3, R4, K5 and switches S5, S6 and S7 bridging the resistors R 2, R3 and R4 respectively. Moreover in series wit the voltage divider is a switch Sa, connected between the resistor K5 and the negative supply terminal (ground). The voltage Vin, whose value has to be monitored by the voltage comparator, is applied to the resistor R1 and the voltage Vs that is applied to the gate electrode of the transistor T1, is derived from the interconnection of the resistors R4 and K5. A control unit U controls the position of the switches S5, S6 and S7 so that several comparison levels can be set. Of course, when only one comparison level is required, the switches S5, S6 and S7 can be dispensed with and one single resistor can replace the resistors R1 to R4.
The switch S8 is controlled by the output of the latch L2, substantially simultaneously with the switches S1 to S4. Thus, when the comparator is switched off from the supply, also current through the voltage divider is stopped so that the battery to be monitored is no longer loaded. This is a very important feature of the comparator shown in the FIGURE. With a 300 kΩ voltage divider and a voltage Vin to be monitored of 3 Volt the current through the voltage divider is 10 μA i.e. substantially more than the operational current of the comparator. By switching off the voltage divider substantially simultaneously with the switching off of the comparator the mean current through the voltage divider is reduced by the same factor (e.g. 200) as the reduction of the mean current of the comparator. The resistance value of the voltage divider can also be reduced, e.g. from 300 kΩ to 100 kΩ. to decrease the die area Resistor dividers are among the components that are most responsible for the consumption of die area in the IC. The switching of the voltage divider enables thus to reduce simultaneously the die area (e.g. with a factor 3) and the current consumption (e.g. with a factor of nearly 70).
Two capacitors (not shown) may be connected across the source-drain path of the transistors T6 and T10 respectively. They prevent any parasitic simultaneous bias of both nodes N1 and N2 to the same value just after the trigger of the comparator, because this would lead to a wrong detection.
Special attention has to be paid to the function of the Schmitt Trigger M4. This Schmitt Trigger ensures that the comparator is not switched on before the switching voltage to the switch S8 has reached a sufficiently high value. Consequently it is ensured that the resistive voltage divider is sufficiently “on” when the comparator becomes operative. The Schmitt Trigger also ensures that the switching of the comparator is done in a very short period of time, so that it is immediately fully operative. For example, if the supply voltage is 3 Volts then the switching voltage to the switches S1 to S4 will switch from 0 to 3V when the switching voltage to the switch S8 will have reached almost 3V e.g. 2,5 V.
For similar reasons the Schmitt triggers M1 to M3 are introduced. The Schmitt triggers M1 and M2 ensure that the nodes N1 and N2 effectively reach an equal value before to shut down the comparator. This is an additional security along with the aforementioned capacitors. The Schmitt trigger M3 ensures that the output at node N2 is effectively stored in the latch L1 before the comparator is shut down.

## Claims

1. A voltage comparator for comparing an input voltage with a reference voltage, said voltage comparator comprising: comparing means (T1 to T10), and clock-signal controlled switching means (S1to S4) connected to said comparing means for energizing the comparing means upon a transition of a clock-signal, determining means (M1, M2, X, M3, V) for determining a completion of a comparison and for controlling the clock-signal controlled switching means (S1 to S4) for de-energizing the comparing means when the completion of a comparison is determined, and a voltage divider (D) for dividing the input voltage to be compared, the clock-signal controlled switching means comprising a switch (S8) connected in series with the voltage divider (D) for inhibiting a flow of current through the voltage divider when the comparison means is de-energized wherein said clock-signal controlled switching means comprising a Schmitt Trigger (M4) having an input which is controlled by a signal that controls said switch (S8) connected in series with the voltage divider, and having an output controls the energizing and de-energizing of the comparing means.

2. A voltage comparator for comparing an input voltage with a reference voltage, said voltage comparator comprising: comparing means (T1 to T10), and clock-signal controlled switching means (S1 to S4) connected to said comparing means for energizing the comparing means upon a transition of a clock signal, determining means (M1, M2, X, M3, V) for determining the a completion of a comparison and for controlling the clock-signal controlled switching means (S1 to S4) for de-energizing the comparing means when the completion of a comparison is determined, a voltage divider (D) for dividing the input voltage to be compared, the clock-signal controlled switching means comprising a switch (S8) connected in series with the voltage divider (D) for inhibiting the a flow of current through the voltage divider when the comparison means is de-energized wherein said comparing means having two substantially identical outputs (N1, N2), said clock-signal controlled switching means being arranged to force different voltages to said two substantially identical outputs when the comparing means is de-energized and said determining means comprising an exclusive OR gate (X) connected to said two substantially identical outputs for determining the completion of a comparison when the two output voltages of said two substantially identical outputs are substantially equal and for controlling, through a clock controlled latch (L2), the de-energizing of the comparing means and the inhibition of current flow through the voltage divider.