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

Abstract—The 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. Keywords—Ultrasound transducers, stepper motor, tachometer, rack and pinion steering system. I. INTRODUCTION N today’s 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.

I

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

2 The flow of program • • • • • • 1. if a need III. Turn left and Turn right) will be written as subroutines that will be called by different segments of the main program. III. Brake. This is the layout of the program (Algorithm) that will be fed to the central Microcontroller. The frequency of the collision time calculation will be in order of kilohertz for close proximity distances. The AND gates are disabled by the respective peripheral microcontrollers as soon as the voltage signal is received by them. STEP 1 CHECK REAR CHECK FRONT BRAKE STEP 2 CHECK RIGHT ACCELERATE FRONT TURN LEFT STEP 3 CHECK LEFT TURN RIGHT Fig. OBSERVATIONS The collision times are updated after a finite instant of time. depending on the required action to be taken. Step3) form the main body of the program while the blocks of code on the right hand side (namely Check front. THE OUTLINE OF THE PROGRAM FED TO THE CENTRAL MICROCONTROLLER 661 . the Check front routine might also call the brake routine.World Academy of Science. The four collision times thus obtained are multiplexed with the help of an 8:1 multiplexer with three select lines. 3. The instantaneous relative distance at that moment is divided by the instantaneous relative velocity which gives the collision time. The blocks of code on the left hand side (namely Step1. Accelerate Front. 5. Step 3 checks the left side of the car and calls the Check SOURCES ERROR: routine ifOF required. accordingly depending on the requirement. Engineering and Technology 6 2007 ƒ ƒ ƒ ƒ ƒ ƒ ƒ ƒ ƒ ƒ ƒ ƒ The voltage pulse passes through the AND gate and stops the clock. This gives the instantaneous relative velocity. The difference of the two relative distances calculated above is found and is then divided by the time span for their change. velocity and the acceleration needs one. two and four voltage pulses respectively to the transmitter. 2. This time depends upon the obstacle relative distance. The inherent voltage-sound conversion times for the IV. 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 microcontrollers MCbr. 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. The first few codes of Step1 calls Check front subroutine to check the front side of the car (i.e. 4. temperature and humidity. The multiplexer is connected to the main microcontroller which selects the appropriate time of collision according to the need of the algorithm. Lower obstacle distance will increase the frequency of collision time calculation and thus making the system more accurate. whenever necessary. SOURCES OF ERRORS: arises 6. Calculation of instantaneous relative distance. MClt. 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. to check if the front side is safe). The main microcontroller is interfaced to the stepper motors which have been used for the modification of the braking. Step 2. The AND gate is enabled again The transmitters are fired again and the instantaneous relative distance is found out using the above procedure. Using the time span between the transmitter and the receiver signals the instantaneous relative distance is calculated. steering and the acceleration systems of the car. front and/or TurnV. 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. acceleration and steering systems) and/or the Check front routine. 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. right • • The speed of the ultrasound in air varies with its velocity.

World Academy of Science. AND gates and multiplexers with very low propagation times. 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 can’t 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. only the appropriate side (i. which ever comes first f) Return 4. Calculation time of the microcontrollers. 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. Engineering and Technology 6 2007 • • ultrasound crystals. 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). 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. 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. Scaling of the voltage-sound conversion times. which ever fits. 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. go to step 3 e) Else compare the time of collision with Tleft f) If time of collision is greater than T left. the Left side) and the appropriate microcontroller is chosen Go to step 1 VII. 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. RIGHT TURN: a) Similar logic as turn left but uses the appropriate microcontrollers and subroutines 5. Propagation times of AND gates and the multiplexer. VI. SOLUTION • • • Use of fast microcontrollers. 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. Return d) Else Beep once and Compare Tfront with Tb. If Tfront>Tb. beep and go to step 1(a) h) Else Call Left turn routine or right turn routine or accelerate routine. CHECK FRONT: a) Take the Time of collision Tfront for the front side from the Microcontroller Mf 662 . call check front routine (we can’t 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. ALGORITHMS FOR THE SUBROUTINES 1. which ever comes first e) Return 3.e. Go to Step b e) Else Call brake subroutine f) Return 2. go to Step 2 f) Else Compare collision time with Ts g) If collision time is Greater than or equal to Ts.

2. Fig. 3. taking stability conditions under consideration. a crankshaft in turn is rotated to the right. 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. 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. 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. 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. BRAKING SYSTEM Fig. 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. thereby artificially applying the brakes. away from the openings. 4 Modified Braking System [3] Normal Braking System: In normal hydraulic braking systems. “Design with PIC microcontrollers”. a stepper motor is rotated to the right by the central microcontroller. XII. 3 Priority level of sides VIII. IX. Peatman. REFERENCES [1] [2] Ernest O. the brake pedal is pushed by the driver. 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.World Academy of Science. Mc Graw Hill 2002. in turn pulling the pistons (inside the master cylinder) to the right. CALCULATIONS PERFORMED BY THE MICROCONTROLLERS FOR BRAKING AND STEERING 1. X. STEERING SYSTEM Fig. Crouse and Anglin. thereby releasing hydraulic fluid into 663 . Doeblin.B. 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. applications and design. XI. With the help of a chain/belt. 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. PH Engineering 1998. In the modified steering system. J. 5 Modified Steering System In a normal rack and pinion steering system the rotary action of the steering shaft is converted into linear motion. The motor can be rotated to the left to release the brake according to the demand of the algorithm stated. pushing the pistons to the right and away from the openings. 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. The rotation of the stepper motor depends upon the velocity of the car. “Automotive Mechanics”.” IV edition Pearson education. 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. “Measurement systems.