Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

World Academy of Science, Engineering and Technology 6 2007

Safety Automation of Cars Using Embedded Microcontrollers


Abhinav Ray, and Pratosh Deepak Rajkhowa

AbstractThe paper deals with the partial automation of cars for safety purposes. We have tried to automate the car to prevent the danger (obstacles around the car) in the best possible way by incorporating intelligence to it with the help of microcontrollers and interfacing them with the basic structures of the braking, steering and the acceleration systems of the car. The actions required are taken only if the driver is not able to steer the car out of danger even after the driver is alerted. We have given preference to a particular direction with respect to other directions in the most practical way and in a particular sequence so that only one system (i.e. braking, steering and the acceleration) works at a given instant of time. The proposed system can be implanted in a manually driven car at a very low cost. KeywordsUltrasound transducers, stepper motor, tachometer, rack and pinion steering system. I. INTRODUCTION N todays automobile industry safety of cars has become a key research issue. In this paper we have given an effective way by which we can increase the car safety by several folds. The practical development of the system proposed by us is being carried out at R.V. College of Engineering, Bangalore, India. II. DESCRIPTION OF THE SYSTEM The proposed system consists of basic blocks like transducers, microcontrollers, multiplexers plus the braking, steering and the acceleration systems of the car. The ultrasound transmitters on each side of the car are fired with a voltage pulse simultaneously. The clock program fed to each of the peripheral microcontrollers (MCf, MCre, MCl, MCr) is started. The receiver ultrasound transducer closest to the obstacle will be the first to generate a voltage pulse.

Fig. 1 The basic circuit diagram


TT: ULTROSOUND TRANSMITTER &: AND GATE MCf: MICROCONTROLLER FOR FRONT COLLISION TIME CALCULATION MCre: MICROCONTROLLER FOR REAR COLLISION TIME CALCULATION MCl: MICROCONTROLLER FOR LEFT COLLISION TIME CALCULATION MCr: MICROCONTROLLER FOR RIGHT COLLISION TIME CALCULATION MCbr: MICROCONTROLLER FOR BRAKING STABILITY CALCULATION MClt: MICROCONTROLLER FOR TURN LEFT STABILITY CALCULATION MCrt: MICROCONTROLLER FOR TURN RIGHT STABILITY CALCULATION MCa: MICROCONTROLLER TO FIND THE TIME REQUIRED TO ACCELERATE TO MAX VELOCITY AT MAX ACCELERATION UNDER STABLITY CONDITIONS MUX: MULTIPLEXER

Manuscript received on May 30, 2005. This work is supported by Rashtreeya Vidyalaya College of Engineering Bangalore, India. Abhinav Ray is with the Department of Instrumentation Technology, RVCE, Bangalore (phone: +91-9886389437, fax: +91-80-28600337, e-mail: rayabhinav@yahoo.com). Pratosh Deepak Rajkhowa is with the Department of Information Science and Engineering, RVCE, Bangalore (e-mail:pdro885@yahoo.com).

660

World Academy of Science, Engineering and Technology 6 2007

The voltage pulse passes through the AND gate and stops the clock. The AND gates are disabled by the respective peripheral microcontrollers as soon as the voltage signal is received by them. Using the time span between the transmitter and the receiver signals the instantaneous relative distance is calculated. The AND gate is enabled again The transmitters are fired again and the instantaneous relative distance is found out using the above procedure. The difference of the two relative distances calculated above is found and is then divided by the time span for their change. This gives the instantaneous relative velocity. The instantaneous relative distance at that moment is divided by the instantaneous relative velocity which gives the collision time. The four collision times thus obtained are multiplexed with the help of an 8:1 multiplexer with three select lines. The multiplexer is connected to the main microcontroller which selects the appropriate time of collision according to the need of the algorithm. The microcontrollers MCbr, MClt, MCrt are fed with appropriate steps for which the stepper motor has to rotate at various velocities of the car for ensuring stability conditions. The main microcontroller is interfaced to the stepper motors which have been used for the modification of the braking, steering and the acceleration systems of the car. III. OBSERVATIONS The collision times are updated after a finite instant of time. This time depends upon the obstacle relative distance. Lower obstacle distance will increase the frequency of collision time calculation and thus making the system more accurate. The frequency of the collision time calculation will be in order of kilohertz for close proximity distances. Calculation of instantaneous relative distance, velocity and the acceleration needs one, two and four voltage pulses respectively to the transmitter. By this we can infer that the number of voltage pulses given to the transmitter increases in geometric progression with every increase in the derivative of the distance. Thus it is inferred that if the error in the calculation of relative distance is E then the errors in the calculation of the relative velocity and the acceleration will be 2E and 4E respectively.

