Abstract:
A transistor switching circuit is provided for providing an indication of when the level of an input signal has passed through a first threshold level, such indication continuing unless such input signal has returned beyond the first threshold level to a second threshold level. Such circuit is useful in indicating whether the battery of a battery powered device should be replaced taking into consideration small variations in the output of the battery after the initial replacement indication has been provided.

Description:
BACKGROUND OF THE INVENTION 
     This invention relates generally to transistor switching circuitry and more particularly to transistor switching circuitry having hysteresis. 
     As is known in the art, it is frequently desirable to provide a transistor switching circuit with hysteresis. For example, it is frequently desirable to provide a transistor switching circuit which will change the state of an output signal when an input signal level passes through a first threshold level but which will not return the output signal to its original state unless the input signal returns to the first threshold and passes through such first threshold to a second different threshold level. Because the switching circuit has a second threshold level different from the first threshold level once the input signal has first passed through the first threshold level, the switching circuit is said to have hysteresis. 
     SUMMARY OF THE INVENTION 
     In accordance with the present invention, a transistor switching circuit is provided having: means for producing a first current or a second, different, current; voltage producing means, responsive to the produced current, for producing a voltage related to the produced current; and switching means, responsive to the voltage produced by the voltage producing means and an input signal, for changing the produced current from the first current to the second current when the level of the input signal passes through a first threshold level and for preventing the produced current from changing from the second current until the input signal returns to the first threshold level and passes through the first threshold level to a second, different, threshold level. 
     In a preferred embodiment of the invention the switching means includes a comparator means, having a pair of transistors, for passing current through either a first one of the pair of transistors or the second one of the pair of transistors selectively in accordance with the difference in levels between the level of a reference signal fed to the base electrode of a first one of the pair of transistors and the level of a voltage fed to the base electrode of a second one of the pair of transistors. The current producing means produces a current having the first current when the first one of the pair of transistors passes current and having the second, different current when the second one of the pair of transistors passes current. The voltage producing means is coupled between the input signal and the base electrode of the second one of the pair of transistors and is responsive to the current produced by the current producing means, for producing at the base electrode of the second one of the pair of transistors, a voltage equal to the reference voltage when the input signal initially passes through the first threshold level and when such input signal returns beyond the first threshold level and passes through the second threshold level. The current producing means includes a current source circuit connected to one of the pair of transistors. The current source circuit includes a current mirror having a pair of transistors with a common base electrode with emitter electrodes coupled together; the emitter area of a first one of the pair of transistors being different from the emitter area of a second one of the pair of transistors. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     For a more complete understanding of the invention, reference is now made to the following description taken together in conjunction with the accompanying drawings, in which: 
     FIG. 1 is a schematic diagram of a transistor switching circuit according to the invention; 
     FIGS. 2A-2D are time histories of various voltage and current levels generated in the transistor switching circuit of FIG. 1; 
     FIG. 3 is a schematic diagram of an alternative embodiment of a transistor switching circuit according to the invention; and 
     FIGS. 4A-4D are time histories of various voltages and current levels generated in the transistor switching circuit of FIG. 3. 
    
    
     DESCRIPTION OF THE PREFERRED EMBODIMENT 
     Referring now to FIG. 1 a transistor switching circuit 10 is shown. Such transistor switching circuit 10 is here used to provide an indication when the battery 12 is &#34;low&#34;. More particularly, the circuit 10 turns an indicator light 14 &#34;on&#34; when the voltage produced by the battery 12 falls below a first predetermined threshold level. For example, here the battery 12 is a 9 volt battery of the type used in many portable recorders and circuit 10 will turn indicator light 14 &#34;on&#34; when the voltage of battery 12 falls below 6 volts to indicate to the user of the portable recorder that the battery 12 is &#34;low&#34; and hence inadequate for prolonged operation of the recorder. Further, switching circuit 10 has hysteresis such that if the level of the battery has fallen below the predetermined level, here 6 volts, to turn indicator light 14 &#34;on&#34;, if the battery 12 should then rise slightly above the predetermined 6 volt level, because of a change in load or environment, the circuit 10 maintains the indicator light 14 &#34;on&#34; to indicate that the battery 12 is still &#34;weak&#34; and not suitable for a prolonged recording and hence that battery 12 should be changed. Thus here the indicator light 14 will remain &#34;on&#34; unless battery 12 is recharged or replaced so that its output voltage is substantially greater than the 6 volt threshold level. More particularly, the indicator light 14 will remain &#34;on&#34; until the level of the voltage of the recharged, or replaced, battery is greater than a second higher predetermined threshold level, here 7.2 volts. 
     Transistor switching circuit 10 includes a comparator circuit 16 having a pair of transistors Q 1 , Q 2  with emitter electrodes connected to the positive terminal (+) of the battery 12 through a current source 18, as shown. Current source 18 is of any conventional design and here produces a current of 13 microamps. The base electrode of transistor Q 1  is connected to a reference voltage source +V REF , here a conventional band-gap reference producing a reference voltage of 1.3 volts. The base electrode of transistor Q 2  is connected to the positive terminal of battery 12 through a precision resistor R, as shown. The collector electrodes of transistors Q 1 , Q 2  are connected to a circuit 19 made up of a pair of current source circuits 20, 22; current source circuit 20 being connected to the collector electrode of transistor Q 1  and current source circuit 22 being connected to the collector electrode of transistor Q 2  as shown. The outputs of lines 24, 26 of current source circuits 20, 22 are connected to the base electrode of transistor Q 2 , as shown. It is noted that when the voltage at the base electrode of transistor Q 2  is greater than the voltage of the reference voltage source +V REF  , here 1.3 volts, (as will be the case when the battery 12 is &#34;strong&#34; or &#34;fresh&#34; and produces an output voltage of 9 volts) transistor Q 1  will conduct current from current source 18 and transistor Q 2  will be in a nonconducting mode. When transistor Q 1  conducts, a current will be produced on output line 24 of current source circuit 20, the level of such current being substantially equal to the current through the collector electrode of transistor Q 1 . Here such current will be about 6.5 microamps for reasons to be discussed hereinafter. Suffice it to say here, however, that the 6.5 microamp current through line 24 passes through resistor R. Here the resistance of resistor R is selected to establish a voltage at the base electrode of transistor Q 2  equal to the difference in the voltage produced by the voltage reference source +V REF  and the first predetermined threshold voltage, here 6 volts. That is, here the resistance of resistor R is selected to produce a 4.7 volt drop across it in response to the 6.5 microamps passing through such resistor, R, and through the output conductor 24 of current source circuit 20. Therefore, the resistance of resistor R is here (4.7/6.5)×10 6  ohms=723 Kohms. Thus, current source circuit 20 and resistor R produce a first predetermined threshold voltage, here 6 volts, for the comparator circuit 16. That is, if the voltage of battery 12 falls from the initial 9 volt level to below the 6 volt threshold level, the voltage at the base electrode of transistor Q 2  falls below the 1.3 volt reference at the base electrode of transistor Q 1  and transistor Q 2  will conduct while transistor Q 1  is placed in a nonconducting mode. The current through output conductor 24 stops and a current is produced through output conductor 26 of the current source circuit 22. The level of the current produced on output line 26 is here larger than the current produced on output line 24 when transistor Q 1  was conducting and transistor Q 2  was in the nonconducting mode. More particularly, while the current through the collector of transistor Q 2  is the same as that which previously passed through the collector of transistor Q 1 , when transistor Q 1  was conducting, here 6.5 microamps, the current source circuit 22 now produces a current on output line 26 greater than 6.5 microamps, here 1.25 times greater or a current on output line 26 of here 8.125 microamps. Thus, in response to this level of higher current on output line 26, resistor R produces a correspondingly higher voltage drop than that produced when the current through such resistor R passed through output line 24. Thus, here the voltage drop across resistor R is now 5.87 volts. It follows then that transistor Q 2  will continue to conduct and transistor Q 1  will remain in a nonconducting mode until the voltage at the positive terminal (+) of battery 12 reaches a level equal to the sum of the reference voltage source +V REF , here 1.3 volts and the voltage drop produced across resistor R, here now 5.87 volts; that is, until the voltage at the positive terminal (+) of battery 12 increases to 7.2 volts. It follows then that the effective threshold level of the comparator circuit 24 has increased from 6 volts to 7.2 volts. In this way, indicator light 14 will turn &#34;on&#34; to warn the user of a low battery when the voltage level of battery 12 falls below the first threshold level, here 6 volts, and such indicator light will remain on to provide such warning if there are relatively small increases in the voltage of battery 12, here increases less than  1.2 volts, as may occur from loading or environmental changes in the battery. However, indicator light 14 will go &#34;off&#34; if battery 12 is recharged or replaced, so that it produces an output voltage greater than 7.2 volts. 
     It follows then that the first threshold voltage V T1  =6 volts is equal to the sum of the reference voltage V REF  and the voltage drop produced in response to the first current, I CQ4 , passing through resistor R, i.e. V T1  =V REF  +RI CQ4  and the second threshold level V T2  =7.2 volts is equal to the sum of the reference voltage, V REF , and the voltage produced across resistor R in response to the second current, I CQ6 , passing through resistor R, i.e. V T2  =V REF  +RI CQ6 . 
     Referring now in more detail to circuit 19, current source circuit 20 is shown to include a current mirror having a &#34;diode connected&#34; transistor Q 3 , having its collector electrode connected to the collector electrode of transistor Q 1  and to its base electrode and also to the base electrode of transistor Q 4 . The emitter electrode of transistors Q 3  and Q 4  are connected to ground (and hence the grounded negative (-) terminal of battery 12). Here the emitter area of transistor Q 3  is equal to the emitter area of transistor Q 4  so that the current through the collector of transistor Q 4 , (i.e. I CQ4 ) which is connected to output line 24, will be equal to the current through the collector electrode of transistor Q 1 . Current source circuit 22 includes a current mirror having a &#34;diode connected&#34; transistor Q 5  having its collector electrode connected to the collector electrode of transistor Q 2  and to both its base electrode and to the base electrode of transistor Q 6 . The collector electrode of transistor Q.sub. 6 is connected to output line 26. The emitter electrodes of transistors Q 5  and Q 6  are connected to ground. It is noted that the emitter area of transistor Q 5  is here four times larger than the emitter area of either one of the transistors Q 3 , Q 4  while the emitter area of transistor Q 6  is five times larger than the emitter area of either one of the transistors Q 3 , Q 4 . Thus, the emitter area of transistor Q 6  is greater than, here 1.25 times greater than the emitter area of transistor Q 5 . Thus, the current through the collector electrode of transistor Q 6  (i.e. I CQ6 ) is thus here 1.25 times greater than the current through the collector electrode of transistor Q 2 . Lines 24 and 25 are connected to the base electrode of transistor Q 2 , as shown. 
     The switching circuit 10 includes a transistor Q 7  and a &#34;diode connected&#34; transistor Q 8  ; transistor Q 7  having its emitter electrode connected to the current source 18, its base electrode connected to the base electrode of transistor Q 1  and its collector electrode connected to the diode connected transistor Q 8 . Transistor Q 8  has its collector connected to: the collector electrode of transistor Q 7  ; the base electrode of transistor Q 8 , and the base electrode of transistor Q 9 . The emitter electrode of transistor Q 8  is connected to ground. Transistor Q 9  has its emitter electrode connected to ground, and its collector electrode connected to the collector electrode of transistor Q 10  and to the base electrode of transistor Q 11 . The base electrode of transistor Q 10  is connected to the base electrode of transistor Q 2  and the emitter electrode of transistor Q 10  is connected to the current source 18, as shown. The collector electrode of transistor Q 10  is connected to the base electrode of transistor Q 11 . The emitter electrode of transistor Q 11  is connected to ground and the collector electrode of transistor Q 11  is connected to the positive (+) terminal of battery 12 through the indicator light 14, as shown. 
     In operation, when the voltage of battery 12 is greater than 9 volts, transistors Q 1  and Q 7  conduct and transistors Q 2  and Q 10  are placed in a nonconducting mode. In such condition the 13 microamps of current source 18 divides equally between transistors Q 1  and Q 7 . Thus, 6.5 microamps pass through the collector electrode of transistor Q 8  to place transistor Q 9  into saturation thereby producing a relatively low voltage at the base of transistor Q 11  so that transistor Q 11  is &#34;off&#34; and no current through the indicator light 14 with the result that such light 14 is &#34;off&#34;. Further 6.5 microamps also passes through the collector electrode of transistor Q 1 . Thus transistor Q 4  produces an output current on line 24 equal to 6.5 microamps and since R is here 723 kohms a voltage of here 4.7 volts is produced across resistor R. 
     As the battery 12 ages with time its output voltages reduce as shown in FIG. 2A. When the output voltage falls below 6 volts, at time t 1 , the voltage at the base electrode of transistor Q 2  falls below the 1.3 volts at the base electrode of transistor Q 1  so that transistors Q 1  and Q 7  are placed in a nonconducting mode and transistors Q 2  and Q 10  become conducting. Again the current from current source 18 divides equally between transistors Q 2  and Q 10 . Transistor Q 8  and Q 9  turns off so that the base electrode of transistor Q 11  is high enough to drive transistor Q 11  into conduction and that current passes from battery 12 to ground through transistor Q 11  and indicator light 14 placing such light 14 &#34;on&#34; to warn of a low battery. Further, the 6.5 microamp current through the collector of transistor Q 2  is monitored by current mirror 22. In particular, the 6.5 microamp current through the collector electrode of transistor Q 2  is mirrored by the current through transistor Q 6  ; here, however, as noted above, because the emitter area of transistor Q 6  is 1.25 times greater than the emitter area of transistor Q 5  a current of (6.5)×(1.25)=8.125 microamps passes through the collector of transistor Q 6  (i.e. I CQ6 ). Thus, referring to FIGS. 2A to 2D, when the battery voltage drops below 6 volts the current through the collector electrode of transistor Q 4  (i.e. I cQ4 ) as shown in FIG. 2B switches at time t 1 , from 6.5 microamps to zero while the current through transistor Q 6  (i.e. I CQ6 ) switches at time t 1 , from zero to 8.125 microamps as shown in FIG. 2C. Thus, the current through resistor R, i.e. I R , changes from an initial value of 6.5 microamps to a second higher level of 8.125 microamps at time t 1  and the voltage drop across resistor R (i.e. V R ) across resistor R correspondingly increases from 4.7 volts to 5.87 volts at time t 1 , as shown in FIG. 2D. Thus, transistor Q 2  remains conducting until the voltage at its base electrode rises to a level above the 1.3 volt reference level at the base electrode of transistor Q 1  and such voltage will not rise above this 1.3 volt level until the voltage at the positive terminal of battery 12 raises to a level above (1.3+5.87) or approximately 7.2 volts, where the 5.87 volts is the new voltage drop V R  produced across resistor R in response to the 8.125 microamps (I R ) now passing through such resistor R via transistor Q 6 , as shown in FIG. 2D. Thus, if the voltage of the battery now rises to a level between 6 volts and 7.2 volts, as shown in FIG. 2A, during the period of time between time t 2  and time t 3 , the light 14 will remain &#34;on&#34; to warn of a low battery. When the battery 12 is replaced or recharged so that its output voltage increases beyond the 7.2 volt level as at time t R  in FIG. 2A, the collector current of transistor Q 4  again increases to 6.5 microamps, transistor Q 11  goes &#34;off&#34; to turn light 14 &#34;off&#34; and the voltage across resistor R returns to 4.7 volts as shown in FIG. 2D. 
     Referring now to FIG. 3 a transistor switching circuit 10&#39; is shown to provide an indication of when the battery 12&#39;, (here nominally a nine volt battery as in the circuit 10 of FIG. 1) is &#34;low&#34; by turning indicator light 14&#39; &#34;on&#34; when the voltage produced by battery 12&#39; falls below a first predetermined threshold level, here 6 volts, and such indicator light 14&#39; will remain &#34;on&#34; until the battery is recharged, or replaced, so that its output is greater than a second, higher, predetermined threshold level, here 7.2 volts. 
     The transistor switching circuit 10&#39; includes a comparator circuit 16&#39; having a pair of transistors Q 1  &#39;, Q 2  &#39; with emitter electrodes connected to the positive terminal of battery 12&#39; through a current source 18&#39;, as shown (here such current source 18&#39; produces 13 microamps of current). The base electrode of transistor Q 2  &#39; is connected to the positive terminal of battery 12&#39; through a precision resistor R&#39; as shown, the base electrode of transistor Q 10  &#39;, and the circuit 19&#39;, as shown. The collector electrode of transistor Q 2  &#39; is connected to circuit 19&#39;. Circuit 19&#39; includes (1) a resistor R 2  connected to ground (and hence the negative terminal of battery 12&#39;) and, via output bus 24&#39;, to the base electrode of transistor Q 2  &#39;, as shown; and (2) to a current mirror circuit 22&#39; including a diode connected transistor Q 5  &#39; having its collector electrode connected to the collector electrode of transistor Q 2  &#39; and to both its base electrode and to the base electrode of transistor Q 6  &#39;. The collector electrode of transistor Q 6  &#39; is connected to the base electrode of transistor Q 2  &#39; via output line 26&#39;, as shown. The emitter electrode of transistor Q 5  &#39; and Q 6  &#39; are connected to ground. It is noted that the emitter electrode of transistor Q 5  &#39; is here five times larger than the emitter area of transistor Q 6  &#39;. 
     In operation, when the voltage of battery 12&#39; is initially greater than 6 volts transistor Q&#39; 1  conducts and transistors Q 2  &#39; and Q 10  &#39; are placed in nonconducting modes. In such condition, the 13 microamps of current source 18&#39; passes through the collector of diode connected transistor Q 8  &#39; here having an emitter area twice that of transistor Q 8  in FIG. 1, so that 13 microamps passes through the collector electrode of transistor Q 8  &#39; placing transistor Q 9  &#39; in saturation and thereby producing a relatively low voltage at the base of transistor Q 11  &#39; so that such transistor is &#34;off&#34; and no current passes through the indicator light 14&#39; with the result that such light 14&#39; is &#34;off&#34;. Under such condition, the current passing through resistor R&#39; via output line 24&#39; is I R  &#39;=I R  &#39; 1  =V BAT  /(R&#39;+R 2 ) where V BAT  is the output of battery 12&#39; and the voltage at the base electrode of transistor Q&#39; 2  (i.e. V BQ  &#39; 2 ) is V BQ  &#39; 2  =V BAT  R 2  /(R&#39;+R 2 ). Since here we have selected as a first predetermined threshold voltage 6 volts, the resistors R&#39; and R 2   are selected to produce a voltage of 1.3 volts (i.e. V REF ) when the battery voltage V BAT  falls to 6 volts. Here R&#39;=940 Kohms and R 2  is 260 Kohms. Thus, V BQ  &#39; 2  goes from initially 1.95 volts, when V BAT  =9 volts to 1.3 volts when V BAT  falls to 6 volts. 
     When the voltage of the battery falls below 6 volts, the voltage V BQ  &#39; 2  falls below the 1.3 reference voltage at the base of transistor Q 1  &#39; with the result that transistors Q 1  &#39; and Q 9  &#39; go to nonconducting states so that transistor Q 11  &#39; goes &#34;on&#34; and light 14&#39; goes &#34;on&#34; to indicate a low battery. Further, transistor Q 2  &#39; is placed in a conducting mode. Thus, the 13 microamps of current source 18&#39; divides equally between transistors Q 2  &#39; and Q 10  &#39;. Further, since the emitter area of transistor Q 5  &#39; is five times greater than the emitter area of transistor Q 6  &#39;, current source 22&#39; acts as a current source providing 6.5/5=1.3 microamps of current through output line 26&#39;. Thus, when the voltage V BAT  passes through the first, here 6 volts, threshold level a second current passes through R&#39;, i.e. I R  &#39;=I R  &#39; 2 . That is, once the voltage of battery 12&#39; has decreased below the 6 volt threshold level at time t&#39; 1  (FIG. 4A) the voltage at the base of transistor Q 2  &#39; may be expressed as V BQ2  &#39;=V BAT  -R&#39;I R  &#39; 2  =V BAT  -R&#39;(I CQ  &#39; 6  +I 2 ) where I CQ  &#39; 6  is the current through the collector electrode of transistor Q&#39; 6  and I 2  is the current through resistor R 2 . Since I 2  =V BQ  &#39; 2  /R 2  it follows that V BQ2  &#39; now may be represented as V BQ  &#39; 2  =[R 2  (V BAT  -R&#39;I CQ  &#39; 6 )/(R&#39;+R 2 )]. Since here I CQ  &#39; 6  is here 1.3 microamps, V BQ2  &#39; may be expressed as [0.217 V BAT  -0.26] volts, as shown in FIG. 4D. The second current I R  &#39; 2  may be expressed as I R  &#39; 2  =(V BAT  -V BQ  &#39; 2 )/R&#39;=V BAT  /(R&#39;+R 2 )+I CQ  &#39; 6  [R 2  /(R&#39;+R 2 )]=I R  &#39; 1  +I CQ  &#39; 6  (R&#39;/(R&#39;+R 2 )). Thus, the second current is the first current, I R  &#39; 1 , plus an additional current I CQ  &#39; 6  (R&#39;/(R&#39;+R 2 )). It is noted that the voltage at the base electrode of transistor Q 2  &#39; remains below the 1.3 volt threshold level at the base of transistor Q 1  &#39; even though the battery voltage rises above 6 volts, as during the period of time between t 2  &#39; and t 3  &#39;, as shown in FIG. 4D. At time t R  &#39;, however, the battery voltage rises to 7.2 volts and the voltage V BQ2  &#39; now passes through the 1.3 reference voltage. Therefore, transistors Q 2  &#39; and Q 10  &#39; are placed in a nonconducting mode while transistor Q 1  &#39; is returned to its conducting condition. Therefore, the current through resistor R&#39; returns to the first current I R  &#39; 1  and the voltage at the base of transistor Q 2  &#39; may again be expressed as V BQ  &#39; 2  =V BAT  R 2  /(R&#39;+R 2 ). Thus, light 14 turns &#34;off&#34; after the battery 12 produces a voltage greater than the second, 7.2 volt, threshold level. It follows then that the first threshold voltage V T  &#39; 1  =6 volts is equal to the sum of the reference voltage, V REF , and the voltage drop produced across resistor R&#39; in response to the first current, V REF  /R 2  ; i.e. V T  &#39; 1  =V REF  +(V REF  /R 2 ) and the second threshold voltage V T  &#39; 2  =7.2 volts is equal to the sum of the reference voltage, V REF , and the voltage drop produces across resistor R&#39; in response to the second current, (V REF  /R 2 )+I CQ  &#39; 6 , i.e. V T  &#39; 2  =V REF  +[(V REF  /R 2 )+I CQ  &#39; 6  ]R&#39;. 
     Having described a preferred embodiment of the invention, it will now be apparent to one of skill in the art that other embodiments incorporating this concept may be used. It is felt, therefore, that this invention should not be restricted to the disclosed embodiment but rather should be limited only by the spirit and scope of the appended claims.