I have a colleague who is off work for the next 2 weeks and has asked me to finish off one of his schematic designs. I have a list of operations it needs to be able to perform, seems simple enough.

I got round to making a start on it today, and after having a browse through what he has already done, I notice something that I haven't seen before.

Here is the basics of what it looks like:


simulate this circuit – Schematic created using CircuitLab

I have not seen an op amp circuit which uses a diode in the feedback circuit in this way. I recognise it is a window comparator, and this part of the circuit is used to detect a voltage level and turn on an LED if it goes above or below a threshold. I just can't work out what the point of the resistor and diode is in the feedback.

My go-to op amp configuration PDF is one from texas instruments (LINK) and I couldn't find one like this. So can anyone tell me what the function is of this feedback circuit?

NOTE: I have labelled things as V1, V2, OUT etc as they should be irrelevant to the circuit, V1 and V2 are measuring the input voltage, Vref is the threshold, and the output toggles LEDs

EDIT: I have updated the schematic to include the resistors that Andy aka mentioned, the values of resistance are what was on the schematic at the time, they may be incorrect, I am unsure, as the schematic is not finished.

  • \$\begingroup\$ We could probably do with seeing what's actually connected to the inputs. \$\endgroup\$ – Finbarr Jan 16 '18 at 16:30
  • \$\begingroup\$ At the inputs, It's just 3.3V from a regulator, then divided down via resistors \$\endgroup\$ – MCG Jan 16 '18 at 16:49
  • \$\begingroup\$ It's just to ensure the regulator is within it's specs \$\endgroup\$ – MCG Jan 16 '18 at 16:49
  • \$\begingroup\$ @MCG I think you have put R3 in the wrong place - it should go between Vref and OA2 non-inverting input. \$\endgroup\$ – Andy aka Jan 17 '18 at 9:34
  • \$\begingroup\$ Correct @Andyaka, I'll correct that now \$\endgroup\$ – MCG Jan 17 '18 at 9:49

It looks like the intention is to provide hysteresis. For instance (and assuming that V1 and Vref have series resistance that is not shown on the OP's diagram), if V1 drops below Vref then OUT will drop to 0 volts and R1/D2 will further enhance the effect of V1 lowering below Vref. This is called hysteresis and is used to avoid a situation where V1 is hovering close to the value of Vref and causing OUT to oscillate high and low due to noise.

That is what hysteresis does - once a comparator switches it stays switched with no ambiguity.

With a diode (D2) in series with R1 and with OUT high there is NO current passing back through D2 to V1. This means that if Vref were to increase toward V1, OUT would switch low at precisely the point Vref = V1.

It's a kind of one-sided hysteresis and this is due to the diode blocking the hysteresis effect in one direction.

  • \$\begingroup\$ Brilliant, thanks. There was a note somewhere about hysteresis here but as I couldn't be sure, I wanted to ask here to see if anyone mentioned it and explained it. Thanks for the answer! Much appreciated! \$\endgroup\$ – MCG Jan 16 '18 at 16:52
  • \$\begingroup\$ And yes, there was a series resistance in Vref I forgot to add! \$\endgroup\$ – MCG Jan 16 '18 at 16:53
  • 1
    \$\begingroup\$ You won't find that circuit in your LINK because comparator circuits are not always regarded as linear circuits. TBH I think it should be included! \$\endgroup\$ – Andy aka Jan 16 '18 at 16:54
  • \$\begingroup\$ @MCG there is probably a resistor in series with V1 too. \$\endgroup\$ – Andy aka Jan 16 '18 at 17:00
  • \$\begingroup\$ Yes there is also a resistor there as you said. It was the end of the work day and was rushing to get it done! On mobile now so can't edit till tomorrow morning. Apologies. \$\endgroup\$ – MCG Jan 16 '18 at 17:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.