Abstract:
An amplifier input stage having a constant input gm and including first and second differential transistor pair so as to provide operation with inputs at or near the upper and lower power supply rails. A comparator circuit operates to control which of the transistor pair is active based upon the relative magnitudes of the amplifier input stage inputs and a reference voltage.

Description:
BACKGROUND OF THE INVENTION 
     1. Field of the Invention 
     The present invention relates generally to amplifier circuits and, in particular, to a constant gm amplifier circuits capable of operating near the power supply rails. 
     2. Description of Related Art 
     Referring to the drawings, FIG. 1 is a block diagram of a conventional constant gm amplifier A and associated circuitry configured to provide a regulated current output IA. In the disclosed embodiment, the output current is used to charge a capacitor C. The amplifier has a differential input with a built in input offset voltage. The inverting and non-inverting inputs of amplifier A are connected across a resistor RA. The output of the amplifier drives a PNP transistor Qx, the collector of which is coupled to resistor RA by way of a diode D 1 . The emitter of Qx is connected to a positive supply voltage VCC by way of a bias circuit BC. In the disclosed example, the supply voltage VCC may fall in the range of +3 to +30 volts. 
     Amplifier A operates to maintain a voltage across resistor RA at a value equal to the input offset voltage of the amplifier. That offset voltage is typically set to be on the order of tens of millivolts. If the voltage across RA is too large, the output of amplifier A will increase thereby decreasing the base-emitter voltage of Qx. This will reduce the current flow through IA through resistor RA. Similarly, a drop in voltage across RA will cause the base-emitter voltage to increase so that the current IA will increase. Thus, current IA is a regulated current. The current is used to charge a capacitor so as to produce a linearly changing voltage across capacitor C. 
     Since the voltage across capacitor C can drop to essentially zero volt and can increase to a value approaching VCC, Amplifier A must be implemented to function even when the inputs to the amplifier are close to the upper and lower power supply rails. FIG. 2 is a simplified schematic diagram of part of a conventional input stage for amplifier A. Two differential transistor pair are used in order to provide the at or near rail-to-rail operation. A first transistor pair, NPN transistors QA and QB, have respective bases that receive differential input In+ and In−. When the common mode voltage, the average value of In+ and In−, approaches the positive supply rail, transistors QA and QB are active and provide at their collectors a differential output current which is further amplifier by an intermediate stage (not depicted) following the input stage. When the common mode input voltage approaches the negative supply rail, ground in this case, a second pair of transistors, PNP transistors QC and QD, are active. The differential input In+ and In− is applied to the respective based of transistors QC and QD. Again, the differential output current at the collectors of QC and QD is further amplified by the following stage. 
     An emitter resistor RB is connected between the emitter of transistor QD and the tail current source IB so as to introduce an input offset voltage when pair QC and QD are active. A second emitter resistor RC, equal in value to RB, is connected between the emitter of transistor QA and the output of the current mirror circuit transistor QG. Resistor RC operates to introduce an input offset voltage when transistor pair QA and QB are active. The offset voltages produced by resistor RB and RC are ideally equal in value. In a typical implementation, resistors RB and RC are both 2 k ohms. 
     A current source IB is connected as a tail current source for differential pair QC and QD. IB has a typical value of 10 microamperes. A pair of NPN transistors QF and QG are connected as a current mirror and function as the tail current source for differential pair QA and QB. A PNP transistor QE has a collector connected to the collector-base short of QF, the input of the current mirror, an emitter connected to the output of tail current source IB and a base connected to a bias voltage source VB. 
     The positive component In+ is roughly indicative of the common mode input voltage, the average value of In+ and In−. When In+ is less than the value of bias voltage VB, the emitter voltage of transistor QE is sufficiently low relative to the base voltage to cause transistor QE to be off. Thus, the input to the current mirror circuit will be zero as will the output at the collector of QG. Accordingly, transistor pair QA/QB, which operates using the current mirror output as the tail current source, will be inactive. Transistor pair QC and QD will be active, with these transistor being capable of operation with inputs essentially at the negative supply rail (ground potential). 
     Assuming that value of In+ exceeds the value of VB, transistor QE will become conductive. All of the current from source IB will flow through transistors QE rather than QC and QD so that pair QC/QD become inactive. The current flow IB through QE will mirrored by the current mirror circuit so that the collector current of QG will be equal to IB. Thus, transistors QA and QB will become active, with these transistors being capable of operation at or near the positive supply rail. 
     The input offset voltage when pair QC/QD is active due to the presence of resistor RB and is equal to RB(IB/2) or 10 millivolts in the present example. 
     Similarly, the input offset voltage when pair QA/QB is active is equal in lieu thereof RC(ICE/2), with ICE being the collector current of transistor QG. Assuming that RB and RC are equal and that IB and ICE are equal, the offset voltage is the same, 10 millivolts, independent of which transistor pair is active. 
     As previously noted, the voltage drop across resistor RA (FIG. 1) is maintained equal to the input offset voltage of amplifier A. Thus, a regulated current IA is produced which, in the present example, is used to charge capacitor C. Although the voltage drop across resistor RA, the difference between the voltages at In+ and In−, is regulated to be 10 millivolts, the average of the two voltages, the common mode voltage, will change as the charge on capacitor C changes. Depending upon the value of the voltage at the junction of resistor RA and diode D 1 , either transistor pair QA/QB or pair QC/QD is active. Referring to FIG. 3, the depicted graph shows the relationship between the regulated output current IA of the circuit of FIG. 1, using the conventional input stage of FIG. 2, and the voltage In+ applied to the non-inverting input of the amplifier A. Voltage VB of the FIG. 2 circuit is set at about +4.4 volts. Depending upon the actual positive and negative supply rail voltages, it is preferable that voltage VB be selected so as to be significantly closer to one or the other supply rails so that only one of the transistor pair is active for most of the operating conditions. This is preferable to setting VB at some midpoint which would increase the likelihood the circuit will be frequently switching between the two pair. 
     When In+ is substantially less than VB, it can be seen by inspection of the circuit of FIG. 2 that the regulated current IA is determined by the voltage drop across resistor RB, the voltage that creates the input offset voltage dropped across resistor RA. That voltage is nominally IB/2(RB) or 10 millivolts. When In+ is substantially greater than VB, the input offset voltage is determined by the voltage drop across RC. Again, that voltage is nominally IB/2(RC). However, when the input Vin+ is close to VB, the graph of FIG. 3 shows that the input offset voltage drops substantially thereby causing the current flow through resistor RA to drop from a nominal value of 40 milliamperes to approximately only 15 milliamperes. 
     The drop in input offset voltage is due to the fact that the current flow IB/2 through resistor RB does not instantly switch to resistor RC, particularly when In+ or the common mode input voltage is constant or changing slowly. Further, under these conditions where the common mode input voltage happens to fall near the transition voltage and remains there for a significant amount of time, there is a likelihood that any noise on the amplifier A inputs or elsewhere would cause the amplifier to become unstable. At best, under these conditions the input offset voltage of amplifier A will drop to a fraction of the nominal value thereby effectively altering the gm of amplifier A and causing the regulated current IB to become unregulated. This undesirable change in gm would be present even if offset resistors RB and RC were not present, but the presence of the resistors reduces the gain of the input stage and increases the time required to switch from one input transistor pair to another. 
     There is thus a need for an amplifier having the capability of operating near or at the power supply rails and yet provide a relatively constant gm. The present invention overcomes the above-noted limitations of the prior art amplifier input stages. These and other advantages of the present invention will become apparent to those skilled in the art upon a reading of the following Detailed Description of the Invention together with the drawings. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 is a block diagram of an exemplary conventional application of a prior art constant gm amplifier functioning as part of a current regulator circuit. 
     FIG. 2 is a schematic diagram of the input stage of the prior art amplifier of FIG. 1 using two differential input transistor pair to achieve operation with the input near or at the power supply rails. 
     FIG. 3 is a graph illustrating a change in regulated output current of the FIG. 1 prior art circuit for a change in the common mode input voltage. 
     FIG. 4 is an amplifier input stage in accordance with one embodiment of the present invention. 
     FIG. 5 is a graph, having a scale which differs from the graph of FIG. 3, illustrating the operation of the FIG. 1 circuit using an amplifier having an input stage of FIG.  4 . 
     FIG. 6 is a schematic diagram of a comparator circuit of the FIG. 4 amplifier input stage. 
     FIG. 7 is a schematic diagram of a current source circuit which can be used in implementing the FIG. 4 amplifier input stage. 
    
    
     SUMMARY OF THE INVENTION 
     An amplifier input stage capable of operation at or near the upper and lower power supply rails and having a constant input gm is disclosed. The input stage includes first and second differential transistor input pair, with each pair having bases coupled to the differential input of the input stage. 
     A comparator circuit is provided, which is separate from the first and second differential transistor pairs, which operates to compare the input signals applied to the input stage with a reference voltage. When the comparator circuit is in a first state, a tail current source associated with the first differential pair is made active, with a tail current source associated with the second differential pair being inactive. When the comparator circuit is in a second state, a tail current source associated with the second differential pair is made active, with the tail current source associated with the first differential pair being inactive. 
     DETAILED DESCRIPTION OF THE INVENTION 
     Referring again to the drawings, FIG. 4 is a schematic diagram of an amplifier input stage in accordance with one embodiment of the present invention. The input stage includes three differential pair, with a NPN differential pair Q 1  and Q 2  basically operating as a level shifting circuit. The bases of transistors Q 1  and Q 2  are connected to receive inputs In− and In+, respectively. The collectors of Q 1  and Q 2  are connected to a diode-connected transistor Q 14  which is, in turn, connected to the positive supply rail VCC. Transistor Q 14  operates to prevent the base-collector junction of Q 1  and Q 2  from being forward biased should inputs In+ and In− momentarily exceed the positive supply voltage. The emitters of Q 1  and Q 2  are connected to respective current sources ID for biasing. 
     Transistors Q 3  and Q 4  form a differential PNP transistor pair having their respective bases connected to receive inputs In− and In+. Transistor pair Q 3  and Q 4  share a common tail current source which includes PNP transistor Q 15 . An offset resistor R 1  is connected between the emitter of Q 4  and the tail current source transistor Q 15 . 
     Transistors Q 5  and Q 6  form a second differential PNP transistor pair having respective bases connected to receive inputs I− and I+ and respective collectors coupled to the respective collectors of Q 3  and Q 4 . The collector outputs are coupled to an intermediate stage of the amplifier which is not depicted. Transistor pair Q 5 / Q 6  shares a common tail current source which includes transistor Q 13 . An offset resistor R 2  is connected between the emitter of Q 6  and the tail current source transistor Q 13 . 
     As will be explained in greater detail, transistor pair Q 3 /Q 4  is rendered active when the inputs In− and In+ are at or near the negative supply rail or circuit common. Q 3  and Q 4  are not capable of handling inputs near the positive supply voltage VCC due to the base-emitter voltage drops of the transistors. Transistor pair Q 5  and Q 6  are active when the inputs In− and In+ are near the positive supply voltage. The base-emitter voltages of NPN pair Q 1  and Q 2  effectively offset the base-emitter voltages of Q 5  and Q 6  so that the only limitation affecting operation of the pair near the positive supply is the voltage required by tail current source transistor Q 13 . Transistor Q 13  operates in saturation, with the saturation voltage being at 300 millivolts or less. Thus, the input stage can operate with inputs In− and In+ within 300 millivolts of VCC. 
     The tail current sources for transistor pair Q 3 /Q 4  and for transistor pair Q 5 /Q 6  are controlled by a comparator circuit  10  having an inverting input coupled to receive input In− and a non-inverting input coupled to receive a reference voltage V Ref . Voltage V Ref  is typically produced using a band gap circuit or other similar voltage reference circuit which is constant with temperature and process. The true output of comparator circuit  10  is connected to control the state of a current source switching circuit  14 , with the inverted output provided by inverter  12  being connected to control the state of a current source switching circuit  16 . 
     Switching circuit  14  includes a differential transistor pair Q 9  and Q 10  which are connected to a common tail current source I 2 . The base of Q 10  is connected to series-connected diodes D 1 , D 2  and D 3  which are connected to the output of current source IC. Diodes D 1 , D 2  and D 3  operate to bias the base of Q 10  at a voltage between the high and low outputs of comparator circuit  10 . The collector of Q 9  is connected directly to the positive supply voltage, with the collector of Q 10  being connected to transistor Q 12  which acts as the input transistor of a current mirror circuit. Tail current source transistor Q 13  functions as the current mirror circuit output transistor. Transistors Q 12  and Q 13  are the same size so that the transistors have essentially equal collector currents. 
     Switching circuit  16  is similar in construction to circuit  14  but is controlled by the output of inverter  12 . A differential transistor pair Q 7 /Q 8  is connected to a common tail current source I 1 , with I 1  and I 2  providing output currents of the same magnitude. Transistor Q 8  is also biased by series-connected diodes D 1 , D 2  and D 3  so that the base voltage of Q 8  is between the high and low outputs of inverter  12 . The collector of transistor Q 7  is connected directly to the positive supply rail, with the collector of Q 8  being connected to transistor Q 11  which forms the input transistor of a current mirror circuit. Tail current source transistor Q 15  functions as the output transistor of the current mirror circuit. Transistors Q 15  and Q 11  are the same size so that the collector currents will be the same. 
     The reference voltage V Ref  is selected to be the voltage at which the input circuit switches between input pair Q 3 /Q 4  and input pair Q 5 /Q 6 . As previously noted in connection with the FIG. 1 circuit, it is usually preferable to switch differential pair at some input voltage displaced from the expected normal operating voltage so as to minimize switching between the pair. In the present example, V Ref  is set to about +3.2 volts. 
     Assuming that amplifier A of FIG. 1 utilizes the input stage of FIG. 4, and assuming that the input voltage In− is less than V Ref , the output of comparator circuit  10  will be high and the output of inverter  12  will be low. The high comparator circuit  10  output will cause transistor Q 9  of the tail current switching circuit  14  to be on and conducting all of the current from current source I 2 . Thus, there will be no current flow through transistors Q 10 , Q 12  and Q 13  thereby rendering transistor pair Q 5 /Q 6  inactive. 
     The low output of inverter  12  will cause transistor Q 7  to be off so that all of the current from tail current source I 1  will flow through transistor Q 8 . Since transistors Q 11  and Q 15  form a current mirror circuit, current I 1  will flow out of tail current source transistor Q 15  thereby rendering transistor pair Q 3 /Q 4  active. Assuming that offset resistor R 1  is 2 kohm, that the collector current of Q 15  is 10 microamperes and that Q 3  and Q 4  are conducting equal current, the input offset voltage will be equal to voltage drop across R 1 , namely, 10 millivolts. 
     Should the input In− approach and then slightly exceed the value of V Ref , the output of the comparator circuit  10  will rapidly change state. The low output of the comparator circuit will cause transistor Q 9  to turn off so that all of the current from tail current source I 2  will flow through transistors Q 10 , Q 12  and Q 13  thereby rendering transistor pair Q 5 /Q 6  active. Since offset resistor R 2  is equal in value to R 1  and since currents I 1  and I 2  are equal, the input offset voltage will remain unchanged at 10 millivolts. 
     Current sources I 1  and I 2  are produced to have a temperature coefficient which will compensate for the temperature coefficient of offset resistors R 1  and R 2  so as to produce an input offset voltage which is relatively constant over temperature and process. The currents produced by sources I 1  and I 2  are inversely related to resistors R 1  and R 2 . Thus, the currents will have a temperature coefficient which compensates for the temperature co-efficient of resistors R 1  and R 2  and which further compensates for process variations. Details regarding the implementation of current sources I 1  and I 2  will be subsequently provided. 
     As can be seen by the graph of FIG. 5, the change in regulated output current IA drops very little as compared to that shown in FIG. 3, taking into account that the scale of the two graphs are significantly different. The drop in current IA shown in FIG. 5 with increases in input voltage is due primarily to the fact that amplifier A has a finite common mode rejection ratio. 
     It can be seen that the gm of amplifier A using the input stage of FIG. 4 is substantially more constant than the using the prior art input stage of FIG.  2 . In addition, it is very easy to implement comparator circuit  10  to have hysteresis so that noise on inputs In+ and In− will not result in instability. The hysteresis is related to the common mode input voltage rather than the differential input voltage and is typically set to a few hundred millivolts. 
     Note that comparator  10  can effectively sense the common mode input voltage by monitoring either input In+ or In− rather than the actual common mode voltage, provided the differential voltage is relatively small. FIG. 6 is a schematic diagram of one implementation of comparator circuit  10 . PNP transistors Q 15  and Q 16  form a differential input transistor pair, with the base of Q 15  receiving reference voltage V Ref  by way of a resistor RH. The base of transistor Q 16  receives the input voltage In−. As will be described, a switchable current source IH, controlled by the output Out of the comparator circuit  10 , is connected between the base of transistor Q 15  and resistor RH. The current source IH and resistor RH operate to provide hysteresis for comparator circuit  10 . 
     Transistors Q 17  and Q 18  form a current mirror load for the differential pair Q 15 /Q 16 . The output of the differential input stage is coupled to a first, second and third common-emitter amplifier stages which include transistors Q 19 , Q 20  and Q 30 , respectively. PNP transistors Q 33 , Q 34  and Q 35  are, together with transistor Q 32 , biased by a common bias voltage and function as active loads for transistors Q 19 , Q 20  and Q 30 , respectively. 
     Resistor RH and switchable current source IH operate to produce the desired hysteresis, as previously noted. Current source IH is switchable in response to the comparator output Out between a first state where it sinks current IH and a second state where no current is sunk. When output Out is high, current source IH is effectively turned off so that there is essentially no voltage drop across resistor RH. When Out is low, current source IH is active so that a voltage drop is created across resistor RH thereby effectively reducing the value of V Ref  by a voltage equal to RH(IH), typically 200 millivolts. 
     FIG. 7 is a schematic diagram of one implementation of current source IH. Current source IH includes a control transistor Q 36  having a base connected to the output Out of comparator circuit  10  and an emitter connected to the circuit common. A resistor R 4  is connected between the collector of transistor Q 36  and the voltage reference V Ref  the same reference voltage connected to one terminal of resistor RH (FIG.  6 ). A further transistor Q 38  has a collector connected to resistor R 4  and an emitter connected to the circuit common. A transistor Q 40  is included having a base and emitter coupled to the respective base and emitter of transistor Q 38 . Q 38  has twice the emitter area of transistor Q 40  so that transistor Q 38  will conduct twice the collector current of transistor Q 40 . A resistor R 6  is connected across the base-emitter junction of transistors Q 38  and Q 40 . A fourth transistor Q 40  has a base connected to the common collectors of Q 36  and Q 38  and an emitter connected to the collector of Q 40 . The collector of Q 42  functions as the current source output IH. 
     When the output Out of comparator circuit  10  is low, control transistor  36  is off so that the collector current of transistor Q 38  is equal to the current flow I 4  through resistor R 4 . The voltage across R 4  is as follows: 
     
       
           V   R4   =V   Ref −( V   BE42   +V   BE40 )  (1) 
       
     
     Thus, the current I 4  is as follows (assuming the base-emitter voltages are equal): 
     
       
           I   4 =( V   Ref −2 V   BE )/ R   4   (2) 
       
     
     The current source output IH is as follows: 
     
       
           IH=I   6 + I   Q40   (3) 
       
     
     Assuming that I 6  is equal to VBE/R 6 , that I Q40  is equal to (I 4 )/2 and that R 4  and R 6  are equal to R, equations (2) and (3) can be combined as follows: 
     
       
           IH=V Ref/(2 R )  (4) 
       
     
     It can be seen from equation (4) that current IH is inversely proportional to the value R. Since the value of the hysteresis voltage is proportional to RH, the effects of temperature and process will cancel. Thus, the hysteresis voltage will be relatively constant over temperature and process. When signal Out is high, transistor Q 36  will conduct all of the current from resistor R 4  thereby causing current IH to drop to zero. Thus, the hysteresis voltage is eliminated. 
     The same implementation shown in FIG. 7 can be used for current sources I 1  and I 2 . Since I 1  and I 2  are not switched, transistor Q 36  is eliminated from the circuit. 
     Thus, a novel input stage for a constant gm amplifier capable of operating with inputs at or near the positive and negative supply rails has been disclosed. Although one embodiment has been described in some detail, it is to be understood that certain changes can be made by those skilled in the art without departing from the spirit and scope of the invention as defined by the appended claims.