Car Safety System Using Fuzzy Logic

: Nowadays everybody can recognize the huge increasing of car numbers on roads. Day after day, this increasing may be an indicator for changing and development. This put a lot of challenges on people and governments. One of these challenges is car accidents and there bad effects. The main aim of our proposal is to help our society to decrease car accidents by designing a system which makes the drivers pay more attention and worn them before an accident takes place. The designed system consists basically of three general circuits, which complete each others. The first circuit consists of microcontroller, power source, speaker and switches needed. The second circuit, the ultrasonic transmitter and receiver circuit which measures the distance between the car and any thing in front of it. Finally, the third circuit, the opto-coupler circuit, its function to determine the current speed of the car. The characteristics of this system include flexibility and effectiveness of implementation. It’s cheap and it has low power consumption with a small size. The system records all the changes surrounded the driver environment, then process them using a fuzzy microcontroller which worn the driver of expected dangers through an output devices which lead the driver to take all necessary measures to avoid the accident.


INTRODUCTION
Fuzzy logic is a problem-solving control system methodology that lends itself to implementation in systems ranging from simple, small, embedded microcontrollers to large, networked, multi-channel PC or workstation-based data acquisition and control systems [1][2][3] . It can be implemented in hardware, software, or a combination of both. Fuzzy logic provides a simple way to arrive at a definite conclusion based upon vague, ambiguous, imprecise, noisy, or missing input information. Fuzzy logic's approach to control problems mimics how a person would make decisions, only much faster.

MATERIALS AND METHODS
Fuzzy Implementation: Any designed system need a number of devices which enable that system to work in the planed way doing its certain job.
We want to control the degree of danger showed by LCD and the speaker depending on the speed and distance signals that came from the sensors and processed by the microcontroller. As shown in Fig. 1.

Fuzzy Implementation
Steps: Choose suitable scale universe of discourse of -L (speed, distance) L, where L and -L represent the upper and lower limits of Universe Of Discourse (UOD) of speed and distance [9] .

Example:
Speed range (0-150) Km h −1 UOD for speed Distance range (0-60) m UOD for distance Danger range (0-5) Volts UOD for danger Divide the UOD into equally spaced intervals which are called the non-fuzzy set intervals for speed, distance and danger. Example:

RESULTS AND DISCUSSION
The fuzzy set is defined now for our example let us take the following fuzzy set: HS High speed BD Big distance HV High danger MS Mid speed MD Mid distance MV Mid danger LS Low speed LD Low distance LV Low danger The decision rules are developed linguistically to do a particular control task and are implementing as a set of the form IF HS and BD then HD Table 1 and 2.
The following steps can be used to calculate the scalar control action (the degree of danger): • For speed and distance define the fuzzy subsets with their discrete membership function • Find the degree of freedom (D.O.F) from the fulfillment of the IF port for all rule by anding the membership of the both speed and distance. As shown in Table 3 Example where, weight represents elements of the net control action vector and I represents the value of the interval n: ((0.825*0.5) + (2.475*1) + (4.15*0.5)) Danger degree = (0.5+1+0.5) Danger degree = 2.478 volt General description of the proposed system: As known the digital systems are easy to treat with, so the first thing in the project is to convert all variations in the car environment into digital signals with out any changes.
The ultrasonic transmitter circuit [4] sends its vibrations in front of car, when these vibrations reflected the ultrasonic receiver circuit will take these vibrations and amplify it. And send it to the microcontroller which can compute the distance between the car and any thing in front it (figure 2).
At the same time the IR circuit [7] senses the round of the wheel and sends it signal to the microcontroller which can compute the car speed. After that the microcontroller sends the output signal to the speaker and The LCD. In addition of these output devices the microcontroller sends output data to a personal computer using the serial port [5,6] .

CONCLUSION
The main results and conclusions that can be drawn from this work are summarized as follows: • The system provides a solution to decrease the car accidents by giving the drivers more time to avoid the accidents • Adjusting the sensitivity and the accuracy for the measuring circuits is important to ensure that the measured parameters represent its actual values • The use of microcontroller makes it possible to implement the system with less hardware components • The microcontroller [8] , PIC16F877 was chosen among all the other microcontrollers because of its low-cost and small size • Architectural and circuit features within the devices minimize software and system overhead while simplifying programming procedures