PROJECT1 (1)
PROJECT1 (1)
A PROJECT REPORT
Submitted by
of
BACHELOR OF ENGINEERING
in
BONAFIDE CERTIFICATE
SIGNATURE SIGNATURE
i
CERTIFICATE OF EVALUATION
SEMESTER : VI
This report of project work submitted by the above student in partial fulfilment
for the award of Bachelor of Engineering in Electronics and Communication
Engineering degree in Anna University was evaluated and confirmed to be reports
of the work done by the above student.
ii
ACKNOWLEDGEMENT
The contentment and elation that accompany the successful completion of any
work would be incomplete without mentioning the people who made it possible.
Words are inadequate in offering our sincere thanks and gratitude to our respected
Chairman Dr. B. Babu Manoharan, M.A., M.B.A., Ph.D. for his outstanding
leadership, unwavering dedication, and invaluable contributions to our
organization. His vision, guidance, and commitment have been instrumental in
shaping our success and driving us towards excellence.
We also thank our beloved principal Dr. Vaddi Seshagiri Rao, M.E, MBA,
Ph.D., for having encouraged us to do our under graduation in Electronics and
Communication Engineering in this esteemed institution.
We also express our sincere thanks and most heartfelt sense of gratitude to our
eminent Head of the Department, Dr. S. Rajesh Kannan, M.E., Ph.D., for
having extended his helping hand at all times.
We humbly express our profound gratitude for the invaluable guidance and expert
suggestions generously shared by our supervisor, Dr. , M.E.,
Ph.D.
We thank all staff members of our department, our family members and friends
who have been the greatest source of support to us.
iii
ABSTRACT
As the landscape of transportation evolves, the integration of advanced
technologies becomes increasingly pivotal. This paper explores the future of
driving with a focus on obstacle detection using ultrasonic sensors. With the
proliferation of autonomous vehicles and the imperative of enhancing road safety,
the implementation of ultrasonic sensors presents a promising avenue. The
methodology entails the deployment of ultrasonic sensors strategically positioned
around the vehicle to detect obstacles within its vicinity. Through the emission
and reception of ultrasonic waves, these sensors accurately gauge distances,
enabling real-time analysis of the vehicle’s surroundings. Leveraging
sophisticated algorithms, the system interprets sensor data to identify potential
obstacles, ranging from stationary objects to dynamic elements such as
pedestrians and other vehicles. Key considerations encompass sensor placement
optimization, signal processing algorithms, and integration with existing
vehicular systems. Addressing these facets ensures robust obstacle detection
capabilities across diverse scenarios, including urban environments, highways,
and adverse weather conditions. This paper delves into the implications of
ultrasonic sensor-based obstacle detection on driving dynamics and human-
machine interactions. By providing timely alerts and facilitating autonomous, this
technology enhances driver safety and augments the driving experience.
Moreover, seamless integration with vehicle control systems fosters a symbiotic
relationship between human operators and automated functionalities. The
efficacy of ultrasonic sensor-based obstacle detection is evaluated through
simulations and real-word testing, validating is reliability and efficacy. Moreover,
discussions on scalability, cost-effectiveness, and regulatory considerations
underscore the feasibility and viability of widespread adoption.
iv
TABLE OF CONTENTS
2. LITERATURE REIVIEW
2.1 Sensors technologies in Autonomous 2
2.2 Principles of Ultrasonic Sensor 2
2.3 advantages of Ultrasonic Sensor 3
2.4 Challenges and Limitations 3
2.5 Comparative analysis 4
2.6 Integrate with AI and Machine Learning 4-5
2.7 Users Acceptance and trust 5
2.8 Ethical Considerations 6
2.9 Collaborative Research Initiatives 7
3. METHODOLOGY
3.1Tools 9
3.2 Pin Diagram and Circuit Connection 17
3.3 Source Code 18-23
v
4. RESULTS AND DISCUSSION
4.1Better line tracking mode 24
4.2Custom Mode 24
4.3Accuracy and precision 24
4.4 Performance in Real-world Conditions 25
4.5Impact of Environmental factors 25
4.6Integration with Autonomous driving Systems 25
4.7Future Directions and considerations 25
5. CONCLUSION 26
5.1Project Outcomes 27
5.2Practical Applications 29
REFERENCES 30
vi
LIST OF TABLES
CHAPTER TITLE PAGE NO
4. Table 1 Performance in Real-world Conditions 25
vii
LIST OF FIGURES
NO TITLE PAGE NO
1. Fig-01 Chassis (including motors & wheels) 9
Fig-02 Arduino Uno 10
Fig-03 Motor driver L293D 11
Fig-04 Ultrasonic Sensor 12
Fig-05 Jumper Wires 13
Fig-06 Battery Holder X4 14
Fig-07 Li-Ion Battery X4 14
Fig-08 Server Motor 15
Fig-09 Bluetooth Module 16
Fig-10 Switch 16
Fig-11 Pin Diagram and Circuit Connection 17
viii
LIST OF ABBREVIATIONS
ABBREVIATION DEFINITION
RC Radio/Remote Control
LCD Liquid-crystal display
LI-ON Battery Lithium-Ion Battery
NASA National Aeronautics and Space administration
USB Universal Serial Bus
IOT Internet Of Things
GPS Global Positioning System
AR Augmented Reality
VR Virtual Reality
AI Artificial Intelligence
AV Autonomous Vehicles
CAN Controller Area Network
OBD On-board diagnostics
HUD Head-Up Display
US Ultrasonic Sensor
AUB Arduino Uno Board
LIDAR Light Detection and Ranging
RADAR Radio Detection and Ranging
EV Electric Vehicle
OTA Over-The-Air updates
V2X Vehicle-to-Everything
MCU Microcontroller Unit
RPM Revolutions Per Minute
ABS Anti-lock Braking System
ix
CHAPTER 1
INTRODUCTION
1.1 Background
The future of driving with obstacle detection using ultrasonic sensors sounds
promising. These sensors can help vehicles navigate safely through various
environments by detecting objects and obstacles in their path, potentially
reducing accidents and improving overall road safety.
In the past, the rate of accidents on roads has increased and it is still rising.
The major cause of these accident cases is lack of focus while driving for
example vehicle coming in opposite direction, a domestic animal crossing the
road or driving the car while drunk. To counter accident is a need of system
which can detect obstacles and move the car in a pre-computed path.
1
CHAPTER 2 LITERATURE REVIEW
2
2.3 Advantages of Ultrasonic Sensors
Ultrasonic sensors offer several advantages that make them a preferred choice for
obstacle detection and proximity sensing applications. One key advantage is their
reliability across different environment conditions. Unlike optical sensors, which
may be affected by factors like lighting conditions or dust, ultrasonic sensors
operate effectively in various environments, including low light, smoke, fog, and
dust, making them suitable for use in both indoor and outdoor settings.
Additionally, ultrasonic sensors have a wide detection range, typically spanning
from a few centimeters to several metres, depending on the sensor’s
specifications. This versatility allows them to detect objects at both close range,
facilitating tasks such as parking assistance, and at longer distances, enabling
collision avoidance in high-speed driving scenarios. Moreover, ultrasonic sensors
are non -invasive and emit harmless sound waves, making them safe for use in
proximity to humans and sensitive equipment.
3
2.5 Comparative Analysis
A comparative analysis of obstacle detection using ultrasonic sensors reveals
both strengths and limitations compared to alternative sensor technologies. While
ultrasonic sensors excel in detecting objects at close range and are unaffected by
factors such as lighting conditions, they do have some drawbacks when compared
to other sensors like LiDAR and radar. One significant limitation is their
relatively shorter range, typically limited to a few meters, which may constrain
their effectiveness in scenarios requiring long-range detection, such as highway
driving at high speeds. Additionally, ultrasonic sensors may struggle to accurately
detect certain materials or shapes, leading to potential blind spots or false
readings. In contrast, LiDAR offers superior range and resolution, making it well-
suited for precise mapping of the environment, but it can be costly and sensitive
to weather conditions. Radar, on the other hand, provides long-range detection
capabilities and performs well in adverse weather, but it may struggle with
detecting small objects or accurately identifying their shapes. Despite these
differences, each sensor technology has its unique advantages and limitations,
and the choice of sensor depends on factors such as the specific application, cost
considerations, and environmental conditions. Integrating multiple sensor
modalities, including ultrasonic sensors, can enhance the robustness and
reliability of obstacle detection systems in autonomous vehicles, providing
redundancy and improving overall performance in diverse driving scenarios.
User acceptance and trust play crucial roles in the successful integration of
obstacle detection systems using ultrasonic sensors in autonomous vehicles.
Studies have shown that user acceptance of such technology is influenced by
factors such as perceived reliability, safety, and ease of use. Ultrasonic sensors,
with their proven track record in various applications and environments,
contribute positively to user acceptance due to their reliability and effectiveness
in detecting obstacles. Moreover, the non-invasive nature of ultrasonic sensors
and their ability to operate in diverse environmental conditions enhance user trust,
as they perceive the technology as safe and robust.
5
2.8 Ethical Considerations
Ethical considerations surrounding obstacle detection using ultrasonic sensors
encompass various aspects of safety, privacy, and societal impact. One primary
ethical concern is ensuring the reliability and accuracy of ultrasonic sensors to
prevent accidents or collisions. Autonomous vehicles rely on these sensors to
detect obstacles and make critical decisions in real-time, raising questions about
the consequences of sensor malfunctions or false readings. Ensuring rigorous
testing, validation, and redundant systems becomes imperative to mitigate such
risks and uphold public safety. Privacy is another ethical consideration, especially
in urban environments where autonomous vehicles equipped with ultrasonic
sensors operate. These sensors emit sound waves that bounce off surrounding
objects, potentially capturing information about nearby individuals or structures.
Safeguarding personal privacy through anonymization techniques or data
encryption becomes essential to address concerns about surveillance and
unauthorized data collection.
Moreover, equitable access to autonomous vehicles featuring ultrasonic sensors
raises ethical questions regarding social justice and inclusivity. Ensuring that
these technologies benefit diverse communities, including those with limited
mobility or access to transportation, becomes crucial to prevent exacerbating
existing disparities. Establishing clear guidelines and ethical frameworks for
decision-making algorithms becomes imperative to navigate such moral
complexities and uphold societal values.
6
2.9 Collaborative Research Initiatives
Collaborative research initiatives focused on obstacle detection using
ultrasonic sensors have emerged as a vital avenue for advancing the capabilities
of autonomous vehicles and related technologies. One significant advantage of
such collaborative efforts is the pooling of expertise and resources from diverse
stakeholders, including academia, industry, and government agencies. By
bringing together multidisciplinary teams with complementary skills and
perspectives, these initiatives foster innovation and accelerate the development
of robust obstacle detection systems. Furthermore, collaboration enables the
sharing of data, insights, and best practices, facilitating the refinement of sensor
technologies and signal processing algorithms. This collaborative approach also
promotes standardization and interoperability, ensuring compatibility and
seamless integration of ultrasonic sensors across different vehicle platforms and
applications.
Disadvantages.
One potential drawback is the complexity of coordinating efforts among multiple
partners with varying priorities, timelines, and methodologies. Achieving
consensus on research goals, allocating resources, and managing intellectual
property rights can require careful negotiation and coordination. Moreover,
differences in organizational cultures and communication styles may hinder
effective collaboration and knowledge sharing. Additionally, collaborative
research initiatives may encounter challenges related to funding constraints or
competing interests among participating entities. Despite these challenges, the
benefits of collaborative research in advancing obstacle detection using ultrasonic
sensors outweigh the potential drawbacks, ultimately driving innovation.
7
CHAPTER 3
METHODOLOGY
8
3.1 Tools
1. Chassis (including motors and wheels)
The main body of the car consists of the chassis. Alongside there will be
four motors for the four wheels will lead down the car.[4]
9
2 .Arduino Uno Board
The Arduino Uno microcontroller serves as a fundamental component in the
implementation of obstacle detection systems using ultrasonic sensors. With its
compact design and versatile capabilities, the Arduino Uno provides an ideal
platform for integrating sensor data processing and control logic. Through its
GPIO pins and analog inputs, the Arduino Uno can easily interface with ultrasonic
sensors, allowing for seamless integration into autonomous vehicle systems or
other applications requiring obstacle detection. By leveraging the Arduino Uno's
rich ecosystem of libraries and development tools, developers can rapidly
prototype and deploy obstacle detection algorithms, taking advantage of its user-
friendly programming environment. Furthermore, the Arduino Uno's
affordability and widespread availability make it accessible to hobbyists,
students, and professionals alike, fostering innovation and experimentation in the
field of robotics and autonomous systems. Overall, the Arduino Uno plays a
crucial role in realizing obstacle detection solutions using ultrasonic sensors,
empowering enthusiasts and engineers to create intelligent, responsive systems
for a variety of practical applications.
10
3. MOTOR DRIVER L293D
In the realm of obstacle detection systems utilizing ultrasonic sensors, the motor
driver serves as a critical component facilitating real-time response. Acting as the
interface between the sensor data and the vehicle's actuators, the motor driver
translates the detected obstacles into appropriate control signals for the vehicle's
motors. This allows for dynamic adjustments to the vehicle's trajectory, speed,
and steering, enabling efficient avoidance of detected obstacles. The motor
driver's role is paramount in ensuring swift and accurate responses to changing
environmental conditions, contributing to enhanced safety and reliability in
autonomous driving scenarios. Through precise control algorithms and
integration with ultrasonic sensor data, the motor driver orchestrates seamless
navigation, optimizing the vehicle's path while maintaining safe distances from
detected obstacles.
11
4. ULTRASONIC SENSOR
Ultrasonic sensors are pivotal in obstacle detection systems, particularly in
the context of autonomous vehicles. These sensors utilize high-frequency sound
waves to detect nearby objects and calculate their distance based on the time it
takes for the sound waves to reflect back. In the realm of obstacle detection,
ultrasonic sensors offer several advantages. Their ability to operate effectively in
various environmental conditions, including low light, smoke, and dust, ensures
reliable performance in diverse settings. Additionally, ultrasonic sensors boast a
wide detection range, enabling them to detect obstacles both at close proximity
and at longer distances, crucial for ensuring safe navigation. Their non-invasive
nature and harmless emission of sound waves make them safe for use in proximity
to pedestrians and other vehicles. Moreover, ultrasonic sensors provide real-time
detection capabilities, facilitating prompt responses to dynamic obstacles and
enhancing overall system reliability. In the context of autonomous vehicles, the
integration of ultrasonic sensors contributes significantly to the development of
robust obstacle detection systems, crucial for ensuring the safety and efficiency
of self-driving vehicles on the road.
12
5. JUMPER WIRES
Jumper wires serve as essential components in the setup of obstacle detection
systems utilizing ultrasonic sensors. These wires, typically made of flexible
insulated conductors, play a crucial role in establishing connections between the
ultrasonic sensor and the microcontroller or other electronic components within
the system. Their flexibility and ease of use allow for convenient positioning and
routing, enabling the creation of tidy and efficient circuit layouts. By connecting
the various pins and components, jumper wires facilitate the transmission of
signals and power necessary for the operation of the ultrasonic sensor.
Additionally, jumper wires come in different lengths and colour, providing
flexibility in customization and organization within the system. Their versatility
and reliability make jumper wires indispensable in prototyping, experimentation,
and development stages of obstacle detection systems, allowing engineers and
hobbyists to quickly iterate and refine their designs.
Figure-05:Jumper Wires
13
6. BATTERY HOLDER X4
In the context of obstacle detection using ultrasonic sensors, the battery holder
X4 plays a crucial role in ensuring continuous and reliable power supply to the
sensor system. Designed to accommodate four batteries, the X4 battery holder
offers several advantages for this application. Firstly, its capacity to hold multiple
batteries increases the overall energy storage capacity, extending the operational
lifespan of the sensor system without the need for frequent battery replacements.
7. LI-ION BATTERY X4
Lithium-ion (Li-ion) batteries have emerged as a critical power source for a
multitude of electronic devices, including those utilized in obstacle detection
systems employing ultrasonic sensors. These batteries offer numerous advantages
ideally suited for such applications. Firstly, Li-ion batteries boast a high energy
density, providing ample power storage in a compact and lightweight form factor.
Figure-07:LI-ION Battery X4
14
8. SERVER MOTOR
The server motor plays a crucial role in the implementation of obstacle
detection using ultrasonic sensors in autonomous vehicles. This motor serves as
the actuator responsible for steering or the vehicle in response to detected
obstacles. When an ultrasonic sensor detects an obstacle within the vehicle's path,
it sends signals to the control system, which in turn commands the server motor
to adjust the vehicle's direction accordingly, avoiding collisions or hazards. The
precise control offered by the server motor enables swift and accurate responses
to dynamic environments, ensuring the safety and efficiency of autonomous
driving systems. Through seamless integration with ultrasonic sensors, the server
motor enhances the vehicle's ability to navigate complex scenarios, such as
crowded urban streets or tight parking spaces. As research and development in
autonomous vehicle technology continue to advance, the role of the server motor
in obstacle detection systems will remain integral, contributing to the realization
of safer and more reliable autonomous driving experiences.
15
9. BLUETOOTH MODULE
10. SWITCH
In figure 10, A switch is used for turning on the power of the vehicle. It controls
the battery connection of the vehicle.
Figure-10 Switch
16
3.1 PIN DIAGRAM AND CIRCUIT CONNECTION
17
3.2 SOURCE CODE
#include<Servo.h>
#include <AFMotor.h>
#define Echo A0
#define Trig A1
#define motor 10
#define Speed 170
#define spoint 103
char value;
int distance;
int Left;
int Right;
int L = 0;
int R = 0;
int L1 = 0;
int R1 = 0;
Servo servo;
AF_DCMotor M1(1);
AF_DCMotor M2(2);
AF_DCMotor M3(3);
AF_DCMotor M4(4);
void setup() {
Serial.begin(9600);
pinMode(Trig, OUTPUT);
pinMode(Echo, INPUT);
servo.attach(motor);
M1.setSpeed(Speed);
M2.setSpeed(Speed);
M3.setSpeed(Speed);
M4.setSpeed(Speed); 18
}
void loop() {
Obstacle();
//Bluetoothcontrol();
//voicecontrol();
}
void Bluetoothcontrol() {
if (Serial.available() > 0) {
value = Serial.read();
Serial.println(value);
}
if (value == 'F') {
forward();
} else if (value == 'B') {
backward();
} else if (value == 'L') {
left();
} else if (value == 'R') {
right();
} else if (value == 'S') {
Stop();
}
}
void Obstacle() {
distance = ultrasonic();
if (distance <= 12) {
Stop();
backward();
delay(100); 19
Stop();
L = leftsee();
servo.write(spoint);
delay(800);
R = rightsee();
servo.write(spoint);
if (L < R) {
right();
delay(500);
Stop();
delay(200);
} else if (L > R) {
left();
delay(500);
Stop();
delay(200);
}
} else {
forward();
}
}
void voicecontrol() {
if (Serial.available() > 0) {
value = Serial.read();
Serial.println(value);
if (value == '^') {
forward();
} else if (value == '-') {
backward(); 20
} else if (value == '<') {
L = leftsee();
servo.write(spoint);
if (L >= 10 ) {
left();
delay(500);
Stop();
} else if (L < 10) {
Stop();
}
} else if (value == '>') {
R = rightsee();
servo.write(spoint);
if (R >= 10 ) {
right();
delay(500);
Stop();
} else if (R < 10) {
Stop();
}
} else if (value == '*') {
Stop();
}
}
}
// Ultrasonic sensor distance reading function
int ultrasonic() {
digitalWrite(Trig, LOW);
delayMicroseconds(4); 21
digitalWrite(Trig, HIGH);
delayMicroseconds(10);
digitalWrite(Trig, LOW);
long t = pulseIn(Echo, HIGH);
long cm = t / 29 / 2; //time convert distance
return cm;
}
void forward() {
M1.run(FORWARD);
M2.run(FORWARD);
M3.run(FORWARD);
M4.run(FORWARD);
}
void backward() {
M1.run(BACKWARD);
M2.run(BACKWARD);
M3.run(BACKWARD);
M4.run(BACKWARD);
}
void right() {
M1.run(BACKWARD);
M2.run(BACKWARD);
M3.run(FORWARD);
M4.run(FORWARD);
}
void left() {
M1.run(FORWARD);
M2.run(FORWARD);
M3.run(BACKWARD); 22
M4.run(BACKWARD);
}
void Stop() {
M1.run(RELEASE);
M2.run(RELEASE);
M3.run(RELEASE);
M4.run(RELEASE);
}
int rightsee() {
servo.write(20);
delay(800);
Left = ultrasonic();
return Left;
}
int leftsee() {
servo.write(180);
delay(800);
Right = ultrasonic();
return Right;
}
23
CHAPTER 4
RESULTS AND DISCUSSION
The prototype is created using 4 DC motors driven by an H-bridge with dual
output, connecting the two left wheels and the two right ones to its outputs. The
car is remotely controlled either by Bluetooth an app or by infrared. Some extra
functionalities can be added to the software.
24
4.4 Performance in Real-world Conditions
The discussion encompassed the performance of ultrasonic sensors in real-world
driving conditions, including urban environments with varying levels of
complexity and traffic density. While the sensors proved adept at detecting
stationary obstacles and vehicles within their detection range, challenges arose in
scenarios with highly reflective surfaces or irregularly shaped objects,
highlighting areas for further optimization and refinement.
Model Wall Time
USB 13min14s
MCU 51min 10s
CHAPTER 5 CONCLUSION
26
5.1 Project Outcomes
In conclusion, the project outcomes related to obstacle detection using ultrasonic
sensors have demonstrated significant advancements and promising prospects for
enhancing safety and efficiency in various applications, particularly in the realm
of autonomous vehicles. Through meticulous research, experimentation, and
implementation, this project has contributed valuable insights into the
capabilities, limitations, and future potential of ultrasonic sensor technology.
28
5.2 Practical Applications
This device has application in surveying different landscapes and mapping them.
It can also be used in commercial devices like:
1.Automated lawn mover
2.Smart room cleaner etc
3.Obstacle avoiding robots can be used in almost all mobile robot
navigation systems.
4.They can also ne used in dangerous environments, where human
penetration could be fatal.
5.Unmanned vehicle driving.
6.Mining Vehicle that uses obstacle detection.
29
References
[1] Zhang, J., & Liu, Y. (2020). A Review on Ultrasonic Sensors for Obstacle
Detection in Autonomous Vehicles. IEEE Sensors Journal, 20(14), 7890-7905.
[3] Patel, S., & Gupta, R. (2019). Comparative Study of Ultrasonic Sensors for
Obstacle Detection in Automotive Environments. Journal of Intelligent
Transportation Systems, 25(3), 245-259.
[4] Li, H., & Wang, C. (2021). Enhancing Obstacle Detection in Autonomous
Vehicles Using Ultrasonic Sensor Fusion Techniques. Sensors, 21(9), 3011.
[5] Kim, S., & Park, J. (2017). Design and Implementation of Ultrasonic Sensor-
Based Collision Avoidance System for Autonomous Cars. International Journal
of Automotive Technology, 18(5), 867-876.
[6] Garcia, M., & Martinez, L. (2016). Real-Time Obstacle Detection Using
Ultrasonic Sensors in Unmanned Aerial Vehicles. Aerospace Science and
Technology, 55, 112-121.
30
[8] Wang, Y., & Chen, X. (2020). Integration of Ultrasonic Sensor Data with Deep
Learning Models for Improved Obstacle Detection in Autonomous Vehicles.
Neural Computing and Applications, 32(18), 13955-13967.
[10] Ekta “Obstacle avoiding Robot” Vol 10, issue 6, pp: 137-139 2021
31