STEP 1 CHECK REAR

CHECK FRONT

BRAKE

STEP 2 CHECK RIGHT

ACCELERATE FRONT

TURN LEFT

STEP 3 CHECK LEFT

TURN RIGHT

Fig. 2 The flow of program

1. This is the layout of the program (Algorithm) that will be fed to the central Microcontroller. 2. The blocks of code on the left hand side (namely Step1, Step 2, Step3) form the main body of the program while the blocks of code on the right hand side (namely Check front, Brake, Accelerate Front, Turn left and Turn right) will be written as subroutines that will be called by different segments of the main program, whenever necessary. 3. The first few codes of Step1 calls Check front subroutine to check the front side of the car (i.e. to check if the front side is safe), accordingly depending on the requirement, the Check front routine might also call the brake routine. 4. The rest of the codes of Step 1 checks if the rear of the car is safe and might call Accelerate Front or Turn left or Turn right subroutines, depending on the required action to be taken. 5. Step 2 basically checks the right side of the car and might call the Turn left routine (Responsible for rotation of the motor in turn controlling the braking, acceleration and steering systems) and/or the Check front routine, if a need III. SOURCES OF ERRORS: arises 6. Step 3 checks the left side of the car and calls the Check SOURCES ERROR: routine ifOF required. front and/or TurnV. right The speed of the ultrasound in air varies with its velocity, temperature and humidity. The inherent voltage-sound conversion times for the

IV. THE OUTLINE OF THE PROGRAM FED TO THE CENTRAL MICROCONTROLLER

661

World Academy of Science, Engineering and Technology 6 2007

ultrasound crystals. Propagation times of AND gates and the multiplexer. Calculation time of the microcontrollers. VI. SOLUTION

Use of fast microcontrollers. AND gates and multiplexers with very low propagation times. Scaling of the voltage-sound conversion times.

b) Take in the time for stable braking Tb at that velocity of the car from the Microcontroller Mbr c) Compare Tfront with 2Tb, If Tfront >2Tb, Return d) Else Beep once and Compare Tfront with Tb, If Tfront>Tb, Go to Step b e) Else Call brake subroutine f) Return 2. BRAKE: a) Take in the amount of rotation of the stepper motor from MCbr so that the car is stable at that speed while braking b) Take in the minimum time (Th) required to brake the car at that velocity from MCbr c) Take in the time of collision of the front (Tfront) from MCf d) Rotate stepper motor till the collision time Tfront becomes equal to 2*Th or till the motor is rotated to that angle, which ever comes first e) Return 3. TURN LEFT: a) Take in the maximum angle theta at which the car can take a stable left turn from MCl b) Take in the time of collision (Tright) of the right side from MCr c) Take in the minimum time (Th) required for the car to travel the at most the length of the car to the left at that angle d) Rotate the motor to the right one step, call check front routine (we cant continue to turn left if there are cars at the front during the left turn) e) Rotate stepper motor till right collision time Tright becomes equal to 2*Th or till the motor is rotated to that angle, which ever comes first f) Return 4. RIGHT TURN: a) Similar logic as turn left but uses the appropriate microcontrollers and subroutines 5. ACCELERATE: a) Take in the minimum time Th to accelerate to maximum speed from that velocity at maximum acceleration with regard to that velocity a) Take in the time of collision Trear from MCre b) Rotate the stepper motor to press the accelerator pedal c) Call check front routine (we cant continue to accelerate forward if there are cars at the front during the acceleration) d) Rotate stepper motor till rear collision time Trear becomes equal to 2*Th or till the motor is rotated to that angle, which ever comes first e) Return

