Crash Monitoring Device

For Vehicles

With Four or More Wheels

Allison Smyth

May 5, 2005

Table of Contents

Section / Pages
Abstract / 2
Introduction / 3-4
Literature Review / 5-8
Methodology / 9-11
Results and Analysis / 12-14
Conclusions – Look into the Future / 15-16
Works Cited / 17-19
Acknowledgements / 20
Appendix A – Materials / 21
Appendix B – Data Table / 22
Appendix C – Graphs / 23-24
Appendix D – Diagrams of the Prototype / 25-26
Appendix E – Schematics / 27-28

Abstract

Car accidents have become a large problem in the United States with the number of accidents increasing each year. A crash-monitoring device that can be mounted on the front of a vehicle to warn the driver of a potential frontal accident was developed to reduce the number of accidents during city and highway driving. This device uses a Polaroid sonar module to determine the distance between two vehicles and gives the driver a visual warning if he or she is following too closely. It also determines if the driver is catching up to the vehicle in front of him or her too quickly and visually warns the driver when necessary. Both of the warnings are based on the weather condition one is driving in. Though the general concept of this device was developed, wide scale testing is needed to prove that it would reduce accidents.

Introduction

Each year the number of car accidents in the United States steadily increases. In the year 2000, 4,563,000 accidents required emergency department visits. Over 41,800 of these accidents cost the drivers or passengers their lives. To reduce the risk of minor accidents, which often lead to major accidents, an automotive collision monitoring system that mounts on the front of a vehicle was created. This device uses sonar technology to send out signals from the front of the vehicle it is mounted on, hereafter noted as Vehicle A, to determine the distance to the vehicle in front of it, hereafter noted as Vehicle B. It monitors the speed of Vehicle A and determines the speed of Vehicle B relative to Vehicle A. If Vehicle A is traveling at a fixed speed in regard to Vehicle B, the device will warn the driver of Vehicle A if he is following too closely. If Vehicle A is traveling faster than Vehicle B, the device will warn the driver of Vehicle A if he is approaching the vehicle too quickly. It will warn the driver of these potential dangers through a series of light emitting diodes (LEDs). A green LED tells the driver that he is doing fine, amber is a warning, and red means slow down immediately.

Currently the device requires the use of an external computer, which calculates the distance between two vehicles and the rate at which one vehicle is approaching another. The external computer also determines if a situation is safe, adequate, or dangerous and gives appropriate warnings. The final prototype will not require an external computer; all the software will be added to the firmware and implemented in the microprocessor.

The goal of this project was to construct a prototype, which is a scaled down, working model that is testable on golf carts. The prototype would demonstrate the effectiveness and practicality of a crash monitoring device to reduce vehicle accidents. Tests for this device would be conducted at speeds less than 20 miles per hour. An important goal for this project was to make the product affordable, user friendly, and easy to install. This would insure that a device of this type would be accepted into the automotive world. The ultimate goal for this project is to implement this product in all vehicles manufactured. Overall, the plan for the project was to build a prototype of the device to show that it would work before converting it to a large-scale finished product.

Literature Review

Currently Mercedes-Benz S-class cars are equipped with an optional system called Distronic, which is an “adaptive cruise control system” (Shababb 1). The Distronic system increases the convenience of cruise control for highway or expressway driving. It is designed to reduce vehicle speed if it detects a slower moving vehicle up to 150 meters directly ahead of it (“Distronic Distance Control Safety Watch” 1). That way one can follow the preceding vehicle at a preset distance; however, the Distronic system “does not react to stationary objects [and] can only apply a maximum of 20% of the vehicle’s braking power” (Mercedes-Benz 1). The difference between the system being built as part of this project and the Mercedes system is that the system being built will be activated for the entire duration of a vehicle’s journey, not only while the vehicle is in cruise control. The Mercedes system also only warns the driver of a dangerous condition when the Distronic system cannot slow the vehicle down quickly enough. This could pose a very dangerous condition. The driver should be warned of a dangerous situation as it begins to occur, not when it is too late. Unlike the Mercedes system, the one produced in this project will also warn the driver if his vehicle is approaching a stationary object.

