Low Cost Av
Low Cost Av
Low Cost Av
Richard W. Wall
Associate Professor University of Idaho Moscow ID 83844-1023 rwall@uidaho.edu
Abstract Autonomous vehicles are equipped with a variety of instrumentation and controls depending upon the mission of the target vehicle. One of the biggest challenges in developing low risk autonomous vehicles is keeping the cost down. Leveraging from low cost instrumentation developed for high volume consumer applications, inexpensive microcontrollers, ultrasonic sensors and a global positioning systems result in a low-cost autonomous vehicle that will navigate to a desired location with obstacle avoidance. This paper describes the design of a low budget autonomous vehicle using a modified radio control car chassis equipped with a GPS and ultrasonic sensors to navigate to a predetermined geographical location with obstacle avoidance. The focus of the project was to determine how much capability could be achieved on a minimal budget. A budget shows that high performance can be readily achieved using low cost processors and commercially available instrumentation. Since the system is battery operated, attention is given to power consumption.
II. NAVIGATION To navigate a vehicle autonomously, the control system must have the ability to determine its present location and direction of travel. Location can be determined either from an outside source with technology such as the Global Positioning System (GPS), or by calculating a traveled path from a known starting point with the use of electronic compasses, inclinometers, and rotational counters. While neither option is perfect, GPS offers the benefit of retrieving location information that has no bearing upon previous results. This prevents calculation errors from accumulating throughout the path. For this reason, low cost, and ease of use, GPS was selected as the method of location retrieval for this autonomous vehicle project. However, limitations in satellite signal reception will limit the use of GPS systems for navigation. These limitations, may in part, be overcome by utilizing differential GPS but at additional expense. The specific GPS chosen for demonstrations was the commercially available Garmin GPS 16-LV (http://www.NavtechGPS.com). This unit has an embedded receiver and antenna, which tracks up to twelve satellites. This is the low voltage model capable of operating off of a 5 volt regulated input. The GPS 16 interface protocol is based on the National Marine Electronics Associations NMEA 0183 ASCII interface specification. The GPS can be configured to stream standardized sentences containing various GPS information as fast as once per second. GPS data being utilized in this project includes latitude and longitude formatted as an ASCII text string ddmm.mmmm representing degrees, minutes and fractions of minutes as well as GPS quality indication, antenna height above or below mean sea level (meters), speed over ground (knots), and course over ground (degrees). Parsing these strings puts the relevant data into usable variables. Absolute position is accurate to within three meters. In testing, the relative position was found to be much more accurate, but the absolute position drifted over time. III. OBSTACLE AVOIDANCE An autonomous vehicle must be able to interpret its environment by gathering information from its sensors. In the science of autonomous navigation, the primary objective is to describe objects located in the vehicles environment so that computations can be made to navigate around obstacles that will impede its progress. Sensors are available in a full spectrum of complexity, price, and output format. On the low cost end, there are infrared and touch sensors that have
I. INTRODUCTION An autonomous vehicle is a self-piloted vehicle that does not require an operator to navigate and accomplish its tasks. Autonomous vehicles are a recently developed subset of robotics and can come in three general forms; air, ground and submarine. Many companies and organizations are spending a lot of time and money developing autonomous vehicles for numerous applications. Possible applications include precision formation flying, investigating areas too dangerous for humans (i.e. chemical fires or radioactive areas), checking line integrity of underwater pipelines and exploring the surface of other planets. One possible task of an autonomous vehicle is to navigate a pre-programmed route while avoiding any obstacles the vehicle may encounter. This function is useful in applications such as an autonomous log-skidder, security surveillance robot, fire suppression system, and a terrain-mapping vehicle. The vehicle can accomplish this task by using sensors to see where it is and what is around it. These sensors vary from close range infrared sensors to longer ranged high frequency radar and global positioning satellites. Creating an autonomous vehicle that accomplishes this task was the topic of a Senior Design project at the University of Idaho. Funding for the project came from the Department of Electrical and Computer Engineering. The goal of the project was to design and build a low cost autonomous vehicle control system for a ground vehicle. The vehicle must be able to navigate a programmed route and avoid obstacles while maintaining a minimum speed. The platform for developing this control system was a radiocontrolled model car.
short range and can only output a signal indicating simply if something is in its range or not. On the high cost end, sensors include devices such as laser range finders, stereo cameras, and complex vision systems that can cost thousands of dollars and provide a detailed description of their field of view. A technology that is still rather low cost, but offers the benefit of outputting a variable distance to an object, is the ultrasonic range finder. Ultrasonic range finders operate by producing a pressure wave and detecting its reflections off of objects. Benefits of ultrasonic range finders include their ability to perform under low visibility and their scalability to underwater applications. Ultrasonic range finders provide relatively good depth resolution. For example, if sound travels at a speed described by (1) and (2) and requires 2 to 5 cycles of the ultrasonic signal for detection, then for a 32kHz transducer, the uncertainty is calculated using (3) and (4).
c = 331.29 1 + T C
m / sec 273.16 c = 335.55 m / sec or 1101 ft / sec at 20C 3 cycles * 335.55 m / sec 32kHz
U=
U = 3.15 cm
(4)
Since the time for echo for a distance measurement is twice the actual distance to the object, the uncertainty is half of that expressed in (2). The beam width of the transducer serves two useful functions: it improves the receiver sensitivity and provides spatial selectivity. The course vertical and lateral resolution is one of the drawbacks of an ultrasonic sensor. The vertical and lateral resolution equals the beam width of the ultrasonic transducer. As the distance to the object increases the broader the observation space becomes. Fig. 1 illustrates the beam pattern for a Devantech SFR08 ultrasonic transducer. Beam width is a function of both transducer physics and frequency of operation. Equations (5) and (6) describe the beam angle as a function of frequency [5].
x = sin , x 3.58 ka
Fig. 1. SFR08 Beam Pattern Depending on the device, output may be in the form of analog voltage or digital output. A particularly useful digital 2 I/O format available is a I C bus. This bus provides a simple two-wire connection for up to 256 devices. Each device 2 connected to the I C is assigned it own address. The bus master controls communication by first addressing a particular device, and then sending the commands to that device. The ease of communication and low cost were the primary reasons for selecting the Devantech SRF08 Ultrasonic range finder for this application. This device operates from a 5 volt regulated supply and uses a 40 kHz ultrasonic pressure wave. 2 Once the sensor receives a start command over the I C bus, the onboard microcontroller initializes a pressure wave and records up to 16 echoes in a set of registers. A 2 microcontroller may then access the readings over the I C bus in a user-specified format of inches, centimetres, or microseconds of travel time. As shown in Fig. 2, three ultrasonic range finders were mounted on the front of the model car, six inches off of the ground and offset by 45 degrees from each other. Due to their close proximity to the ground and the sensors conic field of view, the sensors were adjusted to read reflections off of flat ground at approximately 30 inches. IV. PROCESSING The core of any navigation system is its ability to process data from its sensors and control its outputs in an efficient manner. The complexity of the processor is directly related to the amount of data being processed and the time the processor has to complete the task. With large, expensive systems, the computation power of a high-performance computer may be necessary. However, for a smaller, less expensive system, low-performance microcontrollers or field-programmable gate arrays (FPGA) may be suitable depending upon the processing and speed requirements. There are a variety of microcontrollers available: PIC, OOPic, Basic Stamp and The Rabbit.
(5)
ka =
(6)
development environment that comes with several usefully 2 libraries for common devices such as RS232 and I C drivers. Fig. 3 shows a block diagram of the connection made to the microcontroller in this project. V. DECISION MAKING The microcontroller is responsible for collecting all of the data from the sensors, making decisions based on this information, and controlling the motors. All of these tasks must be performed during different intervals of time. For example, the data from the GPS is streamed to the microcontroller once every second while the ultrasonic sensors can be pinged once every 75 ms and the electronic speed control must receive an update once each 20 ms. Because of these different process timing requirements, the control algorithm was implemented using a multitasking structure comprised of three independent loops. All three loops execute in parallel, which allows each component to run at its own pace. This scheme ensures data is properly read from the GPS and the ultrasonic sensors are always providing the most current information. The first loop updates the data registers containing information from the ultrasonic sensors. In this loop if an obstacle is detected the program sets a flag to notify the other loops of the obstacle and then turns the vehicle to avoid the obstacle. The obstacle flag is cleared once the sensors no longer detect the object. The second loop reads information from the GPS that includes latitude, longitude, heading, and speed. After the GPS sentences have been parsed, course corrections are made if the obstacle flag is clear. To make course corrections, the program calculates the angle from the current heading to the destination and then turns the wheels proportionally. The wheels are fully turned when the angle to the destination is greater than 70 degrees. Speed control is also performed in this loop. The current speed read from the GPS is compared to the desired speed before making adjustments to the PWM duty cycle for the drive motor. One alternative for performing speed control would be to use a rotational sensor connected to one of the vehicles wheels. Ground speed can be calculated from the rotational speed of the wheel. The advantage to this would be real-time access to current speed. The speed from the GPS is only updated once every second. The main disadvantages of this method are the added component costs and added complexity for reading the data. The GPS was selected for speed control because no additional components were required and the data was very easy to read. The third loop displays the current distance and angle to the destination and the current readings from the ultrasonic sensors on a liquid crystal display (LCD). The LCD has been very useful in testing and troubleshooting the navigation system. VI. CONTROLLING SPEED AND TURNING
6 DIO
PWM
3 pin serial
GPS
LCD Display
The vehicle uses two motors: one for steering and the other for speed. The steering is accomplished by a Futaba S3003 servo (http://www.futaba-rc.com) that came stock with the
original radio controlled (RC) car. This servo is controlled by a 50Hz PWM signal from the microcontroller. The pulse width is controlled between 1 ms and 2 ms for right and left respectively. The servo arm is mechanically connected to the front wheels to steer the vehicle. While stationary the servo will pull a minimal amount of current with peaks of up to 300mA when turning. The original RC car came with a standard DC motor commonly used in remote control cars. This type of motor is designed to propel the car at speeds up to 25mph. For this application, the desired speed is less than 5mph and the stock motor could not reliably produce enough torque in this range. The stock motor was replaced with a 24V, 5W, permanent magnet, Hitachi DC motor with sufficient torque at low speeds. A simple DC-DC switch converter was implemented to control the motor. The converter switched the terminals of the motor from 12V DC to ground. The microcontroller supplied a PWM signal connected to the gate of an IRL3302 power MOSFET. Adjusting the duty cycle of the PWM signal controls the motor speed. Under normal operation, the motor pulls an average of 1500 mA. This control scheme works well on flat ground but lacks the feedback loop necessary to adjust the PWM to maintain constant speed when travelling over different grades. Further, this method of control does not allow engine braking to stop the vehicle. VII. POWER MANAGEMENT Power management can be one of the biggest challenges in portable applications. The vehicle power system must be designed to provide the required voltage levels for all of the components and enable the vehicle to run off of battery power for a sufficient amount of time. The majority of the power consumption on the vehicle occurs in the drive motor. The large current draw of the drive motor caused large voltage distortions that severely affected other electronic components on the vehicle. To prevent this from happening, the DC motor controller was connected to its own 12V, 2.2 amp-hour rechargeable battery. A 12V DC bus comprised of 8 C-cell batteries powers all of the other electronics. Fig. 3 illustrates how voltage levels are supplied to the components in this project. The microcontroller comes with an onboard 5V DC regulator, which supplies the 100mA required by the microcontroller and an additional 115mA for powering devices from its ports. The three SRF08 ultrasonic sensors and the 16x2 character Liquid Crystal Display (LCD) were configured to draw current from the microcontroller based on their minimal current requirements. An additional 5V regulator was implemented to supply the power for the GPS receiver and steering servo. The display also requires a minus three-volt connection for contrast. This voltage was provided with the addition of two1.5V AA-cell batteries. The total current requirements for each device are show in Table I.
12V Battery
5V DC Regulator
Rabbit Microcontroller
DC Motor
GPS Receiver
Ultrasonic Sensors
LCD
VIII. RESULTS The vehicle is able to navigate to a specific location. It does try to avoid obstacles along the way. Hitting the mark does occur, but due to the fluctuation of the absolute position, the mark drifted with about a 10ft radius. Another problem occurs because of the lack of braking. The vehicle tends to coast past the desired stopping point, causing it to have to circle back around to the point. Braking can be implemented by controlling the motor with full H-bridge converter instead of a single switch thus allowing current to be switch in either direction through the DC motor. [4] The obstacle avoidance works well for most objects. It can detect cars and other such solid objects. Two issues that come up are: not seeing the object in time to turn and not seeing curbs at the proper distance. These issues can be resolved with adjustments to the ultrasonic sensors. IX. CONCLUSION This project shows that an autonomous vehicle can be built on a small budget. Vehicle navigation is accomplished using a microcontroller, GPS and ultrasonic sensors, mounted on a modified commercial model radio control car chassis. Although this project was done on a small budget and a small scale, the same concepts and ideas can be applied to a larger scale application, given a larger budget. X. REFERENCES [l] Khatib O. Real-time obstacle avoidance for manipulators and mobile robots, The International Journal of Robotics Research 5(1) 1986 pp 90-98.
[2] Saffiotti A., Konolige K., and Ruspini E. H. A multivalued-logic approach to integrating planning and control, Artificial Intelligence 76(1-2), 1995, pp 481526. [3] Edwards, Dean B., and Canning, John R., Developing a Radio-Controlled Log Skidder With Fuzzy Logic Autonomous Control, Transactions of the ASAE, Vol. 38, No. 1, pp 243-248, 1995. [4] Baxter J. M. and Bumby J. R. Fuzzy logic guidance and obstacle avoidance algorithms for autonomous vehicle control, Procs of the Int Workshop on Int Autonomous Vehicles (Southampton, UK), 1993, pp. 41-52. [5] J.A. Kleppel, Engineering Applications of Acoustics, Artech House, ISBN 0-89006-260-9, 1989, pg. 147 [6] Power Electronics: Converters, Application and Design, Mohan, Undeland, and Robbins, 1989, ISBN 0-47161342-8, John Wiley & Sons, Inc., publisher, pp. 223224.