Group3 Redar
Group3 Redar
Class : CO6-I
Course Title : Capstone Project - Execution & Report Writing Course Code : 22060
from V.J. Shinde Polytechnic Dharashiv ( 1557 ) Institute having Enrolment No: -
221557006,2215570037,2215570038has completed project in course Capstone Project
Execution & Report Writing ( 22060 ) having title “Radar System Using Arduino”
during the academic year 2024-2025 , The project completed in a group consisting of four
persons under the guidance of the Faculty Guide.
꧁ ACKNOWLEDGEMENT ꧂
Yours Sincerely,
Shaikh muskan
Faqeer ziddan
Pathan jishan
❖ ABSTRACT :
Data collected from the sensor is transmitted to a computer, where it is visualized using graphical interfaces
developed in Processing IDE. The result is a live radar-like display that marks detected objects at their
respective distances and angles. The project provides an excellent platform for learning about embedded
systems, sensor technology, and real-time data visualization. It holds significant educational value and
potential applications in robotics, security systems, and smart automation.
By mimicking real-world radar operations with readily available and inexpensive components, the project
bridges theoretical knowledge and practical implementation. This hands-on learning tool empowers students
and enthusiasts to explore advanced concepts in electronics and programming within an accessible and
engaging framework.
꧁ INDEX꧂
Contents
1 Introduction
1.1 Title of the Micro-Project...............................................8
1.2 Rationale.........................................................................8
1.3 Aim/Benefit of the micro project...................................8
1.3.1 Aim of Project....................................................8
1.3.2 Benefit of Project...............................................9
1.4 Scope..............................................................................9
1.5 Objective......................................................................10
1.6 Course outcomes addressed.........................................10
1.7 Literature Survey............................................................11
2 General Behaviour
2.1 Initiative........................................................................12
2.4 Specification....................................................................14
3 System Analysis
3.1 Study of current/Existing system...................................15
4 System Design
4.1 System Architecture.......................................................17
5 System Requirement
5.1 Functional Requirement.........................................................21
5.2 Non-Functional Requirement..............................................22
5.3 Explicit Requirement.............................................................23
5.4 Implicit Requirement..........................................................24
7 Application........................................................................................26
8 Working Principal..........................................................................27-31
9 Actual Codes................................................................................32-34
10 Processing Code............................................................................35-41
11 Actual Outputs............................................................................42-43
12 Conclusion....................................................................................44
13 References.......................................................................................45
1.0 INTRODUCTION:
1.2 Rationale:
To design and develop a prototype radar system using Arduino and ultrasonic
sensors that can scan its surroundings, detect objects in a given range, and graphically represent their
location in real time.
1.4 Scope:
1.5 Objectives:
- To ensure the radar system operates reliably and accurately within defined parameters.
- Develop embedded C/C++ code for data acquisition and device control (CO2).
and hobbyists have successfully implemented ultrasonic-based distance measurement systems using
Arduino. Projects on platforms like GitHub and Hackster.io show implementations of similar systems used
for obstacle avoidance in robots, distance measurement, and environmental mapping. Scholarly articles
highlight the limitations and benefits of such systems compared to traditional radar. Technologies like
LIDAR and IR sensors are also compared to ultrasonic sensors, showcasing the simplicity and cost-
2.1 Initiative:
Hardware Requirements:
Software Requirements:
1. Arduino IDE
Purpose: To write, compile, and upload code to the Arduino Uno board.
Features Used:
Serial communication
2. Processing IDE
Purpose: To create a graphical radar interface that reads and visualizes serial data from Arduino in real-
time.
Features Used:
Purpose: Ensures the computer can communicate with the Arduino board via USB.
Note: Ensure drivers are installed correctly to avoid port detection issues.
Alternatives: Built-in Serial Monitor in Arduino IDE or tools like PuTTY or RealTerm.
5. Libraries Used
2.3 Specification:
expensive and complex. Alternatives such as LIDAR and IR-based systems also require high-
end hardware and software. The Arduino-based radar system offers a simplified version using
ultrasonic sensing, ideal for beginners. It does not match the precision of RF radar but serves
Feasibility Study
The system requires basic knowledge of electronics and programming. The radar can be operated with a
simple setup and does not require frequent calibration or maintenance, making it operationally feasible.
The System Design for the Radar System using Arduino outlines the architecture, hardware
connections, software flow, and visualization setup. This section focuses on creating a robust and
functional design that meets the defined objectives.
1. Input Subsystem:
o Ultrasonic Sensor (e.g., HC-SR04): Sends ultrasonic waves and receives
the reflected echo to calculate the distance of objects.
o Servo Motor (Optional): Rotates the sensor to cover a specified
angular range (e.g., 0°–180°) for scanning.
2. Processing Subsystem:
o Arduino Microcontroller: Receives data from the ultrasonic
sensor, processes it to calculate distances, and controls the servo
motor.
3. Output Subsystem:
o Visualization Interface (PC/Display): Displays radar data in real- time using
a graphical interface (e.g., Processing IDE or LCD).
Alert System (Optional): LEDs or buzzers for warnings when objects are detected
Circuit Diagram
The software involves coding in Arduino IDE to control the hardware and transmit data to a
visualization tool.
Flowchart
2. Start Scanning:
o Rotate the servo motor to a specific angle (for rotational scanning).
o Trigger the ultrasonic sensor to emit pulses.
o Measure the time of echo return and calculate distance.
3. Process Data:
o Map the distance and angle for object localization.
o Send data to the visualization tool or display.
4. Display Results:
o Update the radar visualization in real-time.
o Trigger alerts for objects in the critical range.
2) Real-time Operation: The radar must respond and display object data with minimal delay.
These are clearly stated, measurable, and directly requested or needed for the radar system to
function as intended:
1. Object Detection:
The system must detect objects using the HC-SR04 ultrasonic sensor.
2. Servo Rotation:
The servo motor must rotate the sensor across a range of 0° to 180°.
3. Distance Measurement:
The sensor must measure the distance between itself and an object, and send this data to
the Arduino.
4. Serial Communication:
The Arduino must send angle and distance data to the PC via USB serial.
5. Radar Display:
The Processing IDE must graphically visualize real-time data in a radar-like interface.
7. Real-time Operation:
The radar must detect and display object data continuously and without manual input
during runtime.
8. Component Integration:
Arduino, ultrasonic sensor, and servo motor must be physically and logically integrated.
These are not directly stated but are necessary for the system to work effectively and be usable:
1. Calibration:
The system should automatically or manually calibrate sensor readings for accuracy.
2. Error Handling:
The code should handle cases where no object is detected or if invalid readings occur.
3. Responsiveness:
4. User-Friendly Interface:
The graphical interface should be clear and easy to understand, even for non-technical users.
5. Compact Design:
The hardware layout should be organized, safe, and compact for ease of use and portability.
The code should be modular for easy updates, upgrades, or integration with other systems.
7. Data Consistency:
The system should consistently transmit accurate and timely data without interruptions.
8. Noise Reduction:
The software should smooth noisy data or filter out invalid distance spikes caused by echo misreads.
1. Arduino Programming: Learn to code microcontrollers for sensor and motor control.
2. Sensor Interfacing: Gain hands-on experience with ultrasonic sensors (HC-SR04)
for distance measurement.
3. Servo Motor Control: Control servo motors for scanning and rotation.
4. Data Communication: Implement serial communication to transfer data
between Arduino and PC.
5. GUI Development: Create graphical user interfaces (GUIs) using
Processing for real-time radar visualization.
6. Problem Solving & Debugging: Troubleshoot hardware and software issues
for smooth system operation.
7. Radar System Concepts: Understand the basics of radar systems, object detection,
and robotics.
8. Project Management: Learn to plan, design, and build a complete system
from scratch.
9. Real-Time Data Processing: Handle real-time sensor data and visualize it effectively.
10. Documentation: Develop skills in documenting and presenting technical project
How It Works:
1. Arduino Code:
o Sends angle and distance data to the PC via the serial port in the format
<angle>,<distance>..
2. Processing Code:
1. Hardware Setup:
2. Software Setup:
o Upload the Arduino code to your Arduino board using the Arduino IDE.
o Adjust the COM port in the myPort line of the Processing code to match
Linux/Mac).
Radar Display:
distance ranges.
Text Display:
o The sensor waits for the pulse to reflect off any nearby object and return
to the Echo pin.
1. Visualization:
o Processing receives the angle and distance data and creates a radar-
like display on the screen.
o The system visually represents the detected objects by drawing lines
that indicate the distance and angle at which the objects are detected
Radar System using arduino
1. Servo Control:
3. Visualization:
o Processing receives the angle and distance data and creates a radar-
like display on the screen.
o The system visually represents the detected objects by drawing lines
that indicate the distance and angle at which the objects are detected.
30
Radar System using arduino
9.0Actual Code :
Arduino Code :-
#include <Servo.h>
void setup()
{ pinMode(trigPin,
OUTPUT);
pinMode(echoPin, INPUT);
Serial.begin(9600);
myServo.attach(servoPin);
}
void loop() {
// Sweep from 15 to 165 degrees
sweepServo(15, 165, 1);
// Sweep back from 165 to 15 degrees
sweepServo(165, 15, -1);
}
int calculateDistance()
{ digitalWrite(trigPin,
LOW);
delayMicroseconds(2);
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);
if (duration == 0) {
return -1; // No valid reading
} else {
return duration * 0.034 / 2;
}
}
32
Radar System using arduino
This Arduino code is designed to control a basic radar system using an ultrasonic sensor (HC-SR04) and
a servo motor. Here's how it works:
1. Initialization:
The ultrasonic sensor's trigger and echo pins are connected to pins 10 and 11 respectively.
2. Servo Movement:
The servo motor continuously sweeps from 15° to 165° and then back from 165° to 15°, simulating a
radar sweep.
3. Distance Measurement:
At each angle, the ultrasonic sensor sends a pulse and measures the distance to the nearest object.
Distance is calculated using the time it takes for the echo to return.
4. Data Output:
If a valid distance is detected, the Arduino sends the angle and distance in the format angle,distance. via
serial communication.
This data can be read and visualized by a computer using Processing or other software to simulate a
radar interface.
33
Radar System using arduino
Processing code :-
import processing.serial.*;
import java.awt.event.KeyEvent;
import java.io.IOException;
Serial myPort;
String angle = "";
String distance = "";
String data = "";
String noObject;
float pixsDistance;
int iAngle = 0, iDistance = 0;
int index1 = 0;
int index2 = 0;
PFont orcFont;
void setup() {
size(1200, 700); // **CHANGE THIS TO YOUR SCREEN RESOLUTION**
smooth();
myPort = new Serial(this, "COM7", 9600); // Starts the serial communication
myPort.bufferUntil('.'); // Reads the data from the serial port up to the character '.'. So actually it reads
this: angle,distance.
}
void draw()
{ fill(98, 245,
31);
35
Radar System using arduino
// Reads the data from the Serial Port up to the character '.' and puts it into the String variable "data".
data = myPort.readStringUntil('.');
data = data.substring(0, data.length() - 1);
index1 = data.indexOf(","); // Find the character ',' and puts it into the variable "index1"
angle = data.substring(0, index1); // Reads the data from position "0" to position of the variable index1
(angle)
distance = data.substring(index1 + 1, data.length()); // Reads the data from position "index1" to the end
(distance)
36
Radar System using arduino
void drawRadar() {
pushMatrix();
translate(width / 2, height - height * 0.074); // Moves the starting coordinates to new location
noFill();
strokeWeight(2);
stroke(98, 245, 31);
popMatrix();
}
void drawObject() {
pushMatrix();
translate(width / 2, height - height * 0.074); // Moves the starting coordinates to new location
strokeWeight(10); // Makes the dot more visible
stroke(255, 10, 10); // Red color for the dot
void drawLine() {
pushMatrix();
strokeWeight(9);
stroke(30, 250, 60);
translate(width / 2, height
-
line(0, 0, (height - height * 0.12) * cos(radians(iAngle)), -(height - height * 0.12) *
sin(radians(iAngle)));
popMatrix();
}
fill(0, 0, 0);
noStroke();
rect(0, height - height * 0.0648, width, height);
fill(98, 245, 31);
textSize(25);
text("10cm", width - width * 0.3854, height - height * 0.0833);
text("20cm", width - width * 0.281, height - height * 0.0833);
text("30cm", width - width * 0.177, height - height * 0.0833);
text("40cm", width - width * 0.0729, height - height * 0.0833);
38
Radar System using arduino
textSize(40);
39
Radar System using arduino
textSize(25);
fill(98, 245, 60);
for (int angle = 30; angle <= 150; angle += 30) {
translate((width / 2) * cos(radians(angle)), -(width / 2) *
sin(radians(angle))); rotate(-radians(90 - angle));
text(angle + "°", 0, 0);
resetMatrix();
}
popMatrix();
}
40
Radar System using arduino
1. Serial Communication:
Connects to the Arduino via the specified COM port (COM7) at 9600 baud.
2. Data Parsing:
3. Radar Visualization:
If an object is detected within 40 cm, the radar sweep pauses for 1 second, mimicking real radar
behavior.
41
Radar System using arduino
5. User Interface:
42
Radar System using arduino
Actual Output :
Description of output :-
Key Elements:-
Red Dots: Indicates detected object(s) within a certain distance (e.g., <40 cm).
Angle: 165°: Shows the current angle of the servo during the sweep.
Dist -: May be blank or updated shortly (usually shown with the object distance, such as "Dist: 19 cm").
Text Labels: Indicate distance rings like 10cm, 20cm, etc., which help measure how far the object
Behavior:
When an object is detected within the critical range (e.g., <40 cm), a red dot appears at its
location on the radar. The system temporarily pauses for a short time (as coded) to highlight
detection clearly.
43
Radar System using arduino
Description of output :-
Key Elements :-
No Red Dots: No object detected within the radar's defined detection range.
Dist: 19 cm: Indicates no object close enough to trigger pause logic (if detection threshold is set to
< 15–20 cm).
Behavior: The radar sweep runs continuously without pausing, as nothing is detected within the
critical range. The system just displays real-time scanning with no red dots plotted on the radar
field.
44
Radar System using arduino
10.0 Conclusion:
Through this project, you not only gain hands-on experience with ultrasonic sensors and servo motors but
also learn how to design and implement a real- time system that communicates and visualizes data
effectively. This makes the project an excellent introduction to embedded systems, offering valuable
insights into object detection, distance measurement, and radar-like applications.
In conclusion, this project enhances your problem-solving abilities, boosts your understanding of radar
technologies, and helps you gain proficiency in both hardware and software development—skills that are
essential for anyone interested in the field of electronics, robotics, and embedded systems
45
Radar System using arduino
11.0 References:
4. Banzi, M., & Shiloh, M. Getting Started with Arduino, Maker Media
46