There are many sensors on the market that can be used to determine the distance between two vehicles. The sensors that are the most practical for use on vehicles are sonar or radar devices. Sonar is an acronym for sound navigation and ranging system. “[It] is a system that uses transmitted and reflected underwater sound waves to detect and locate submerged objects or measure the distances underwater” (Bellis 1). Sonar has recently been adapted for use of distance measurement in robots. In a sonar ranging device, a speaker (transducer, which is also a receiver) is used to emit a short burst of sound, which is known as a ping. The sound wave travels through the air, reflects from a target, and travels back to the transducer in the form of an echo. “The pulse may be at a constant frequency or a chirp of changing frequency” (Bellis 3); the experiments conducted in this project will only use a constant frequency. By measuring the time between the ping and the echo, one can determine the distance between the target and the transducer using the formula, where d is the distance, v is the speed of sound, and t is the time until the transducer hears the echo (Kurtus 1). Once one has found the change in distance and the time in between echo pings one can find the velocity of Vehicle B (the vehicle preceding the one with the device) relative to Vehicle A (the vehicle with the device) using the equation for velocity: change in distance divided by time.

The Polaroid Sonar Module 6500 series is a very popular device for ranging in robotics. This module will be perfect for the prototype of a crash prevention system since it has a range of 6 inches to 35 feet. The Polaroid device operates off of 5 volts, therefore, a regulator must be built to be sure that the device receives this constant voltage. “The sonar transmit output is 16 cycles at a frequency of 49.4 kHz” (Technical Specifications for 6500 Series Sonar Ranging Module 1). This Polaroid module also has a feature that allows one to blank out the device, or in other words, it allows the programmer to send out another ping before the echo of the original ping returns. This allows one to get more pings in per second. The prototype being created as part of this project will not use this feature; however, it is good to know this feature exists for later prototypes.

For a prototype that operates at low speeds a sonar system would work well; however at high speeds (as distance between objects grow) the reliability of sonar would be in question. When conditions include high speeds and a large amount of road noise, a radar device will work more reliably than a sonar device. A radar system works in the same manner as a sonar system to measure distance between objects and the velocity of an object in front of one; however, radar systems are more expensive than sonar systems. They use radio waves instead of sound waves, and they can work at greater distances than sonar. Radar pulses also travel at the speed of light (rather than sonar pulses traveling at the speed of sound). The time it takes for a radar pulse to travel to a target and back can be found using the expression 2r/c, where r equals range (distance to target) and c equals the speed of light. The best feature of radar that makes it seem like the best choice for a final prototype is that “a radar signal provides its own illumination, thereby being able to detect targets through bad weather as well as at night” (Anderson 1).

This project will also deal with a microprocessor, which is also known as a central processing unit (CPU). The microprocessor that will be used is a Motorola 9S12 badge. This device will be the brains of the sonar unit and will “carry out the instructions contained in the [firmware]” (fact-index.com 1). The 9S12 microprocessor consists of many ports. The port that the sonar device will be attached to is Port B. This port was picked because a microprocessor of this type has certain ports designed for certain functions. Although it really doesn’t matter where one attaches the unit, some ports are more appropriate than others. The programming language used to talk to the microprocessor is Assembly. Assembly is used because it is more specific than most other programming languages, and each command has only one interpretation. Assembly is “an extremely explicit language and the programmer must take everything into account” (Yetsko 1). To make sure that the final program for the final prototype has no bugs, CodeWarrior will be used. This program is an assembler, linker, compiler, editor, loader, and debugger; therefore, if there are any serious problems with the program, it will find them.

This device also requires the use of electronics, since a power regulator must be built to distribute power to the sonar module and the badge. The power regulator will incorporate capacitors, a potentiometer, two regulators, and diodes along with a power jack to put power into the entire system. The potentiometer is a large resistor with three-terminals that limits the voltage that can flow through a certain area (Potentiometer 1). The power supply will require two regulators because both the badge and the sonar module have certain regulations to the amount of voltage they can receive at one time. The badge can only have 9 volts while the sonar module can only take 5 volts. The diodes are used to prevent the regulators from being damaged when the device is turned off suddenly. If the amount of voltage being applied to the out side of the regulator is more than the amount being applied to the in side of a regulator, the part will be destroyed. The diode provides a pathway for the voltage on the out side of the regulator to pass around instead of through the regulator. The purpose of the capacitors is to smooth out spikes in the voltage. This allows the sensors to obtain more accurate readings.

Methodology

Before beginning the construction of this project, the layout of the initial prototype was created. It included the sonar circuit board, transducer, power supply, and the 9S12 microprocessor. It was found that a wooden board approximately 8 inches by 6 inches would be sufficient for housing all of these devices. After designing the general prototype, the power supply was designed. This device distributes power to the microprocessor and to the sonar device, which each require different amounts of power. The power supply includes 2 regulators (one for the microprocessor and one for the sonar unit), an assortment of capacitors and resistors, a potentiometer, several diodes, a power jack, a LED, and a slide switch (see Appendix A for the complete list of materials).

