Abstract:
A comparator circuit comprising an operational amplifier for comparing a reference input signal at a given voltage and an input signal at an unknown voltage to produce a signal representing the result of the comparison, a first constant current source for feeding a constant current to the operational amplifier, an output transistor, having its base connected to the output of the operational amplifier, for controlling the output of the circuit, and a second constant current source for feeding a constant current to the base of the output transistor. This configuration enables the comparator circuit to operate normally, even when the input voltage is less than the reference voltage and is equal to zero.

Description:
BACKGROUND OF THE INVENTION 
     The present invention relates to a comparator circuit for comparing an unknown input voltage with a known input voltage to produce an output signal representing the result of the comparison. 
     A prior comparator circuit will be described referring to FIG. 1. The emitters of PNP transistors Q1 and Q2 are connected together to a first power source providing a positive potential Vcc, through a constant current source 1. A reference input signal of given reference voltage Vref is applied to the base of the transistor Q1, through the first input terminal 2. An input signal at an unknown voltage Vin is applied to the base of the transistor Q2, through the second input terminal 3. The collectors of the transistors Q1 and Q2 are connected to the collectors of NPN transistors Q3 and Q4, respectively. The transistors Q3 and Q4 cooperate to form a current mirror circuit. The transistors Q3 and Q4 are so arranged that their emitters are grounded, the bases are interconnected, and the collector of the transistor Q3 is connected to the common base of the transistors Q3 and Q4. With such a current mirror arrangement, the emitter current of the transistor Q4 is the same as that of the transistor Q3. Transistors Q1 to Q4 constitute an operational amplifier 4. 
     Further, an output transistor Q5 of NPN type having a grounded emitter is connected at its base to the collector of the transistor Q4 of the operational amplifier 4. The collector of transistor Q5 is connected to a power source providing a potential Vcc through a resistor 5, and serves as an output terminal 6. 
     The operation of the illustrated known comparator circuit, assuming application of a reference input signal Vref and an unknown input signal Vin, will be described. When Vin&gt;Vref, the transistor Q1 is conductive while the transistor Q2 is nonconductive. Accordingly, a current I E1  from the constant current source 1 flows through the emitter-collector path of the transistor Q1 and is amplified to value of αI E1 . α is the current amplification factor of the transistor Q1. The current αI E1  flows into the transistor Q3, too. The transistors Q3 and Q4 form the current mirror circuit. However, a current of the same value as the current αI E1  will now flow into the collector-emitter path of the transistor Q4 through the emitter-collector path of the transistor Q2, because the transistor Q2 is nonconductive. No current is fed from the constant current source 1. The charge stored in the base of the transistor Q5 (the charge stored in the stray capacitance 7 equivalently connected between the base of the transistor Q5 and ground in FIG. 1) discharges through the collector-emitter path of the transistor Q4. As a result, the output transistor Q5 becomes nonconductive since the base-emitter voltage is 0 V. And the output terminal 6 becomes high in potential (the difference between the potential Vcc and the voltage drop across the resistor 5). 
     When Vin&lt;Vref, the transistor Q1 is nonconductive, while the transistor Q2 is conductive. Accordingly, the current I E1  from the constant current source 1 flows through the emitter-collector path of the transistor Q2 and is amplified to a value of αI E1 . Here, α is the current amplification factor of the transistor Q2. Since the transistor Q1 is nonconductive, no current flows through the transistor Q1 or the transistor Q3. Therefore, the base-emitter voltage of the transistor Q3 is 0 V. Then, the transistor Q4 which cooperates with the transistor Q3 to form the current mirror circuit, becomes nonconductive. The current αI E1  amplified by the transistor Q2 flows into the base of the transistor Q5 to render the output transistor Q5 conductive. As a result, the output terminal 6 becomes low in potential (ground level). 
     As described above, the output transistor Q5 is conductive or nonconductive in accordance with the amplitude of the unknown voltage input signal Vin relative to that of the reference signal Vref so that the comparison result can be obtained by detecting the potential at the collector of the output transistor Q5 at the output terminal 6. 
     In the construction of the prior comparator circuit, when Vin&lt;Vref and Vin=0 V, erroneous operation can occur for the following reason. The collector-emitter voltage V CE (Q2) of the transistor Q2 is given by 
     
         V.sub.CE(Q2) =Vin+V.sub.BE(Q2) -V.sub.BE(Q5) 
    
     where V BE (Q2) and V BE (Q5) are the base-emitter voltage of the transistors Q2 and Q5, respectively. Since V BE (Q2) and V BE (Q5) are substantially equal to each other, when Vin=0 V, V CE (Q2) is almost 0 V. Under this condition, the transistor Q2 fails to operate normally and instead operates as a diode. The current I E1  from the constant current source 1 flows into the base of the transistor Q2 but does not flow into the collector. As a result, the transistor Q5 can not maintain its conductive state. Thus, the transistor Q5 operates erroneously. 
     SUMMARY OF THE INVENTION 
     Accordingly, the present invention has as an object to provide a comparator circuit which operates normally even when Vin&lt;Vref and Vin=0 V. 
     According to the present invention, there is provided a comparator circuit comprising operational amplifier means for comparing a reference signal given voltage and an input signal of unknown voltage to produce a signal representing the result of the comparison, first constant current supply means for feeding a constant current to the amplifier means, output transistor means having an input connected to the output of the operational amplifier means, of which the operation is under control of the output signal from the operational amplifier means, and second constant current supply means for feeding a constant current to the input of the output transistor means. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 is a circuit diagram of a prior art comparator circuit; and 
     FIG. 2 is a circuit diagram of an embodiment of a comparator circuit according to the present invention. 
    
    
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT 
     Reference is made to FIG. 2 illustrating an embodiment of a comparator circuit according to the present invention. The emitters of transistors Q6 and Q7 of PNP type are connected together to a power source for providing a positive potential Vcc (high potential) through a first constant current source 8. The first constant current source 8 may comprise a current mirror circuit, for example. A reference signal at a given voltage Vref is applied to the base of the transistor Q6 through the first input terminal 10. An unknown input signal at a voltage Vin is applied to the base of the transistor Q7 through the second input terminal 11. The collectors of the transistors Q6 and Q7 are connected to the collectors of the NPN transistors Q8 and Q9, respectively. The transistors Q8 and Q9 make up a current mirror circuit. More specifically, the transistors Q8 and Q9 are grounded at the emitters, or coupled with the power source at ground potential (low potential). The bases of those transistors Q8 and Q9 are interconnected. Further, the collector and base of the transistor Q8 are interconnected. With such an arrangement, the transistors Q8 and Q9 constitute a current mirror circuit. The emitter area S9 of the transistor Q9 is set larger than the emitter area S8 of the transistor Q8. Accordingly, the current flowing to the emitter of the transistor Q9 is equivalent to the product of the emitter area and the current flowing into the emitter of the transistor Q8. The transistors Q6 to Q9 make up an operational amplifier 12. The collector of the transistor Q9 serving as the output terminal of the amplifier 12 is connected to the base of the output NPN transistor Q10. The output transistor Q10 is connected at the emitter to ground. Its collector is connected to the power source providing the potential Vcc through the resistor 13. The base of the transistor Q10 is connected to the power source providing the positive potential Vcc through the second constant current source 9. 
     In the comparator circuit thus constructed, when Vin&gt;Vref, the output transistor Q10 is nonconductive in accordance with its operation mode. On the other hand, when Vin&lt;Vref, the output transistor Q10 is conductive. When Vin&lt;Vref and Vin=0 V, the conductive state of the transistor Q10 is kept, thereby obtaining an accurate comparison result. This will be discussed in detail. 
     When Vin&gt;Vref, the transistor Q6 is conductive while the transistor Q7 is nonconductive. The current I E2  supplied from the constant current source 8 flows through the emitter-collector path of the transistor Q6 and is amplified to be αI E2 . α is a common emitter current amplification of the transistor Q6. The current αI E2  flows through the emitter-collector path of the transistor Q8. The emitter area S9 of the transistor Q9 is larger than the emitter area S8 of the transistor Q8. For example, S8:S9=1:2. The transistor Q9 cooperates with the transistor Q8 to form the current mirror circuit as described above. However, the current, defined by the emitter area ratio multiplied by αI E2  (e.g. when the emitter area ratio is given by S8:S9=1:2, the current is multiplied by two), will not flow into the transistor Q9 through the transistor Q7, because the transistor Q7 is nonconductive. No current is fed from the first constant current source 8. Therefore, the current is supplied from the base of the transistor Q10 to the transistor Q9. 
     The current I E3  is supplied from the second constant current source 9 to the base of the transistor Q10. When a relationship between the currents I E2  and I E3  is set up such that 2αI E2  &gt;I E3 , the current I E3  from the constant current source 9 and the charge stored in the base of the transistor Q10, more precisely, the charge stored in the stray capacitance 15 equivalently connected between the base of the transistor Q10 and ground in FIG. 2, flows through the transistor Q9. As a result, the base of the transistor Q10 is discharged to a nonconductive state. Accordingly, the potential at the output terminal 14 of the comparator circuit, that is, the collector of the transistor Q10, becomes high, that is, corresponds to a value obtained by subtracting the voltage drop across the resistor 13 from the potential Vcc. 
     That is, when Vin&gt;Vref, if the following condition is satisfied, the output transistor Q10 is nonconductive. ##EQU1## To obtain stable operation of the circuit, the values of m and I E3  must preferably be set up: m=2 and I E3  =I E2 . 
     When Vin&lt;Vref, the transistor Q6 is nonconductive, while the transistor Q7 is conductive. Therefore, no current flows into the transistor Q8 and therefore the transistor Q9 is also nonconductive. The result is that the current αI E2  (α is the common emitter current amplification factor of the transistor Q7) supplied by the constant current source 8 and amplified by the transistor Q7 is supplied to the base of the output transistor Q10. The current I E3  from the second constant current source 9 in addition to the current αI E2  is applied to the base of the output transistor Q10. The transistor Q10 is conductive and the potential at the output terminal 14 is low in level. 
     The operation of the comparator circuit, when Vin&lt;Vref and Vin=0, will be described. 
     In this case, the voltage between the collector and emitter of the transistor Q7 is substantially 0 V. In this condition, the transistor loses its own function and functions as a diode. Accordingly, the current I E2  from the first constant current source 8 does not flow into the transistor Q9 but flows into the base of the transistor Q7. The result is that the current from the transistor Q7 is not supplied to the base of the transistor Q10. The constant current I E3 , however, is constantly supplied from the second constant current source 9 to the base of the output transistor Q10. Under this condition of the circuit, the output transistor Q10 is kept in a conductive state, not in a nonconductive state. Thus, the potential at the output terminal 14 is kept at the low potential. 
     As described above, in the comparator circuit of the present embodiment, when Vin&gt;Vref, the transistor Q10 is rendered nonconductive. In the inverse condition, i.e. Vin&lt;Vref, the output transistor Q10 is made conductive. Further, even if Vin=0 V when Vin&lt;Vref, no erroneous operation takes place. Consequently, the conductive state of the transistor Q10 can be kept to ensure a correct comparison result. 
     In the above-mentioned operating condition, if Vin=Vref no switching operation of the output transistor Q10 is performed, and output transistor Q10 is kept conductive. When the difference between Vin and Vref is distinctive, the switching operation is reliably performed. Therefore, no practical problem arises in the above-mentioned embodiment. 
     In designing the circuit, if I E2 , I E3  and m are selected to satisfy a given condition, the switching operation is allowed even under the condition of Vin=Vref. This will be discussed in detail referring to FIG. 2. 
     When Vin=Vref, the current I E2  supplied from the constant current source 8 is equally shunted into the transistors Q6 and Q7. These shunted and amplified currents I C6  and I C7  are given ##EQU2## where alpha (α) is a common emitter current amplification factor of each of the transistors Q6 and Q7. The common emitter current amplification factor α is expressed by using the DC amplification factor h FE  of each of the transistors Q6 and Q7, 
     
         α=h.sub.FE /(1+h.sub.FE) 
    
     The current I E9  flowing into the transistor Q9, since the transistors Q8 and Q9 constitute a current mirror circuit, is ##EQU3## 
     The current I E9  is the sum of the current I C7  flowing into the transistor Q7 and the second constant current I E3 , and is expressed by 
     
         I.sub.E9 =I.sub.C7 +I.sub.E3 
    
     Rearranging the above equation with respect to the current I E3 , we have 
     
         I.sub.E3 =I.sub.E9 -I.sub.C7 
    
     This equation indicates that the switching operation of the transistor Q10, when Vin=Vref, is allowed by selecting the current I E3  to be the difference between the currents I E9  and the I C7 . The current I E3 , when using I E2  and m, is expressed ##EQU4## Thus, the switching of the transistor Q10 is allowed when Vin=Vref by feeding from the constant current source 9 the current I E3  expressed by the equation as just mentioned. Generally, α≈1 and preferably m=2. Under this condition, the current I E3  is ##EQU5## This implies that, to effect the switching of the transistor Q10 under such a condition, the current I E3  fed from the constant current source 9 must be 1/2 the current I E2  fed from the constant current source 8. 
     As described above, when Vin&gt;Vref, the transistor Q10 is nonconductive. When Vin&lt;Vref, it is conductive. Even if Vin=0 V when Vin&lt;Vref, the transistor Q10 keeps its conductive state. Further, even when Vin=Vref, the switching operation of the output transistor Q10 is allowed. In this way, a reliable comparing operation of the comparator circuit is ensured free from error. 
     While the emitter area ratio of the transistors Q8 and Q9 is preferably 1:2 in the above embodiment, the emitter area ratio is of course not limited to such value. 
     In the above embodiment, the transistors Q6 and Q7 are of PNP type and the transistors Q8 and Q10 are of NPN type. The conductivity types of these transistors may be reversed, if the polarity of the power sources applied to them are correspondingly reversed. 
     It should be understood that the present invention may be variously modified and changed within the spirit of the present invention.