Microcontrollers Based Rear End Anti Col
Microcontrollers Based Rear End Anti Col
Microcontrollers Based Rear End Anti Col
Abstract
Now a day’s vehicle accident is becoming critical issue allover the world and in Ethiopia in particular that demands
engineer’s endeavor to find ways to minimize the incidence. The application of electronic systems embedded in
automobile is expected to contribute a lot on the race to minimize vehicle accident disaster. Thus, the research focused on
developing a model of rear end anti-collision warning system that will detect the distance between two vehicles moving
on the same lane in the same direction and alert the driver whenever she or he is in danger range using microcontroller
(PIC).
1. Introduction
Ethiopia, in addition to HIV AIDS, is suffering from car accidents. A large number of people have been killed in
motor vehicle accidents of various kinds. In this regard, the Ethiopian Federal Police Annual Statistical Report on road
accidents shows that in Ethiopia, during the years 2002/03-2006/07, the number of people who died of vehicle accidents
each year is 2,226 on average. The same report indicated that the yearly average number of serious and light injuries
during the aforementioned period is 3,855 and 4,826 respectively (Federal Police of Ethiopia annual statistics (2002/03-
2006/07)).
The worsening situations in the rate of car crash calls for hand to hand efforts of all concerned bodies and the
society in general. It is a well known fact that the socio economic, physical and psychological crisis caused by vehicle
accidents need to be dealt with seriously. Various research and studies should be conducted to overcome these problems
(Federal Police of Ethiopia annual statistics (2002/03-2006/07), WHO (2004). World report on road traffic injury
prevention, Geneva: World health organization, Advances in Transportation Studies an international Journal Section A
15 (2008)).
This research will be dedicated to attempt alternative solution for this known problem by developing low cost
domestic anti-collision warning system model that would be mounted on the existing car models and alert the driver in
danger zone.
Therefore, rather than putting aside inbuilt active safety system development to the car manufacturers, the user shall
find ways to solve the problem by developing domestic active safety system model that would be developed later to be
fitted to road vehicle despite their model and year of make. This initiated the writer of this manuscript to contribute his
share by constructing a model that will enable to conduct further research for finding alternative solution to minimize this
life threatening menace of vehicle accident in Ethiopia.
2. Vehicle Accidents
A vehicle or car accident is a road traffic incident which usually involves one road vehicle being in collision with,
either another vehicle, or another road user, or a stationary road side object, and this may result in death, injury and/or
property damage. According to WHO, 2004 road incidents result in death of an estimated 1.2 million people worldwide
each year, and injure about forty times this number (Federal Police of Ethiopia annual statistics (2002/03-2006/07)).
Various statistical data showed that vehicle to vehicle collisions have become one of the most serious problems
nowadays (“Statistics of motor vehicle collisions and types of collisions,” Road safety Assoc. Korea, 1997, Tech. Rep.).
In particular rear end collision accidents are said to occur more frequently, and thus, establishment of some means and
alternative solution for rear end collision avoidance is considered as a vital issue for reduction of vehicle accident.
According to the National Highway Traffic Safety Administration (NHTSA), the leading cause of death, about the
six most common are listed. If we look at six of them the greatest threats to the victims are the drivers themselves (British
medical journal April 10, 2004; 328:851 (published by WHO and World Bank)). These are: Distracted Drivers, Driver
Fatigue, Drunk Driving, Speeding, Aggressive Driving, Weather.
Head-on collisions,
Vehicle collisions can be classified by mechanism. Common mechanisms include:
Run-off-road collisions,
Rear-end collisions,
14
G.J. E.D.T.,Vol. 2(6):14-21 (November-December, 2013) ISSN: 2319 – 7293
Side collision, and
Rollovers are the most common once.
3. Microcontrollers
Microcontrollers are a type of microcomputers that consists of a single silicon chip and they are used in many house
hold goods and cars. Therefore a microcontroller is a single chip computer. Micro suggests that the device is small, and
controller suggests that the device can be used in control applications. Another term used for microcontroller is
embedded controller, since most of the microcontrollers are built in to or embedded in the devices they control. The term
microcomputer is used to describe a system that includes a minimum of microprocessor, program memory, data memory
and input-output (I/O). Some microcomputer systems include additional components such as timers, counters, analogue
to digital converters, and so on (Automotive engineering journal, March 1997, pp.86, Thomas Braunl, (2008).
Embedded Robotics, third edition, http://www.st.com, MICROCONTROLLERS MADE EASY).
Even though there are several types of microcontrollers, the most commonly used in embedded systems are the Basic
stamp and the PIC Basic microcontrollers. The BASIC Stamp is a microcontroller developed by Parallax, Inc.
(http://www.parallaxinc.com/) which is easily programmed using a form of the BASIC programming language. It is
called a “Stamp” because it is close to the size of an average postage stamp. The basic stamp is expensive and slower
compared to PIC Basic microcontrollers. Due to this the PIC Basic microcontroller is chosen for this project to develop a
low cost model. The comparison (table 1) is briefly shown as follows (http://www.pond.ie/TechInfo/Stamp and
http://www.lvr.com/files/mibch1.pdf).
Table 1 Comparison of Basic stamp and PIC microcontroller.
Basic stamp PIC microcontroller
Expensive Cheaper
Slower Faster
Easier to learn More difficult to learn to use
Free software for programming (PBASIC) can be Requires a compiler to create software
Downloaded from parallax
15
G.J. E.D.T.,Vol. 2(6):14-21 (November-December, 2013) ISSN: 2319 – 7293
To measure the distance of an object ahead of the vehicle, an infrared sensor (GP2D12) which require a 5v input is
used. This sensor can detect an object at a distance of 10cm to 80cm. Within this range of distance it will detect an object
and output an average analog voltage of 0.4v to 2.6v depending on the object distance from the sensor. Therefore, if
someone gets the optimized stopping distance in relation to the vehicle speed and other variables affecting the stopping
distance, it is possible to program a microcontroller so that it will out put a warning signal to inform the driver that an
object is in front.
This project is designed assuming the driver is aware of everything in front if the brake is applied or steering wheel
is being steered. The system is informed about these two things by the help of brake switch and steering position sensor.
As a result, the system will not warn the driver if either of the two is detected. i.e. if brake is applied or steering is being
steered to left or right. Taking all this things in to consideration, the system will warn the driver only when the vehicle is
not changing a direction, brake is not applied and object is in the target. Thus, this system will help the driver informing
to take care of an object in front of the vehicle either during night or day driving. Generally the system is demonstrated in
a simplified concept block diagram below so that one can easily understand (figure 1).
5.2 Rear end Anti-collision Warning Design Using PIC Microcontroller (PIC16F876A)
The rear end collision warning system designed in this project consists of hard ware and software part. The hard
ware part consists of the 10x7.5 mm circuit board, microcontroller, the distance sensor, potentiometers, push buttons,
connecting wires, various electronic components used for power supply and timer circuits. Some of the components are
shown by the help of block diagram and the picture below taken while constructing experiment boards (figure 2).
16
G.J. E.D.T.,Vol. 2(6):14-21 (November-December, 2013) ISSN: 2319 – 7293
5 2V
calculated as
17
G.J. E.D.T.,Vol. 2(6):14-21 (November-December, 2013) ISSN: 2319 – 7293
5.3 Software Algorism for Rear end Anti-collision Warning Using PIC 16F876A
The software algorithm is written using assembly language and it is shown using the flow chart and a sample codes
taken from the complete program of the project. The flow chart of the complete program is as below (Figure 4).
18
G.J. E.D.T.,Vol. 2(6):14-21 (November-December, 2013) ISSN: 2319 – 7293
The power supply, timer, the microcontroller and hard wires are all in a single board. The distance sensor is
mounted on the front bumper of the car so that it can detect an object in front of the car. The car model is driven by a dc
motor using other drive circuits which is not part of this project. The potentiometer used to simulate vehicle speed is
mounted on the car so that it can be varied manually. There is also a buzzer mounted on the dash board to alert the driver
when necessary.
6.1. Experiments
To conduct different experiments, all the necessary materials are collected and an experiment board is made. This
experiment board consists of the microcontroller and microcontroller support circuits such as power supply, clock signal
circuit and other related circuits. The distance sensor and the potentiometers used to simulate vehicle speed are mounted
on a separate board. On the experiment board made for trial, several experiments have been made.
19
G.J. E.D.T.,Vol. 2(6):14-21 (November-December, 2013) ISSN: 2319 – 7293
Though the PIC16F876A consists of 10 bit analog channels, the higher address register of these analog channels are
used which can hold an eight bit value. So we can consider the analog reading as 8 bit number. Therefore the
microcontroller can read an analog voltage of 0V to 5V and convert it in to an 8 bit number where 0V is 0 and 5V is 255.
That is a reading of 51 per volt or a resolution of 1/51V. In another word 1 bit is a voltage reading of 19.6mV. Based on
this resolution, five speeds are represented by an analog reading of 51, 77, 102,128, and 153 which corresponds to a
voltage reading of 1V, 1.5V, 2V, 2.5V, and 3V respectively. Similarly five respective distances are sampled as 26, 51,
77, 102, and 128 which correspond to a voltage reading of 0.5V, 1V, 1.5V, 2V, and 2.5V respectively. Since the vehicle
speed is considered from 0KM/hr to 180km/hr and distance from 10cm to 80cm. Based on these resolutions, the program
has been written and loaded to the microcontroller and.
Table 2 Shows sampled vehicle speeds with a corresponding warning distance.
No. Speed Warning distance Remark
Km/hr
1 <=36km/hr 10cm
2 <=54km/hr 30cm
3 <=72km/hr 47cm
4 <=90km/hr 63cm
5 <=108km/hr 80cm
6 >108 Top speed warning LED will lit
On actual vehicle the warning distance has to be determined based up on optimized stopping distance of the vehicle
to be equipped with rear end ant-collision warning system. This needs another research by itself. Then the programmer
has to consider this optimized stopping distance when writing the code for the software development.
7. Discussions of Results
7.1 Object Distance versus Analog Voltage Output
Various objects are selected for experiment purpose just to see the distance sensor analog voltage output in relation
to the respective object distance. The objects are selected taking into consideration the materials from which most vehicle
bodies are made and objects that possibly observed on the road. Therefore, carton, glass, sheet metal, black painted
carton and human body were selected.
When the sensor output is recorded for each of the objects, slight differences were observed. Since the objects are
hold manually at different distances while conducting the experiment, my own error in holding the object exactly
perpendicular to the sensor may add to the differences observed. More or less, the output is nearly similar, so it is
possible to have a relation between an object distance and the analog voltage output of the sensor.
The other scientific reason for the variation of the sensor voltage output for different object yields due to the difference in
reflexive property of the materials. The glass material is superior to all the materials considered in this experiment. Since
its reflexivity is high, it resulted in higher voltage output of the sensor.
References
Advances in Transportation Studies an international Journal Section A 15 (2008).
Automotive engineering journal, March 1997, pp.86.
British medical journal April 10, 2004; 328:851 (published by WHO and World Bank).
Dogan Ibrahim, (2006). PIC BASIC Projects 30 Projects Using PIC BASIC and PIC BASIC PRO. Linacre House, Jordan Hill
Federal Police of Ethiopia annual statistics (2002/03-2006/07).
George Beggs et al, (1992). Object detection Method and Apparatus Employing Electro-optics U.S.PATENT NO. 5,122,796.
L.H. Nordlund, (1961). Close-Following Vehicle Warning System, U.S.PATENT NO. 2,974,304.
Masaaki Katsumata, (1978). Radar-operated Collision Avoidance System for Roadway Vehicles Using Stored Information for
Determination of Valid Objects, U.S.PATENT NO. 4,072,945. “Statistics of motor vehicle collisions and types of collisions,” Road
safety Assoc. Korea, 1997, Tech. Rep. “Traffic Safety Facts 2000”, National Highway Traffic Safety Administration Report.
20
G.J. E.D.T.,Vol. 2(6):14-21 (November-December, 2013) ISSN: 2319 – 7293
21