ultrasonic sensor based obstacle detection for automobiles · ultrasonic sensor based obstacle...
TRANSCRIPT
@IJRTER-2016, All Rights Reserved 268
ULTRASONIC SENSOR BASED OBSTACLE DETECTION FOR
AUTOMOBILES
Sundaram A1,Ashenafi Paulo’s Forsido2,Dawid Adane3 1,2,3 Wolkite University, Department of Electrical and computer Engineering, Wolkite, Ethiopia.
Abstract – A lot of research is being carried out with latest technology devices and equipment’s to
detect obstacle of various types in various surroundings and to avoid it at a suitable position. The
research was focused towards the obstacle avoidance by autonomous agents and was limited to
extruding obstacles. This narrowed down to make the detection mechanism very system-specific and not
much suitable for general purposes. The result of which did not have an adequate control over the
device. In this paper a user friendly device has been developed to detect a close range obstacle for
automobile. Due to increased number of automobiles it is necessary to implement safety equipment’s
before crash and thereby providing additional time to deploy safety technologies. The proposed system
uses ultrasonic sensors, P89V51RD2 microcontroller a driving circuit to caution the driver approaching
a pothole or any obstruction on the road. The scope of this paper is to build a simple, user friendly
system with latest technology components that are at a great extent helpful to detect the potholes, closed
objects and other obstacle and provide information or alert to the user requirement.
Index Terms- Ultrasonic sensors, automobile, microconroller, pothole.
I. INTRODUCTION
The road accidents are claimed for two main reasons. The first reason is driving on a dangerous road
conditions. To maintain the roads in good condition, suitable for a safe and comfortable journey is quite
challenging. The roads sometimes become hazardous for drivers and pedestrians to pass. This happen
because of harsh weather, unexpected traffic load and normal wear and tear, degradation of even well-
laid roads. The drivers, pedestrians and road maintenance staff are interested in fixing the challenges as
soon as possible using any system that can measure the underlying irregularities and can accurately depict
the result to the driver by informing the drivers of hazardous road conditions especially at night or when
lighting is poor would be a useful feature in these navigation systems. Intelligent monitoring system is the
one which has found its incredible application if this field of study that suits very well for the
identification of such conditions.
The second main reason is the Driver distraction. This is cited as the most contributing cause in half of all
the road accidents. In order to significantly reduce road accidents severity and occurrence, future safety
technologies must move beyond certain level. To create an electronic awareness of the traffic situation,
the vehicles will require new exterior pre-crash sensors. However, the advanced safety features enabled
by pre-crash sensing will provide a significant benefit in all cases of poor lighting, bad weather, or driver
distraction. Almost all driver assistance systems require some knowledge of the surroundings which is
not an easy task and that increases the complexity and performance of the system. The knowledge of the
surrounding needs to be more accurate and reliable, establishing an area around the vehicle that must be
continually monitored.
International Journal of Recent Trends in Engineering & Research (IJRTER) Volume 02, Issue 05; May - 2016 [ISSN: 2455-1457]
@IJRTER-2016, All Rights Reserved 269
Figure 1. Proposed Block Diagram
Many supervising techniques find its appropriate application, among those the most popular and efficient
method is to have long and short sensors installed in the vehicle. Long sensors include scanners, radar
and computer vision. The Short sensors include ultrasonic and capacitive sensors. These sensors also
have a wide variety of performance characteristics and their cost can also vary significantly but long-
range sensors are usually more expensive and complex than short-range sensors. For this reason, when
multiple sensors are included in a specific assistance system, the characteristics of each one should be
assessed in order to choose those that provide a satisfactory solution without increasing the price of the
system. To overcome these situations the proposed collision avoidance system is equipped with a laser
scanner at the front of the vehicle is described.
This system detects obstacles and automatically actions are commanded to stop or avoid a collision,
assessing if there are other vehicles in the opposite direction in the adjacent lane. High performance
characteristics are required for this sensor because reliable and accurate data are essential for performing
safe autonomous manoeuvres. However, this system has the limitation of not taking into account any
obstacles in the adjacent lane that are circulating in the same direction as the host vehicle.
II. CIRCUIT DIAGRAM
A. General Description
P89V51RB2/RC2/RD2 is 80C51 microcontrollers with 16/32/64 Kb flash and 1024 B of data RAM. A
key feature of the P89V51RB2/RC2/RD2 is its X2 mode option. The design engineer can choose to run
the application with the conventional 80C51 clock rate (12 clocks per machine cycle) or select the X2
mode (six clocks per machine cycle) to achieve twice the throughput at the same clock frequency.
Another way to benefit from this feature is to keep the same performance by reducing the clock
frequency by half, thus dramatically reducingthe EMI. The flash program memory supports both parallel
programming and in serial ISP. Parallel programming mode offers gang-programming at high speed,
reducing programming costs and time to market. ISP allows a device to be reprogrammed in the end
product under software control. The capability to field/update the application firmware makes a wide
range of applications possible. The P89V51RB2/RC2/RD2 is also capable of IAP, allowing the flash
program memory to be reconfigured even while the application is running.
Figure 2. Power Supply Circuit
International Journal of Recent Trends in Engineering & Research (IJRTER) Volume 02, Issue 05; May - 2016 [ISSN: 2455-1457]
@IJRTER-2016, All Rights Reserved 270
P89V51RD2 has 128-byte Random Access memory for data storage. Random access memory is non-
volatile memory. During execution for storing the data the RAM is used. RAM consists of the register
banks, stack for temporary data storage. It also consists of some special function register (SFR) which are
used for some specific purpose like timer, input output ports etc. Normally microcontroller has 256-byte
RAM in which 128 bytes is used for user space which is normally a Register bank and stack. But other
128-byte RAM which consists of SFRs. 128 byte = 27 bytes. In 27 bytes the last 7 bits can be changed, so
total locations are from 00H to 7F H. The procedure of calculating the memory address is called as
“memorymapping”. The data is saved on memory locations from 00H to 7FH.
B. LV-Ultrasonic-EZ1 Timing Description
250mS after power-up, the LV-Ultrasonic-EZ1 is ready to accept the RX command. If the RX pin is left
open or held high, the sensor will first run a calibration cycle (49mS) and then it will take a range of
reading (49mS). Therefore, the first reading will take ~100mS. Subsequent readings will take 49mS. The
LV-Ultrasonic-EZ1 checks the RX pin at the end of every cycle. Range data can be acquired once every
49mS. Each 49mS period starts by the RX being high or open, after which the LV- Ultrasonic sends
thirteen 42 KHz waves, after which the pulse width pin (PW) is set high. When a target is detected the
PW pin is pulled low. The PW pin is high for up to 37.5mS if no Target is detected. The remainder of the
49mS time (less 4.7mS) is spent adjusting the analog voltage to the correct level. When a long distance is
measured immediately after a short distance reading, the analog voltage may not reach the exact level
within one read cycle. During the last 4.7mS, the serial data is sent. The LV- Ultrasonic timing is
calibrated to one percent at five volts, and in use is better than two percent. In addition, operation at 3.3V
typically causes the objects range, to be reported, one to two percent further than actual.
Figure 3. Sensor Circuit
International Journal of Recent Trends in Engineering & Research (IJRTER) Volume 02, Issue 05; May - 2016 [ISSN: 2455-1457]
@IJRTER-2016, All Rights Reserved 271
Figure 4. Speed Control Circuit
The LV-Ultrasonic- EZ1 sensor provides very short to long-range detection. The LV-Ultrasonic-EZ1
detects objects from 0-inches to 254- inches (6.45-meters) and provides sonar range information from 6-
inches out to 254-inches with 1-inch resolution. The interface output formats included are pulse width
output, analog voltage output, and serial digital output.
Figure 5. Driver Circuit
III. L293DNE CIRCUIT
The L293DNE has 16 pins. Pin 16 is enable pin and should always be set to +5V. Pin 8 provides power
for both motors. The motor power source should have its positive node connected to pin 8, and ground
connected to the pins 4, 5, 12, and 13. Grounds for the logic control source should also be connected to
the same pins. The motor will be connected to pins 3 and 6. When power is supplied to pin 2, pin 3 will
become positive and pin 6 will become ground for the motor. When power is supplied to pin 7, pin 6 will
become positive and pin 3 will become ground.
Depending up on control pin (2 or 7) powered the polarity of the circuit change that’s connected to the
motor. If neither 2 nor 7 is powered, there will be no current going through pin 3 and 6 and the motor will
not be powered. It works on the concept of H-bridge. H-bridge is a circuit which allows the voltage to
flow in either direction. The direction of the voltage is used to change the rotation of the motor in
clockwise or anticlockwise direction. Hence H-bridge IC is ideal for driving a DC motor. In a single
l293d chip there are two h-Bridge circuit inside the IC which can rotate two dc motors independently. It
International Journal of Recent Trends in Engineering & Research (IJRTER) Volume 02, Issue 05; May - 2016 [ISSN: 2455-1457]
@IJRTER-2016, All Rights Reserved 272
occupies very little space, so it is very much used in robotic application for controlling DC motors. Given
below is the pin diagram of a L293D motor controller. There are two Enable pins on l293d. Pin 1 and pin
9 needs to be high to drive the motor. For driving the motor with left H-bridge pin 1 to be enabled high
and for right H-Bridge pin 9 to be enabled high. If anyone of the either pin1 or pin9 goes low, then the
motor in the corresponding section will suspend working.
Figure 6. L293DNE Circuit
A. Working of L293DNE Circuit
There are 4 input pins for l293d, pin 2, 7 on the left and pin 15, 10 on the right as shown on the pin
diagram. Left input pins will regulate the rotation of motor connected across left side and right input for
motor on the right hand side. The motors are rotated on the basis of the inputs provided across the input
pins as LOGIC 0 or LOGIC 1. In simple you need to provide Logic 0 or 1 across the input pins for
rotating the motor.
B. L293DNE Logic Table
Let’s consider a Motor connected on left side output pins (pin 3,6). For rotating the motor in clockwise
direction the input pins are provided with Logic 1 and Logic 0.
Pin 2 = Logic 1 and Pin 7 = Logic 0 | Clockwise Direction
Pin 2 = Logic 0 and Pin 7 = Logic 1 | Anticlockwise Direction
Pin 2 = Logic 0 and Pin 7 = Logic 0 | Idle [No rotation] [Hi-Impedance state]
Pin 2 = Logic 1 and Pin 7 = Logic 1 | Idle [No rotation]
In a very similar way the motor can also operate across input pin 15, 10 for motor on the right hand side.
International Journal of Recent Trends in Engineering & Research (IJRTER) Volume 02, Issue 05; May - 2016 [ISSN: 2455-1457]
@IJRTER-2016, All Rights Reserved 273
Figure 7. Flowchart for Implemetation Process
IV. ULTRASONIC SENSOR CONSTRUCTION
The ultrasonic transducer pulse sends sound waves from the face of the sensor. The transducer also
receives echoes of those waves as reflected off an object. When the sensor receives the reflected echo, the
comparator calculates the distance by comparing the emit-to-receive timeframes to the speed of sound.
There are four basic components of an ultrasonic proximity sensor:
Transducer/receiver
Comparator
Detector circuit
Solid-state output
Figure 8. Ultrasonic Proximity Sensor Components
The solid state output generates an electrical signal to be interpreted by an interface device like a
programmable logic controller (PLC). The signal from digital sensors indicates the presence or absence
of an object in the sensing field. The signal from analog sensors indicates the distance to an object in the
sensing field. In general, industrial sensors operate between 25 kHz and 500 kHz. Medical ultrasound
units operate at 5 MHz or more. Sensing frequency is inversely proportional to sensing distance. While a
50 kHz sound wave may work to 10 m (33 ft) or more, a 200 kHz sound wave is limited to sensing ranges
of about 1 m (3 ft).
A. Detecting Obstacle
HC SR-04 Ultrasonic detector module has transmitter and receiver section. The sensor is interfaced with
the micro controller with one output as the trigger and the other input as echo. After detecting the input
echo signal the Microcontrollers triggers the sensor at every one second interval. If the echo signal with a
high width is detected in the predefined range then the obstacle is considered and at the same time the
motor is commanded to stop. The obstacle is considered to be removed then the motor starts as per the IR
sensors inputs.
International Journal of Recent Trends in Engineering & Research (IJRTER) Volume 02, Issue 05; May - 2016 [ISSN: 2455-1457]
@IJRTER-2016, All Rights Reserved 274
Figure 9. Detecting Obstacle
At any instant when an obstacle is found in the range of ultrasonic sensors then the firmware will glow
the LED. The Ultrasonic Detector HC-SR04 circuit is a circuit which gives a low output in the absence of
Ultrasonic signal when some obstacle come in path Ultrasonic signal is reflected back and fall onto the
Ultrasonic detector. In such a way that obstacle is detected. Ultrasonic ranging module HC - SR04
provides 2cm - 400cm non-contact.
Test distance = (high level time*velocity of sound (340M/S) / 2
V. RESULTS AND CONCLUSION
The use of ultrasonic sensors improve the safety parameters which include sensing of obstacle and there
by controlling the motor speed. An experimental set arrangement is made to measure and monitor the
road condition from a distance of about 3m from the obstacle. The driver is cautioned using a suitable
alarm system at the detection of the obstacle. A simple and robust alternative arrangement is tested and
found satisfied to be implemented along with the latest technology equipment’s to the modern
transportation system.
An experimental setup arrangement is prepared and tested. It proved to be useful for detecting the
obstacle using ultrasonic sensors. This system when installed to vehicles on movement will provide an
excellent result by receiving signals from the sensors. These signals will in turn act to reduce the speed of
the motor there by gradually reducing the speed of the moving vehicle. In near future the method of using
the ultrasonic sensors for the moving vehicle to detect the obstacle is to be efficient method to save
human life’s.
REFERENCES 1. S.P. Bhumkar, V.V. Deotare, R.V.Babar “Accident Avoidance and Detection On Highways” International Journal of
Engineering Trends and Technology- Vol-3, Issue-2, pp.247-252,2012.
2. Ming-Yi Dai, Hsin-TsungHo, Chih-Ching Hsiao, “A Safety System for Intelligent Portable Hybrid Electric Bicycle”,
IEEE 2010 InternationalConference on System Science and Engineering, pp.379-384,june 2010.
3. William J. Fleming “Overview of Automotive Sensors” IEEE 2001 sensors journal, vo l. 1, no. 4, pp.296-308, December
2001.
4. AlessioCarullo and Marco Parvis, “An Ultrasonic Sensor for Distance Measurement in Automotive Applications” IEEE
2001 sensors journal, vol. 1, no. 2, pp.143-147,Auust 2001
5. JoonAhn, Yi Wang, Bo Yu, Fan Bai, BhaskarKrishnamachari“RISA: Distributed Road Information Sharing
Architecture,IEEE 2012 Proceedings, INFOCOM , pp.1427-1502 , August 2012.
6. Raymond Tatchikou ,SubirBiswas, Francois Dion, “Cooperative Vehicle Collision Avoidance using Inter-vehicle Packet
Forwarding”, IEEE 2005 Globecom ,pp.2762-2766 , January 2005
7. Jakob Eriksson, Lewis Girod, Bret Hull,Ryan Newton, Samuel Madden, HariBalakrishnan, “The Pothole Patrol: Using a
Mobile Sensor Network for Road Surface Monitoring”, IEEE journals, June 2008.
8. ArtisMednis, Girts Strazdins, ReinholdsZviedris, GeorgijsKanonirs, Leo Selavo,“Real Time Pothole Detection using
Android Smartphones with Accelerometers” IEEE journals ,July 2011.