The first device built in this project was the power supply. This was an essential part of the prototype because without it, multiple power cables would need to be run from a battery to the device. The power supply takes in power from a power jack and sends it to two regulators. The LM340 Regulator allows only 5 volts of power to pass to the sonar device. The LM317 Regulator allows 9 volts of power to pass to the microprocessor. The LM317 required a potentiometer to adjust the amount of voltage passing through the regulator. To prevent large spikes in the current of the circuit, capacitors were used. Diodes are used on the board to make sure that neither of the two regulators is destroyed if the board is turned off suddenly. The diodes give the power an alternate pathway to avoid passing back through the regulator and destroying it.

Once the power supply was built, a wooden board of the dimensions stated above was acquired. Using wood screws, the sonar circuit board, power supply, and 9S12 badge were attached to the board. The badge was then connected to the power supply by standard wires. Several more wires ran through the power supply and attached to the microprocessor, to transmit instructions from the badge to the sonar board. These wires were soldered to the power supply so that only one ribbon cable would need to attach from the power supply to the sonar circuit board. During this build phase, a magnetic switch was attached to the power supply through a cable. It is wired so that one end of the switch receives power and the other end is attached to a pin on the badge.

A device to hold the transducer was also built. This device was made out of foam and aluminum to prevent the transducer from vibrating or hearing unwanted sounds. The foam had to be nonconductive because nearly 200 volts of electricity pass through the transducer during an initial pulse. The foam also needed to be static proof so that it would not destroy the transducer, which, like most electronic items, is very susceptible to static electricity. The foam was placed on the front and the back of the transducer, and was then encased in aluminum. The aluminum was held together by 8 nuts, bolts, and spacers. The bolts were all placed at a distance 2 cm greater than the radius of the transducer from the center of the transducer. This design would insure equal pressure on all parts of the transducer at all times. When this device was completed it was attached to the prototype using wood screws. The entire prototype was placed in a metal box (10 by 10 by 4 inches) to prevent radio waves from interfering with the processes on the board. A picture of the prototype before being put into the metal box and transducer can be found in Appendix D.

Once the build phase was completed, the firmware for the badge was written in Assembly and implemented into the 9S12 Badge. The badge was programmed to wait for a “V” or an “E” command from an outside source. Upon receiving a “V” it would record the time between pulses of the magnetic switch. This number was then sent to the source asking for “V.” When the badge received an “E” command it would send out a signal for the sonar device to send an initial pulse. The badge then waits no longer than 150 milliseconds for the pulse to return in the form of an echo. If no pulse returns in that time, the badge assumes that there is nothing ahead of the vehicle and sends 150 as the echo time. To test the badge, Hyperterm (a communications program) was used. In Hyperterm, one could send the commands “V” and “E” and see if the badge would respond.

The software for the external computer was written in Delphi. This program is written to send out a “V” and an “E” command when the run button is pressed. The badge should then return the time it takes for the echo and the time it takes to receive a pulse from the magnetic switch. The software then converts the times it receives from the badge into feet per second for the velocity and feet for the echo. The software also has buttons to tell if you are driving in dry, wet, or snowy conditions. The software is designed to give warnings depending on the weather condition selected. The warnings determine if one is traveling too close to the preceding vehicle or if one is approaching the preceding vehicle at too great a speed. The computer informs the person of the safety of their driving by displaying one of three messages: safe, adequate, or dangerous.

Once this was completed, an emulator was built to test the software. The emulator was used in place of the prototype at first to make sure that the software was working before attaching the prototype. If one attached the prototype immediately and something didn’t work, one would not know if it was the software or the firmware that was not working. Once the firmware (Assembly), software (Delphi), and prototype were all deemed to be fully functional, they were attached together and tested to make sure that they were compatible with each other.

Results and Analysis

The device that was built meets many of the initial goals of this project. The device is capable of determining the distance to Vehicle B (vehicle preceding the vehicle with the device) using sonar ranging technology. It is also able to determine how quickly Vehicle A (vehicle with the device) is approaching Vehicle B. Visual warnings are made informing the driver when Vehicle A is too close or approaching Vehicle B too quickly. The warnings also take into account the speed of Vehicle A as well as the weather conditions one is driving in: dry, wet, or icy. Furthermore, the device is affordable, compact, and easy to install. Unfortunately, the device still incorporates an external computer, which will need to be eliminated to achieve the ultimate goal of having this device implemented on all vehicles manufactured. In summary, this prototype has made a great deal of progress since its initial development and now is ready for a finalization stage.