# Window Comparator Question

So I've been reading an intro book to electronics and I got to a section about operational amplifiers. It talks about different uses of them and how they can be used as comparators. It then talks about a specific comparator called a window comparator which will output a positive voltage if the input voltage is in between the high and low reference values. Here is the diagram they give:

I understand the theory, but according to this diagram I don't seem to get the values they say I should get. For example, I put the Vref(high) at 5v and the low at 1V with a 3V input. According to the book I should get a positive voltage for Vout. However in the top comparator, The noninverting input (+ side) is at a lower value than the inverting input. According to the book, this means the output should be negative, right? In the bottom comparator, the noninverting input is also lower than the inverting input, once again resulting in a negative output. Since there are two diodes on both sides, this wouldn't allow any of the signal to get through and Vout would be 0. Can somebody explain to me why they say you should get a positive output if the input voltage lies between the two reference values then? Thanks.

#### Attachments

• 280.9 KB Views: 373
• 280.9 KB Views: 394
• 436.7 KB Views: 327

## Answers and Replies

QuantumQuest
Gold Member
For example, I put the Vref(high) at 5v and the low at 1V with a 3V input.
Have you implemented this either on a breadboard (or something) or using electronics simulator software and in what way i.e. what components you are using and what are the voltages you apply (##V_{cc}, V_{REF}, V_{in}##)?

Averagesupernova
Gold Member
Is there a requirement what the logic output is? In other words is there a reason that the output needs to be high when the input is within the window? I can't see what your book says. Your circuit will output a high when outside the window and a low when within the window.

berkeman
They explicitly said in the book that if the input voltage lies within both reference values, the output will be positive. You can read it here. Figure 3-12 is the diagram I attached above.

I've caught errors in this book before, is this another one of those errors?

#### Attachments

• 155 KB Views: 615
Averagesupernova
Gold Member
They explicitly said in the book that if the input voltage lies within both reference values, the output will be positive. You can read it here. Figure 3-12 is the diagram I attached above.
View attachment 222679

I've caught errors in this book before, is this another one of those errors?
I would say.

berkeman
berkeman
Mentor
Can somebody explain to me why they say you should get a positive output if the input voltage lies between the two reference values then? Thanks.
Looks to me also that the output is active low...
I've caught errors in this book before, is this another one of those errors?
There's a free version of LTSpice that is especially helpful for students. I'd guess that if you simulated this circuit in LTSpice to confirm the hint from @Averagesupernova you would get extra credit...

dlgoff