| Window Comparator to Filter Input Last Modified: 2006-11-16 | | |
| Acroname Robotics | PDF webpage version | ||
| Introduction This note describes how to use a window comparator to interface sensors that provide analog output when your controller doesn't have a spare A/D channel. The window comparator can "watch" an output line and digitally tell the controller when the voltage moves above or below specific voltage settings. This voltage "window" can be adjusted using different resistor values. Circuit Schematic Below is a schematic of the window comparator interfaced to the Eltec 442 Pyroelectric detector. In this schematic, R2 could be replaced with a variable resistor to adjust the size of the voltage window. With the specified values, the window is roughly 2.30V to 2.70V. ![]() Generally, the voltage of the detector will rise or fall depending on the direction of motion of the object (person, candle, light bulb). This means that one or the other of the digital outputs from this circuit will go from low to high when the motion occurs depending on the direction of the motion. Experimentation is the best way to learn how the detector behaves. This circuit uses the LM139 Quad Comparator. This chip is easy to locate and costs typically less than a dollar. The Radio Shack part number is 276-1712 and the DigiKey part number is LM139J-ND. Resistors R1, R2, and R3 create a voltage divider. By reducing the R2, the size of the window is reduced. Larger values of R2 will increase this window size. When used with a pyroelectric detector, the size of this window depends on the range of detection, source of heat, placement of lens, etc. The values shown above seem to work fine for general use. element type not assignedResistors R4 and R5 are pullup resistors. These are required because the comparator outputs are open collector. Additional Notes This idea was put together to help out Cartersville Middle School in Georgia. The school was putting together a robot for the Trinity Fire Fighting Contest. Revision History:
| ||||
Related Links: Articles: Acroname Tips and Advice for Trinity Fire Fighting Contest | |||||
| voice: 720-564-0373, email: sales@acroname.com, address: 4822 Sterling Dr., Boulder CO, 80301-2350, privacy © Copyright 1994-2010 Acroname, Inc., Boulder, Colorado. All rights reserved. |