Final Miniproject
Final Miniproject
By
CERTIFICATE
students Jay Avhad (04), Manas Bakare (05), Ananya Armarkar (14) submitted to the
University of Mumbai in partial fulfillment of the requirement for the award of the degree
By
Telecommunication Engineering.
Examiners:
1.
2.
Supervisors:
1.
2.
Date:
We declare that this written submission represents our ideas in our own words and
where others' ideas or words have been included, we have adequately cited and referenced
the original sources. We also declare that we have adhered to all principles of academic
honesty and integrity and have not misrepresented or fabricated or falsified any
will be cause for disciplinary action by the Institute and can also evoke penal action from
the sources which have thus not been properly cited or from whom proper permission has
JAY AVHAD
MANAS BAKARE
ANANYA ARMARKAR
Date:
ACKNOWLEDGEMENT
It gives a great pleasure to acknowledge our deep sense of gratitude to present our
project titled; “RADAR AND SPEED DETECTION”. We would like to give sincere
thanks to our Principal Dr. Vivek Sunnapwar and H.O.D. Dr. Jayashree Khanapuri for
giving me the opportunity to present this topic. I am also thankful to Coordinator Prof.
Prashant
Prof. Rashmi Adatkar for this whole hearted support and affectionate encouragement.
Her dynamism, vision, and sincerity have deeply inspired us. She has taught us the
5
Table of Contents
Chapter 1: Introduction.........................................................................8
Chapter 4. Design............................................................................... 10
IC details.........................................................................................11
Circuit Diagram.............................................................................. 11
PCB diagram...................................................................................11
6
Chapter 1: Introduction
Radar systems have become an essential part of modern technology, playing a vital role in
applications ranging from air traffic control to autonomous vehicles. These systems are widely
recognized for their ability to detect and monitor objects by emitting signals and analyzing the
reflected echoes. While traditional radar systems often rely on radio waves, advancements in
microcontroller technology have allowed the integration of simpler and more cost-effective
components, such as ultrasonic sensors, to perform similar functions in smaller-scale
applications.
This project focuses on designing a low-cost radar and speed sensor system using Arduino, an
ultrasonic (HC-SR04), and a servo motor. The system scans its surroundings within a 40 cm
to detect objects and calculate their speed. It achieves this by measuring the distance to an
object at successive time intervals, determining the change in position over time, and
calculating speed accordingly. The data is then displayed in real-time on the laptop screen for
easy interpretation.
The servo motor in this system rotates the ultrasonic sensor through a 180° arc, enabling a
comprehensive sweep the surrounding environment. The ultrasonic sensor emits high-
frequency sound and measures the time taken for the waves to reflect back after hitting an
object. This information is processed by the Arduino microcontroller, which calculates both
the distance and speed of the detected object. The use of a servo motor ensures that the sensor
can scan a wide area, enhancing the system's detection capabilities.
This project’s significance lies in its simplicity, affordability, and versatility. Unlike
conventional radar systems, which often require advanced hardware and high power
consumption, this implementation leverages readily available components to provide a
functional and efficient alternative. The radar and speed sensor can be used in applications such
as obstacle detection in smart vehicles, and even as a learning tool for students and hobbyists.
Through this project, we aim to bridge the gap between the complexity of traditional radar
systems and the accessibility of modern microcontroller-based solutions, demonstrating how
innovative designs can yield practical and impactful results.
7
Chapter 2: Literature Survey
Radar systems play a crucial role in object detection and speed measurement, traditionally
relying on high-cost and complex radio wave technologies such as Doppler radar. These
systems are highly accurate but require advanced hardware and significant power, making them
inaccessible for cost-sensitive or small-scale applications. Ultrasonic radar, on the other hand,
offers a simpler and more affordable solution by using sound waves to detect objects and
measure distances. This project employs the HC-SR04 ultrasonic sensor, a popular choice
known for its reliability and affordability, with a detection range of 2–40 cm.
The speed detection in this system is achieved through successive distance measurements over
time, using the formula
Speed=Change in DistanceTime Interval\textSpeed=Time IntervalChange in Distance. This
computationally lightweight method eliminates the need for advanced signal processing,
making it ideal for Arduino-based systems. To enhance the detection area, a servo motor
(SG90) rotates the ultrasonic sensor across a 180° arc, enabling a full environmental sweep.
This setup mimics the scanning functionality of high-end radar systems while maintaining
affordability and simplicity.
The Arduino NANO microcontroller serves as the system’s core, integrating the ultrasonic
sensor, servo motor, and a laptop (PROCESSING) for real-time data processing and
visualization. Arduino's open-source environment and readily available libraries simplify the
development process, making it accessible even for beginners.
While ultrasonic sensors have limitations, such as reduced accuracy with soft or angled
surfaces and sensitivity to environmental factors, this project addresses these challenges
through careful calibration and integration. By combining object detection and speed
measurement in a single system, it offers a cost-effective, versatile solution suitable for
robotics, automation, and educational use. This project bridges the gap between complex radar
systems and practical, accessible designs, demonstrating how affordable technology can
deliver impactful results.
8
Chapter 3: Objective and Problem Statement
Objective
The objective of this project is to design and implement a cost-effective radar and speed sensor
system using an Arduino microcontroller, an ultrasonic sensor, and a servo motor. The system
aims to detect objects within a 40 cm radius, calculate their speed, and display real-time data
on a digital screen. By integrating object detection and speed measurement functionalities, the
project seeks to provide a simplified yet efficient alternative to conventional radar systems for
applications in robotics, automation, and education.
Problem Statement
Traditional radar systems, while highly accurate, are often expensive, complex, and resource-
intensive, limiting their accessibility for small-scale and educational applications. Low-cost
alternatives, such as ultrasonic sensors, are typically used for distance measurement but rarely
integrate speed detection and environmental scanning into a single system. Additionally,
challenges like limited detection range, sensitivity to environmental factors, and the need for
precise component integration hinder their broader application.
This project addresses these issues by combining ultrasonic sensing, servo motor-based
scanning, and microcontroller technology to create a simple and affordable system capable of
detecting objects, measuring speed, and scanning the environment in real-time. The goal is to
bridge the gap between high-end radar technology and accessible, low-cost solutions for
practical use.
9
Chapter 4. Design
Block diagram of the working principle of an ultrasonic radar As shown in Fig 5, Arduino
UNO receives power supply from the computer. Then microcontroller sends signals to the other
two components: the ultrasonic sensor and servo motor. The feedback from these components
is sent back to the microcontroller. The ultrasonic sensor has a transmitter to send out the
ultrasound and a receiver to catch the reflected sound waves. The total travelling time of this
sound wave is the distance.
10
Hardware Section
IC details
Arduino Nano, ultrasonic sensor, servo motor,
Circuit Diagram
Add circuit diagram and details/working
Ultrasonic Sensor
1 Arduino Nano Trig Digital Pin 7 (D7)
(HC-SR04)
Ultrasonic Sensor
2 Arduino Nano Echo Digital Pin 8 (D8)
(HC-SR04)
Ultrasonic Sensor
3 Arduino Nano VCC and GND 5V and GND
(HC-SR04)
Servo Motor
5 Arduino Nano VCC and GND 5V and GND
(SG90)
11
1. Row 1–3: The ultrasonic sensor requires power, ground, and two control
signals (Trig and Echo), connected to the respective Arduino Nano pins.
2. Row 4–5: The servo motor is connected to a PWM-enabled pin (D11), with
power and ground provided by the Arduino Nano.
3. Row 6: The Arduino Nano is powered via USB from the laptop, which
also serves as the data interface for programming and serial
communication.
4. Row 7: The serial monitor uses the USB TX/RX communication lines for
real-time data output, simplifying debugging and visualization.
12
Software Section
Flowchart
13
Program Code and link for Github
repository
#include<Servo.h>
#define trigPin 8
#define echoPin 9
void loop()
long duration;
{
int distance ;
int i ;
for (i=15; i<=165; i++)
Servo myservo;
{
myservo.write(i);
int calculateDistance()
delay(15);
{
calculateDistance();
digitalWrite(trigPin,LOW);
Serial.print(i);
delayMicroseconds(2);
Serial.print(",");
digitalWrite(trigPin,HIGH);
Serial.print(distance);
delayMicroseconds(10);
Serial.print(".");
digitalWrite(trigPin,LOW);
}
duration = pulseIn(echoPin, HIGH);
for(i=165; i>=15; i--)
distance = duration*0.034/2;
{
return distance;
myservo.write(i);
}
delay(15);
calculateDistance();
void setup()
Serial.print(i);
{
Serial.print(",");
pinMode(trigPin , OUTPUT);
Serial.print(distance);
pinMode(echoPin, INPUT);
Serial.print(".");
myservo.attach(11);
Serial.begin(9600);
}
}
14
Chapter 6 : Implementation and Result
Implementation
The implementation of the radar system using an ultrasonic sensor and Arduino involves
precise connections between hardware components and coding logic to capture and process
distance data. The HC-SR04 ultrasonic sensor is interfaced with the Arduino, where the Trig
pin (trigger pin) is connected to pin 7, and the Echo pin (echo pin) is connected to pin 8.
The Servo motor is connected to pin 11 for sweeping motion. In the setup phase, the trigPin is
configured as an output to send the ultrasonic pulse, and the echoPin is set as an input to receive
the reflected signal. The Servo motor is initialized using the Servo library, and the Arduino
communicates data through the Serial monitor at a baud rate of 9600.
In the loop, the servo motor sweeps back and forth between 15° and 165°, and for each position,
the ultrasonic sensor calculates the distance to an object by measuring the time taken for the
echo pulse to return. This is achieved using the pulseIn() function, which reads the HIGH
duration of the echoPin. The distance is calculated using the formula: distance = duration ×
0.034 / 2, where 0.034 cm/µs is the speed of sound. The calculated distance, along with the
servo angle, is sent to the Serial monitor for further analysis or visualization. Delays are
introduced to ensure smooth operation and accurate readings during the servo's motion.
15
Results
The radar system implemented using the Arduino, ultrasonic sensor, and servo motor
successfully measures and visualizes the distance of objects within its detection range.
The ultrasonic sensor accurately calculates the distance by emitting ultrasonic waves
and detecting their reflections, while the servo motor ensures a wide scanning area by
sweeping between 15° and 165°. The results are displayed on the Serial Monitor, where
the angular position of the servo and the corresponding distance of detected objects
are continuously logged. This data can be further processed to map the surrounding
environment, simulating a radar system. The project demonstrates real-time distance
measurement and object detection capabilities, with a reliable range of approximately
2 cm to 40 cm, depending on the sensor's specifications and environmental conditions.
The system effectively showcases the integration of multiple components to create a
simple yet functional radar system.
16
Chapter 7: Conclusions.
Summary of Goals and Objective Restatement
The primary objective of this project was to develop a radar and speed detection system using
an Arduino Nano, an ultrasonic sensor, and a servo motor. The system aimed to detect objects
within a 40 cm radius, measure their distances, and provide real-time data output via the serial
monitor. Through systematic implementation and testing, most of the initial goals were
successfully achieved. The radar system accurately measured object distances and displayed
them in real time, effectively demonstrating the feasibility of using low-cost components for
such applications.
While the project met its primary objectives, several challenges and limitations were
encountered during development:
1. Hardware Limitations:
o The ultrasonic sensor’s effective range was limited to 40 cm, which constrained
the detection capability. This limitation could be addressed by using sensors
with higher range and accuracy.
o The servo motor occasionally exhibited jittering during prolonged operation,
likely due to limited torque or power fluctuations.
2. Coding and Integration Issues:
o Initial coding errors led to inaccurate distance calculations, which required
debugging and recalibration.
o Synchronizing the servo motor’s rotation and ultrasonic sensor readings proved
challenging, especially in maintaining consistent delay times without affecting
accuracy.
3. Design Constraints:
o The setup lacked a visual interface, such as a radar screen, which could provide
a more intuitive representation of the scanned data.
o The system's dependency on a USB-powered Arduino Nano restricted its
portability.
17
These challenges underscore the complexities of hardware-software integration and the
importance of meticulous testing during project development.
Learning Outcomes
This project provided valuable insights into embedded system design, hardware interfacing,
and coding in Arduino IDE. Key takeaways include:
While the current implementation is functional, there are several avenues for improvement and
future development:
18
This project demonstrated the potential of low-cost microcontroller-based systems for creating
functional radar solutions. While limitations were present, the successful integration of
components and real-time data generation validated the initial design goals. The challenges
faced during development enhanced our understanding of embedded systems and provided a
foundation for future advancements. With further improvements, this project could serve as a
stepping stone for building sophisticated, portable radar systems for various applications.
References
1. https://www.researchgate.net/publi 7. https://circuitdigest.com/microcont
cation/340087911_Design_and_Im roller-projects/radar-using-arduino-
plementation_of_Arduino- and-ultrasonic-sensor
Based_Ultrasonic_Radar 8. https://github.com/sureshjoshi/ardu
2. https://ijcrt.org/viewfull.php?&p_i ino-radar
d=IJCRT24A4488
3. https://www.researchgate.net/publi
cation/355185656_Arduino-
Based_Ultrasonic_Radar_System
4. https://www.researchgate.net/publi
cation/356152220_Integration_of_
Arduino_and_Ultrasonic_Sensors_
for_Experimental_Radar_Applicati
on
5. https://create.arduino.cc/projecthub
/Hashan/radar-system-using-
arduino-bb9f56
6. https://www.instructables.com/Son
ar-Radar-System-Using-Arduino-
Servo-Ultrasonic/
19