Window comparator

by ourcircuits

10 parts

A 5 V ladder of three equal resistors sets 3.33 V and 1.67 V thresholds and two op-amp comparators — output rails pinned to 0/5 V so they put out real logic levels — each watch one bound. A diode-AND (pull-up plus two diodes) combines them: the output sits at 5.0 V only while the 200 Hz triangle is inside the window and gets yanked to 0.57 V (one diode drop) the moment either comparator goes low. Measured, it toggles at exactly 3.333 V and 1.667 V on the input.