Circuit Note CN-0343 Devices Connected/Referenced 32 kB RAM, 126 kB Flash ARM7TDMI ADuC7126 Processor with Flexible Peripheral ADP3629 High Speed, Dual, 2 A MOSFET Driver Dual Low Power 1.5% Comparator with ADCMP670 400 mV Reference Circuits from the Lab reference designs are engineered and 650 kHz /1.3 MHz Step-Up PWM DC-to-DC tested for quick and easy system integration to help solve todays ADP1613 Switching Converters analog, mixed-signal, and RF design challenges. For more information and/or support, visit www.analog.com/CN0343. Low Cost, Low Noise, Dual CMOS Rail-to- AD8692 Rail Output Operational Amplifiers AD8541 General-Purpose CMOS Rail-to-Rail Amplifier ADP7104 20 V, 500 mA, Low Noise, CMOS LDO 3.3 V, Slew Rate Limited, Half Duplex, ADM3483 RS-485/RS-422 Transceivers Ultrasonic Distance Measurement The approximate range is from 50 cm to 10 m with a resolution EVALUATION AND DESIGN SUPPORT of about 2 cm. Temperature compensation is provided by the Circuit Evaluation Boards integrated temperature sensor and analog-to-digital converter CN-0343 Circuit Evaluation Board (EVAL-CN0343-EB1Z) (ADC) contained in the microcontroller. Design and Integration Files Schematics, Source Code, Layout Files, Bill of Materials In industrial applications, distance measurement is a common requirement, such as fluid level sensing or sensing the distance CIRCUIT FUNCTION AND BENEFITS between solids. Industrial fluids are often corrosive or contain The circuit shown in Figure 1 is a completely self-contained solids and debris, as in wastewater purification or chemical distance sensor that utilizes an ultrasonic transmitter and processing. Therefore, ultrasonic techniques are advantageous sensitive analog receiver in conjunction with a precision analog because the sensor does not contact the liquid or object directly, microcontroller to provide distance measurements. Unlike as in the case of flotation-based sensors. complicated PLL-based receivers, the sensor shown in Figure 1 For sensing the levels of thick liquids or foamy water, the ultrasonic uses a sensitive window comparator circuit, thereby minimizing level sensor is a better choice than capacitance, reed, or float real estate and cost. sensors. In very dusty or corrosive environments, the ultrasonic sensor is the sensor of choice. Rev. A Circuits from the Lab reference designs from Analog Devices have been designed and built by Analog Devices engineers. Standard engineering practices have been employed in the design and construction of each circuit, and their function and performance have been tested and verified in a lab environment at room temperature. However, you are solely responsible for testing the circuit and One Technology Way, P.O. Box 9106, Norwood, MA 02062-9106, U.S.A. determining its suitability and applicability for your use and application. Accordingly, in no event shall Tel: 781.329.4700 www.analog.com Analog Devices be liable for direct, indirect, special, incidental, consequential or punitive damages due Fax: 781.461.3113 20142015 Analog Devices, Inc. All rights reserved. to any cause whatsoever connected to the use of any Circuits from the Lab circuits. (Continued on last page) CN-0343 Circuit Note C13 270pF V REF 2.5V R4 2.5V R5 16k C21 3.3V 560 270pF 3.3V 400SR160 R16 R15 5V ADCMP670 C16 R10 U4 R6 470k 330k R19 C10 6.8nF 560 +INA 47k 1k 82pF R12 C30 16k 68pF U8A OUTA 1 R2 AD8692 400mV INT 2 2.5V R11 470k OUTB 560 C31 R18 R17 56pF 82k 68k C22 INB 100nF U8B 1 AD8692 2 J3 INT JLINK R20 5V V U12 REF 3.3V 6V 100k AD8541 2.5V 18V ADP1613 BOOST J1 18V R14 C28 P3.2 V CIRCUIT REF 47 10F C39 C36 U7 ADuC7126 400ST160 R29 470nF 100nF U4 100nF PWM0 5V ADP7104-5 VOUT VIN R13 GND 100k U2 U13 216 CHARACTERS PWM1 LCD DISPLAY MC21605C6W 3V ADP7104-3.3 U6 U9 U14 ADP3629 VOUT VIN GND ADM3483 PUSH U10 BUTTONS J2 RS-485 Figure 1. Ultrasonic Distance Sensor (Simplified Schematic: All Connections and Decoupling Not Shown) CIRCUIT DESCRIPTION ULTRASONIC DISTANCE MEASURE SYSTEM Ultrasonic Measurement Theory Figure 2 shows a typical ultrasonic distance measurement Rx Tx system. The time between the transmitted sound and the received sound, t, is used to measure the distance, d: C t C = VELOCITY OF SOUND AIR AIR d d t = Tx TO Rx TIME 2 C t AIR d = 2 where CAIR is the velocity of sound. In the dry air, the speed of sound in m/s is approximately C 20.0457 273.15 T m/s AIR Figure 2. Typical Ultrasonic Distance Measurement System where T is the temperature in C. When sound strikes a medium, the amount reflected is defined At 25C, C = 346.13 m/s. Ultrasonic distance measurements AIR by the reflection coefficient, R: must have temperature compensation to yield accurate results, Z2 Z1 R because the error in the distance measurement due to the Z2 Z1 velocity variation is approximately 0.18% of the distance for a where: 1C error in the temperature measurement. Z1 is the acoustic impedance of air. The acoustic impedance, Z, of a medium is defined as Z2 is the acoustic impedance of the medium. Z = V The acoustic impedance of liquids or solids is much greater where: than that of air, therefore R ~ 1, and most of the sound is is the density of the medium. reflected. V is the acoustic velocity. In a typical system, the ultrasonic transmitter is first driven and emits a short burst at the resonant frequency of the transmitter. The receiver then listens for the echo. When the echo is detected, the time interval is measured by the processor and the distance is calculated. Rev. A Page 2 of 7 11765-001 11765-002