Collision Avoidance via Laser Rangefinding By N.

Collision Avoidance via Laser Rangefinding
By
Long N. Phan
Submitted to the Department of Mechanical Engineering
In Partial Fulfillment of the Requirements for the Degree of
Bachelor of Science in Mechanical Engineering
and
Master of Science in Mechanical Engineering
at the
Massachusetts Institute of Technology
May 1999
autohrby 9r0sd1to M
@ Long N. Phan, 1999. All rights reserved. dvrbutn putscht pape nd
Ct*)ronic copies of thS the-si
documentn wholo or In pcAs
Author
Obepartment of Mechanical Engineering
Certified by
Paul A. DeBitetto
Senior Member of Technical Staff, Charles Stark Draper Laboratory
Thesis Supervisor
Certified by
Sanjay E. Sarma
Professor of Mechanical Engineering, Massachusetts Institute of Technology
iwarvisor
Th
V
Accepted by
Ain A. Sonin
Chairman, Department Committee on Graduate Theses
SSACHUSETTS IN TI
Collision Avoidance via Laser Rangefinding
By
Long N. Phan
Submitted to the Department of Mechanical Engineering
On May 1, 1999 in Partial Fulfillment of the
Requirements for the
Degree of Bachelor of Science
And
Master of Science
In Mechanical Engineering
Abstract
This thesis describes the design of a prototyped collision avoidance sensor for small
autonomous vehicles. The system is based on laser rangefinding using time-of-flight, and
built using small, low-cost, off-the-shelf components. The key requirement is for terrain
mapping in an urban environment on small autonomous vehicles although it can
potentially be used for any application that requires rangefinding. The completed
scanning laser rangefinding system includes a high power pulsed laser, high-speed timeof-flight measurement device, optical receiver, some optics, high-speed servo, and a
microcontroller. System performance was characterized for both rangefinding and
scanning functions. The final system design provides operational flexibility and technical
knowledge for designing similar rangefinding systems.
Thesis Supervisor: Paul A. DeBitetto
Title: Senior Member of Technical Staff, Charles Stark Draper Laboratory
Thesis Supervisor: Sanjay Sarma
Title: Professor of Mechanical Engineering, Massachusetts Institute of Technology
2
Acknowledgements
This thesis was prepared at The Charles Stark Draper Laboratory, Inc., under Internal
Research & Development No. 18598.
Publication of this thesis does not constitute approval by Draper or the sponsoring agency
of the findings or conclusions contained herein. It is published for the exchange and
stimulation of ideas.
Permission is hereby granted by the Author to the Massachusetts Institute of Technology
to reproduce any or all of this thesis.
Long N. Phan
The work that is described in this document was by no means done all by myself.
There are many people that I would like to thank for their support of my education here at
MIT and Draper Laboratory during the many years.
First, I would like to thank all the members of the Draper helicopter team. I have
been involved with the team for almost five years now and my development as an
engineer was largely attributed by members of the team; Paul DeBitetto, Bill Hall, Bob
Butler, former Draper Fellow Christian Trott, Michael Bosse, and Rusty Sammon. Big
thanks goes to Paul DeBitetto for his support of my wild endeavors, no matter how
difficult or challenging the task may be and for guiding my personal growth. Bob Butler
provided a lot of electrical engineering help to a young mechanical engineer. Christian
Trott and Michael Bosse were student members of the winning 1996 International Aerial
Robotics competition and we spent the whole summer sweating and working together
under the most extreme of conditions. Rusty Sammon is my partner in the collision
avoidance sensor business and supported me technically in every way. Without him, the
sensor would not have been completed.
Other Draper fellows and students in the autonomous vehicle lab include Bill
Kaliardos, Charles Tung, Mohan Gurunathan, Anthony Lorusso, and the many others
who have come and gone. Bill Kaliardos is a fellow mechanical engineer and mentor
with many many years of experience to draw from. His nightly moral support and jokes
will be missed. I would like to take this time to thank all the guys in the original
unmanned vehicle lab for "lending" me the "tools" over the years and not charging me a
premium for it.
From MIT, I would like to thank my good friend, Amy Yu, for helping me get
through my years of hardship to get to where I am today. Professor Sarma has been one
hell of a professor for helping me in every way a professor could. His excellence and
enthusiasm has been absolutely inspiring.
Finally, I would like to thank my entire family for years of encouragement and
support. It is to my mother, father, brother, and sister that I dedicate all my effort.
Long N. Phan
May, 1999
3
Biographical Note
Long N. Phan was born on June 13, 1976 in Saigon Vietnam. He spent two years in his
home country before his parents and uncle left the country as boat refugees traveling
from country to country to escape the communist state of Vietnam. In December of
1979, his entire family made it safely to the United States where they resided in the
tropical islands of Hawaii. After years of hardship, Long graduated from McKinley High
School in Honolulu in 1994 and attended the Massachusetts Institute of Technology
studying mechanical engineering as an undergraduate and graduate student. During his
years, he was active as a varsity volleyball player, member of the Beta Chapter of the Chi
Phi Fraternity, and a competitive engineering student who competed in over three
international engineering competitions. During all his summers, he worked on the
autonomous aerial vehicle project at Draper Laboratory where he focused on
electromechanical systems engineering. This work was the focus of his research for
almost two years, from the beginning of his senior year to the end of his graduate year.
Contingent upon this acceptance of this thesis, Long will be awarded a Bachelor of
Science and Master of Science degree in mechanical engineering and minor in
economics. His future career plan is to work on Wall Street as a trader for Lehman
Brothers.
4
Contents
CHAPTER 1...........
...............................-
.
1 INTRODUCTION .....................................................-.--------
.
.
10
-
-
-
-
-
-
-
10
-------------..........................
10
12
1.1 Introduction.............................................................................
1.2 Objective of This Thesis Document ..................................................................
12
. ----.. --... --..............
1.2.1 D ecision M aking Process ..................................................................................-.........
12
....................
........
Process..............................................................................
D
esign
of
1.2.2 Description
............ ----...- .. .. ................... 12
1.2.3 Analysis of Perform ance.....................................................................
............. 12
......
1.2.4 Conclusion and Future Work.................................................................................
13
1.3 Autonomous Vehicles.........................................................................................
. ............. 13
. ------.....
1.3.1 Land R over Vehicles .........................................................................................
. ------------------------------.................. 13
1.3.2 Aerial V ehicles .........................................................................................
. ...... 14
1.4 Challenges...................................................................... .. 14
.....
...........
1.5 Conclusion.................................................................
15
. ------------.....................
CHAPTER 2 ................................................................--------------....
2 SENSORS ON THE M ARKET AND DECISION M AKING PROCESS....................................
15
2.1 UltrasonicSonar Technology ............................................................................
2.2 Ultra Wide Band High Frequency Radar.........................................................
15
20
.........
2.2.1 Multispectral Solutions, Inc..........................................................................................
2.2.2 Micropower Impulse Radar by Lawrence Livermore National Laboratory..........................................
-----....--.. 28
...........
2.2.2.1 Potential Applications .........................................................................................
22
25
30
2.3 Laser Rangefinding ...........................................................................................
34
2.3.1 L aser T riangulation ..........................................................................................---------------------------..............
--..........
--......
2.3.2 Pulsed Laser R angefinding.......................................................................................2.3.3 Continuous Wave Phase Shift Rangefinding........................................................................................
36
37
2.3.4 Various Packaged Laser Rangefinding Systems...................................................................................40
40
2.3.4.1 LEICA LRF OEM Laser Rangefinder Modules...........................................................................
41
2.3.4.2 Riegl Laser Distance Sensor LD90-3GF ....................................................................................
42
------------..........................
.
.
.....
-....
............................................................4000
2.3.4.3 A ccuR ange
43
2.3.4.4 Riegl Miniaturized 2D Laser Scanner System LSS390................................................................
...44
.............
2.3.4.5 AccuRange 4000 2D Line Scanner ................................................................
45
2.3.4.6 Riegl Laser Mirror Scanner LMS-Q140-60/80 .............................................................................
2.4 Comparison of Various Rangefinding M ethods ................................................
2.5 Final Decision ....................................................................................
CHAPTER 3 ....................................................................-
46
.. 47
. -------..-------------...................
48
48
3 SYSTEM DESCRIPTION....................................................................
3.1 Scanning Laser Rangefinding System................................................................48
49
3.2 High Power Pulsed Laser................................................................................
51
3.3 Power Technology ML100H15..........................................................................
3.3.1 Laser Safety ..........................................................................
. ...............
-----..
-----------------............................
53
53
. . ------------........
3.3.1.1 C lass I L aser P roduct .................................................................................................
3.3.1.2 C lass II L aser P roducts.........................................................................................................------------..53
....... ............... 53
3.3.1.3 C lass 1Ila Laser Products.................................................................................
3.3.1.4 C lass IlIb L aser P roducts ..............................................................................................---...------.----..
3.3.1.5 C lass IV Laser Products ...................................................................................................-------.......
54
54
55
3.4 Laser Optical Receiver.....................................................................................
59
Board.......
Evaluation
TOF
RC-1202
IMRA
3.5 Time of Flight measurement:
3.5 .1 Initialization of R C 1202 ............................................................................................-......-
5
.-. ------...... 6 1
3 .5.2 Op eratio n :..................................................................................................................................................6
3.5.3 Output Data Formatting.............................................................................................................................62
3 .5.4 INP U TS .....................................................................................................................................................
3 .5.5 O U TP U T S .................................................................................................................................................
3.5.6 OPE R AT IO N ............................................................................................................................................
1
63
64
66
3.6 System Controller: 16C73A PIC M icrocontroller................................................66
68
3.7 RS-232 Data Interface: M axim MAX232 .............................................................
3.8 PrecisionMotor: Modified FutabaHigh Speed RC Servo................................69
71
3.9 Optics..............................................................................................................-----.
74
3.10 System Integration..............................................................................................
75
3.11 OperationalProcedures..................................................................................
76
3.12 FinalSystem ....................................................................................................
C HA PTER 4 ....................................................................................................................
4 ANALYSIS OF PROTOTYPE SYSTEM PERFORMANCE ..................................................
4.1 Rangefinding Performance................................................................................
4.2 Scanner System ..................................................................................................
4.3 Laser Scanner System .......................................................................................
CONCLUSION AND FUTURE W ORK ........................................................................
APPENDIX A .....................
............
............
......
APPENDIX B....................................
REFERENCES..................
................
6
78
78
80
83
90
CHAPTER 5 .......................................................
5
78
0.
90
.......
92
..............
104
................... 105
List of Figures
FIGURE 2.1 DISPERSION PATTERN FOR POLAROID SONAR...........................................................................
FIGURE 2.2 A TYPICAL SONAR SETUP........................................................................................................
FIGURE 2.3 TIMING DIAGRAM FOR ULTRASONIC SONAR ............................................................................
FIGURE 2.4 POLAROID 6500 SERIES MODULE AND TRANSDUCER .................................................................
FIGURE 2.5 MULTISPECTRAL UWB RADAR SYSTEM BLOCK DIAGRAM......................................................
FIGURE 2.6 MULTISPECTRAL UWB RADAR SYSTEM ..................................................................................
FIGURE 2.7 MEASURED TIME AND FREQUENCY RESPONSE OF MULTISPECTRAL UWB RADAR ....................
FIGURE 2.8 M IR M OTION SENSOR ................................................................................................................
FIGURE 2.9 M IR M ODULAR RANGEFINDER ................................................................................................
FIGURE 2.10 D IFFUSE REFLECTIONS ..............................................................................................................
FIGURE 2.11 M IRROR-LIKE REFLECTIONS...................................................................................................
FIGURE 2.12 R ETROREFLECTIONS ................................................................................................................
FIGURE 2.13 TRIANGULATION TECHNIQUE ...................................................................................................
FIGURE 2.14 OBSTRUCTION IN TRIANGULATION..........................................................................................
FIGURE 2.15 PULSED LASER SYSTEM ............................................................................................................
FIGURE 2.16 CONTINUOUS WAVE PHASE SHIFT LASER RANGEFINDING .......................................................
FIGURE 2.17 LEICA OEM COMPARISON TABLE ............................................................................................
FIGURE 2.18 LEICA MRF2000 MONOCULAR RANGEFINDER (LEFT) AND STANDALONE UNIT (RIGHT) ........
FIGURE 2.19 RIEGL LASER DISTANCE SENSOR LD90-3GF HEAD UNIT W/O ELECTRONICS.......................
FIGURE 2.20 ACCUITY RESEARCH ACCUIRANGE 4000..............................................................................
FIGURE 2.21 RIEGL MINIATURIZED 2D LASER SCANNER HEAD (LEFT) AND SYSTEM LAYOUT (RIGHT) .......
FIGURE 2.22 ACCUITY ACCURANGE 4000 2D LINE SCANNER ......................................................................
FIGURE 2.23 RIEGL LASER MIRROR SCANNER LMS-Q140-60/80.............................................................
FIGURE 3.1 SCANNING LASER RANGEFINDING SYSTEM LAYOUT...............................................................
FIGURE 3.2 SOLAR RADIATION NOISE SPECTRUM ......................................................................................
FIGURE 3.3 POWER TECHNOLOGY PACKAGED PULSE LASER SYSTEMS .....................................................
FIGURE 3.4 DIMENSION DRAWINGS OF POWER TECHNOLOGY'S PULSED LASERS.....................................
FIGURE 3.5 O PTICAL R ECEIVER ....................................................................................................................
FIGURE 3.6 BASIC SILICON PHOTODIODE PRINCIPLE.....................................................................................
FIGURE 3.7 E-O DEVICES ERX1B OPTICAL RECEIVER...............................................................................
FIGURE 3.8 TYPICAL SILICON PHOTODIODE RESPONSIVITY VS WAVELENGTH ..........................................
FIGURE 3.9 SILICON PIN PHOTODIODE ......................................................................................................
FIGURE 3.10 IM RA RC 1202 BLOCK DIAGRAM ........................................................................................
FIGURE 3.11 EVALUATION BOARD DIAGRAM .............................................................................................
FIGURE 3.12 MICROCHIP PIC 16C73A MICROCONTROLLER .....................................................................
FIGURE 3.13 INDUSTRY STANDARD RS-232 LAYOUT ................................................................................
FIGURE 3.14 M AXIM M AX232 TRANSCEIVER ...........................................................................................
FIGURE 3.15 STANDARD R C SERVO ..............................................................................................................
FIGURE 3.16 PLANO CONVEX LENS FOR LIGHT STRUCTURING WITH DETECTOR .......................................
FIGURE 3.17 INTERFERENCE FILTER PATTERN SPECTRUM .............................................................................
FIGURE 3.18 COMPLETE LASER SCANNING RANGEFINDING SYSTEM .........................................................
FIGURE 3.19 CONTROL W ORD FORM AT ........................................................................................................
FIGURE 3.20 COM PLETED SYSTEM ................................................................................................................
FIGURE 3.21 COMPLETED SYSTEM WITH RS-232 INTERFACE .......................................................................
FIGURE 3.22 COMPLETED SYSTEM OPERATING AT VARIOUS ANGLES .......................................................
FIGURE 3.23 COMPLETE ELECTRONICS CIRCUIT BOARD.............................................................................
FIGURE 4.1 LASER RANGEFINDER CALIBRATION CHART ...........................................................................
FIGURE 4.2 PROBABILITY DENSITY FUNCTION OF RANGE ACCURACY, MEAN=0, STD=1.606 IN ................
FIGURE 4.3 SCANNER A NGLE D ATA VS TIM E................................................................................................
FIGURE 4.4 RAW ANGLE DATA FOR A SINGLE FULL SCAN............................................................................
FIGURE 4.5 PROBABILITY DENSITY FUNCTION OF SCANNER SYSTEM PERFORMANCE ..................................
FIGURE 4.6 LASER SCANNED DATA FOR HALLWAY ....................................................................................
FIGURE 4.7 FOUR FULL SCANS MERGED FOR HALLWAY.............................................................................
7
16
18
18
19
23
23
24
27
28
31
31
31
34
35
36
38
40
40
41
42
43
44
46
49
50
52
52
55
55
56
57
58
60
60
67
68
69
70
72
73
74
76
76
77
77
77
79
80
81
82
83
84
84
FIGURE 4.8 TRANSPOSED HALL PLOT OF ACTUAL ANGLE AND RANGE INFORMATION ..............................
F IGURE 4.9 K NOW N SURFACE .......................................................................................................................
FIGURE 4.10 LASER SCANNED DATA FOR KNOWN SURFACE .....................................................................
FIGURE 4.11 FOUR FULL SCANS MERGED FOR KNOWN SURFACE..............................................................
FIGURE 4.12 TRANSPOSED KNOWN SURFACE PLOT OF ACTUAL ANGLE AND RANGE ................................
FIGURE 4.13 TRANSPOSED SURFACE PLOT OVERLAID WITH KNOWN SURFACE .........................................
FIGURE 4.14 EXTERNAL ROOFTOP TEST WITH SUNLIGHT.............................................................................
FIGURE 4.15 FOUR FULL SCANS FOR EXTERNAL ROOFTOP TEST WITH SUNLIGHT.........................................
FIGURE 4.16 TRANSPOSED SURFACE PLOT OVERLAID WITH EXTERNAL ROOFTOP TEST............................
8
85
85
86
86
87
87
88
88
89
9
Chapter 1
1 Introduction
1.1 Introduction
The concept of a machine that can navigate in a completely unknown
environment has been around for many years. It has been a source of fascination and
research for scientists, engineers, students, and just about everyone interested in the field
of robotics. The term "robot" is generally described as a machine that can intelligently
interact with people and the environment.
Over the years, technology has helped machines evolve into robots by providing
various improvements and inventions to implement ideas that help makes a robot into
how we view them today.
Faster computers, betters sensors, more advanced intelligent
machine theory, and improved mechanical and electrical components are some of the
things that has propelled robotics into what we know them as today. From manufacturing
to artificial intelligence, ideas and technology have merged and coupled to help bring us
closer to the concept of an ideal robot, one that approaches human or better than human
abilities.
From this, the term autonomous is often used to depict the idea of a robot that
interacts intelligently with the environment. Today, we are beginning to see a new breed
of autonomous vehicles whether it be ground, air, or sea. The vehicles can come in the
form of a car, an airplane, helicopter, boat, or just about any other platform typically
controlled and operated by humans. For some platforms, it is easier to be autonomous
than others because of how it interacts with the environment and how technology is used
to support important issues. An airplane for example needs to control speed, attitude,
The
heading, and pitch angles to help guide it from one destination to another.
supporting technologies for an airplane are things such as GPS, inertial measurement
unit, compass, altimeter, and radar. These devices help the airplane to maneuver and
guide itself without significant input from the human operator.
Relatively, an airplane can fly autonomously in the air easier than car in the city
or a helicopter in an urban area. With proper path planning, airplanes can easily avoid
10
mountains and buildings and can detect other airplanes via radar.
Unfortunately, for
ground vehicles and helicopters interested in flying in an unknown urban area, autonomy
is much harder to achieve. Not only will the vehicle need to move with confidence but
also detect objects and obstacles with confidence.
This has long been an ongoing
problem for many engineers and scientists developing autonomous ground and air
vehicles operating in completely unknown environments. They want to be able to not
only move in those environments but also detect and avoid potentially hazardous paths
along the way.
It would be a lot easier to navigate through an environment if it were completely
known. Unfortunately, this is generally not the case when we view how we wish to
operate autonomous vehicles.
Ideally, an autonomous vehicle can operate fully
independent of an operator in any condition or environment.
For this to be possible, the
vehicle must not only know it's current state but the state of the surrounding
environment. There are many types of state sensors on the market used to assess the
active state of an autonomous vehicle. However, environmental state information is a lot
more difficult to achieve. Optical cameras, sonars, radars, and lasers are some of the
methods used to determine environment states. Each has their benefits and costs.
For many years, researching and producing autonomous vehicles has been a major
goal for The Charles Stark Draper Laboratory.
A few examples of their autonomous
research include both ground rover and helicopter vehicles. The goal of this thesis is to
provide a basis for producing an efficient collision avoidance sensor for such vehicles.
11
1.2 Objective of This Thesis Document
1.2.1 Decision Making Process
There are many types of sensors on the market that can be used to help
autonomous vehicles gain situation awareness of the surrounding environment. Each
type of sensor has positives and negative aspects, which includes range, resolution,
accuracy, speed, and weight. The goal of this thesis is to decide on a single type of
sensor and create a platform for its use on autonomous ground rover and helicopter
support at Draper Laboratory.
1.2.2 Description of Design Process
It is the primary goal of this thesis to outline a process that can be used to recreate the production of a scanning laser rangefinding system that fits the desired goals.
The technique provided in this section will be used to design a very flexible rangefinding
system and modifiable in the future for just about any application. The result is optimal
compared to purchasing an off-the-shelf system because the intellectual property gained
during through this thesis provides extreme flexibility in design and goals, something that
is extremely costly and difficult when dealing with a manufacturer.
1.2.3 Analysis of Performance
In order to determine how valuable the laser rangefinding sensor is, the
performance will be tested in various conditions including indoor and outdoor tests.
1.2.4 Conclusion and Future W ork
A total development time of 1.5 years has been placed through the study and
development of the laser rangefinder. A great deal has been accomplished during this
time period. However, there are areas for potential future improvements. Some of the
suggestions are obvious while others are subtle. Various suggestions will be listed.
12
1.3 Autonomous Vehicles
Autonomous vehicles come in all forms: aerial, space, land, and sea.
The two
areas of autonomous vehicles that we are most interested in applying this collision
avoidance laser rangefinding is aerial and land vehicles although there is a possibility that
it can be used in space applications as well. Despite the desire of most researchers to
develop fully autonomous vehicles, the military believes in mostly "unmanned" vehicles.
That is, the military does not foresee immediate applications in which there is zero
human control over the vehicles. The most realistic scenario would involve in a semiautonomous vehicle traveling point-point movements with a remote human operator
giving high level instructions and perhaps even giving feedback or control for any visual
obstacles.
1.3.1 Land Rover Vehicles
Land rover vehicles have advantages that make them good for certain
applications. First, they can carry a heavier payload than other forms of autonomous
vehicles and second, they have contact with the ground which means it is easier for them
to perform tasks that are inside small confined areas. The most difficult task for an
autonomous ground vehicle is naturally, collision avoidance. The task would be a lot
easier if it were just a plane empty field but problems arises when there are objects such
as buildings, trees, doors, and even other vehicles in the way.
1.3.2 Aerial Vehicles
Aerial vehicles, particularly helicopters, have many advantages over ground
vehicles for certain applications. They have three translational degrees of freedom that
Besides better movement
gives them an advantage for avoiding direct obstacles.
abilities, aerial vehicles have better searching and surveillance because they are able to
"look" at a wider field of view. Finally, they have ability to travel at high speeds and
hover accurately in a stationary position.
13
1.4 Challenges
The primary challenge in creating a collision avoidance sensor for aerial and rover
vehicles is to create one that is low powered, lightweight, accurate, and fast.
Even
though weight is not as important to a land vehicle compared to an aerial vehicle, it is still
important when you look at the opportunity cost of the situation. Heavier and larger
systems means you will have to sacrifice space and energy that could alternatively be
used to carry other payloads such as equipment, fuel, ordinance, or anything else that
may be of interest.
1.5 Conclusion
The rest of this document will describe the design process for making a collision
avoidance sensor via laser rangefinding. Chapter 2 will go through the decision making
process for why this laser system is superior to other laser systems, radar, and sonar
technology. Chapter 3 goes through the process for making and integrating various off
the shelf parts to make a flexible scanning laser rangefinder. Chapter 4 analyzes the
performance of the prototype system. Finally, Chapter 5 will include suggestions for
future systems and the conclusion.
14
Chapter 2
2 Sensors on the Mark et and Decision Making Process
There are many types of sensors on the market that could be used to help
autonomous vehicles achieve situation awareness of the environment. These include, but
are not limited to, optical image processing, laser, radar, and sonar. Of these techniques,
optical image processing is the newest and most difficult because it requires a lot of
computational power and an extremely sophisticated expert system to handle object
detection for an unknown environment.
Thus, we will concentrate on the tradeoffs
between laser, radar, and sonar technology in deciding which is the best technique for
collision avoidance.
2.1 Ultrasonic Sonar Technology
Ultrasonic sonar technology has been used for rangefinding for quite awhile now.
The reason for its popularity for use in the robotics field is because it is small, simple to
use, inexpensive, and relatively reliable at close ranges. This technology has been around
since the late 70's, used originally in Polaroid cameras, and is still being used today for
many robotic type projects. The major disadvantage of ultrasonic sonar is the limited
range and relatively speed. Since it is classified as a "sonar" rangefinder, the ECHO
signal emitted travels as the speed of sound (- 330 m/s for dry air at STP) and the return
signal is limited to the type of surface the ECHO signal is reflected off of. Some surfaces
provide good sonic reflections while others absorb sonic waves easily, limiting the
operational range of the sonar rangefinder. Another negative aspect of sonar technology
is that the signal sent is not a focused beam, but rather, a wide-angle beam that disperses
in a large pattern. Figure 2.1 shows how a typical dispersed signal sent from a Polaroid
6500 series sonar emitter.
15
Typici Beam Patarn At s kHz
Figure 2.1 Dispersion Pattern for Polaroid Sonar
Polaroid, Inc. continues to manufacture ranging modules and ultrasonic
transducers, the essential sonar components, even though their line of sonar cameras is
out-of-date. The newest version of the ranging module is the 6500 Series Sonar Ranging
Module (Part #615077). It is used in conjunction with the Polaroid high voltage
electrostatic transducer to send and receive acoustic signals modulated by the ranging
module and controlled by external sources, typically a computer or a microcontroller.
The 6500 series ranging module from Polaroid is the standard model used for
sonar rangefinding. Some of the module's useful features include:
e
accurate sonar ranging from 6" to 35 ft. (dependent upon the operating conditions)
e
operates on a single supply source in the range of 4.5 - 6.8 volts
*
accurate clock output using a 420 kHz ceramic resonator (2.38 gs output resolution)
" variable data sampling rate
The ultrasonic ranging module is operated by controlling two signals, INIT and
BINH, and reading one signal, ECHO. INIT is the initializing signal which tells the
ranging module to start sending a ping. INIT will remain a high signal for the entire
length of the maximum desired distance. BINH is a the blanking inhibit controller signal.
The ranging module has an internal blanking inhibit time of 2.38 ms. ECHO is the signal
1 Courtesy
of Polaroid Corporation
16
from the module indicates the length of time between the return signal and the end of the
INIT signal. It is from the difference in time of INIT and ECHO that the total time of
sound travel, At, is determined.
In actual operation, there is a series of 16 pulses that is sent to the electrostatic
transducer after an INIT signal is received. The pulses are modulated at 49.4 kHz with a
400 volt amplitude that excites the transducer to generate an acoustic sound wave. After
the pulses are sent, a 200 volt bias will remain on the transducer as the transducer waits
for the return echo from the traveling sound waves. During a pulse cycle, a maximum
current draw of 2 Amp can be expected.
To eliminate the ringing of the transducer from being detected as a return signal
during a pulse, a pre-selected blanking inhibit time of 2.38 ms is automatically selected
by the ranging module. The blanking inhibit time in actuality is the time between the
INIT signal going high and when ECHO can go high. This places a minimum on the
distance that can be detected. This blanking inhibit time can be adjusted by feeding a
BINH signal to the transducer. The BINH signal goes high after a the INIT goes high
and remains high for as long as INIT remains high. The difference in total time between
INIT and BINH is the blanking inhibit time.
The purpose of a microcontroller is to provide the necessary signals to drive the
ranging modules and measure the signal output, which is a function of the actual distance
measured. The process is initiated when a signal is fed into the ranging board to initialize
a 'ping', the term used to indicate a pulse of modulated sound. Once initialized, the
ranging board automatically sends the ping and waits for a return 'echo', a term used to
indicate the reception of the modulated sound. During this process, the micro controller
measures the elapsed time between a ping and an echo. This interval is a direct function
of the distance traveled by the modulated sound wave at the speed of sound in air. The
speed of sound in air is:
V,
r =
(1)
where y is the ratio of specific heats(cp/c,) for air (= 1.4), R is the gas constant for air
(287.1 J/kg-K) , and T is the temperature in Kelvin.
The limited range, 30 ft. maximum range at optimal operating conditions and -15
ft. at nominal conditions, of sonar rangefinders are well suited for indoor and close range
17
operations. However, outdoor usage is limited by the constraints imposed by the limits of
sonar technology. Ranges on ultrasonic sonars are determined by timing the time of
flight of the ultrasonic sonic pulse between the time you send the pulse (ECHO) and
when you receive a signal return (RECV). Figure 2.2 shows a diagram of an ultrasonic
sonar. The time of flight (TOF) between the ECHO and RECV indicates the total flight
time of the ultrasonic pulse. Distance is determined by the Equation 2:
1
d =-vxTOF
2
(2)
d = distance
v = velocity of travelling signal
TOF = time of flight
Electrostatic
Transducer
Micro Controller
_Sonar
-.. Ranging
Module
Modulated Sound Wave
:
@Surface
1/2
Figure 2.2 A Typical Sonar Setup
ECHF
2
R ECV
TOF
Figure 2.3 Timing Diagram for Ultrasonic Sonar
18
s
'
Object/
Solid
A source of error in computing this distance is the temperature difference between
different operating environments. The temperature variance between a hot day and a cold
day can be as high as fifty degrees Fahrenheit. This error can be estimated by:
Cerror
=
yiRT - VyRT2
(3)
where Ti and T 2 are the different temperatures of the 2 operating environments. Given a
variance of fifty degrees (1000 F for hot and 500 F for cold), this error would be 16.2 m/s.
Thus, temperature should be a parameter or variable that can be changed based on the
actual operating temperature of the sonar.
Distance resolution is limited by the timing resolution of whichever method is
used to time the TOF signal. It has been determined over time however that anything
better than %" resolution
is unrealistic because of random noise and errors.
Microcontrollers such as the Microchip's PIC microprocessor and Parallax's BASIC
stamp are typical controllers used to control the signals and for timing of the sonar
rangefinder.
Figure 2.4 Polaroid 6500 Series Module and Transducer
19
2.2 Ultra Wide Band High Frequency Radar
One of the uses UWB technology is radar systems, permitting the precise
measurement of distances, the detection of objects within a defined range of distances, or
high resolution imaging of objects that are behind or under other surfaces. When
combined with appropriate modulation techniques, UWB devices also may be used for
communications purposes, such as the transmission of voice, control signals, and data.
Most of the current equipment designs that have been investigated contain high level,
distinct spectral lines concentrated near the center of the emission. However, it is
recognized that, as the technology advances, this type of modulation is capable of
spreading the signal levels over such a wide bandwidth that the emissions would appear
to be similar to background noise. For such systems, the amount of energy appearing in
any particular band should be extremely low. Such signals are not easily detected or
intercepted.
Recently, there have been many advances in the development of UWB
technology. UWB systems typically use extremely narrow pulse (impulse) modulation or
swept frequency modulation which employs a fast sweep over a wide bandwidth.
Because of the type of modulation involved, the emission bandwidths of UWB devices
generally exceed one gigahertz and may exceed ten gigahertz. In some cases, these pulses
do not modulate a carrier but instead, the radio frequency emissions generated by the
pulses are applied to an antenna. The resonant frequency determines the center frequency
of the radiated emission. The bandwidth characteristics of the antenna will act as a lowpass filter, further affecting the shape of the radiated signal. UWB pulse widths currently
are on the order of 0.1-2.0 nanoseconds or even less. The emission spectrum appears as a
fundamental lobe with adjacent side lobes that can decrease slowly in amplitude.
Applications for radar systems are currently being developed to detect buried
objects such as plastic gas pipes or hidden flaws in airport runways or highways. Other
radar systems could be used as fluid level sensors in difficult-to-measure situations such
as oil refinery tanks and other storage tanks. Public safety personnel have expressed a
desire for radar systems that can detect people hidden behind walls or covered in debris,
such as from an earthquake. Other public safety personnel also have expressed a need for
20
UWB communications systems that can operate covertly. These possible communications
systems could also be employed by heavy industrial manufacturers to overcome problems
such as multi-path and machinery-generated radio noise.
Currently, two general types of UWB systems have been presented to the public,
radar systems and communications systems that can be used for voice, data and control
signals. These communication products are comparable to spread spectrum modulated
communication systems. Like spread spectrum systems, UWB systems are able to
employ gain processing on the received signal and can operate in the presence of highpowered transmission systems without considerable interference. UWB systems also may
have a very low potential, relative to the total peak powers employed, for causing harmful
interference to other users of the spectrum if the transmitted signal is spread over a wide
bandwidth which may result in a relatively low spectral power density.
For the purpose of this thesis, there are two UWB systems that were considered.
One is produced by Multispectral Solutions, Inc. and the other is a Micro Impulse Radar
(MIR) developed by Lawrence Livermore National Laboratory. MSSI is recognized as
an industry leader in the development of low probability of intercept and detection
(LPI/D) communications and radar systems utilizing ultra wideband or short pulse
technology. MSSI design experience includes GHz bandwidth RF as well as high-speed
digital processing systems.
21
2.2.1 Multispectral Solutions, Inc.
Multispectral Solutions has been developing a miniature ultra wideband radar to
demonstrate the ability to detect suspended wires and other small obstacles exceeding
several hundred feet using a UWB sensor that uses an average output power of less than
10 microwatts.
The sensor utilizes a short pulse waveform of approximately 2.5
nanoseconds in duration while the receiver uses advance processing technology to detect
the radar return pulse and achieve range resolutions of less than one foot.
The key advantages of a Multispectral's UWB radar sensor include:
e Wide volumetric pattern coverage
" Precise range control.
" High resolution, independent of range
" Automatic system calibration
" Lower power requirements
* Low Cost
At the heart of the ultra wideband radar is the receiver/processor board which
contains the high speed pulse detect, digital signal processor for 1/0 and range
calculations, and a field programmable gate array (FPGA).
The MSSI UWB radar
utilizes a 1 watt, 400 Mhz instantaneous bandwidth pulse (2.5 ns pulsewidth) and a 10
Kpps pulse repetition frequency. Thus, the duty cycle is 0.0025% and the average power
is 25 microwatts.
22
Wideband
Patch
Antennas
Impulse
Source
BPF
Trigger
Source
Figure 2.5 Multispectral UWB Radar System Block Diagram 2
T.m.l Dod.
Dec "rcWny
Contl Electonics
Boot Row
BM Ram
FPGA
ftP EI.ctromcs
Figure 2.6 Multispectral UWB Radar System 2
In summary, the primary advantages of the of a low power UWB radar include:
*
Extremely low probability of intercept and detection
*
High anti-jam immunity
*
Frequency diversity with minimal hardware modifications
*
Low cost components and assembly
Specifications:
Weight: 3 lbs.
Size: 150 cubic inches
Power: 10+ Watt
2 Courtesy of Multispectral Solutions Inc.
23
Ref Lvl
0.0d~m
1OdB3/
4M
__
Freq
RevBW
LEVEL
ON= a
1.500GHz
10MHz
VidBW
-
-
Span
7M2
NWPA
I.OGHz
SWP 20mS
te.5000MZ
PiANB Freq
ww I
OdB
Atten
iUkt*,w.1t
97
Figure 2.7 Measured Time and Frequency Response of Multispectral UWB Radar 3
3
Courtesy of Multispectral Solutions Inc.
24
2.2.2 Micropower Impulse Radar by Lawrence Livermore National Laboratory
The Micropower Impulse Radar (MIR) is a fundamentally different type of radar
that was invented and patented by Lawrence Livermore National Laboratory (LLNL). It
is a pulsed radar like other ultra-wideband radars, but it emits much shorter pulses than
most and, because it is built out of a small number of common electronic components, it
is compact and inexpensive.
MIR technology has become one of LLNL's biggest technology transfer activity.
They have licenses signed with industry in the areas of automobile back-up systems and
in hand-held tools for finding studs and other objects behind walls. Many other diverse
applications that are under investigation include fluid level sensing (electronic dipsticks),
heart monitoring for medical applications, security systems, detection of breathing
through walls or rubble (e.g., finding survivors of earthquakes), monitoring of infants for
the possible prevention of Sudden Infant Death Syndrome (SIDS), underground and
through-wall imaging, as well as many others.
One unique feature of the MIR is the pulse generation circuitry, which, while
small and inexpensive, had never before been considered in radar applications. Each
pulse is less than a billionth of a second and each MIR emits about two million of these
pulses per second. Actual pulse repetition rates are coded with random noise to reduce
the possibility of interference from other radars, while each is "tuned" to itself. The same
pulse is used for transmitting to send via the transmit as for sampling the received signal.
Three direct advantages of the short pulse-widths are:
1. With pulses so short, the MIR operates across a wider band of frequencies than a
conventional radar, giving high resolution and accuracy, but also making it less
susceptible to interference from other radars.
2. Since current is only drawn during this short pulse time and the pulses are infrequent,
there are extremely low power requirements. One type of MIR unit can operate for years
on a single AA battery.
25
3. The microwaves emitted by the pulse are at exceedingly low, and therefore medically
safe, levels (microwatts). Indeed, the MIR emits less than one-millionth the energy of a
cellular telephone.
As with conventional radars, the antenna configuration on the MIR determines
much of its operating characteristics. Several antenna systems have been designed to
match the ultra-wide frequency characteristics of the MIR sensor. For the standard MIR
motion sensor with a center frequency of about 2 GHz, LLNL use a small 1.5-inch
antenna. However, the MIR is also flexible enough that it can operate at a relatively
lower center frequency, using larger antenna systems, giving it longer range and better
capability for penetrating water, ice, and mud.
What makes the MIR- so useful for security applications is its range gating
capability. Imagine that each radio pulse is a large wave traveling across a lake. The
wave bounces off an island and comes back to you. The amount of time it takes the wave
to return depends on the distance to the island. By setting the radar's "gate," or echo
acceptance range, to open only at the right time to receive echoes from a certain distance,
it can ignore all other echoes. Range gating can therefore be used to set up an invisible
security bubble around the radar. In a burglar alarm, for instance, the range might be set
at 20 feet. The radar then detects only objects that modulate the reflected signal at this
distance. It detects motion by repeatedly checking the echo pattern to see whether it
changes over time; a change means the bubble has been penetrated by a moving object.
This eliminates triggering on stationary background objects or "clutter."
The current MIR motion sensor can be fully concealed behind walls or inside
drawers while detecting intruders at ranges up to 20 feet. Its sharply-bounded detection
range is easily adjusted for any situation. In addition, the MIR can project a set or sweep
of range shells to generate a filled volume of sensitivity. It does not respond to objects
outside the current range gate, and it attempts to avoid false triggering on near objects
such as insects. However, the range-gating mechanism may be susceptible to triggering
on large-object movement in the near-field (inside the range bubble) because radar
phenomena like multiple scattering will modulate the range-gate return.
26
Averaging of many thousands of pulses is done on th.e MIR to reduce the effects
of noise and to increase sensitivity. A single received pulse in the nanosecond time scale
may be contaminated with various forms of outside interference, but if the returns of
many pulses at the same range gate are combined, the result is much more representative
of the actual return. The number of averages per range gate is adjustable (nominally it is
about 10,000 samples) and is one of the tradeoffs in the MIR design.
The exact pulse emission and detection times are randomized for three reasons:
1. Continuous wave (CW) interference, such as from radio and TV station harmonics,
may cause beat frequencies with the received echoes that can trigger false alarms. When
the 10,000 samples of MIR return echoes are averaged at randomly-dithered times,
random samples of CW interference are effectively averaged to zero.
2. Random operation also means that multiple MIR units can be collocated without
interfering with each other. Channel allocations are not needed and a nearly unlimited
number of sensors can be in the same vicinity even though they occupy the same
wideband spectrum.
3. Randomizing also spreads the sensor's emission spectrum to the point that it resembles
random thermal noise, making it difficult to distinguish from background noise. That is,
this randomizing makes the MIR very stealthy.
Figure 2.8 MIR Motion Sensor 4
4 Courtesy of Lawrence Livermore National Laboratory
27
The MIR UWB motion sensing system projects an invisible "bubble" at the
motion-sensing boundary that has a sharply define, adjustable radius. Intrusion into the
bubble indicates motion via a non-microphonic, non-Doppler process that can also
measure velocity.
Figure 2.9 MIR Modular Rangefinder 5
The MIR modular rangefinder is a compact, low-cost ultra-wideband radar with a
swept range gate. The device generates an equivalent-time A-scan (echo amplitude vs
range, similar to a WWII radar) with a typical range sweep of 4 inches to 10 feet and an
incremental range resolution, as limited by noise, of .01 inch.
2.2.2.1 PotentialApplications
Uses include replacement of ultrasound rangefinders for fluid level sensing (a
dipstick without the stick), vehicle height sensing, and robotics control. When positioned
over a highway lane, it can collect vehicle count, vehicle profile, and approximate speed
data for traffic control. An FCC Part 15 compliant version transmits RF packets rather
than a short impulse, and can provide swept-range quadrature Doppler information. A
major application for this microradar is imaging. It operates in spectral regions that
readily penetrate walls, control panels, and to an acceptable extent, concrete and human
tissue.
5Courtesy of Lawrence Livermore National Laboratory
28
The basic antennas have a very broad beamwidth and corresponding low gain.
They are suitable for synthetic beam imaging where broad illumination is desirable.
Narrower beamwidths and higher gain can be obtained on a broadband basis with horns,
reflectors or dielectric lenses.
Unfortunately, MIR technology is still new and is not yet readily available on the
market for testing and evaluation. In general, UWB technology is too new for practical
use and general understanding.
The technology is fairly complicated and the signal
processing of UWB seems to play a very important role in determining the use and limits
of the technology.
29
2.3 Laser Rangefinding
Lasers are becoming more common for use as rangefinding sensors because their
prices have dropped significantly over the years.
Not only is pricing a major
consideration but performance is as well. Laser rangefinding provides highly accurate
and fast range readings because the pulses can be focused and travels at the speed of light
Relative to sonar rangefinding, laser rangefinding offers significant
advantages in speed, accuracy, and resolution. In both cases, distance is determined by
(-3.Ox108 m/s).
similar methods, by measuring the time between when a signal is sent and when it's
received. Unfortunately, since the speed is light is difficult to measure, resolution in laser
rangefinding is limited by the method used to measure the TOF.
Similar to ultrasonic sonar rangefinding, laser rangefinding have constraints as
well. It is limited not only by the signal strength of the laser pulse output but also, the
reflectivity of the surface of the object. In extreme cases, a perfect reflective material
such as mirror will make it difficult if not impossible to get a return laser signal and on
the other side, a perfect black body surface will completely absorb the laser signal. After
all, a laser signal is a form of light. There are various types of reflections that can occur;
diffuse (Fig. 2.10), mirror-like (Fig. 2.11), and retro-reflection (Fig. 2.12).
30
incident beam
target
diffusely r efle ctin g
target surface
Figure 2.10 Diffuse reflections 6
glossy or mirnor-like
target surface
target
Figure 2.11 Mirror-like reflections6
ReTroreflecting foil or
cat's eyes reflector
Figure 2.12 Retroreflections 6
6
Courtesy of RIEGL USA Inc.
31
For different objects and surfaces, the amount of laser light returned is
characterized by the reflection coefficient p.
For diffuse reflecting surfaces, the
maximum theoretical value for p is 100%. For mirror-like or retroflecting surfaces, the
maximum theoretical value for p can exceed 100%.
Table 1 shows the reflection
coefficient of various surfaces for a 900 nm wavelength signal.
Reflective Coefficient p
Up to 100%
94%
80-90%
88%
85%
Up to 75%
Material
White Paper
Lumber
Snow
Beer Foam
White Masonry
Clay Limestone
Newspaper
.
Tissue Paper
Deciduous Trees
Coniferous Trees
Carbonate Dry Sand
Carbonate Wet Sand
Beach Sands
Rough Wood Pallet
Concrete, Smooth
Pebble Asphalt
Lava
Black Neoprene
Black Rubber Tire Wall
Reflecting Foil 3M2000X
Opaque White Plastic
Opaque Black Plastic
Clear Plastic
69%
60%
60%
30%
57%
41%
50%
25%
24%
17%
8%
5%
2%
1250%
110%
17%
50%
7
Table 1: Material Reflectivity
To boost the return signal strength of a laser, extremely powerful laser pulses are
used and fired in small time increments. The average power maybe equivalent to that of
a weak laser but the signal to noise ratio on the receiver is increased by a factor of 10's,
100's, or 1000's. This is the method commonly used, thus, it is call pulsed laser
rangefinding. The average power is calculated by the following Equation 4:
7
Courtesy of RIEGL USA Inc.
32
(4)
P = (Peak - Power) x freq x p - width
P = Average Power
PeakPower = Maximum Power of Laser
Freq = Laser Pulse Repetition Frequency (samples/second)
p-width = Pulse width length (second)
Laser rangefinding has traditionally been a very difficult process.
Because light
travels at a speed of 3.Ox 108 m/s, it became necessary for the laser rangefinding system to
have a timer capable of measuring time in nanosecond resolution. To time a 1
nanosecond differential signal, the minimum clock frequency required is 1 Gigahertz
( seconds), a very small fraction of a second. Over the years, technology has given us
109
the advantage of making timing circuits smaller and faster. In the 60's, laser rangefinders
weighted in the tens of pounds. Today, they are lightweight and portable and weights
less than a few pounds for the low end versions.
33
2.3.1 Laser Triangulation
Even a few years ago, laser rangefinding was generally thought of as being very
hard to accomplished efficiently and effectively. People used techniques such as laser
angle triangulation to effectively approximate range. This process was range limited and
relatively poor in quality.
sin A
sin B
b
-a
B
A
Laser positions
Figure 2.13 Triangulation Technique
Laser triangulation makes use of a technique that's been used thousands of years
by surveyors. It makes use of the law of sines to get a range. By knowing the two angles
of a triangle and their common side, the remaining sides can be calculated.
In the
particular case of rangefinding, corners A and C of Figure 2.13 represents two separate
cameras or charged coupled devices (CCD). The common side is the baseline separation
distance, c. Thus, range can be calculated by measuring angles A and B and using the
equation:
sin A
a
sin B
b
34
(5)
(6)
a =bsin A
sin B
Also, since angle B can not be measure directly, it can be calculated from angles A and C
from the following equation:
a~b sinA
sin(ir- A-C)
(7)
This type of laser rangefinding is typically classified as passive laser
rangefinding. Amazing, it technique also represents how the human eyes work and how
people estimate distances. Each eye works as a detector and range is internally calculated
or estimated in our heads.
Unfortunately, passive laser rangefinding systems have self-imposed limits.
Besides being dependent on two separate sensors, each individual sensor needs to view
the target source directly, otherwise, triangulation will not be possible. This is illustrated
in Figure 8.
Another major problem with triangular rangefinding is that range and
resolution is limited by the resolution of the receiver in determining angular return
signals. Because of this, triangulation systems are mainly effective at close range only.
0
0i
0
Figure 2.14 Obstruction in triangulation
35
2.3.2 Pulsed Laser Rangefindi ng
Data Out
DataOutProcessor
- Processor
Target
Receiver
''
Figure 2.15 Pulsed Laser System
Pulsed laser rangefinding is the dominant type of rangefinding technique used
today. Pulsed laser rangefinding works on a very basic principle, the distance to the
target object is directly proportional to the time of the return ECHO. Similar to sonar
rangefinding, laser rangefinding operates on the same technique.
A source signal is
propagated and a return signal is received. The time between the two signals is directly
proportional to distance traveled.
There are inherent advantages to using a laser
rangefinder compared to a sonar rangefinder. Sound travels at a speed of approximately
1 ft/s at room temperature while light travels at approximately 1 ft/ns, about a million
times faster.
One difficulty for laser detection is because the EM signals travel so fast, high
speed electronics are required to detect reasonable distances.
This is typically not a
problem for conventional radar systems that may have ranges in the kilometers, but for
short-range applications, this imposes requirement for short-range applications.
In a pulsed laser system, the emitted pulse has a rather large amplitude that is
characterized by a pulse width, the carrier frequency, and sometimes even the modulation
of each pulse. Optimally, it is ideal to have an extremely large amplitude and short pulse
width. A large laser signal amplitude will increase the signal-to-noise ratio of the return
36
signal thereby, increasing the probability of detection and range. A small pulse width
translate to lower average power for the laser making it more eye safe and less power
hungry.
Modulation of a pulsed laser system only occurs when it requires separating the
laser signal from the background noise such as ambient light. In this case, the laser is
pulsed and modulated at a particular frequency and the receiver carries a band-pass filter
that only allows signals of a particular frequency through. Although this is rarely used in
typical rangefinding applications, it is possible to use this to carry "information". By
changing the modulation frequency, it is possible to encode information in the laser
signal and decoded on the receiving end.
2.3.3 Continuous Wave Phase Shift Rangefinding
The final method in laser rangefinding is rangefinding using a continuous wave
phase shift. Although similar to the TOF methods, instead of sending a short and distinct
pulse, a continuous modulated signal is emitted. Rather than timing signals directly like
in the TOF method, the continuous wave method measures the phase difference between
the emitted and detected signals.
Similar to the TOF method, the elapsed time of a CW wave is related to range by:
(8)
At=C
d = distance
c = speed of light
Figure 2.16 illustrates the transformation between time and frequency domains of a
continuous wave phase shift. The elapsed time of the phase difference between the
emitted and detected signal is normalized by the period of the wave. This is shown in
Equation 9.
At
T
Ap
27c
T = wave period =
A$ = phase shift
37
(9)
1
-
f = modulation frequency
By combining Equations 8 & 9, the range can be expressed as:
d =c=A
f -4r
AA
4r
(10)
f
and measuring the phase shift $,
Thus, by modulating the laser at a known frequency
this method can yield a range of distance d.
For example, if a continuous laser source is modulated at 10 Mhz, each period of
the wave is 100 ns.
In terms of the speed of light, this cycle is equivalent to
approximately 100 ft in length per wave period. If an object is 50 ft way, the equivalent
round trip travel time for wave is 100 ft, thus, there will be zero phase difference.
However, if the target object is closer than 50 ft and the phase difference is measurable,
the range can be determined easily from the phase difference using Equation 10.
One of the major problems with CW wave laser rangefinding is the ambiguity in
the calculated ranges. In the previous example where the CW wave is modulated at 10
Mhz, ranges can differ by multiples of 50 ft. Thus, if there was an object at 50 ft, 100 ft,
150 ft, etc, the CW wave method would not be able to distinguish from the various ranges
from looking purely at the phase difference.
Phase
Detection
Circuitry
/
A
'
Figure 2.16 Continuous Wave Phase Shift Laser Rangefinding
38
In comparison, CW laser rangefinding systems offer some important advantages
compared to the TOF method. The first reason is because of their continuous nature, this
makes for very fast operations. There is no need to fire a pulse and wait for the return.
The second advantage is, there is no need to measure time absolutely to determine range
and resolution but only the relative phase difference.
The range and resolution is
determined by the modulation frequency and the resolution of the electronics in
determining the phase difference between the outgoing and incoming laser signals. This
actually lessons the requirements on the electronics compared to TOF ranging methods in
addition to allowing ranging operations at extremely close ranges.
The three primary types of methods for laser rangefinding, triangulation, time-offlight, and CW each has their advantages and disadvantages. Technology has advanced
enough over the years that now, people can purchase off the shelf parts components to do
rangefinding and there are firms out there that sells and specializes in the various
components of a laser rangefinder.
Of the three techniques, the TOF method is
seemingly the most dominant because in theory and practice, it is the least complicated to
understand and easiest to use. There are specific manufacturers for the various pulsed
lasers, receivers, and even timing circuit. Also, laser rangefinding has become such a hot
and profitable area in the recent years that many companies are making their own
packaged rangefinding systems.
Most of these firms are proprietary which imposes
limits on engineers and scientists to learn more about the system custom build one that
fits their specific needs.
39
2.3.4 Various Packaged Laser Rangefinding Systems
There are many packaged laser rangefinding systems on the market today. These
packages include OEM modules, packaged single point solutions, and 2D scanning
solutions. The following will contain examples of existing systems on the market today.
2.3.4.1 LEICA LRF OEM Laser R angefinderModules
These rangefinder modules are available as basic assemblies, integrated with
optics and housing. A typical example of the integrated form is the LEICA MRF2000.
Basic assemblies can be manufactured in different configurations with the following
main features:
LEICA LRF
LEICA LRF
860nm
1550nm
Eye-safety class
ANSI 2136.1
EN60825-1 (1994)
AMa&)mum range
3300m
50M
Wavelength
Distance accuracy
(1
~
(1993)
~
+1 to 2m
~
___
+1
to 2m
+ to)2m__
:Measurement rate
15per minutef20prmnt
Data transmission
RS232 or 422
RS232 or 422
DC0-28
6 V DC, 10-28 V DC
400 mA/6 V
450 mA/6 V
ower supply
DC
AConsumption
Weight
Implemented in
95g
100g
MRF2000
VECTOR
Figure 2.17 Leica OEM Comparison Table
Figure 2.18 LEICA MRF2000 Monocular rangefinder (L) and standalone unit (R) 8
8 Courtesy of Leica Technology
40
2.3.4.2 Riegl Laser Distance Sens or LD90-3GF
The distance and level meter LD90-3-GF with glass-fiber coupled optical head
makes use of the time-of-flight method to determine the distance of a remote target by
measuring the transit-time between transmission and reception of a short laser pulse.
Distance measurements
can be performed to both non-cooperative
and
cooperative targets with high accuracy, interference immunity, and excellent reliability.
The serial interface allows communication and operation of the instrument. Furthermore,
the LD90-3-GF can be equipped with the various digital and analog data outputs
frequently used in industry. The measuring system consists of a lightweight and small
optical head and a separate electronics box, connected by a duplex glass-fiber cable with
connectors on both sides.
Specifications for Riegl Laser Distance Sensor LD90-3GF:
Measuring range (depending on the reflection coefficient of the target)
Good, diffusely reflecting targets, reflectivity 3 80% up to 100 m
Bad, diffusely reflecting targets, reflectivity 3 10% up to 35 m
Reflecting foil 2) or plastic cat's-eye reflectors > 1000 m
Minimum distance, typically 1 m
Distance measurement Accuracy: Typically ± 2cm, in the worst case 5cm
Measuring time (ms or s): 1Oms/ 20ms/ 50ms/ 0.1/ 0.2/ 0.5/ 1/2
Statistical deviation (cm): ±7/ ±5/ ±3/ ±2/ ±1.5/1I/ ±0.7/ ±0.5
Resolution (cm)5): 5/ 5/ 2/ 2/ 1/ 1/ 0.5/ 0.5
Accuracy: ± 0.3 m/s
Measuring time, typically 0.5 s
Serial data interface RS232 or, alternatively, RS422
Baud rate selectable between 150 Bd and 19200 Bd, further 38.4 kBd and 115.2 kBd
Physical Weight Data: Electronics: 1.5 kg & MK36 Head: 0.6 kg
Figure 2.19 Riegl Laser Distance Sensor LD90-3GF Head Unit w/o Electronics9
9 Courtesy of RIEGL USA Inc.
41
2.3.4.3 AccuRange 4000
The AccuRange 4000 is an optical distance measurement sensor with a useful
range of zero to 50 feet for most diffuse reflective surfaces. It operates by emitting a
collimated laser beam that is reflected from the target surface and collected by the sensor.
The sensor is suitable for a wide variety of distance measurement applications that
demand high accuracy and fast response times.
Specifications for Accurange 4000:
Zero to 50 feet operating range for most surfaces.
0.1 inch accuracy, 0.02 inch short-term
Optional RS-485/422, 4-20mA current loop, and pulse width outputs.
RS-232 serial output standard.
Reflected signal amplitude output for greyscale images.
Fast response time: 50KHz maximum sample rate.
Lightweight, compact, low power design.
Tightly collimated output beam for small spot size
Two output beam configurations available: visible or infrared
Ideally suited to level and position measurement, machine vision, autonomous vehicle
navigation, and 3D imaging applications.
Weight: 2.5 lbs.
Power
Sensor Power: +5 Volts (+5V min, +6 V max) @ 400 mA
Heater Power: +5 Volts (+5V min, +6 V max) @ 4A, temperature dependent.
May be used to stabilize sensor temperature in low-temperature environments
3,13
22 oiWeght:
Outer Shell Anodild Akuminum
400aded
Foura -32
Mosarccu:
mowiting bos
91
-
6.66
1.60
2.38
Figure 2.20 Accuity Research Accuirange 400010
o Courtesy of Accuity Research
42
2.3.4.4 Riegl Miniaturized2D La ser Scanner System LSS390.
A semiconductor laser transmits short laser pulses, which are collimated and
emitted by the transmitter lens of the scanner unit. In the receiver lens, a small fraction of
the echo signal hits a photodiode. Range measurement is carried out by measurement
of the time-of-flight of these pulses. The measuring beam is scanned in the horizontal
plane to achieve the requested angle coverage.
The scanning system consists of two parts: The SCANNER HEAD including
transmitter/receiver
front-end and the motorized scanning mechanism
and The
ELECTRONICS UNIT which includes power supply, signal processing electronics and
interface circuits.
Specifications:
Measurement range:
I - 200 m to cooperative targets
I - 80 m to non-cooperative targets
Measurement accuracy, typically t 5 cm
Measurement resolution 1 cm
Measurement rate: 2000 Hz
Laser wavelength: 0.9 pm (near infrared)
Interface: Serial interface, asynchronous, RS422
115.2 kBd in "HIGH SPEED" mode and 19.2 kBd in "ADJUST" mode
Scanner performance:
Scanning range ± 100
Scanning stepwidth typ. 0.20
Angular movement near-sinusoidal, symmetrical
Scanning rate 20 scans per second,
i.e. 10 up scans and 10 down scans per second
Driving motor stepper motor, steps synchronised with laser clock
Angle read out resolution at the edges of scanning range: approx. 0.05'
in the middle of scanning range: approx. 0.30
Scanner head
Electronics unit
Physical data:
60x90x 120 mm
200x130x76 mm
Dimensions (LxWxH)
0.9 kg
1.3 kg
Weight
SCANNERHEAD
ELECTRONICS
UNIT
Figure 2.21 Riegl Miniaturized 2D Laser Scanner Head (L) and System Layout (R)"
" Courtesy of RIEGL USA Inc.
43
2.3.4.5 AccuRange 4000 2D Line Scanner
The AccuRange LineScanner can be used with the AccuRange 4000 to scan and
collect distance data over a full circle. The scanner consists of a balanced, rotating mirror
and motor with position encoder, and mounting hardware for use with the AccuRange
4000. The scanner deflects the AccuRange beam 90 degrees, sweeping it through a full
circle as it rotates.
Specifications for Accurange 4000 2D Line Scanner:
Scan rates up to 2600 lines per minute.
Scanning mirror sweeps laser beam through 360 degrees and returns reflected
light to AccuRange 4000.
96% optical reflectance for maximum sensitivity.
Compact, lightweight assembly with AccuRange 4000.
May be used with AccuRange 4000 or AccuRange 4000 and High Speed Interface.
Motor encoder with 2000 position counts/revolution and index pulse.
Clear Angle of Scan with standard mount: 300 degrees.
Weights:
Rotating mirror: 6.5 oz
Mirror and motor: 14 oz
Full Assembly: 3.5 lbs
(with AccuRange 4000, including mounting platform)
Figure 2.22 Accuity Accurange 4000 2D Line Scanner1 2
12 Courtesy
of Accuity Research
44
2.3.4.6 Riegl Laser Mirror Scann er LMS-Q140-60/80
The Mirror Scanner LMS-Q140 has been designed for high speed line scanning
applications. The range finder system is based upon the principle of time-of-flight
measurement of short laser pulses in the infrared wavelength region. This enables an
accurate range measurement to practically any target surface with a narrow laser beam.
Rangefinder Performance
Measurement range
2.
up to 350 m for natural targets, reflectivity 80 %
up to 100 m for natural targets, reflectivity 2 20 %
typ. 2 m
1)
Minimum range
typ i 2.5 cm, in the worst case i 10 cm
2.5 cm
12 000 Hz
0.9 pm (near infrared)
Measurement accuracy
Measurement resolution
Measurement rate
Laser wavelength
approx. 3 mrad
Class 1 for the scanned beam
Parallel interface, ECP standard (enhanced capabilities port)
Beam divergence 3)
Eye safety
1nterface
Scanner Performance
Q140-80
..............
Q140-60
Scanning mechanism
rotating polygon, 4 facets
rotating polygon, 3 facets
i 300= 60* total
i 400= 800 total
Scanning range
0.20
0 150
Stepwidth
linear
Angular movement
0.040
1Angle readout resolution
typ
Scanning rate
0 scans per second
Physical Size:
ain dimensions
(Lx W x H in mm)
Weight
without protecting
with aluminium
with stainlesss steel
case
protecting case
protecting case
375 x 140x 140
0 200 x 474
0 206 x 474
approx. 6 kg
approx. 12 kg
approx. 16 kg
11V DC, max 2 A - 15
Power supply
Shock proofiess
Mounting
100 g, 1-3 ms, XYZ ais +/- direction
8 x M6
threads
4 x M8 threads
45
4 x M8 threads
Figure 2.23 Riegl Laser Mirror Scanner LMS-Q140-60/80 13
2.4 Comparison of Various Rangefinding Methods
The three possible collision avoidance technologies that were discussed
previously is ultrasonic sonar, UWB radar, and laser rangefinding. Below is a table
listing the major advantages and disadvantages of each. Some of the important criteria
that needed to be considered is ease of implementation, range, speed, resolution, weight,
and power. Once again, the purpose of this thesis was to design a flexible collision
avoidance sensor that could be mounted onboard an aerial vehicle, which is extremely
weight and power conscious, and ground vehicles, which is more flexible in that respect.
Sonar
UWB
Radar
Laser
Ease of
Implementation
Range
Speed
Resolution
Weight
Power
Easy
Very Difficult
(Proprietary)
Moderate
Short
Long
Slow
Fast
High
Moderate
Low
Moderate
Low
High
Long
Fast
High
Various
Moderate
"3Courtesy of RIEGL USA Inc.
46
2.5 Final Decision
A final decision was reached to use a Laser TOF rangefinding method. The main
reasons for this decision was that ultrasonic sonic technology is inadequate for long
ranges and UWB radar is too experimental for any real application today as a collision
avoidance sensor. The final collision avoidance sensor would have to meet the following
criteria:
e
Ranges to 50 ft or more
* Fast Data Acquisition and Transfers, 500 Hz minimum
" Low Power, < 10 W
" Lightweight, < 2 lbs
*
Provide at least a 2D ranging information, i.e. angle & range
e
Adequate Resolution, > 6 inches
"
Provide at least a 900 field of view
*
Provide adequate angular resolution
* Provide flexibility in angle, range, and resolution measurements
The problem with existing laser rangefinding systems on the market is that some
are too slow at acquiring data, have limited range, inflexible operating conditions,
requires too much power, or weights too much, or a combination of any one of these
factors. The ideal solution is to have a minimal system that satisfies the above
requirements and provide a gateway for future changes. If a system is bought off the
shelf, there will be little or no intellectual knowledge gained.
Therefore, it is the primary goal of this thesis to create a scanning 2D laser
rangefinding system that meets the requirement, is low cost in production, and provides
intellectual knowledge for future uses. The next chapter will explain the process for
creating such a system.
47
Chapter 3
3 System Description
3.1 Scanning Laser Rangefin ding System
Given the requirements listed in Chapter 2, creating a fully working laser
rangefinding system is a fairly difficult task. The most difficult part of a time-of-flight
rangefinding system is; how do you measure the time-of-flight? As previously explained,
to get a 1 ft distance resolution in measuring the TOF of a laser pulse, a 1 Gigahertz clock
is required. For a 6" resolution, a 2 Gigahertz clock is needed and this is realistically
impossible since the power requirement for such a clock is be too large. Besides the time
of flight measurement subsystem, a few other parts are required to construct a scanning
laser rangefinder. The subsystems includes:
*
High Powered Pulsed Laser:
Power Technology ML100H 100 W Pulsed Laser
*
Time of Flight measurement:
IMRA RC- 1202 TOF Evaluation Board
*
Laser Optical Receiver:
E-O Devices ERX- 1 Si-PIN Optical Receiver
*
System Controller:
16C73A PIC Microcontroller
* RS-232 Data Interface:
MAX-232
e
Precision Motor:
Modified Futaba High Speed RC Servo
*
Proper Optics:
Edmund Scientific PCX BBAR 25x25 Lens
48
Angle & Range
Data Out
Figure 3.1 Scanning Laser Rangefinding System Layout
3.2 High Power Pulsed Lase r
A high powered pulsed laser is the first required component of the basic
rangefinding system. It is used to fire a laser signal that will reflect of a solid object and
the return signal captured on the laser optical receiver. As previously discussed, it is
optimal to have a very high-powered pulsed laser signal for several reasons. First, the
signal-to-noise ratio will be increased significantly, thus increasing the range of the
receiver and canceling the noise such as ambient and sunlight generated by the
surrounding environment.
In choosing a laser, there are two key factors that need to be considered, the
wavelength and maximum pulsed power (which is different from average power). The
wavelength will decide how the signal reflects off various surfaces and the power will
determine the sensitivity of the receiver and how much noise will affect the signal.
Figure 3.2 shows a graph of solar noise at various wavelengths. From that, it is seen that
the in the visible wavelength range, that is where noise is greatest. Therefore, it would be
optimal to pick a laser wavelength beyond the visible wavelength to minimize noise.
49
Also, by comparing Figure 3.2 with Figure 3.9, it is possible to see that the
optimal sensitivity for a silicon laser detector is somewhere near the 900 nm wavelength.
For this reason, more laser rangefinders operate at a wavelength of 900 nm. This is the
reason why the pulsed laser chosen operates at a wavelength of 905 nm.
Figure 3.2 Solar Radiation Noise Spectrum14
Power Technology is a manufacturer that develops packaged pulsed laser
systems. Most manufacturers will either produce the laser diode or the pulse driving
circuit. Typically, a pulse laser system will consist of a high power diode and the pulse
driver, which will generate the proper power to fire the laser at a very high power for a
very short duration.
In examining the various systems that power technology produces,
the pulse laser system chosen was an ML100H system which is a 100 W pulsed laser
system. The following are specifications for the system.
"4Courtesy of NASA
50
3.3 Power Technology ML1 00H15
The ML Series of pulsed laser diode systems are complete systems requiring only
an unregulated DC input voltage and a TTL timing trigger to operate. These systems
include the pulse drive electronics, focusing lens, and the laser diode. The laser
wavelength is typically 905 nm, which is close to the peak sensitivity of most silicon
detectors. A range of output powers are available utilizing either stacked or single
junction lasers. The standard unit provides 15 nS pulse widths with fast rise and fall
times. The ML is well suited to applications requiring a reflected beam (ie. ranging
finding applications).
Standard Features:
Wavelength: 905 ± 10nm
Pulse Width: Fixed at 15nS
Propagation Delay: < 8nS
Jitter: < 0.lnS
Input Voltage (full rating): 9 - 14.5 VDC
Input Voltage (de-rated to 5KHz p.r.f): 6 - 14.5 VDC
Storage Temperature: -30 to + 850 C
Operating Temperature (full power): -20 to + 50' C
Operating Temperature (@ 60% optical power): 85' C
MODEL:
Output Pov ~er
(Peak) ers
Emitter Si ze
(microns x st acks)
Pulse Repetition
Frequency
(max)
Typical Input Current
(@ 12V, max. p.r.f.)
Typical Input Current
(quiescent)
Weight
51
ML1OH15
100W
150 x 200
5 KHz
150 mA
56 mA
142g
Figure 3.3 Power Technology Packaged Pulse Laser Systems 15
Figure 3.4 Dimension Drawings of Power Technology's Pulsed Lasers15
15Courtesy of Power Technology,
Inc.
52
3.3.1 Laser Safety
As posted by the Center for Devices and Radiological Health (CDRH) regulation 21 CFR
1040.10 and 21 CFR 1040.11, the standard classification for lasers are as follows:
3.3.1.1 Class I Laser Product
No known biological hazard. The light is shielded from any possible viewing by a person
and the laser system is interlocked to prevent the laser from being on when exposed.
(large laser printers such as the DEC LPS-40 has a 10mW HeNe driving it which is a
Class II1b laser, but the printer is interlocked so as to prevent any contact with the
exposed laser beam, hence the device produces no known biological hazard, even though
the actual laser is Class 11b. This would also apply to CD players and small laser
printers, as they are Class I devices).
3.3.1.2 Class II Laser Products
Power up to 1 milliwatt. These lasers are not considered a optically dangerous device as
the eye reflex will prevent any occular damage. (i.e. when the eye is hit with a bright
light, the eye lid will automatically blink or the person will turn thier head so as to
remove the bright light. This is called the reflex action or time. Class II lasers won't cause
eye damage in this time period. Still, one wouldn't want to look at it for an extended
period of time.) Caution labels (yellow) should be placed on the laser equipment. No
known skin exposure hazard exist and no fire hazard exist.
3.3.1.3 Class IIIa Laser Products
Power output between 1 milliwatt and 5 milliwatt. These lasers can produce spot
blindness under the right conditions and other possible eye injuries. Products that have a
Class Ia
laser should have a laser emission indicator to tell when the laser is in
operation. They should also have a Danger label and output aperature label attatched to
the laser and/or equipment. A key operated power switch SHOULD be used to prevent
unauthorized use. No known skin hazard of fire hazard exist.
53
3.3.1.4 Class IlIb Laser Products
Power output from 5 milliwatts to 500 milliwatts. These lasers are considered a definate
eye hazard, particularly at the higher power levels, which WILL cause eye damage. Skin
may be burned at the higher levels of power output as well as the flash point of some
materials which could catch fire. A red DANGER label and aperature label MUST be
affixed to the laser.
3.3.1.5 Class IV Laser Products
Power output >500 milliwatts. These CAN and WILL cause eye damage. The Class IV
range CAN and WILL cause materials to burn on contact as well as skin and clothing to
burn. These laser systems MUST have a key lockout switch to prevent unauthorized use
Inter-locks to prevent the system from being used with the protective covers off Emission
indicators to show that the laser is in use Mechanical shutters to block the beam Red
DANGER labels and aperature labels affixed to the laser. The reflected beam should be
considered as dangerous as the primary beam.
The Power Technology ML10OH15 was tested and approved by the Draper
Laboratory Safety office. Although it is classified as a Class IIIb Laser, that assumes that
the pulsed laser is operating at peak operating conditions, a 5 khz pulse rate. In actual
operating pulse repetition rate is 500 hz, an order of a magnitude less than the maximum
rating. The actual average power is 500 hz x 15 ns x 100 W = 0.75 mW. The maximum
rated power output is 7.5 mW would define the ML100H15 laser as a Class 11b category.
Actual power test using an optical power meter indicates the following power
ratings at various ranges for a 5 khz pulsed test:
Condition
Distance
Power
No Lens
1 cm
1.25 mW/cm 2
5 cm
0.1 mW/cm 2
1 cm
3.5 mW/cm 2
10 cm
< 1.0 mW/cm 2
20 cm
0.5 mW/cm 2
Direct Beam
54
3.4 Laser Optical Receiver
The optical receiver is used to receive the return signal from the pulsed laser. It is
essentially a high speed photodiode coupled with electronics for various controls. E-O
Devices is a manufacturer of various laser rangefinding components including pulsed
laser drivers, optical receivers, and even a time-of-flight chronometer. Their ERX1B
optical receiver is a very small, lightweight receiver.
A laser receiver operates on the principle that the photodiode collects photons
returning from a reflected surface. Once the photons are collected, it goes through a
series of operations before a TTL output is obtained and sent to the TOF counter. This is
shown in Figure 3.5. The comparator is used to adjust the minimum noise level to cancel
various noise such as those from ambient and sunlight.
Figure 3.6 shows the basic
principle of how silicon photodiodes works.
Light
Photodiode
Detector
p
-
l
r
---
Main Amplifier
Demodulator
Comparator
TTL Out
--
Figure 3.5 Optical Receiver
.AR-coating
depletion layer
in ci ent -n
light
n+
reverse
bi as
breakdown
light:
light ,"
power density
I
forward
bi as
voltage
photocurrent
E
on
EVi1lumnali
ele ctric
fiel d
-F
Figure 3.6 Basic Silicon Photodiode Principle
55
Y
ERXJB (with built-in comparator)
Low-Noise Si-PIN Photodiode Optical Receiver
FEATURES:
* Low-cost, Compact, Si-PIN Optical Receiver for OEM Applications.
*
Si-PIN Detector, sensor area Imm 2 , (Siemens SFH217).
" Wideband -3dB Bandwidth = 20MHz (modified upon request).
" Input-referred Noise Current Spectral Density < 2pA/NHz.
" Transimpedance gain > 1 MegOhm (modified upon request).
*
Power Supply = 9 - 12 Vdc @ 60mA (typ. ERX-1B).
*
Version lB includes latchable Voltage Comparator with reset input.
*
Version lB includes trim-potentiometer threshold adjustment on bottom side.
*
Customizable trade-offs with gain/bandwidth parameters upon request.
*
Compact Circuit Board only 1.5 x 1.0 Inches.
* Mounting holes for 2-56 screws (4 plcs.) 1.30 x 0.80 Inch centers.
Figure 3.7 E-O Devices ERX1B Optical Receiver 1
INTERFACE:
Pin 1: COMMON
Pin 2: ANALOG OUTPUT COMPARATOR OUTPUT (ERX-1B, TTL-positive going)
Pin 3: LATCH CONTROL (ERX-1B, TTL-compatible input)
Pin 4: COMMON
Pin 5: 9 - 12 Vdc INPUT
LATCH CONTROL (ERX-1B): Input OPEN or HI (5V) = Output Latch Enabled
Input GND or LO (OV) = Resets Output Latch (latching disabled while LO)
16 Courtesy
of E-O Devices
56
Application Notes for ERXJB:
(1) To operate this correctly, there is there is noise level adjustment potentiometer on the
ERX1B. Turning clockwise will lower the noise level and counterclockwise will
raise the noise level making it more sensitive to ambient light. To make proper
adjustments, place Pin 2 on an oscilloscope and adjust the potentiometer until there is
a sinusoidal signal showing. Then, raise the noise level higher set the level sensitivity
above the ambient noise level. Figure 3.8 shows the responsivity of a typical silicon
photodiode vs various wavelengths. Notice that the optimal sensitivity is near 900
nm.
(2) The optical receiver needs to be encased in a metallic housing grounded to the circuit
board. This will minimize the various noise sources affecting the sensitivity of the
receiver and also eliminate unwanted optical noise. Without a metallic grounding
case, the optical receiver will no function properly.
O -
TYPiCAL DETECTOR RESPONSE CURVES
0.7
0
.----
BU
04
20
kQ
XM
400
5W0
E"
7Q8001,0
0
1000
1100
WAVELENGTH-nrn
17
Figure 3.8 Typical Silicon Photodiode Responsivity vs Wavelength
"7Courtesy of Edmund Scientific
57
All
Metal
(+)
Not charge
coneentraion
p
x
field
x
W2
Intrinsic high resistivity layer is
sandwiched between p and n
regions and absorbs most photons
Figure 3.9 Silicon PIN Photodiode
58
3.5 Time of Flight measurement: IMRA RC-1202 TOF Evaluation Board
By incorporating a monolithic 2 GHz. phased locked loop (PLL), the IMRA RC1202 provides a low cost, single chip solution, for measuring time intervals with 500
picosecond resolution. The IMRA RC-1202 is ideal for measuring single event time
intervals in applications such as electronic instrumentation, monopulse radars and
rangefinders. Several user selectable options are provided for maximum flexibility. The
IMRA RC- 1202 contains a 12 bit on chip counter that can be extended by the use of
external circuitry if required. The counter resolution is user selectable, with re solutions
ranging from 500 picoseconds to 4 nanoseconds. Additional features such as minimum
count gating and multiple event operation (1 to 8) provide unprecedented functionality in
a single package.
The IMRA RC-1202 is a high-speed counter that can determine time intervals to
one-half nanosecond resolution. The resolution is variable, 1/2, 1, 2, or 4 nanoseconds
and is user programmable. The counter is able to determine the time between a user
selectable number of events, up to a maximum of eight. The maximum elapsed time is a
function of the resolution that is selected. The table below shows the relationship between
resolution and maximum elapsed time.
RESOLUTION
MAXIMUM ELAPSED TIME
1/2 nanosecond
2047 nanoseconds
1 nanosecond
4095 nanoseconds
2 nanoseconds
8190 nanoseconds
4 nanoseconds
16380 nanoseconds
The counter is clocked internally at a frequency of up to 2 GHz. The internal clock is
derived using an on chip phase locked loop (PLL) with an on chip voltage controlled
oscillator (VCO) running at 2 GHz. The reference oscillator is generated off chip and can
run at a much slower speed, 25 MHz. This minimizes the number of high speed signals
external to the counter, reducing the complexity and cost of the system. A block diagram
is shown in Figure 3.10.
59
F,(TTL)
Reference
COUT
VCODI\BO
LOCKED
F
(TT L)
F,
(TTL)
I
|I
Oscillator
RCVD
Counter
(TTL)
12/1
PLL
Formattng
1
+
+
+
Circuitry
+
DATA
RDY
COUNT
VALID
CDAT AO
CNTL
R
RDY
Timing and Control
CLK
CLK
DATA
STROBE
Pover
Conditioning
I
i
2
Poer Ground
Start Count
(rniffercn
All TTL I/D
/ 2
Sto p Count
PDir1 N
RT et
Clock Slect
(FVL)
91 IK)
Figure 3.10 IMRA RC 1202 Block Diagram18
BOTTOM SIDE
TCP SIDE
A
3 8"
4
-2
10"
1P-
Features:
IMRA RC12Q2 - 12 Bit - 500ps resolution counter
On Board +5 Volt Regulator - Pover Switching option
External Clock option
Figure 3.11 Evaluation Board Diagram 8
18Courtesy of IMRA America, Inc.
60
H = HCT641
LO = LT1129C-5
I R = I T1199R28-5
3.5.1 Initialization of RC1202
The circuit must be initialized before operation can take place. Power must be applied for
a minimum of 100 microseconds before initialization can start. Once power has been
applied, the RESET signal must be held at a logic high level for a minimum of 1
microsecond. The RESET signal is then brought to a logic low level. The initial
conditions of the counter are shown below. The control information is loaded using the
input CLK, DATA, and STROBE signals. The control word format is shown on the
following pages. Parameters that are loaded into the system include; number of events,
resolution, valid elapsed time window (min.), and cascade mode.
PARAMETER
INITIAL VALUE
Mode
Non-Cascade
Resolution
4 nanoseconds
Number of Events
1
Minimum Count
0 (changeable in 32 count increments)
COUT
Low
DATA
0
RDY
Low
CNTL RDY
High
COUNT VALID
Low
3.5.2 Operation:
The counter is used to measure the time between events. The counter is started by
a logic high level on the START COUNT input. The counter increments each clock
period. A logic high level on the STOP COUNT input stops the counter. A DATA
VALID indicator is provided. This signal is active high when the value of the counter is
within the elapsed time window. This window is user definable and can be changed
during operation. The STOP COUNT signal is enabled only when the minimum count, as
set by the user, is exceeded. If the counter overflows, a pulse will be generated on COUT,
a value of all zeros is output and the DATA VALID signal is low.
61
The counter uses the number of events set by the user to vary the mode of
operation. If the number of events is set to one, the counter outputs a value for each start /
stop sequence that is received. If the number of events is set to two, the first start / stop
sequence is used to obtain the elapsed time of the first event, and the second event is
detected by using the second stop pulse to obtain the elapsed time. Similarly, the elapsed
time of the third, fourth,... eighth events is obtained.
The control information can be changed if desired without resetting the entire
system. The CNTL RDY signal is low during a timing sequence. The new control
information can be loaded into the counter but may not be latched by using the STROBE
signal until the CNTL RDY signal goes high.
3.5.3 Output Data Formatting
The data from the counter is formatted for output to the external processor. The
output data is valid when RDY and DATA VALID is high. The processor brings the
RCVD signal high to signify that it has latched the DATA and is ready to read the next
word. The START signal must be low before RCVD is brought high, otherwise the
counter will begin its next count sequence. The output is double buffered. The processor
must respond to the RDY signal before the next timing sequence is initiated. If the
processor does not respond the next start/stop sequence will not be initiated.
A signal (COUT) is provided to extend the maximum count capability when the
circuit is in the cascade mode. This signal will change state every 4096 clock cycles. The
signal can be used to clock an external counter circuit. This signal will have a maximum
frequency of 488 KHz. The state of this signal is low upon reset.
62
CONTROL WORD FORMATTING:
NUMBER OF EVENTS
MSB AIN
BIN
CIN
RESOLUTION
SL2
SL3
CASCADE MODE (0=NON-CASCADE, 1=CASCADE)
CASCADE
MINIMUM ELAPSED TIME (MSB)
MINCNT7
MINCNT6
MINCNT5
MINCNT4
MINCNT3
MINCNT2
MINCNT1
MINIMUM ELAPSED TIME (LSB)
MINCNTO
RESERVED BIT
0
RESERVED BIT
0
LSB
DATA IS SHIFTEE INTO THE COUNTER LSB FIRST
EVENT ENCODIN G:
NUMBER OF EVENTS
A IN
BIN
CIN
8
0
0
0
7
1
0
0
6
0
1
0
5
1
1
0
4
0
0
1
3
1
0
1
2
1
1
0
1
1
1
1
CLOCK DIVIDE R ATIO SELECT:
RESOLUTION
)IVIDE RATIO
S L2
SL3
4 NANOSECONDS
0
0
2 NANOSECONDS
4
1
0
1 NANOSECONDS
2
1
0
500 PICOSECONDS
1
1
A block diagram of the evaluation board is shown in Figure 3.10. The board contains the
IMRA RC- 1202, an on board 25 MHz reference oscillator, several HCT input and output
buffers, voltage regulation for the buffers, a separate switchable voltage regulator for
the counter, and a connector for an external clock input. The board is approximately
3.375" by 2.125". The required input voltage is +6V @ 700mA.
3.5.4 INPUTS
SIGNAL NAME
SIGNAL NAME
PIN NUMBER
DESCRIPTION
CLKSEL
J5-1
RESET
J5-3
CLKB
J5-5
Selects between internal clock and external
clock (SMA-J2). A logic low level selects
the external clock. A logic high level
selects the internal clock.
A logic high level resets the RC1202. This
signal must be held high at least 1 microsecond.
This signal is used to shift the control
word into the RC1202. Data is shifted into
63
DATA
J5-7
STROBE
J5-9
RCVD
J5-11
START
J5-13
STOP
J5-15
SHTDWNB
J5-17
INENB
J5-19
the RCl 202 in the negative edge of CLKB.
This signal is used to input the control
data necessary to configure the RC1202.
STROBE is used to latch the control data
after it has been shifted into the RC1202.
A logic high level on STROBE latches the
control information. This signal is level
sensitive and must be held high for a
minimum of 32 system clock cycles.
RCVD is a handshake signal that is used to
indicate to the RC1202 that the previous
count value has been read. This signal
should be brought high for a minimum of 20
nanoseconds and returned low a minimum of 20
nanoseconds before the next START pulse.
The RC1202 begins counting when the START
signal goes high. The START pulse must be a
minimum of 10 nanoseconds wide. The START
pulse must go low 20 nanoseconds before the
RCVD signal is brought high.
A logic high on this signal stops the
counter. If the RC 1202 is configured for a
single event, the first STOP pulse after a
START pulse will stop the counter. If the
counter is configured for two events, the
first STOP pulse after the first START will
stop the counter. When the second START
pulse is applied, the counter will STOP
after receiving two STOP pulses. The STOP
pulse must be at least 10 nanoseconds wide.
A logic low level on this input will disable
power to UI (RC 1202) and U8 (MC 100ELT22) and
will disable the oscillator (U6) output.
This signal is used to operate the system in
a power switching mode. By shutting down the
RC1202 when it is not being used for
counting, a significant power saving can be
achieved.
A logic low level on this input will enable
the input buffer U2. This signal must be
brought low before operation of the RC 1202
can occur.
3.5.5 OUTPUTS
SIGNAL NAME
PIN NUMBER
DESCRIPTION
DATA_11 THRU
DATA_0
Counter DATA. DATA_11 is MSB. DATA_0 is
LSB. Data is valid when RDY and DATAVALID
are high.
CDATAO
J4-1, 3, 5,
7,9, 11,
13, 15, 17,
19, 21, 23
J4-25
COUT
J4-27
CDATAO is used test the functionality of the
control word shift register. The value of
the DATA input is available on CDATAO after
16 cycles of CLKB.
COUT is the thirteenth bit of the counter.
64
LOCKED
J4-29
VCODIV80
J4-31
CNTLRDY
J4-33
DATAVALID
J4-35
RDY
J4-37
If the counter is configured in the CASCADE
mode, the COUT signal can be used to clock
an external counter, extending the
capability beyond 12 bits. If the counter
is configured in the NON-CASCADE mode, COUT
will go high for approximately 10
nanoseconds when the count reaches 4096.
This can be used to detect counter overflow.
This signal will go high when the phase and
Frequency of the reference oscillator is
equal to the phase and frequency of the
internal VCO divided by 80. The comparison
is made on both the rising and falling
edges, thus the duty cycle of the reference
oscillator must be equal to 50%. The PLL
compares only one edge of the reference
frequency, thus the circuit can be locked in
frequency even if the LOCKED signal is not
high. The LOCKED signal will be low if the
EXTERNAL CLOCK is being used.
This output is It the frequency of the CLOCK
divided by 80. Thus if the INTERNAL CLOCK is
being used this signal will be the VCO
frequency divided by 80. This will be the
value of the reference signal if the PLL is
locked. If the circuit is configured for
EXTERNAL CLOCK, this signal will be the
external clock frequency divided by 80.
This signal will be high when the RC1202 is
ready to receive a new control word. This
signal will be low during a ranging
sequence.
This signal goes high when counter data is
valid. If the RC1202 is configured in the
NON-CASCADE mode, i.e. CASC=0, DATA_VALID
will be high if the counter does not equal
4096 counts and the counter data has been
latched and transferred to the outputs of
the RC1202 . This data may then be read from
the DATA bus (DATA_11 to DATA_0). If the
RC1202 is configured in the CASCADE mode,
i.e. CASC=1, DATAVALID will go high when
the counter data has been latched and
transferred to the outputs of the RC1202.
In the CASCADE mode, the user is responsible
for determining the validity of the data
output of the external counter.
This signal goes high when counter data has
been latched and transferred to the outputs
of the RC1202. This data may then be read
from the DATA bus (DATA_11 to DATA_0). In
the CASCADE mode, the user is responsible
for determining when data output of the
external counter is ready.
65
3.5.6 OPERATION
The basic operation of the IMRA RC-1202 EVALUATION BOARD is as follows.
1.Apply power to connector J1. Pin 1 is +6V. Pin 2 is GND.
2.Set input signals J5-1 to J5-17 to their desired initial values
3.Bring INENB (J5-19) to logic low level
4.Reset RC-1202.
5.Load control word
6.Apply START
7.Apply STOP
8.Read DATA_11 thru DATA_0 when RDY and DATAVALID go high.
9.Pulse RCVD.
10.Repeat step 6-9 for each event.
3.6 System Controller: 16C73A PIC Microcontroller
A Microchip PIC16C73A microcontroller controls all the laser pulsing, timing
mechanism configuration and triggering, range sampling, servo angle sampling, and
communication with the on-board computer. The choice of the PIC microcontroller was
not based on any comparative
research. There
are most likely
many other
microcontrollers available that have the necessary input/output configurations, memory,
and timing precision for the task. The PIC was chosen because the Autonomous Vehicles
Group at Draper Labs has considerable experience using the PIC microcontrollers on
autonomous vehicles. Draper Labs already had the programming components and
technical expertise for the PIC16C73A, so choosing this microcontroller benefitted the
project by reducing development time and promoting uniformity in microcontroller.
Draper Fellow, Rusty Sammon, has helped with all portions of developing,
programming, and testing of the PIC microcontroller.
programming the PIC microcontroller was proven.
His mastery of the art of
Included in Appendix A is his
ASSEMBLY coded program for controlling the various digital signals and data
communications for the laser rangefinder.
66
A brief description of the code follows:
Upon startup, the PIC loads the configuration word into the precision timing
module. This configures the timing module for a 500ps timestep with triggering on the
laser fire and receive signals. The configuration and variable registers for the PIC are
initialized as well.
The PIC proceeds to enter the main sampling loop, which is repeated at a rate of
500Hz. The speed of this loop is regulated using the timing interrupt flag generated by a
built-in PIC timing counter. At the start of the loop, the PIC begins sampling the analog
input corresponding to the servo position. The analog-to-digital conversion takes multiple
clock cycles, so this needs to be started early. Immediately after starting the conversion,
the PIC pulses the laser and simultaneously initiates counting on the timing module. Soon
after the laser pulse reaction is received by the detector (triggering the stop of the timing
module), the PIC receives a signal from the timing module indicating the timing data is
available for transmission. The PIC then reads the parallel data outputs of the timing
module into it's own register memory for the range measurement. The analog-to-digital
conversion of the servo position is now finished, and this angle measurement is stored in
the PIC's register memory as well. Finally, the PIC sends these digital values to the
computer via the RS-232 serial port at 38.4 kbps and completes the main loop.
MCTVPP--
+
28
1
E3
RA1/AN1
a
25 ]
E
5
24 )
RA4(TOCKI
E-
6
23 ]
RA5/AN4
E
7
22
21
RA3/AN3NROF
8
Vss -OSC1/CLKJN --
9
E- 10
11
RCaT10SO/T1CKI -4--(
(~ 12
RC1rr1oS1CCP2
E
RC2CCP1
RC3/SCKISCL -
--
R85
-
RB4
RB3
MRB2
---
R81
-
RB0/INT
---
20 )
[
oSC2/CLKOUT
RB6
PM4--
26
4
RA21AN2
RB7
-
27
-2
RAOQANO -0-
19
]
18
17
)---
-
Vio
--
VSS
RC7:RX/DT
-4-- RC6/TX/CK
13
16 )
RC5'SOO
14
15 ]
RC41SO/SDA
19
Figure 3.12 Microchip PIC 16C73A Microcontroller
19 Courtesy of Microchip
67
3.7 RS-232 Data Interface: Maxim MAX232
The MAX232 and MAX233 are parts commonly used to translate TTL-level
signals (0-5V) into RS232-level signals (in this case -10V to +10V). Unlike other parts,
such as the 1488, the MAX232 does not require +10v and -10v supplies to do this
translation: instead, they use two charge pumps to produce these voltage levels from a
single 5v supply. Charge pumps require capacitors: the MAX232 and 232A require 5
external capacitors (I uf in the case of the 232, and . uf in the case of the 232A). The PIC
16C73A outputs serial data in the 0-5 V range and the MAX232 translate that data to a
true RS-232 format that the computer can read and understand. Figure 3.19 shows the
schematic for an Maxim MAX232 serial transceiver. Pins 10 and 11 are serial data input
from the PIC and pin 7 and 14 is the RS-232 data out that goes to the computer.
DB9 Pinout
(Mouse)
Function
Pin #
Signal
Pint
DCD
DataCanierDetect
1
Pin2
RxD
ReceivedData
2
Pin3
TxD
TrnsmitData
3
Pin 4
DTR
Data Tenmnal Ready
4
PmS
SG
Signal Ground
5
Pin6
DSR
Data Set Ready
6
Pmn7
RTS
Requestto Send
7
Pin8
CTS
Cle artoSend
8
5
1
00000
0000
6
9
Figure 3.13 Industry Standard RS-232 Layout
68
TOPVIEW
|I-
v"O~
4;
M0X32
MAX232
MAX232A
j";NV
E CTIN
DIP/SO .8
MAX2204
M O-
V.
(I"2
5VC4
F
~
CA
T L0M4C'
4E1TJ
1.00 11.
1.0,
0 3" 1 CA. 1 0
R-3
k
TCO
CAPACW2ANC
EV .
T':
41
D
GNU ~
Figure 3.14 Maxim MAX232 Transceiver2 0
3.8 Precision Motor: Modified Futaba High Speed RC Servo
Radio Control (RC) servos are rather cheap ($ 30), accurate (about 10), lightweight (20 to
50 gr), relatively strong, and easy to operate. They are also commonly available
anywhere and all operate on a standard signal interface. The purpose for using an RC
servo as the motor control mechanism for scanning the laser is because it has two major
inherent advantages built-in: a precise regulated position control and constant angular
velocity control.
Figure 3.15 is a drawing of a standard servo:
20
Courtesy of Maxim Semiconductors
69
i-
-
Servo
Internal 2K Pot
Figure 3.15 Standard RC Servo
There usually have three wires:
Black: This is the ground.
Red: This is the power source. 5 to 6 Volts.
White: This is the control signal. It's protocol is as follows:
The signal sent to servo cycles at about 50 Hz. A TTL pulse between 1 and 2
millisecond is sent to the servo. The length of the pulse tells the servo at which angle it
should put its action lever. For example, 1 ms means 0', 2 ms means 1200, 1.5 ms means
600, 1.2 ms means 240, and so on... (Servos are counter-reactive: they will try to maintain
the lever at the controlled angle, whatever is below the maximum available force acting
upon it.)
The servo chosen is a modified High Speed Futaba FP-S131SH.
Because the
servo position is internally regulated by the electronics inside the servo, there is no need
to create a feedback controller when using a microcontroller to control the servo position.
Instead of controlling the servo using the PIC 16C73A controller, it was decided that it
was best to use the BASIC STAMP II chip, another microcontroller.
The reason for
using the STAMP II instead of the PIC was because it provided an easier and faster
method of programming and changing of variables.
Each servo has its own
characterization of angular speed and response. The BASIC STAMP code used was the
following:
70
BASIC STAMP II Program:
VAR
X
OUTPUT 15
WORD
/* Setting Pin 15 as the SERVO Control Signal
/* Start the loop
SERVO:
FOR X=1 TO 30
PULSOUT 15,100
LOW 15
PAUSE 18
NEXT
/* a) Repeat for 30 times
/* Pulse Pin 15 HIGH for 1OOx2ns=200 ns
/* Pulse Pin 15 LOW
/* Pause for 18 ms
/* Goto a) till 30
FOR X=1 TO 30
PULSOUT 15,1200
LOW 15
PAUSE 18
NEXT
/* b) Repeat for 30 times
/* Pulse Pin 15 HIGH for 1200x2ns=2.4 ms
/* Pulse Pin 15 LOW
/* Pause for 18 ms
/* Goto b) till 30
GOTO SERVO
/* Repeat SERVO loop
From the STAMP II program, it can be seen that the servo was controlled by
changing the pulse width between 0.2 ms and 2.4 ms. The reason for this rather than
between 1.0 ms and 2.0 ms is because each servo is different and some can handle more
angle range than others. For this particular Fatuba Model FP-S131SH servo, the 0.2 ms
to 2.4 ms represents a angle range of approximately 160 degrees.
To measure angle, there is an internal 2k potentiometer inside the servo that's
used by the servo electronics to determine servo position. This information can be read
by an external source to determine servo position as well. As long as the impedance is
sufficiently high so that load is minimal, there will be little or no effect on servo
performance. The potentiometer was wired directly to the PIC's A/D channel and
position is captured and sent to the RS-232 data port along with rangefinding
information.
3.9 Optics
Optics is required to improve the performance of any laser rangefinding
application. Although lenses are often used in imaging applications, in many cases the
goal of the simple lens is the projection of light from one point to another. To be useful,
emitters, detectors, lasers, and fiber optics usually require a lens for some form of light
structuring. Figure 3.16 shows a typical example of how a plano-convex lens can be used
71
to limit a detector's field of view. Considered in reverse, the figure might represent an
emitting setup. This arrangement is particularly beneficial when using an LED or other
broad field source. Such sources commonly appear in light-gate applications and require
precise aiming toward the detector. The primary reason for using a lens to help gather
2
light is to increase the effective light gathering area. If properly done, a typical 1 mm
2
silicon surface using a 12 mm plano convex lens can achieve an affective area of ntr =113
mm 2, meaning 113 times the amount of light gathered.
Lens (D1)
-i
1/2 Field of View (P)
p =D 2 / 2f (radians)
Emitter/ Detector
J (D2)
Focal Length (f)
Figure 3.16 Plano Convex Lens for Light Structuring with Detector 2 1
Knowing where the light will go is only the first step in designing a light projecting
system; it is just as important to know how much light is transmitted. Typically the lightgathering capability of a lens is quantified as follows:
EQUATION #1: f/# (f-number) = f (focal length of lens) + D (diameter of lens)
EQUATION #2: NA (numerical aperture) = (0.5) / (f/#)
In Figure 3.16, Theta illustrates how the numerical aperture controls the angle of
light accepted by the lens. As f/# decreases, Theta (the acceptance angle) increases and
the lens becomes capable of gathering more light. Matching a source's emitted cone of
light with the accepting cone of a lens avoids underfilling and over-filling the lens, thus
creating a perfectly efficient system. Edmund Scientific provides various types of lenses
to help balance maximum light gathering capability for various physical requirements.
21
Courtesy of Edmund Scientific
72
Besides light gathering lens, there might also be a lens to reduce the noise from
sources such as ambient room lighting and sunlight. This type of lens is called an
interference filter. It is used as a band pass filter for allowing only light of a certain
wavelength through. Figure 3.17 shows the typical dispersion pattern for such a filter.
100
Peak
Transmittance
Central
Wavelength
%T
50--
I I
I I
I
I
I
I'
-I
0
Half
Bandwidth
(WAVELENGTH)
22
Figure 3.17 Interference filter pattern spectrum
22
Courtesy of Edmund Scientific
73
3.10 System Integration
VCC +6 V
Figure 3.18 Complete Laser Scanning Rangefinding System
74
3.11 Operational Procedures
The PIC 16C73A is the main device used to control all operations in the laser rangefinder
system. The system is integrated as shown in Figure 3.18. The control process is as
follows:
1) Apply power to the various parts of the system:
6-14.5 V
9-12 V
5V
6V
5V
5V
Pulsed Laser:
Optical Receiver:
PIC 16C73A:
RC1202 Counter:
MAX232:
Futaba Servo:
Note: For Futaba Servo, place a separate 5 V supply to the rest of the system to minimize
back EMF created by the servo when loaded. This back EMF. will effect various parts of
the system including the A/D accuracy while reading the servo position on the PIC
16C73A microprocessor.
2) PIC Pseudo-Code:
a)
b)
c)
d)
e)
f)
g)
h)
i)
Reset RC1202 (J5-3)
Load Control Word
Pulse Laser at 500 Hz, LASER OUT (PIC-Pin 15) to Laser Unit
Apply START on RC1202 directly from LASER OUT
Apply STOP on RC1202 directly from Optical Receiver Pin-2
Wait to RDY (J4-37) to go HIGH to indicate a counter is ready.
Read DATA_0-DATA.I_1 (J4-1,3,5,7,9,11,13,15,17,19,21,23)
Read A/D Channel for Servo Position (PIC-Pin2)
Send Range AND Angle Data to RS-232 Port
j) Pulse RCVD to clear RC1202
k) Repeat Steps d) -j)
How to Load Control Word for 500 ps:
Signals to Control 'Control Word': DATAIN (J5-7), CLKB (J5-5), STROBE (J5-7)
Load Control Word in the following format:
AIN
1
BIN
1
CIN
1
SL2
1
SL3
1
CSC
0
CT7 CT6
0
0
75
CT5
0
CT4
0
CT3
0
CT2 CTl
0
0
CTO
0
"O"
0
DATAIN
CLKB
STROBE
Figure 3.19 Control Word Format
Control Word Pseudo-Code:
a) Set STROBE LOW
b) Set DATAIN LOW
c) Set 10 CLKB Pulses (-1 gs pulse width each)
d) Set DATAIN HIGH
e) Set 5 CLKB Pulses (- ps pulse width each)
f) Set STROBE HIGH (-2 ps pulse width)
.g) Set STROBE LOW
3.12 Final System
The completed final system is shown in Figure 3.20-3.23.
Visible Laser Unit
Pulse Laser
RC1202
Counter
Optical
Receiver
Miscellaneous
Electronics
Collecting
Optics
7
Futaba Servo
Figure 3.20 Completed System
76
I~j'~
RS-232 Interface
Figure 3.21 Completed System with RS-232 Interface
0 Degree View
90 Degree View
180 Degree View
Figure 3.22 Completed System Operating at Various Angles
Figure 3.23 Complete Electronics Circuit Board
77
Chapter 4
4 Analysis of Prototype System Performance
The completed scanning laser rangefinding system performed suitably and met all
expectations originally sought. The laser rangefinder subsystem works in conjunction
with the servo scanner to output both range and position information. The completed
system was able to map a visual representation of the environment accurately. The live
communications range and angle data (ASCII, HEX format) was read by a laptop's serial
port, the most common communications port available. The data was saved and mapped
using Matlab. This chapter will explain the system performance and how the data and
manipulated and interpreted to get an actual visual map.
4.1 Rangefinding Performan ce
The rangefinding system was built separate of the scanning system. The performance is
tested both in terms of range, accuracy, and resolution. From the tests performed, ranges
obtained reached nearly 65 feet for indoor tests. For outdoors, the maximum range may
drop a little because of additional noise sources such as sunlight. Accuracy and
resolution is determined recording data and comparing it at various known distances.
Appendix B contains the raw data. The conversation from hexadecimal to decimal was
performed and graphed to find the actual scale factor for range.
78
120
y = 2.2004x + 0.8775
R = 0.9937
100
80
* Series1
* Series2
-Linear
(Series2)
60
CA
0
40-
'
'V
'
'
20---
0--0
10
20
40
30
50
60
Range Count
Figure 4.1 Laser Rangefinder Calibration Chart
From the data collected, a linear regression was performed and an equation for the
linear scaling of the ranging data was found. This equation is the following:
y = 2.2004 + 0.8775
(11)
where y is the actual count from the RC 1202 counter. Therefore, the resolution of the
counter is 2.2004 inches per count with an R 2 value of 0.9937 indicating that from the
data collected, the approximation for the resolution is very accurate.
To determine accuracy of the laser rangefinding system, the variance of the data
needs to be compared for fixed location. Data was recorded for an extended period of
time at various fixed locations inclued 6" from the laser and 6' from the laser. In both
cases, the standard deviation is approximately 0.73 counts or 1.606 inches. Figure 4.2
shows the probability distribution function for a standard deviation of 1.606 inches and a
mean of zero. This represents what we can expect for the accuracy performance of the
system.
79
0.8
0.6 -
0
.
0.4
0.2
-8
-6
-4
0
-2
2
4
6
8
Inches
Figure 4.2 Probability Density Function of Range Accuracy, Mean=O, STD=1.606 in
4.2 Scanner System
The scanner system is completely independent of the laser rangefinding system.
After range data is collected, it is merged in combination with an angle data but the two
are not intermixed or dependant on each other in anyway.
The performance of the
scanner will depend on the speed and accuracy of the system in determining angle
information. To determine the performance, data was collected while the servo scanner
was in operation. Figure 4.3 shows a typical chart of the output angle over time. From
this, speed, resolution, and accuracy can be determined.
80
100
90
-*
80
70
60
*i50
-4
S40
-
30
-------
-
20
10
0
0)
200
400
1000
800
600
1200
1400
Time (1/500 second)
Figure 4.3 Scanner Angle Data vs Time
From Figure 4.3, the scanner system can be characterized easily. First, it can be
seen that the servo system moves linearily, which indicates that the servo has a constant
angular velocity. For approximately every 600 samples (1.2 seconds), the servo moves
approximately a full 160 degrees and back to 0 degrees. Thus, the angular velocity is:
160 - deg rees x500 samples
sec
300samples
(12)
Q = 266.7 degrees/sec
Resolution can be determined by comparing the maximum and minimum of the
raw data recorded. This can be estimated over the total angular traveled, which is 160
degrees.
160
Resolution = 160-degrees
95-10
max- min
=
1.88 degree/raw count
(13)
The equation for converting raw angle data to actual angle is:
Angle = 1.88 x (x - 10)
(14)
Where x is the raw angle data. This is used later for converting raw data into an actual
map.
81
100
90
70 -
60
40
30
20
00
50
200
150
100
300
250
350
Time (1/500second)
Figure 4.4 Raw Angle Data for a Single Full Scan
To calculate the standard deviation of the data compared to the linear trendline, a
major assumption must be made. First, that the servo is perfectly linear as the trendline
predicts. Although it is known that this is not true and that the servo itself does have
errors, it will serve to help predict the standard deviation of the angle.
Using the
equation:
(15)
y = 0.2896x+ 10.47
where x is time, to predict the linear motion of the servo and subtracting the actual
position of the servo, a data set is obtained for the difference with a mean of zero.
Ay = Yactual
(16)
- Ypredicted
Finding the standard deviation of the raw data set (Ay) and then converting the raw data
standard deviation to actual angle standard deviation will yield an approximation of the
variance in the scanning servo system.
The standard deviation calculated from the raw data is 2.65 counts, which is
equivalent to 4.98 degrees standard deviation for actual angle.
Figure 4.5 shows the
probability density function for a standard deviation of 4.98 degrees with zero mean.
82
0.8 [.
-0
0.4
0
0.2
-16
-10
0
-6
5
10
15
Degree
Figure 4.5 Probability Density Function of Scanner System Performance
From the PDF chart, it can be seen that the scanner system is not particularly
accurate. However, do remember the assumption that was previously made. This does
affect the error by a certain factor but it is still shown that the angle does vary
significantly.
4.3 Laser Scanner System
The laser scanner system was tested as a combination of both the laser
rangefinder and the scanner system. Together, the data is merged to get range and angle
information. This can be used to represent a visual map of the area being scanned. This
section will show various visual representations of the different environments.
Three
different scenerios was chosen; looking down the hallway, looking at a known wall
surface, and an external test with sunlight.
One of the easier environments to depict is looking straight down a narrow
hallway. The end of the hallway is approximately 60 ft or so from where the laser
scanner system is positioned.
Figure 4.6 shows scanner range with respect to time.
Given that the system was stationary, each full scan of 160 degrees should be similar.
Since the system was looking straight down a hallway, the scan should also depict a
narrow passage down the center of the scan.
83
Full Scan
800.0-
600.0
500.0
C400.0
* Series1i
I
300.0
200.0-
ilk__
100.0
600
400
200
0
800
1000
1400
1200
Time (1/500 second)
Figure 4.6 Laser Scanned Data for Hallway
Next, the data needs to be combined with angle information and scans overlaid to
show how consistent the hallway seems. Figure 4.7 shows an overlay of 4 full scans and
merged with the scanner's angle data. From Figure 4.7, it can be seen that each scan is
fairly consistent in performing with limited variation. Indeed, the visual information does
match over different scans.
- - -C0600
M
000.0
-20.0
0.0
20.0
40.0
60.0
100.0
80.0
Angle(Degrees)
120.0
140.0
1600
Figure 4.7 Four Full Scans Merged for Hallway
84
180.0
2
3
-) -- - - - - - - - - - - - - - - - - L
An gle (d egree s)
Figure 4.8 Transposed Hall Plot of Actual Angle and Range Information
Figure 4.8 is a transposed version of Figure 4.7 shown on a polar plot to
accurately show the hallway visual information as it appears from a top looking 2
dimensional view downward.
The result indicates that there are two lines down the
center of the picture. This indeed is the hallway, a narrow passage approximately 4.5 feet
wide. Also in the picture, is range information for the end of the hallway, which is on the
extreme of 715 inches from the laser system.
The next test is to place the laser scanner inside an enclosed room and test it
against a known wall surface. The wall surface is shown on Figure 4.9.
135
135
Degrees
Degrees
Laser
System
Figure 4.9 Known Surface
85
250.0
200.0
150.0
0)
100.0-
500
0.0
1000
800
600
400
200
0
1400
1200
Time (1/500 second)
Figure 4.10 Laser Scanned Data for Known Surface
250.0-
200.0--
9$
150.0-
100.0
50.0-
-
0.0
0.0
20.0
40.0
60.0
80.0
100.0
120.0
140.0
160.0
Angle (Degrees)
Figure 4.11 Four Full Scans Merged for Known Surface
86
180.0
60
120
167.86
60
-
-
30
- -
1
330
300
'240
Angle (degrees)
Figure 4.12 Transposed Known Surface Plot of Actual Angle and Range
90
223.8
a)
C-
0
180
CD
270
Angle (degrees)
Figure 4.13 Transposed Surface Plot Overlaid with Known Surface
87
The final test for the scanning laser rangefinding system is an outdoor test which
includes sunlight effects. The laser scanner system was tested ontop Draper Laboratory's
It was tested along the rough concrete surface with an estimated
parking rooftop.
At the time of the test, the sunlight was reflecting
reflectivity coefficient of 25-50%.
directly off the surface of the walls along the parking lot, similating a maximum noise
environment. Outside temperature was approximately 600 F with no cloud and lots of
sunshine.
...................................
600 0 -r
h
4
500 0
5
*Oeresl
0
00O
0
2000
1000
00
0
100
500
400
300
200
700
600
Time (1500 second)
Figure 4.14 External rooftop test with sunlight
6000
s
I..
5000
lot
400.0
IN.
3000
2000
1000
00
00
200
40.0
600
100.0
0.0
Angle(Degre.)
120.0
1400
160,0
180.0
Figure 4.15 Four full scans for external rooftop test with sunlight
88
90
645.2
120
6
x~
-
150
%2
327 .12
18 .0&- ,.
30
270
Angle (degree)
Figure 4.16 Transposed Surface Plot Overlaid with external rooftop test
What the external test shows is that the scanning rangefinder works under external
operating conditions even with noise effects such as sunlight. During the test, the noise
level adjustment on the optical receiver was adjusted for a higher minimum noise level,
canceling higher amounts of noise produced by sunlight. For the outdoor test, it can been
seen in Figure 4.15 and 4.16 that the range exceeded 540 inches, which translates to
about 45 ft range, at least. Given the reflectivity of the surface outdoor and the sunlight
noise, this is fairly acceptable for collision avoidance purposely and perhaps,
performance. Outdoor performance can be improved further if a bandpass filter is used
on the receiving end.
89
Chapter 5
5 Conclusion and Future Work
The laser scanning system performed as expected. The final weight was 530
grams (-1.25 lbs), a weight lighter than comparable systems on the market. The total
power required for the complete system including the servo is 8 Watts. The performance
of the laser rangefinding system was 2.2 inch resolution with a standard deviation of
1.606 inches and a minimum 65 foot range indoors. The scanner system has a resolution
of 1.88 degree with a approximate standard deviation of 4.98 degrees and a range of 160
.degrees which takes approximately 0.6 seconds to complete the full scan.
In terms of weight, a lot can be shaved off the existing prototype. A large part of
the electronics portion was unnecessarily lengthy cabling which can easily be reduced in
future versions of the system. Perhaps better packaging on both the laser and receiver
units can help save weight and volume.
Performance is limited somewhat in this version of the prototype for several
reasons. First, the A/D solution on the PIC 16C73A microprocessor is inadequate for
precise monitoring and control of the servo position. In the future, emphasis should be
placed on replacing the 8 bit A/D converter built into the PIC with a 12 bit version so that
more accurate angle resolutions can be obtained. Secondly, optics plays a major role in
gathering of the reflected laser lightwaves. In this prototype, an ad-hoc method was used
for placement of the convex lens in front of the optical receiver. It was only noticed
towards the end that the focal point between the convex lens and the silicon on the optical
receiver was not properly matched. If it were properly matched the maximum should
increase substantially.
Several other designs should be considered for future laser scanning products.
Although the servo type scanner might be sufficient for relatively low speed scanning, a
spinning mirror scanner maybe more appropriate for high speed scanning, a system
similar to the Accurange 4000 2D Line Scanner design. That design incorporates a
spinning mirror control system rather than moving the whole laser and receiver unit.
90
The high speed movement and decoding of a cube mirror is significantly more precise
and accurate than the servo system that was employed in this thesis.
Of course, the
complexity might increase a little but the advantages may be worth the effort.
This thesis provides a framework for how to build a fairly accurate and
inexpensive scanning laser rangefinding system.
The system is easily modifiable by
mixing and matching various subsystems such as the microcontroller, the pulse laser, and
the servo control system, to meet a variety of requirements. That is the biggest advantage
that was seen from the start of the project.
Although initially thought difficult, this
project has proven that time of flight laser rangefinding can be done effectively with low
cost available technology.
91
Appendix A
PIC 16C73A Microprocessor Code by Rusty Sammon
processor 16c73
#include "16c73.h"
#include "laser.h"
;Created 7/22/98 by Rusty Sammon
;Modified 3/22/99 by Rusty Sammon
;This version of the laser.asm code has the following options:
*ascii output along serial line
* 500Hz laser sampling rate / data send rate
* 6.000 Mhz clock speed
*configures counter for 500ps resolution
; analog servo input for A2D conversion
*PWM output to set servo arm position
;This PIC code will run a laser rangefinder for use as an altimeter on
;an autonomous helicopter. The code is reasonably straightforward:
1) Start the counter and pulse the laser
2) Wait till the counter has data available
3) Read the data (parallel data) from the counter
4) Send the newest data to computer on a serial line
;NOTES
;Timerl is used to generate an interrupt flag to time the sampling rate
;(500Hz--> 2ms intervals).
;Code makes an effort to keep Bank 0 as the active register bank except
;when it is absolutely necessary to use Bank 1.
;This version of the code will send the data as Ascii characters,
;which makes it easier to display the data using a Terminal program
;on a PC.
;This version of the code contains a startup procedure to configure
;the counter for a 500ps timestep. The default counter timestep
;is 4ns
Start Code;;;
ORG OxOOOO
GOTO Startup
; Reset Start Location
; Interrupt Vector Location
ORG Ox0004
GOTO InterruptHandler
92
Port Initializations
Startup:
Initialize Port A
_rp0
BCF
_porta
CLRF
_rp0
BSF
OxFB
MOVLW
_trisa
MOVWF
; (1 -- > input, 0 -- > output)
; bit 5 - DATA9 input
; bit 4 - DATA8 input
; bit 3 - not used (analog input- see servo init stuff)
; bit 2 - RCVD output
; bit 1 - not used (analog input- see servo init stuff)
; bit 0 - SERVOIN analog input from servo potentiometer
Initialize Port B
_rp0
BCF
_portb
CLRF
_rp0
BSF
MOVLW OxFF
MOVWF trisb
; Make all of them inputs (1 --> input, 0
-- >
output)
; data0-data7 are on these pins
Initialize Port C
_rp0
BCF
_portc
CLRF
_rp0
BSF
MOVLW Ox08
MOVWF _trisc
; bit 7 - STROBE output
; bit 6 - SERIAL output pin
; bit 5 - CLKB output pin
; bit 4 - LASER Output to Laser
; bit 3 - RDY Input from Counter
; bit 2 - DATAIN output to counter
; bit 1 - SERVOUT output to servo
; bit 0 - RESET output to counter
Initializations for Laser Pulse Rate
;General Interrupt Setup
BSF _rp0
MOVLW OxCO
MOVWF _intcon
; bit 7 - Global Interrupts are ENABLED
; bit 6 - Peripheral Interrupts are ENABLED
; bit 5 - Timer 0 (TMRO) overflow interrupt disabled
; bit 4 - RBO external interrupt disabled
; bit 3 - RB port change interrupt disabled
; bit 2 - TMRO overflow interrupt flag bit
; bit 1 - RBO external interrupt flag bit
bit 0 - RB port chance interrupt flag bit
93
; Interrupts are used for timing the laser pulse rate
; This program uses the capture compare module flag bit for timing purposes,
; but does not actually perform an interrupt. The flag bit is set regardless
; of whether interrupts are enabled, and this is all we care about. The flag
; bit is cleared in the regular code
Enable Specific Interrupt
BSF _rpO
MOVLW 0x06
MOVWF _pieI
; bit 7 - Parallel Slave port interrupt disabled
; bit 6 - A2D converter interrupt disabled
; bit 5 - USART Receive interrupt disabled
; bit 4 - USART Transmit interrupt disabled
; bit 3 - Synchronous Serial Port interrupt disabled
; bit 2 - Capture Compare module 1 (CCPl) interrupt ENABLED
; bit 1 - TMR2 to PR2 match interrupt ENABLED
; bit 0 - Timer 1 overflow interrupt disabled
; Remember, the CCP1 flag bit is used for timing the laser
; pulse rate
; Timer2 is used to time the width of pulses that are sent to the servo
; The frequency of these pulses is controlled by the PulseCounter
Initialize Timer I
Use Bank 0
BCF _rp0
MOVLW OxO1
MOVWF _tIcon
Turn Timer 1 on, it's used for timing the laser pulse rate
Prescale 1:1
Use internal clock
Initialize Capture Compare Module 1 (CCPI)
BCF _rpO
MOVLW OxOb
MOVWF _ccp Icon
; bits 7-6 - Unimplemented
; bits 5-4 - PWM Least Significant bits (not used for ccpl)
; bits 3-0 - Select Compare mode and have interrupt trigger
resetting of TMR1
Changes the interrupt flag when TMR1 has same value as CCPR1H
and CCPRIL
Then resets TMR1 so we can do it over again
This is used for timing the laser pulse rate
;Load value into CCP1
BCF _rpO
MOVLW OxOB
MOVWF _ccprlh
MOVLW OxB8
MOVWF _ccprll
Get value into compare module for interrupts at correct intervals
Used for timing the laser pulse rate
Fosc = 6.000 Mhz
Clock speed = 1.5Mhz => 667ns (have to recalculate if clock speed is changed)
94
500 samples/sec --> 2ms/sample
2ms / 667ns = 3000 = 0xOBB8
Generates an interrupt every time TMRl = OxOBB8
;Reset Interrupt Flags
BCF _rpO
Reset Capture Compare module interrupt flag
CLRF _pir1
BCF TimeForLoop
; 1 = Interrupt occurred
; 0 = No interrupt
Initialization for Serial Output
Initialize Asynchronous Transmitter (USART)
_rp0
BSF
MOVLW Ox24
MOVWF _txsta
bit 7 - Clock Source Select (not used in Asynchronous mode)
bit 6 - Use 8 bit transmission
bit 5 - Transmit ENABLED
bit 4 - Asynchronous mode
bit 3 - Unimplemented
bit 2 - High speed transmission
; bit 1 - Transmit Shift Register Status Bit (1=empty, 0=full)
; bit 0 - 9th bit of transmit data (not used)
; Note: Port C, 7 is both the DATAIN output and the Serial port receive input
; Because of this we won't actually enable the serial port (the enable affects
; both the transmit and receive ports) until after loading the control word
; for the counter (this is the only time that DATAIN is used)
USART Baud Rate Generator Stuff
BSF _rpO
MOVLW 0x09
MOVWF _spbrg
; Value in the SPBRG register controls the baud rate for USART
; transmission using the formula
; Currently, we're using high speed transmission (BRGH=1)
Baud Rate = Fosc / (16*(X+1))
Fosc = 6.000 Mhz (have to change this if clock speed changes)
For baud rate of 37.5kbps, use X=9=0x09
Initialization for A2D conversion
Configure analog conversion (ADCONO)
BCF _rp0
MOVLW Ox81
MOVWF _adcon0
bits 7-6= Conversion clock at Fosc/32= 6.000 Mhz/32= 187.5khz
This means that it takes 32/4= 8 instructions to do a conversion
bits 5-3= Analog Channel= 0 (porta,0)
bit 2 - A/D conversion not yet in progress
bit 0 - A/D converter module is turned on
95
Configure analog port (ADCON1)
BSF _rp0
MOVLW Ox04
MOVWF _adcon1
bits 7-3= unimplemented
bits 2-0= set porta bits 0,1 ,and 3 as analog inputs
note that only porta,0 is actually used (SERVOIN)
Initialize Servo Controls
ServoInit:
;set up Timer2 for pulse length timing
BCF _rp0
MOVLW 0x07
MOVWF _t2con
; bit 7 - unimplemented
; bits 6-3= postscale 1:1
bit 2 - turn ON timer 2
bits 1-0= prescale 16
; Interrupts are generated when Timer2==PR2. We set PR2=the length of the
; servo pulse, and only enable Timer2 once every 50 Hz (the servo update rate)
; Note that we set _pr2=ServoDestination in laser.h
; Start off with a pulse width equal to Servo_xO
BSF _p0
MOVLW Servo_xl
MOVWF ServoDestination
;Switch to Bank 0 (program should always be in bank 0)
BCF _rp0
;Reset pulse and angle counters
BSF UsingTMR2_Int
CLRF _tmr2
CALL ResetServoSweep
CALL StartServoPulse
Load control data into the counter
PreparetoLoadCounter:
;bring counter reset low to prepare to send reset pulse to counter
BCF RESET
;get laser ready for first pulse
BCF LASER
;get ready to tell when data is received
BCF RCVD
ResetCounter:
BSF RESET
NOP
BCF RESET
;pulse RESET signal to reset the counter
;pulse length = 2 cycles = 667ns * 2 = 1.3us
;finish RESET pulse, counter should be ready to go
LoadCounterControlWord:
;The counter has a control data word that needs to be loaded
;at startup to get the counter into the correct mode of operation
;By default, the counter has a timestep of 4ns. Loading this
;control word reduces the timestep to 500ps.
;get set to load the data word
BCF CLKB
96
BCF STROBE
;load the first 11 bits of the data word (all zeros)
BCF DATAIN
;give datain time to be set - necessary?
NOP
;Load data bit 0
CALL PulseCLKB
;Load data bit 1
CALL PulseCLKB
;Load data bit 2
CALL PulseCLKB
;Load data bit 3
CALL PulseCLKB
;Load data bit 4
CALL PulseCLKB
;Load data bit 5
CALL PulseCLKB
;Load data bit 6
CALL PulseCLKB
;Load data bit 7
CALL PulseCLKB
;Load data bit 8
CALL PulseCLKB
;Load data bit 9
CALL PulseCLKB
;Load data bit 10
CALL PulseCLKB
;load the last 5 bits of the data word (all ones)
BSF DATAIN
;give datain time to be set - necessary?
NOP
;Load data bit
CALL PulseCLKB
;Load data bit
CALL PulseCLKB
;Load data bit
CALL PulseCLKB
;Load data bit
CALL PulseCLKB
;Load data bit
CALL PulseCLKB
1'
12
13
14
15
;Finish loading the data word by brining strobe high
BSF STROBE
NOP
;pulse length = 4 cycles = 4 * 667ns = 2.7us
NOP
NOP
BCF STROBE
;cycle 3
;cycle 4
;We're done with DATAIN, now enable serial port (part of RCSTA)
;Serial port ENABLED
BSF _spen
Main Loop- Do one sample
InitMainLoop:
CLRF _tmrlh
CLRF _tmr 11
BCF TimeForLoop
BCF _rpO
MainLoop:
BSF StartA2D
;reset timer #1 for interrupt generation
;reset timer #1
;Clea r the interrupt flag
;Swit ch to Bank 0 (program should always be in bank 0)
;Sample the servo position and start A2D conversion
; pulse the laser
; clock = 6.000 Mhz = 667ns (need to change code if clock changes)
;start pulsing the laser
BSF LASER
;pulse length = 2 cycle = 2 * 667ns = 1.3us
;cycle #2
NOP
;finish pulsing the laser
BCF LASER
WaitForCounter:
97
BTFSC RDY
GOTO ReadData
BTFSC TimeForLoop
GOTO CounterTimeout
GOTO WaitForCounter
ReadData:
CLRF DataLow
CLRF DataHigh
BTFSC dataO
BSF DataLow,O
BTFSC datal
BSF DataLow,1
BTFSC data2
BSF DataLow,2
BTFSC data3
BSF Data_ Low,3
BTFSC data4
BSF DataLow,4
BTFSC data5
BSF DataLow,5
BTFSC data6
BSF DataLow,6
BTFSC data7
BSF DataLow,7
BTFSC data8
BSF DataHigh,O
BTFSC data9
BSF DataHigh,1
;IF counter is ready
;THEN continue on and read data from counter
;ELSE IF interrupt occurs
;THEN no laser pulse has been received and counter
;has timed out; send blank data and try again
;ELSE continue to wait for counter to be ready
;Assume all bits are zero until read in
;if bit 0 is set
;then set DataLow,O
;read bit 1
;read bit 2
;read bit 3
;read bit 4
;read bit 5
;read bit 6
;read bit 7
;read bit 8
;read bit 9
;let counter know that data has been received by pulsing the RCVD output
BSF RCVD
NOP
BCF RCVD
;pulse length = 2 cycles = 2 * 667ns = 1.3us
;end pulsing RCVD
SendA2DAsciil:
;by now the A2D conversion is easily finished (it takes 8 cycles)
;convert the A2D result to ascii and send it to computer
CLRF Digit
BTFSC _adres,
BSF Digit, 0
BTFSC _adres,
BSF Digit, 1
BTFSC _adres,
BSF Digit, 2
BTFSC _adres,
BSF Digit, 3
4
5
6
7
CALL SendDigitasAscii
;converts digit to ascii and sends it
SendA2DAscii0:
;convert the second digit of the servo position to ascii
CLRF Digit
BTFSC _adres, 0
BSF Digit, 0
BTFSC _adres, 1
BSF Digit, 1
BTFSC _adres, 2
98
BSF Digit, 2
BTFSC _adres, 3
BSF Digit, 3
CALL SendDigit-asAscii
SendSpace:
MOVLW Ox20
MOVWF Ascii
CALL WaittoSend
;converts digit to ascii and sends it
;Ascii "space"
;Send the carriage return
PrepareAscii2:
;Convert the third digit of the hexadecimal number to ascii
CLRF Digit
BTFSC DataHigh, 0
BSF Digit, 0
BTFSC DataHigh, 1
BSF Digit, I
BTFSC DataHigh, 2
BSF Digit, 2
BTFSC DataHigh, 3
BSF Digit, 3
;converts digit to ascii an sends it
CALL SendDigit asAscii
PrepareAscii 1:
;Convert the second digit of the hexadecimal number to ascii
CLRF Digit
BTFSC DataLow, 4
BSF Digit, 0
BTFSC DataLow, 5
BSF Digit, 1
BTFSC DataLow, 6
BSF Digit, 2
BTFSC DataLow, 7
BSF Digit, 3
;converts digit to ascii an sends it
CALL SendDigit-asAscii
PrepareAscii0:
;Convert the first digit of the hexadecimal number to ascii
;This is done by taking the first 4 bits of the datalow register
;and finding their corresponding values as hexadecimal digits
;in ascii
CLRF Digit
BTFSC DataLow, 0
BSF Digit, 0
BTFSC DataLow, 1
BSF Digit, 1
BTFSC DataLow, 2
BSF Digit, 2
BTFSC DataLow, 3
BSF Digit, 3
;converts digit to ascii an sends it
CALL SendDigitasAscii
SendCarriageReturn:
MOVLW OxOA
MOVWF Ascii
CALL WaittoSend
;Ascii "line feed"
;Send the carriage return
ContinueServoSweep:
99
DECF SampleCounterLow, 1
BTFSC DidNotBorrow
DECF SampleCounter_High, 1
MOVFW SampleCounterLow
ADDLW OxOO
BTFSS ResultZero
GOTO UpdateServoPosition
MOVFW SampleCounterHigh
ADDLW OxOO
BTFSC ResultZero
CALL ResetServoSweep
UpdateServoPosition:
DECF PulseCounter, 1
BTFSC ResultZero
CALL StartServoPulse
WaitToLoop:
BTFSS TimeForLoop
GOTO WaitToLoop
BCF TimeForLoop
FinishLoop:
CLRWDT
GOTO MainLoop
;IF there was a borrow
;THEN decrement the high byte also
;IF the low byte not zero
;THEN Finish the loop
;ELSE test the high byte
;IF the high byte is zero
;THEN Start sweeping the other way
;IF Pulse-counter == 0
;THEN start the pulse output to servo
;if interrupt hasn't happened yet
;then keep looping
;Clear the interrupt flag
;(Note that this is NOT done in the
;interrupt handler)
;Clear the Watchdog timer
;ELSE continue sweeping this way
CounterTimeout:
When the counter does not send back a RDY signal before it is time to send
data, then this procedure is called. This procedure will clear the interrupt
and then send a "!" to indicate no data was received.
MOVLW Ox21
;Send flag value (Ascii "!")
MOVWF Ascii
;to show that no signal is returned
;Send the blank data
CALL WaittoSend
GOTO SendCarriage_Return
SendDigit-asAscii:
This procedure converts a 4 bit number value in the register Digit
and converts is to an Ascii value that corresponds to the correct
hexadecimal digit. For example,
(binary 101 1)=(hex B)
converts to
(Ascii "B")=(hex 42)=(binary 01000010)
;The converted ascii number is stored in the register Ascii
;First, we have to determine if the hexadecimal
;digit is a number or a letter. By subracting
;from 0x09 and then looking at the carry bit, we
;can see if the number is greater than Ox09
;(greater than Ox09 means it's a letter)
;IF the /borrow bit is 0 (a borrow occurred)
BTFSS Overflow
MOVFW Digit
SUBLW 0x09
100
GOTO Convert_ Letter
ConvertNumber:
MOVFW Digit
ADDLW 0x30
;THEN the digit is a letter
;ELSE the digit is number
;Reload the digit, the result of the subraction is useless
;0x30 is the ascii value for "0"
;0x31 is the ascii value for "1", etc.
;by adding 0x30, we line up the ascii values for
;digits 0 through 9
MOVWF Ascii
GOTO Wait to_ Send
ConvertLetter:
MOVLW OxOA ;Subtract Ox0A from the digit to get the offset
SUBWF Digit,0 ;Store this in the working register
ADDLW 0x41 ;0x41 is the ascii value for "A"
;0x42 is the ascii value for "B", etc.
;by adding 0x4 1, we line up the ascii values for
;letters A through F
MOVWF Ascii
;The TransmitFlag indicates whether the transmit buffer is eipty
;and it is possible to send more data. It is set regardless of
;whether the transmit interrupt is enabled (in this program, it
;isn't). The TransmitFlag can not be cleared in the code.
WaittoSend:
NOP
SendAscii:
BSF TransmitEnable
MOVFW Ascii
MOVWF _txreg
NOP
WaittoFinishSending:
BTFSS TransmitDone
GOTO WaittoFinishSending
BCF TransmitEnable
RETURN
;enable transmission
;wait for it to be loaded into TSR
;IF TransmitFlag is NOT set
;THEN _txreg is not empty and we have to wait
;ELSE _txreg is empty and we can send data
transmission
;disable
PulseCLKB:
When loading the data word into the counter, it is necessary to pulse
the clock for each new bit that is loaded. This procedure is called
from the load data word routine to make the above code more readable
It pulses the clock once and then waits long enough for the clock to
be ready to be pulsed again.
;assume that CLKB is already low for sufficient time
BSF CLKB
;pulse length = 2 cycles = 667ns * 2 = 1.3us
NOP
NOP
BCF CLKB
;wait long enough so that PulseCLKB can be called again
NOP
;wait length = 2 cycles = 667ns * 2 = 1.3us
NOP
RETURN
101
InterruptHandler:
BCF _rpO
MOVWF WSave
MOVFW _status
MOVWF StatusSave
MOVFW _fsr
MOVWF FsrSave
BCF _rpO
BTFSC Timer2_PR2_Flag
CALL FinishServoPulse
BTFSC CCPLFlag
CALL HandleCCPIInt
;Save key registers
;register bank 0
;IF Tim er2 interrupt
;THEN Handle that
;IF CCP1 Interrupt
;use a jump here? so that we don't reset the tr
;unless absolutely necessary?
;IF Transmit int
BTFSC TransmitFlag
CALL HandleTxInt
;This is the only way to clear the interrupt flag
CLRF _txreg
BCF A2DIntFlag
BCF _rpO
MOVFW FsrSave
MOVWF _fsr
MOVFW StatusSave
MOVWF _status
MOVFW WSave
RETFIE
;Restore key registers
;ELSE do notthing for timerl interrupts
HandleTxInt:
MOVLW OxOO
MOVWF _txreg
BCF TransmitEnable
RETURN
;clear th e flag
;disable transmission
HandleCCP1_Int:
BCF CCPLFlag
BSF TimeForLoop
RETURN
;Clear the flag
;Mark the variable
ResetServo_Sweep:
The servo destination stores the position that the servo should
be moving to during the the upcoming sweep. For now, we only
use the top 8 bits of the duty cycle register in setting the
servo position.
;register bank 1
BSF _rp0
;Servo_xO is the start position
MOVLW Servo_xO
SUBWF ServoDestination, 0
;IF we just went to Servo_xO
BTFSC ResultZero
;THEN do a forward sweep
GOTO ForwardSweep
;ELSE do a reverse sweep
Servo_xO
MOVLW
102
MOVWF ServoDestination
;register bank 0
BCF _rpO
MOVLW SweepSamplesHigh
MOVWF SampleCounterHigh
MOVLW SweepSamplesLow
MOVWF SampleCounterLow
RETURN
;move back to Servo_xO
ForwardSweep:
MOVLW Servo_xl
MOVWF ServoDestination
;register bank 0
BCF _rpO
MOVLW SweepSamplesHigh
MOVWF SampleCounterHigh
MOVLW SweepSamplesLow
MOVWF SampleCounterLow
RETURN
StartServoPulse:
* MOVLW PulseRate
MOVWF PulseCounter
CLRF _tmr2
BSF SERVOUT
BCF Timer2_PR2_Flag
;Reset the pulse-counter
;reset the timer
;start pulsing the servo
;clear the interrupt flag
BSF _rp0
BSF Timer2_Int_Enable
;Turn timer 2 ON
BCF _rpO
BSF UsingTMR2_Int
RETURN
FinishServoPulse:
BCF Timer2_PR2_Flag
BTFSS UsingTMR2_Int
RETURN
BCF SERVOUT
;clear the interrupt flag
;IF we're not using this interrupt
;THEN Don't do anything
;stop pulsing the servo
BSF _rp0
BCF Timer2_Int_Enable
;disable the interrupt
BCF _rp0
BCF UsingTMR2_Int
RETURN
END
103
Appendix B
Calibration Data
Average at 6" from Laser: 72.8 (HEX)
STD at 6" from Laser: .7343
3/28/99
Each data represents 6 inches of seperation
2
3
4
5
6
7
8.
9
10
11
12
13
14
15
16
17
18
19
Pass 1 (HEX)
073
075
077/078
07A
07C
07F
082
085
088
08C
090
092
094
096/097
098
09A/09B
09D
09F/OAO
OA1/0A2
Pass 2 (HEX)
073
075
078
07A
07C/07D
07F
081/082
085
088/089
08C/08D
08F/090
092/093
094/095
096/097
098/099
09B
09D
09F/OAO
OA1/0A2
Inches
6
12
18
24
30
36
42
48
54
60
66
72
78
84
90
96
102
108
114
Pass 1(Bin)
3
5
7.5
10
12
14
18
21
24
28
32
34
36
38.5
40
42.5
45
47.5
49.5
Pass 2(Bin)
3
5
8
10
12.5
14
17.5
21
24.5
28.5
31.5
34.5
36.5
38.5
40.5
43
45
47.5
49.5
Data
1
Average
3
5
7.75
10
12.25
14
17.75
21
24.25
28.25
31.75
34.25
36.25
38.5
40.25
42.75
45
47.5
49.5
104
References
[1] Kaliardos, William. Sensors for Autonomous Navigation and Hazard Avoidance on a
Planetary Micro-Rover. MS Thesis, MIT May '93, CSDL-T-1 186.
[2] Trott, Christian A. Electronics Design for an Autonomous Helicopter. ME Thesis,
MIT June '97, CSDL-T-1283.
[3] Paul Horowitz and Winfield Hill. The Art of Electronics. Cambridge University
Press, New York, 1993.
[4] Araki, Kazuo. High Speed and Continuous Rangefinding System. IEICE
Transactions, V E74, October '91.
[5] Hecht, Eugene. Optics. Addison Wesley Publishing Co, 1987.
[6] Polaroid Corporation. Data Sheets for Electrostatic Transducers. Cambridge, '97.
[7] Polaroid Corporation. Technical Specifications for 6500 Series Sonar Ranging
Module. Cambridge, '96.
[8] Fontana, R.J. An Ultra Wideband Synthetic Vision Sensor for Airborne Wire
Detection. Multispectral Solutions, Gaitersburg, MD, '98.
105