Electronic – Comparing two variable voltages with hysteresis

comparatorhysteresisschmitt-trigger

All of the designs I have seen for adding hysteresis to a comparator (Schmitt triggers) assume that one of the two inputs to the comparator is set at a fixed reference voltage (typically with a voltage divider between the supply voltage and ground).

Suppose I want to compare one voltage to another, where both input voltages change over time. A simple comparator will do this. But I would like to add hysteresis. In other words, when the difference between the two inputs is within some threshold of 0, the comparator does not switch its output, but if the voltage difference exceed the threshold, the comparator input switches to indicate which value is higher.

How could I design a comparator which compares two variable voltages with hysteresis?

Best Answer

Easiest is to difference-amplify first, then the output is ground-referenced and the familiar hysteresis circuit just works. Ground, here, is a 'constant reference'.

Like this:

schematic

simulate this circuit – Schematic created using CircuitLab

Slightly more tricky, one could use a series resistor and a switchable high impedance current source (LM13700 can fill that function) to put (in the form of current times resistor) a series voltage offset onto the (+) comparator input, polarity determined by the comparator output; that would change the input signal slightly, though.

Related Topic