VII. ALGORITHM FED TO THE CENTRAL MICROCONTROLLER Step 1: CALL CHECK FRONT SUBROUTINE a) Take in the time of collision of the rear side from MCre b) Take in the minimum time taken to accelerate at the front from MCa, minimum time to take a stable left turn from MClt and minimum time to take a stable right turn from MCrt c) Compare the three time quantities and choose the smallest (Ts) d) Compare Collision time with 2*Ts e) If Collision time is more than or equal to 2*Ts, go to Step 2 f) Else Compare collision time with Ts g) If collision time is Greater than or equal to Ts, beep and go to step 1(a) h) Else Call Left turn routine or right turn routine or accelerate routine, which ever fits. i) Go to step 2 Step 2: a) Take in the time of collision Tright from the Microcontroller Mr b) Take in the variable maximum stable angle theta from MClt c) Take in the time (Tleft) required to travel (at most) the length of the car at that velocity and at the maximum theta angle theta from MClt d) Compare the time of collision with 2* Tleft e) If collision time is greater than or equal to 2*Tleft, go to step 3 e) Else compare the time of collision with Tleft f) If time of collision is greater than T left, beep and go to Step 2(a) g) Else Call turn left routine to take a left turn so that the time of collision increases to at least 2*Tleft or till the angle of rotation of the car becomes equal to theta, which ever comes first h) Go to step 3 Step 3: *same logic works here too (like the previous step), only the appropriate side (i.e. the Left side) and the appropriate microcontroller is chosen Go to step 1 VII. ALGORITHMS FOR THE SUBROUTINES 1. CHECK FRONT: a) Take the Time of collision Tfront for the front side from the Microcontroller Mf

662

World Academy of Science, Engineering and Technology 6 2007

PRIORITY LEVELS OF THE SIDES PRIORITY LEVEL 1 PRIORITY LEVEL 2 PRIORITY LEVEL 3 PRIORITY LEVEL 4 FRONT SIDE REAR SIDE RIGHT SIDE LEFT SIDE

the brake shoes causing the brakes to be applied. Modified Braking System: However in the proposed modified system, a stepper motor is rotated to the right by the central microcontroller. With the help of a chain/belt, a crankshaft in turn is rotated to the right, pushing the pistons to the right and away from the openings, thereby artificially applying the brakes. The motor can be rotated to the left to release the brake according to the demand of the algorithm stated. X. STEERING SYSTEM

Fig. 3 Priority level of sides

VIII. CALCULATIONS PERFORMED BY THE MICROCONTROLLERS FOR BRAKING AND STEERING 1. MBr Feeds the magnitude of stepper motor rotation for the braking system to the main microcontroller depending upon the velocity ranges of the car to maintain stability conditions. It also calculates the amount of time taken by the car to avoid collision depending upon the instantaneous velocity and the braking power of the car at that particular velocity. 2. MClt Feeds the magnitude of stepper motor rotation for the steering system to rotate left according to the instantaneous velocity of the car to maintain the stability of the car. It calculates the amount of time taken by the car to avoid collision depending upon the instantaneous velocity of the car and the length to be traveled on the left. 3. MCrt Feeds the magnitude of the stepper motor for the steering system to rotate right according to the instantaneous velocity of the car to maintain the stability of the car. It calculates the amount of time taken by the car to avoid collision depending upon the instantaneous velocity of the car and the length to be traveled on the right. IX. BRAKING SYSTEM

Fig. 5 Modified Steering System In a normal rack and pinion steering system the rotary action of the steering shaft is converted into linear motion. In the modified steering system, a stepper motor (within a gear system) is rotated by the central microcontroller to turn the steering shaft left or right artificially as per the algorithm. The rotation of the stepper motor depends upon the velocity of the car, taking stability conditions under consideration. XI. ACCELERATION SYSTEM The pedal of the accelerator can be pressed with the help of a small gear system and a stepper motor (Easily programable) In order to increase the speed of the car to any desired speed. XII. CONCLUSION The proposed system is a cheap/low cost system that can be implanted in manually driven cars for safety purpose without taking away the pleasure of driving unlike fully automated cars. REFERENCES
[1] [2] Ernest O. Doeblin, Measurement systems, applications and design, IV edition Pearson education. J.B. Peatman, Design with PIC microcontrollers, PH Engineering 1998. Crouse and Anglin, Automotive Mechanics, Mc Graw Hill 2002.

Fig. 4 Modified Braking System

[3]

Normal Braking System: In normal hydraulic braking systems, the brake pedal is pushed by the driver, in turn pulling the pistons (inside the master cylinder) to the right, away from the openings, thereby releasing hydraulic fluid into

663

You might also like