Abstract:
A dual-threshold voltage comparator circuit utilizes a single input pin of an integrated circuit and an external resistor network. Appropriate selection of the resistors comprising the resistor network permits independent setting of the dual thresholds of the comparator.

Description:
BACKGROUND AND SUMMARY OF THE INVENTION 
     This invention relates generally to voltage comparator circuits and, more particularly, to a dual-threshold voltage comparator circuit that utilizes a single input pin. 
     In many battery-powered applications, a monitoring circuit is used to monitor the voltage of the discharging battery. Typically, the monitoring circuit will generate a Low Battery Indicator (LBI) signal when the battery voltage drops below a certain threshold. Due to varying loading and battery chemistries among different applications, it is not uncommon to resistively divide and compare the battery voltage to a fixed reference, as illustrated in the prior art circuit of FIG. 1. Such an arrangement allows the precise voltage threshold of the LBI signal to be set by properly selecting the ratio of the resistor divider. 
     In some applications, a secondary indicator is desirable to indicate when a dead battery condition exists. Certain rechargeable battery chemistries can be permanently damaged if allowed to discharge excessively. The generation of a Dead Battery Indicator (DBI) signal can be used to shut down a system and prevent further current draw from the battery. One known method for generating the DBI signal is to create a comparator circuit secondary to the LBI comparator using an additional resistor divider and input: pin, as illustrated in the circuit of FIG. 2. This prior circuit is disadvantageous in that it requires an additional input pin and a resistive divider, which add to the cost of the system. 
     An alternative approach for generating both the LBI and DBI signals utilizing a single input pin is illustrated in the prior art circuit of FIG. 3. The resistor ratio (R1/R2) is properly selected to set the threshold of the Low Battery Indicator signal. The threshold of the Dead Battery Indicator signal tends to track to the threshold of the LBI signal with a scaling factor that is dependent on the ratio of the reference voltages V REF1  and V REF2 . Since the reference voltages V REF1  and V REF2  are generally fixed, this approach requires that the threshold of the DBI signal be a fixed percentage of the threshold of the LBI signal. Due to varying requirements of different applications, this prior art approach is undesirable. 
     It would be advantageous to provide a dual-threshold comparator circuit in which the thresholds of the LBI and DBI signals can be independently set using a single input pin and a single resistive divider. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 is a schematic block diagram of a typical prior art voltage comparator utilizing a single input pin and a single threshold level. 
     FIG. 2 is a schematic block diagram of a prior art dual-input dual-threshold voltage comparator. 
     FIG. 3 is a schematic block diagram of a prior art single-input dual-threshold volage comparator. 
     FIG. 4A is a schematic block diagram of a single-input dual-threshold voltage comparator in accordance with a first embodiment of the present invention. 
     FIG. 4B illustrates waveforms of the input and output signals associated with the circuit of FIG. 4A. 
     FIG. 5 is a schematic diagram of a circuit implementing the current sense and compare block of FIG. 4A. 
     FIG. 6A is a schematic block diagram of a single-input dual-threshold voltage comparator in accordance with a second embodiment of the present invention. 
     FIG. 6B illustrates waveforms of the input and output signals associated with the circuit of FIG. 6A. 
     FIG. 7A is a schematic block diagram of a single-input dual-threshold voltage comparator in accordance with a third embodiment of the present invention. 
     FIG. 7B illustrates waveforms of the input and output signals associated with the circuit of FIG. 7A. 
     FIG. 8A is a schematic block diagram of a single-input dual-threshold voltage comparator in accordance with a fourth embodiment of the present invention. 
     FIG. 8B illustrates waveforms of the input and output signals associated with the circuit of FIG. 8A. 
    
    
     DESCRIPTION OF THE PREFERRED EMBODIMENTS 
     Referring now to FIG. 4A, there is shown a typical application circuit in accordance with a first preferred embodiment of the present invention in which an input pin 401 of a comparator 400 is connected to an input voltage source V IN  through an external resistor network 101, 102. Resistors 101, 102 have resistance values R1 and R2, respectively, that are dependent upon application requirements. A reference 402 provides a reference voltage V REF  that is applied to the positive input of of a high gain amplifier 403. The negative input of amplifier 403 is connected to input pin 401. The output of amplifier 403 is connected to input pin 401 through a resistor 404. The circuitry just described implements a closed-loop active network including amplifier 403 such that the voltage at input pin 401 will be virtually equal to the voltage V REF  generated by reference 402. A feedback current I FB  will be a linear function of the input voltage V IN . The transfer characteristics from V IN  to I FB  will be dependent upon the fixed reference V REF  and the values of resistors 101, 102. FIG. 4B illustrates the linear relationship between the input voltage V IN  and the feedback current I FB . The resistance ratio R1/R2 and the absolute value of resistance R1, respectively, dictate the x-intercept and slope of the transfer characteristics illustrated in that drawing figure. 
     A current sense and compare circuit 405 of FIG. 4A serves to sense and compare the feedback current I FB  to reference currents I REF1  and I REF2  and to generate output signals Out1 and Out2, respectively. Any of a number of common circuit configurations for sense and compare circuit 405 may be chosen, an exemplary one of which is illustrated in FIG. 5. Reference currents I REF1  and I REF2  typically comprise fixed current references, but could be made variable, depending on operating conditions. Referring again to FIG. 4B, a threshold voltage V TH1  is defined to correspond to an input voltage V IN  that produces a feedback current I FB  equal to the reference current I REF1 . A threshold voltage V TH1  corresponds to an input voltage V IN  below which the output signal Out1 will be asserted. Otherwise, the output will not be asserted. In a fashion similar to the description above with respect to threshold voltage V TH1  a second threshold voltage V TH2  is defined to correspond to a reference current I REF2 . Additional threshold voltages may be defined in correspondence with additional reference currents I REFn . However, the transfer function between the reference currents I REFn  and their corresponding threshold voltages will be linearly dependent upon the I FB  /V IN  characteristics defined by the external resistor network 101, 102. 
     Referring now to FIG. 5, there is shown a schematic diagram of a circuit for implementing the Current Sense and Compare Circuit block 405 of FIG. 4A. The feedback current I FB  flowing through resistor 404 will produce a voltage drop across resistor 404 equal to the product of the feedback current I FB  and the resistive value RFB of resistor 404. The voltage drop across resistor 404 is buffered and referenced to ground utilizing differential amplifier 505. The resulting voltage at the output of differential amplifier 505 will be equal to the product of I FB  and R FB . The voltage (I FB  *R FB ) generated by differential amplifier 505 is applied to the negative inputs of voltage comparators 503 and 504. 
     The voltage present at the positive input of voltage comparator 503 will be generated by a reference current I REF1  flowing into resistor 501 with a value of R FB . The resulting voltage present at the positive input pin of voltage comparator 503 will be equal to the product of I REF1  and R FB . Similarly, reference current I REF2  and resistor 502 will generate a voltage present at the positive input of voltage comparator 504 with a value equal to the product of I REF2  and R FB . 
     The output of voltage comparator 503 will be asserted when the voltage (I REF1  *R FB ) present on the positive input is greater than the voltage (I FB  *R FB ) present on the negative pin. The voltages present at both inputs of voltage comparator 503 have a common proportionality to the common resistor value R FB  of resistors 501 and 404. Thus, it can be concluded that the output of voltage comparator 503 will be asserted when the feedback current I FB  is less than the reference current I REF1 . Similarly, the output of voltage comparator 504 will be asserted when the feedback current I FB  is less than the reference current I REF2 . 
     Referring now to FIG. 6A, there is shown a typical application circuit in accordance with a second embodiment of the present invention in which an input pin 601 of a comparator 600 is coupled to an input voltage source V IN  through a resistor network 101, 102. Resistors 101, 102 have resistance values R1 and R2, respectively, that are dependent upon application requirements. A reference 602 provides a reference voltage V REF  that is applied to the positive input of of a high gain amplifier 603. The negative input of amplifier 603 is connected to input pin 601. The output of amplifier 603 provides a feedback current I FB  to the input pin 601 such that the closed loop characterisitcs attempt to maintain a voltage at input pin 601 that is virtually equal to the voltage generated by reference 602. As in the case of the embodiment of FIG. 4A described above, the transfer characteristics between the input voltage V IN  and the feedback current I FB  will be dependent upon the selected values R1, R2 of resistors 101, 102. 
     Normally, with no limitations on the magnitude of the feedback current I FB , the voltage on the input pin 601 will remain substantially equal to the voltage supplied by reference V REF . By limiting the feedback current I FB  to minimum and maximum values, the voltage on the input pin 601 can deviate from the reference voltage V REF  when the feedback current I FB  saturates to either the minimum or maximum values of I FB . A voltage V A  on the input pin 601 thus becomes a resistively divided version of the input voltage V IN  exhibiting a &#34;flat spot&#34; when the amplifier 603 is operating in a linear region. 
     Circuit block 605 serves to sense and compare the voltage V A  on the input pin 601 to reference voltages V REF1  and V REF2  and to generate output signals Out1 and Out2. respectively. Any of a number of common sense and compare circuits may be chosen to implement circuit block 605. Referring now to FIG. 6B, a threshold voltage V TH1  is defined to correspond to an input voltage V IN  that produces a voltage on the input pin 601 equal to the reference voltage V REF1 . The value of the threshold voltage VTH1 will be dependent upon the selection of the values R1, R2 of resistors 101, 102, and upon the fixed references V REF1 , V REF , and I FB (MIN). Similar to the foregoing description, a second threshold voltage V TH2  is defined to correspond to reference voltage V REF2 . The threshold voltages V TH1  and V TH2  may be independently set by appropriate selection of the values R1, R2 of resistors 101, 102. Additional threshold voltages may be defined to correspond to additional reference voltages V REFn , as illustrated in FIG. 6A. However, the transfer functions between the additional reference voltages V REFn  and their corresponding threshold voltages will be linearly dependent upon a feedback current step I FB  and the V A  /V IN  characteristics defined by the resistors 101, 102. 
     Referring now to FIG. 7A, there is shown a typical application circuit in accordance with a third embodiment of the present invention in which an input pin 701 of a comparator 700 is coupled to an input voltage source V IN  through a resistor network 101, 102. Resistors 101, 102 have resistance values R1and R2, respectively, that are dependent upon application requirements. A reference 702 provides a reference voltage V REF  that is applied to the positive input of a comparator 703. The negative input of comparator 703 is connected to input pin 701. An output signal Out appears at the output of comparator 703. The output of a clock circuit 704 enables a current source 705 that can be stepped between two current values, one of which is typically zero, depending upon the enable signal. 
     Assuming that the current provided by current source 705 is toggling between a minimum value of zero and maximum value of I STEP , the voltage on the input pin 701 will be toggling between two values that are dependent upon the values of the external resistors 101, 102, the value of the input voltage V IN , and the value of the step current I STEP . The toggling voltage on the input pin 701 will have a peak voltage and a valley voltage which will shift upward and downward with changes in the input voltage V IN . If V IN  is sufficiently high, both the peak and valley voltages will be greater than the reference voltage V REF  generated by reference 702. In such a state, the output of comparator 703 will always be low, as indicated by the first state of operation illustrated in FIG. 7B. 
     As the input voltage V IN  drops, the peak and valley voltages described above will drop proportionately. A second state of operation will exist in which the peak voltage at the input pin 701 will be greater than the reference voltage V REF , and the valley voltage will be less than V REF . In this second state of operation, the output of comparator 703 will be toggling at the frequency of the clock 704, as illustrated in FIG. 7B. As the input voltage V IN  continues to drop, the peak and valley voltages will ultimately fall to a level such that both are less than the reference voltage V REF . In this third state of operation, the output of comparator 703 will remain high, as also illustrated in FIG. 7B. 
     As described above, the comparator 700 of FIG. 7A illustrates three distinct states (low, pulsed, and high), corresponding to three distinct ranges of input voltage V IN . Similar to the previously described embodiments of the present invention, the tango input thresholds at which the state transitions occur can be independently set utilizing a single resistive divider 101, 102 and input pin 701. The comparator of FIG. 7A is unique when compared to the previously described embodiments due to its ability to indicate the three distinct output states while utilizing not only a single input pin 701, but a single output pin as well. 
     Referring now to FIG. 8A, there is shown a typical application circuit in accordance with a fourth embodiment of the present invention in which an input pin 801 of a comparator 800 is coupled to an input voltage source V IN  through a resistor network 101, 102. Resistors 101, 102 have resistance values R1and R2, respectively, that are dependent upon application requirements. A reference 802 provides a reference voltage V REF  that is applied to the positive input of a comparator 803. The negative input of comparator 803 is connected to input pin 801. The output of comparator 803, at which an output signal Out1 appears, is connected to the set input of a digital latch 805. The reset input of digital latch 805 is driven by a clock circuit 804. The output of latch 805 is connected to a current source 806 that can be stepped between two current values, one of which is typically zero, depending upon an enable signal. 
     When the input voltage V IN  is relatively large, the negative input of comparator 803 will be positive with respect to the positive input of comparator 803. The output of comparator 803 will be at a steady low state. A clock pulse from clock circuit 804 will initialize the output of latch 805 to a cleared state. The clock signal generated by clock circuit 804 may be a single initiation pulse, or it may be a relatively low frequency periodic pulse. With latch 805 cleared, current source 806 will be disabled. This corresponds to the condition of the 1st state illustrated in FIG. 8B. 
     As the input voltage V IN  decays, the voltage at the negative input of comparator 803 will also decay. When the voltage at the negative input of comparator 803 is equal to the reference voltage V REF , the output of comparator 803 will switch from a low state to a high state. With the output of clock circuit 804 at a low level, the output latch 805 will be set to a high state. Setting the output latch 805 will assert the Out2 signal and enable the current source 806. Assuming the voltage V A  at the input pin 801 was previously slightly less than the reference voltage V REF , turning on current source 806 will pull the voltage on input pin 801 above V REF , thus forcing output signal Out1 to a low state. At the low-to-high transition of output signal Out2, a narrow glitch is present on the output signal Out1. This narrow glitch can be easily removed by well known filtering or clock synchronization. Throughout the remainder of this second state of operation, output signal Out1 will be low, and output signal Out2 will be high, as illustrated in FIG. 8B. 
     As the input voltage V IN  continues to decay, the voltage at the negative input of comparator 803 will again approach the reference voltage V REF . When the voltage at the negative input of comparator 803 falls below V REF , output signal Out1 will transition from a low to a high state. In this third state of operation, both output signals Out1 and Out2 will be high. 
     Several embodiments have been described above for implementing a dual-threshold single-input voltage comparator. By using these approaches, an additional threshold level is gained over prior art comparators without the expense of an additional input pin or additional components. Although the present invention has been described with reference to specific embodiments, the descriptions are for the purpose of illustration and are not to be construed as limiting. Those skilled in the art will appreciate that the comparator of the present invention can be implemented with various modifications to the described embodiments.