23. The comparator with hysteresis

The hysteresis comparator circuit uses an operational amplifier with positive feedback to make the comparison have two separate on and off values ​​of the circuit.

This separation between the on value and the off value is called the hysteresis value.

Esquema de un comparador con histéresis.

Simplified diagram of a comparator with hysteresis.

Operation

The circuit without resistor R2 works the same as a traditional comparator, which compares the voltage 'Vin' with the ground voltage.

By adding resistor R2, we add positive feedback, because R2 is connected between the output and the positive input terminal. This positive feedback has the result of boosting the output voltage.

If the output is positive, the input terminal V+ will be positive and the input voltage Vin will have to be greater than zero to make the output negative again.

On the other hand, if the output is negative, the input terminal V+ will be negative and the input voltage Vin will have to be less than zero to make the output positive again.

The result is a separation between the input value that produces a positive output and the input value that produces a negative output.

Simulation

In the following simulation we can see a comparator with hysteresis functioning as a heating control:

  • The output LED represents the heater heating the room.
  • Resistor R1 represents the thermostat in which we can change the desired temperature of the room.
  • Resistor R3 represents the ambient temperature sensor.
  • Resistor R4 provides positive feedback and is what produces the hysteresis.

By increasing the temperature value in R3, the LED will end up turning off so that the room temperature decreases.

If in that case we decrease the temperature value in R3, the LED will end up turning on so that the room temperature increases.

If we remove resistor R4, the circuit is a traditional comparator that compares the reference voltage of R1 with the voltage of R2 and R3, which are a temperature sensor.

With R4 connected, the on and off temperatures do not coincide, but are several degrees apart, which is called hysteresis temperature.

If both on and off temperatures are considered, the heater would turn on and off continuously, very frequently, and that could damage it.

Exercises

  1. How is the hysteresis comparator different from the traditional comparator? Explain the differences in circuit operation and design.

  2. What is voltage or temperature hysteresis?

  3. Which is higher in this simulated circuit, the on temperature or the off temperature?

    In a refrigerator, what will be higher, the on or off temperature of the refrigerator? Justify your answer.

  4. Simulate the temperature change in thermistor R3 to check how the circuit behaves. The red light on the diode represents the ignition of a heater.

    At what temperature does the heater turn on?

    At what temperature does the heater turn off?

    Why is there this difference between the two?

  5. Change resistor R4 to a lower value (100k). What happens with hysteresis?

    Change resistor R4 to a higher value (800k). What happens with hysteresis?

  6. What are the advantages and disadvantages of using a lower hysteresis in the heater circuit?

  7. Change the value of the variable resistor R1 so that the heating works between the ranges 20ºC and 22ºC.

    Keep resistance R4 with the value of 800k from the previous exercise.