In the proximity detector of Figure 1, a 4-in.-sq piece of copper-plated pc board serves as an antenna that forms one plate of a capacitor. An approaching (grounded) person serves as the other plate, producing a capacitance value of 2 to 5 pF that increases as the person approaches. At 6 in. from the copper plate, for example, the person produces a capacitance value of approximately 2 pF.
Figure 1. | This proximity detector lights the LED when a person approaches the antenna plate within a threshold distance set by potentiometer R2. |
A simplified circuit illustrates how the circuit transforms distance/capacitance into a proportional voltage (Figure 2). Transitions of the input square wave apply directly to the lower input of the exclusive-OR (XOR) gate but are delayed 0.693×R1×C1 sec before the comparator reconstructs the transitions and applies them to the upper XOR input. R2 and C2 filter the resulting XOR output to produce a voltage proportional to distance.
Figure 2. | Exclusive-ORing two inputs, one delayed by the R1-C1 network, and subsequent filtering by R2 and C2 implements a capacitance-to-voltage conversion. |
The XOR output’s duty cycle is proportional to the sum of the R1-C1 network’s delay and the comparator’s propagation delay, so a small variation in comparator delay can mask small changes in antenna capacitance. The circuit in Figure 1 overcomes this limitation using a dual comparator (IC1). Passing the XOR inputs through nearly identical comparators largely nullifies the effect of offset voltage, drift, and propagation delay through the comparators.
Figure 1’s delay capacitance consists of a 33-pF capacitor, C1, in parallel with 15 pF (6 in. of coaxial cable at 30 pF per foot) and the 4-in.-sq antenna plate. This capacitance charges to 5 V through R1 during each positive half cycle of the input square wave.
When no one is near the detector, this capacitance equals 48 pF and produces a delay of 16.5 nsec at the upper XOR input. With a hand 6 in. from the detector, the capacitance rises to 50 pF and produces a delay of 17.3 nsec, yielding a time difference of only 0.8 nsec.
To detect such small time differences – over temperature and with accuracy – the comparators must be stable in offset voltage and propagation delay. (Changes in offset voltage as well as propagation delay affect delay time.) One 10-nsec comparator is generally stable to within 1 nsec. To resolve subnanosecond intervals, use the dual-comparator approach of Figure 1, which increases the useful resolution by a factor of four to five.
Op amp IC2A offsets and amplifies the dc voltage at TP1, which corresponds to the distance between hand and antenna plate. A hand movement toward the antenna causes the voltages at TP1 and TP2 to rise. IC2B and Q1 serve as a comparator with hysteresis, which compares the TP2 voltage with 2.5 V. Thus, any TP2 voltage above 2.5 V (which corresponds to a proximity of 6 in.) turns on the LED. You can adjust potentiometer R2 to set a threshold other than 6 in., and you can connect a DVM at TP2 to read out the proximity in inches. R3 adds hysteresis to ensure a well-defined transition.
To ensure frequency stability for the high-speed dual comparator in Figure 1, the copper-clad pc board should have a ground layer in addition to the circuit layer. Power-supply bypassing should include 0.1-mF ceramic capacitors that sit very close to the comparators’ supply terminals.