General Engineering Terms
"A" "B" "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M",
"N", "O", "P" "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"

Window Comparator

A comparator receives one input signal and compares that signal to a reference voltage applied to another input. A window comparator uses two voltage references and compares the incoming signal to both of those references. The comparator circuit outputs one level when the incoming signal is within the voltage window and the opposite level when the incoming signal goes outside the window [the two voltage references].

LM358 Window Comparator Circuit Diagram
LM358 Window Comparator




Component Selection

Because the Window Comparator requires two operational amplifiers, a dual package LM358 was used in the design. However two single Op Amps, or a quad package Op Amp could have been used as well. But the LM358 is a dual low power operational amplifier in an 8 pin package [DIP or SOIC], or TO99 metal can.

Recall that an operational amplifier can be made to function like a voltage comparator, but a voltage comparator will never function as an operational amplifier. So it doesn't really matter what component is used to do the voltage comparison, although it might make a difference to the surrounding component values. This circuit example uses a Wired-OR connection so if either of the outputs from the amplifiers goes low the transistor turns on.

The two 1N914 diodes separate the outputs from one another, so that if either goes low that Op Amp will turn on the transistor. The circuit assumes a standard operational amplifier output, but a comparator might have a completely different output structure. For example a comparator could have an open collector, totem pole or both an open-collector and open-emitter output structure. So the interface between the Op Amp and transistor might change depending on the device used. The 1N914 is a common small-signal diode [fast-switching diode] and could be replaced by any number of similar components.

This circuit uses a 2N3904 general purpose NPN transistor, another very common part. Like the diode, the transistor could be substituted by any other general purpose NPN transistor. The transistor is just used as a switch, tuning on when either Op Amp goes low and allowing one of the diodes to conduct.





Voltage Window

The voltage window is set by two voltages, an upper limit applied to the top comparator and a lower limit applied to the lower comparator. The input voltage is applied between them and its absolute value compared to the two references. The voltage references could be any value up to the limit of the voltage used to power the Op Amps. Also for the circuit to function correctly the upper limit should be more positive than the lower limit.

Both comparators are high when the input voltage is between the reference voltages. If the input rises above the upper limit [Vhigh] than the top comparator goes low. Or if the input falls below the lower limit [Vlow] than the bottom comparator goes low. So the two comparators form a voltage window, which output a high when the input is between the window or a low when the input goes above or below the window.

Note that the term comparator is being used to describe the function or application of the integrated circuits, but operational amplifiers are being used in the example as comparators. As covered under the Voltage Comparator topic, those type of chips could also be used; however the output circuit might need to be different. For example some comparator Ics might have a Open Collector output and need to be pulled high.

LM358 Package Options

There are a number of possible packaging options when purchasing an LM358, although not all options may be available from all manufacturers. The picture above shows an LM358 in a 8-pin plastic DIP, indicated by the letter 'N' after the part designation. An 8 pin dual in-line ceramic package is also available for military temperature ranges; although a ceramic part would use the LM158 part number to indicate the higher temperature range operation.

The LM358 is also produced in the through-hole metal-can variant as either an 8-lead TO-5 package or 8-lead TO-99 package.

Surface mount packages include an 8 pin SO package or a 14 pin ceramic SOIC, an 8-pin Bump package is also available.

Not all package options will accommodate all temperature ranges, and not all manufacturers will offer all the package options.

 
PC motherboard
Home

Distributor rolodex Electronic Components Electronic Equipment EDA CDROM Software Engineering Standards, BOB card Cabled Computer Bus Electronic Engineering Design Table Conversion DB9-to-DB25.
DistributorsComponents Equipment Software Standards Buses Design Reference