Whether you want to build an automatic flush toilet for your home or design a machine to taunt your cat every time she walks by, our friends from Nuts & Volts Magazine have this great ultra-simple, ultrasonic proximity detector.
The circuit in Figure 1a and Figure 1b are the schematics of an ultrasonic proximity detector. It has a maximum detection range of approximately 6 ft. When someone passes in front of the ultrasonic transceiver board, the contacts of relay K1 will close. The relay will remain energized while the device continues to detect a reflection. When there is no reflection, the relay contacts will open after 20 seconds. Photo 1 shows the assembled circuit on an experimenter's breadboard.
Step1: TransmitterU2C forms a 40 KHz oscillator (figure 3 shows the 40 KHz crystal assembly). This oscillator is connected to U2D and U2E while the inverted oscillator signal (U2B) goes to U2A and U2F. These parallel gates provide more current and drive the ultrasonic transmitter. Note that it may take a couple of seconds after the power is applied for the oscillator to stabilize.
Step 2: ReceiverQ1 and Q2 amplify the reflected 40 KHz signal picked up by the ultrasonic receiver by 2500. Q2 is capacitively coupled to the voltage doubler formed by D1 and D2. The rectified signal is connected to the negative input of voltage comparator U1A. R12 (the Sensitivity potentiometer) sets the threshold voltage for U1A. When the threshold voltage is exceeded, the open collector output of U1A goes high-impedance. This enables the 70 Hz oscillator formed by U1B. When this oscillator is on, the LED glows and the one-shot formed by U3 is repeatedly triggered. The output duration of the one-shot is set by R16 and C11 and is equal to 1.1*R16*C11 seconds. U3's output turns on Q3. As a result, K1 closes its normally open contacts. C13 dampens the inductive kickback when K1 is turned off, preventing the circuit from triggering due to this noise source. The unit is powered by a 12 VDC 200mA unregulated wall transformer. U4 provides a regulated 9VDC to power the circuit. Device pinouts are shown in Figure 2. The 40 KHz transmitter and receiver are mounted 4 inches apart on a piece of perfboard (see Photo 2 below).
The circuit consists of the following:
40 kHz Ultrasonic Sensor Set (Transmitter)
40 kHz Ultrasonic Sensor Set (Receiver)
To calibrate the device, have someone stand at the desired detection distance in front of the transceiver board. Next, turn the Sensitivity Control (R12) until LED D3 glows. Then rotate R12 slightly in the opposite direction until the LED goes out. Noise may cause the device to trigger randomly, causing the LED to blink. If this happens, turn R12 slightly to reduce the circuit's sensitivity. One application for this circuit is turning on a door chime. Another use is detecting a person on a porch and turning on an exterior light. This can be accomplished by wiring the normally open contacts of the relay in parallel with the lamp SWITCH. Have fun with your Ultrasonic Proximity Detector.
|R1||3K 5% 1/4W Resistor||690970|
|R2||150K 5% 1/4W Resistor||691382|
|R3,R10,R14||330K 5% 1/4W Resistor||691462|
|R4||1.8K 5% 1/4W Resistor||690929|
|R5||470 5% 1/4W Resistor||690785|
|R6||10K 5% 1/4W Resistor||691104|
|R7||2.2K 5% 1/4W Resistor||690945|
|R8,R15,R17||1K 5% 1/4W Resistor||690865|
|R9||220 5% 1/4W Resistor||690700|
|R11,R19,R20,R22||100K 5% 1/4W Resistor||691340|
|R13||10M 5% 1/4W Resistor||691817|
|R16,R21||1M 5% 1/4W Resistor||691585|
|R18||150 5% 1/4W Resistor||690662|
|C11||22µF Tantalum Capacitor||545852|
|K1||12V SPDT Relay||2112946|
|J1||2.5mm x 5.5mm Jack||281842|
|T1||12V 200mA Wall Xfmr||249236|