● Learn about comparator functionality.
● Gain a greater understanding of the use of hysteresis with comparators.
● Learn more about the effects hysteresis has on the functionality of comparators.
A vector displaying hysteresis.
In the current global crisis, we must remain vigilant in the accuracy of our decision making. Today's busy lifestyles and financial challenges also bring about the need to make accurate comparisons to optimize our purchasing choices. In previous times, these choices were about saving money or staying within our budgets. However, now it is also about safety.
With these changing times also comes advancements in our tools and technology. One such tool is an “app,” and they come in a myriad of variations. One such type provides review and pricing comparisons. Many of us are familiar with these types of apps because they serve an important role in our modern society. Now in the field of electronics, we utilize electronic devices that execute similar comparative actions, and we call them comparators. Their functionality is equally important to the overall functionality of the applications that employ them.
A comparator is a device for comparing a measurable property or thing with a reference or standard. In other words, it is an electronic circuit for comparing two electrical signals. We use comparators to examine or analyze two currents or voltages. The comparator compares these voltages or currents at its two inputs.
Functionally, this means that it takes two input voltages, compares them, and then provides a differential output voltage, either a low or high-level signal. On a broader scope, we can use a comparator to sense when a discretionary varying input signal achieves a defined threshold level or the reference level.
With regards to comparator design, you can use a variety of components such as op-amps, diodes, and transistors. You can often find comparators in use in electronic applications that drive logic circuits. The classification or types of comparators include mechanical, electrical, pneumatic, optical, electronic, sigma, and digital. Generally, a comparator's design is without feedback to afford open-loop configurations.
Hysteresis is the phenomenon in which the value of a physical property lags behind changes in the effect causing it, such as when magnetic induction lags behind the magnetizing force. You can also define it as a concept in physical science. Conceptionally, a system's output depends not only on its input but also on the history of its past inputs. This concept is logical since history affects the value of an internal state. Furthermore, hysteresis happens in ferroelectric materials and ferromagnetic materials.
One example of this is when ferromagnetic materials become permanently magnetized. When this happens, the material remains magnetized even after removing the magnetizing field. This, of course, means that the ferromagnetic material will not revert to zero magnetization. You can only coerce the ferromagnetic material back to zero with sufficient heat or a field in the opposite direction.
Under these conditions, applying an alternating magnetic field will create what is called a hysteresis loop (magnetic hysteresis). Magnetic hysteresis is also the effect that provides the element of memory for HDD. More importantly, the predictability of hysteresis makes it an ideal stabilizing mechanism.
Comparators without Hysteresis
We utilize comparators to compare or differentiate between two different signal levels. For example, a comparator may distinguish between a high temperature and a normal temperature condition. Also, signal or noise variations at the comparison threshold can create multiple transitions. Therefore, hysteresis sets a lower and an upper limit to eliminate the numerous shifts or transitions created by noise.
A comparator that does not utilize hysteresis will use a voltage divider to set the voltage threshold. In this case, the comparator compares the input signal (Vin) to the threshold voltage (Vth). Then, we apply the comparator's input signal to the inverting input so that the output will have an inverted polarity. When Vin > Vth, the output will drive to the negative supply (GND) or a logic low. However, when Vin < Vth, the output drives to the positive supply or logic high.
Although this methodology is simple, we can use it to determine if an actual signal, for example, temperature, is above a predetermined value. However, like most things in the fields of science, electronics, and physics, this method has adverse side-effects. One of the primary issues this method succumbs to is noise. Even a minute quantity of noise present on the input signal can trigger the input to transition below and above its threshold, thus causing an erratic output.
Comparators with Hysteresis
As I am sure you can imagine, a comparator without hysteresis can be critically unstable, and more so if it has noise present at its input. When the input signal approaches the threshold (Vth), it transitions below and above its threshold multiple times. This causes the output to transition numerous times as well. It is easy to understand how these erratic transitions can create functionality issues.
Take, for example, the input signal for critical temperature readings and the output to be a vital monitor, which we interpret with a microcontroller. Since the erratic outputs do not provide a consistent or accurate message to the microcontroller, the system will undoubtedly suffer a critical failure.
However, with a minute change to the comparator circuit, we can add hysteresis. The hysteresis will utilize two different threshold voltages (Vth) to prevent the multiple transitions introduced in the circuit. When using hysteresis, the input signal must surpass the VH (upper threshold) to transition low or below the VL (lower threshold) to transition high.
Note: Typically, noise is not a factor when using hysteresis, unless it exceeds the hysteresis range. In cases such as this, it would generate additional transitions. Therefore, the hysteresis range must be wide enough to reject the noise in your application.
The use of comparators ranges from applications in temperature sensors, motor controls, and various alarm system applications. In each of these applications, a comparator provides critical functionality. However, without hysteresis, stable functionality would not be possible, which affirms the importance of this functionality, providing positive-feedback methodology.
Temperature and humidity sensor detection industry monitor.
Using PSpice Designer for OrCAD can help you analyze your designs as they become more complex. This unique set of features takes data directly from your schematic and gives you a full view of the behavior of your circuits, even B-H curves can be plotted easily.
If you’re looking to learn more about how Cadence has the solution for you, talk to us and our team of experts.