Radar
Radar
Acknowledgement
1
We are deeply indebted to the Department of Electronics and
Communication Engineering for their inspiring and
encouraging guidance. Despite their busy schedule, they
always made time to address the challenges we faced during
our project work. Their continuous support and insightful
advice have been invaluable to the successful completion of
this project. Their expertise and enthusiasm were evident in
every interaction. He provided quick and precise analyses,
comprehensive solutions, and critical reviews that
significantly enhanced our work. Their ability to simplify
complex concepts and provide clear direction was
instrumental in overcoming the obstacles we encountered.
Their dedication to mentoring us and his unwavering
commitment to our success are truly appreciated.
We extend our heartfelt thanks to the staff of the Department
of Electronics and Communication Engineering. Their
patience, cooperation, and assistance have been crucial in
facilitating our project work. The staff's willingness to help
and their prompt support enabled us to navigate through
various administrative and technical hurdles.
In conclusion, we express our sincere gratitude to their
collective efforts, encouragement, and support have been
pivotal in the accomplishment of this project. We are
profoundly grateful for their contributions and the positive
impact they have had on our academic journey.
2
Ultrasonic Radar Project Report
Introduction
The Ultrasonic Radar project is a practical implementation of radar-like
technology using Arduino and basic electronic components. It aims to
detect objects within a specified range and visualize their position and
distance on a graphical interface. This project incorporates improvements
such as the addition of a buzzer that rings when an object is detected
within the range, enhancing its functionality compared to traditional
designs.
Aim
The objective of this project is to develop a radar system capable of
detecting objects under challenging conditions and determining their
distance and position with precision. The addition of a buzzer enhances
its usability by providing audible feedback for nearby obstacles.
Components Used
1. Arduino Uno R3
3. Servo Motor
4. Buzzer
3
5. Breadboard
6. Jumper Wires
7. Arduino Connector
Circuit Description
4
Working Principle
1. Distance Measurement:
3. Buzzer Alert:
4. Visualization:
Arduino Code
Below is the Arduino sketch used in this project:
void setup() {
pinMode(trigPin, OUTPUT);
pinMode(echoPin, INPUT);
pinMode(buzzer, OUTPUT); // Set buzzer pin as output
myservo.attach(11);
Serial.begin(9600);
void loop() {
int i;
for (i = 0; i <= 90; i++) {
myservo.write(i);
delay(15);
int dist = calculateDistance();
5
Serial.print(i);
Serial.print(",");
Serial.print(dist);
Serial.print(".");
Serial.print(i);
Serial.print(",");
Serial.print(dist);
Serial.print(".");
6
float pixsDistance;
int iAngle, iDistance;
int index1=0;
int index2=0;
PFont orcFont;
void setup() {
7
}
void drawRadar() {
pushMatrix();
translate(width/2, height-height*0.074); // moves the starting
coordinats to new location
noFill();
strokeWeight(2);
stroke(98, 245, 31);
// draws the arc lines
arc(0, 0, (width-width*0.0625), (width-width*0.0625), PI, TWO_PI);
arc(0, 0, (width-width*0.27), (width-width*0.27), PI, TWO_PI);
arc(0, 0, (width-width*0.479), (width-width*0.479), PI, TWO_PI);
arc(0, 0, (width-width*0.687), (width-width*0.687), PI, TWO_PI);
// Replace the angle lines in drawRadar() with:
line(-width/2, 0, width/2, 0); // 0 degrees (horizontal line)
line(0, 0, (-width/2)*cos(radians(15)), (-width/2)*sin(radians(15)));
line(0, 0, (-width/2)*cos(radians(30)), (-width/2)*sin(radians(30)));
line(0, 0, (-width/2)*cos(radians(45)), (-width/2)*sin(radians(45)));
line(0, 0, (-width/2)*cos(radians(60)), (-width/2)*sin(radians(60)));
line(0, 0, (-width/2)*cos(radians(75)), (-width/2)*sin(radians(75)));
line(0, 0, (-width/2)*cos(radians(90)), (-width/2)*sin(radians(90)));
8
float displayAngle = map(iAngle, 0, 90, 0, 180);
line(pixsDistance*cos(radians(displayAngle)), -
pixsDistance*sin(radians(displayAngle)),
(width-width*0.505)*cos(radians(displayAngle)), -(width-
width*0.505)*sin(radians(displayAngle)));
}
popMatrix();
}
pushMatrix();
if (iDistance>40) {
noObject = "Out of Range";
} else {
noObject = "In Range";
}
fill(0, 0, 0);
noStroke();
rect(0, height-height*0.0648, width, height);
fill(98, 245, 31);
textSize(25);
textSize(25);
fill(98, 245, 60);
// Add these angle labels in drawText() after "fill(98, 245, 60);"
// 0 degrees
translate((width-width*0.5)+width/2*cos(radians(0)), (height-
height*0.0907)-width/2*sin(radians(0)));
rotate(radians(0));
text("0", 0, 0);
resetMatrix();
// 15 degrees
9
translate((width-width*0.5)+width/2*cos(radians(15)), (height-
height*0.0907)-width/2*sin(radians(15)));
rotate(-radians(-75));
text("15", 0, 0);
resetMatrix();
// 30 degrees
translate((width-width*0.4994)+width/2*cos(radians(30)), (height-
height*0.0907)-width/2*sin(radians(30)));
rotate(-radians(-60));
text("30", 0, 0);
resetMatrix();
// 45 degrees
translate((width-width*0.5)+width/2*cos(radians(45)), (height-
height*0.09)-width/2*sin(radians(45)));
rotate(-radians(-45));
text("45", 0, 0);
resetMatrix();
// 60 degrees
translate((width-width*0.503)+width/2*cos(radians(60)), (height-
height*0.0888)-width/2*sin(radians(60)));
rotate(-radians(-30));
text("60", 0, 0);
resetMatrix();
// 75 degrees
translate((width-width*0.505)+width/2*cos(radians(75)), (height-
height*0.085)-width/2*sin(radians(75)));
rotate(-radians(-15));
text("75", 0, 0);
resetMatrix();
// 90 degrees
translate((width-width*0.507)+width/2*cos(radians(90)), (height-
height*0.0833)-width/2*sin(radians(90)));
rotate(radians(0));
text("90", 0, 0);
resetMatrix();
popMatrix();
}
10
Team Members
1.AYUSH RAJ (24/A11/064)
2.AGRIM DAIMA(24/B14/007)
All team members are students at Delhi Technological University.
Results
The Ultrasonic Radar successfully detects objects within its range and
provides audible alerts through the buzzer when obstacles are close
(within 10 cm). The radar visualization effectively displays real-time data
on a graphical interface.
Conclusion
This project demonstrates how sensors and actuators can be integrated
with microcontrollers to create functional systems for object detection
and visualization. The addition of a buzzer enhances its practicality by
providing immediate feedback for close obstacles. Such systems have
11
potential applications in security systems, robotics navigation, and
autonomous vehicles.
12