The present invention relates generally to electronic circuits used as comparators, and more specifically to electronic circuits used as comparators with built-in hysteresis.
The problem addressed by this invention is encountered in electronic circuits used to compare a first voltage to a second voltage. Commercially available comparators, such as the LM2904, are readily available and are often used to compare voltages. The LM2904 comparator is designed for no hysteresis and low offset. In some applications, such as a reset circuit, however, it is desirable for a comparator to have more hysteresis. FIG. 1 shows a prior art comparator, such as the LM2904, configured to have hysteresis. More specifically, FIG. 1 shows comparator 10 having a non-inverting input 4, an inverting input 12, and an output 8. Resistor 6 and resistor 3 add hysteresis to the circuit, as is known in the art. Typical resistor values for this configuration are 10 kilohms for resistor 3 and 1 Megohms for resistor 6. In fact, problems with the circuit of FIG. 1 are that large resistor values are required and/or the circuit has an undesirably low gain. Large resistor values are inconvenient for integration onto a chip.
FIG. 2a shows a prior art comparator circuit 16. This circuit includes a bias circuit 18, a differential input stage 20, and a hysteresis circuit 22. The bias circuit includes current source 24 connected in series with NPN bipolar transistor 26 and resistor 28. In operation, current is generated by current source 24 to forward bias transistor 26. This creates a bias voltage which is used by the transistors in the differential input stage 20 and by transistor 48 of comparator 16.
The differential stage includes PNP transistors 30, 36, 40, and 44, NPN transistors 32 and 46, resistors 38 and 42, and current source 34. In operation, the base of transistor 36 is the noninverting input of comparator 16 and the base of transistor 40 is the inverting input. When the base of transistor 36 is at a higher voltage than the base of transistor 40, transistor 40 turns on and conducts the current supplied by current source 34 while transistor 36 is off. Consequently, transistor 46 is turned off which allows transistor 44 to drive the voltage on Vout high. Conversely, if the base of transistor 36 is lower than the base of transistor 40, then transistor 36 is on and transistor 40 is off. This condition drives the emitter of transistor 46 low which turns transistor 46 on. Since transistor 46 is on, Vout is driven to a low voltage.
The hysteresis circuit 22 includes PNP transistor 48 and resistor 50. In operation, transistor 48 turns on when the V- input of the comparator is at a sufficiently low value to turn on transistors 30, 32 and 40. When the V- input goes positive with respect to the V+ input, transistor 36 conducts, turning off transistors 32, 30 and 48. With transistor 48 on, a voltage drop is developed across resistor 50. Therefore, this additional voltage drop is the hysteresis which must be overcome to switch the comparator when the voltage on the V- input rises.
The problem with the prior art of FIG. 2a is that the circuit requires resistors 38 and 42 to be relatively low resistance so that the circuit can have sufficient dynamic range without the transistors in the differential stage operating in saturation. Consequently, the circuit in FIG. 2a suffers from low gain.
FIG. 2b shows a circuit which is similar to FIG. 2a but differs in how the hysteresis in the circuit is achieved. FIG. 2b shows a bias current circuit comprising transistor M18, Q29, and resistor R40. The differential input stage comprises transistors Q0, Q1, Q2, Q3, Q4, and Q5. The output stage comprises M15 and M19. M13, M14, M15, M16, and M51 are current sources for the circuit. The base of Q2 is the non-inverting input and the base of Q0 is the inverting input of the differential stage. Resistors R26, R29, and R38 form a voltage divider to set up the voltage reference for the non-inverting input and to form the hysteresis circuit.
In operation, the output of the circuit, Vout, switches when the input, V-, rises to the threshold voltage of the circuit. At that point, Q0 and Q1 turn off while transistors Q3 and Q2 turn on. With Q3 on, M36 and M19 are turned on thereby activating the hysteresis circuit and pulling the output to a low voltage, respectively. The hysteresis circuit is activated by transistor M36 effectively shorting resistor R38 which effectively changes the voltage reference on the inverting input. The problem with this circuit is that current is always flowing in through the voltage divider network. Additionally, there is a practical problem with making transistor M36 large enough to completely short out the resistor R38 unless resistor R38 is made extremely large. If resistor R38 is large, then typically resistors R26 and R29 will have to be even larger and, for an integrated circuit, large circuit areas will be used.
USPTO Backgrounds
USPTO Backgrounds