|
AN597 Datasheet, PDF (1/8 Pages) Microchip Technology – Implementing Ultrasonic Ranging | |||
|
AN597
Implementing Ultrasonic Ranging
Author:
Robert Schreiber
Logic Products Division
INTRODUCTION
Object ranging is essential in many types of systems.
One of the most popular ranging techniques is
ultrasonic ranging. Ultrasonic ranging is used in a wide
variety of applications including:
⢠Auto focus cameras
⢠Motion detection
⢠Robotics guidance
⢠Proximity sensing
⢠Object ranging
This application note describes a method of interfacing
PIC16CXX microcontrollers to the Polaroid 6500
Ranging Module. This implementation uses a
minimum of microcontroller resources, a CCP module
and two I/O pins. The two major components of the
system are:
⢠Microcontroller
⢠Polaroid 6500 Ranging Module
The microcontroller performs the intelligence and
arithmetic functions for ultrasonic ranging, while the
Polaroid 6500 Ranging Module performs the ultrasonic
signal transmissions and echo detection.
FIGURE 1: RANGING MODULE INTERFACE
THEORY OF OPERATION
Ultrasonic ranging entails transmitting a sound wave
and measuring the time that it takes for the sound wave
to reï¬ect off of an object and back to the origin. The
reï¬ection time is proportional to the distance that the
object is from the source. In this implementation, the
sound wave is transmitted and received from the same
transducer. Therefore, a blanking interval is required
between signal transmission and reception to eliminate
false echoes (i.e., a transmitted signal being detected
as its own echo).
CIRCUIT CONFIGURATION
In this implementation, a PIC16C74 is connected to the
ranging module as shown in Figure 1. The RE0 and
RE1 I/O pins are conï¬gured as digital outputs and are
tied to INIT and BINH, respectively. The CCP1 pin is
conï¬gured as a digital input and is tied to ECHO
through a pull-up resistor. The pull-up resistor is
needed since the ECHO signal is an open-collector
output. The CCP1 pin is conï¬gured for capture mode
(CCP1CON). Figure 2 shows the timing relationship for
VDD and the three signal lines (INIT, BINH, and ECHO).
Note: The ranging module requires 5.0 millisec-
onds to stabilize during power-up.
RE1
RE0
CCP1
PIC16C74
BINH
INIT
TRANSMIT
ECHO
POLAROID 6500 RANGING MODULE
TRANSDUCER
© 1995 Microchip Technology Inc.
Thi d
t
t d ith F M k 4 0 4
DS00597A-page 1
|
▷ |