Professional Documents
Culture Documents
Radar System Using Arduino: Project Report
Radar System Using Arduino: Project Report
Radar System Using Arduino: Project Report
ON
2016-2020
CERTIFICATE
Thank You.
Abstract
This project is about Radar System controlled via Arduino. This Radar
system consists of an Ultrasonic Sensor and Servo Motor, these are the
major components of the system. Basic working of the system is that it
have to detect objects in its defined range. Ultra-sonic sensor is attached
to the servo motor it rotates about 180 degree and gives visual
representation on the software called processing IDE. Processing IDE
gives graphical representation and it also gives angle or position of the
obzject and distance of the object. This system is controlled through
Arduino. Arduino UNO board is sufficed to control ultrasonic sensor and
also to interface the sensor and display device. While researching, we
learned about existing navigation and obstacle detection innovations and
different systems where ultrasonic sensors are used efficiently. Main
application of this RADAR system comes into different field of
navigation, positioning, object identification, mapping, spying or tracking
and different applications. These less investment system are also suitable
for indoor applications.
Table of Contents
1.Abstract
2.Acknowledgement
3.Introduction
4.History
5.Project Aim
6.Hardware Requirements
7.Software Requirements
8.Description of the Hardware Requirements
9.Methodology
10. Connections
11.Working
12.Discussion and Result
13.Pros and Cons
14.Application
15.Conclusions
16.References
Appendix A
Appendix B
Chapter 1
1.1 Introduction
RADAR system is an object detection or tracking system which uses
radio waves to decide or get the range, height, heading, or speed of items
or objects. Radar frameworks or system arrive in an assortment of sizes
and have distinctive performance particulars. Some radars are utilized for
aviation authority at air terminals and others are utilized for long range
observation and early cautioning frameworks . There are some ways to
show radar working data. There are also some modified radar systems
which have advance technology of handling the systems. These modified
system are used at higher levels to get or extract the helpful or important
data . Our proposed system’s working principle is linked by the
following components which are is ultra-sonic sensor connected to the
microcontroller (we have chosen Arduino) digital input and output pins.
Then we have servo motor which is also connected to digital output and
input pins. Our both main components ultra-sonic sensor and servo motor
are connected simultaneously, so that when our servo motor rotates from
0 degree to 180 degree from extreme right to extreme left the motor will
rotate nearby its axis . We utilize Computer screen to demonstrate the
data (distance and angle) through software called “Processing
development Environment”.
1.2 History
It is a common assumption that radar is a by-product of World War II,
brought about by military necessity. According to Hiser (Radar
Meteorology, Third Edition, 1970), this is true only to the extent that the
war produced radar equipment in great quantities suitable for practical
use. Actually, the fundamental principle underlying all radars was first
observed in 1886 by the physicist Heinrich Hertz when he found that
electromagnetic waves could be reflected from various objects, and even
focused into beams by appropriate reflectors.
Why Arduino?
We had the following reasons strongly backing our decision to choose
the Arduino UNO Support - Thanks to its simple and accessible user
experience,
Arduino has been used in thousands of different projects and
applications. The Arduino software is easy-to-use for beginners, yet
flexible enough for advanced users. It runs on Mac, Windows, and Linux.
This has enabled a very large support base for Arduino, more than any
other microcontroller board ever released in the market. Every
problem/bug/ question that we ever had throughout the course of this
project was promptly answered by questions in online forums, as there
was a very high probability that scores of people had already posted the
same question and the issue was resolved by other experienced users.
Microcontroller ATmega328P(8-bit)
Operating Voltage (DC)5V
Input Voltage (recommended) 7-12V; (limits) 6-20V
Digital I/O Pins 14(of which 6 provide PWM output)
Analog Input Pins 6
DC Current per I/O Pin 40mA
DC Current for 3.3V pin 50mA
Flash Memory 32 KB (ATmega328) of which 0.5 KB
used by bootloader
SRAM 2 KB (ATmega328)
EEPROM 1 KB (ATmega328)
Clock Speed 16MHz
Need of External Programmer NO
Built-in-LED pin 13
Length 68.6 mm
Width 53.4mm
Weight 25 g
Table 1.1: Features of Arduino UNO
Cost Effective - The Arduino UNO, its basic variant that every beginner
to embedded systems usually starts with, is available for less than $25.
Being an open source hardware and due to its simplicity, it is easily and
widely replicable, which is also responsible for the growth of such a large
community as mentioned in the earlier reason.
Features - It is generally observed that the computing power and inbuilt
memory of the Arduino easily supports a wide variety of circuits with
multiple components along with continuous serial communication with
another device/computer. Compared to the system configuration of the
board, our project would require fairly low amount of resources.
The no. of GPIO pins on the UNO is more than sufficient considering the
need for the circuitry in our project, as we shall see when we look at the
pinouts of the servo motor and the sensor - the only two other devices
being used in the project.
One important advantage of using the UNO is that unlike most previous
programmable circuit boards, the Arduino UNO does not need a separate
piece of hardware (called a programmer) in order to load new code onto
the board - we can simply use a USB cable. The ATmega328 on the
Arduino Uno comes pre- programmed with a bootloader that allows us to
upload new code to it without the use of an external hardware
programmer.
Moreover, the components we have used work under the same operating
voltage and current conditions as an Arduino, especially considering the
fact that such components are nowadays sold with their compatibility
with Arduino in mind.
Operation of Arduino
Once a program written for an Arduino, called a "Sketch is uploaded to
the board via the Arduino IDE, the Arduino environment performs some
small transformations to make sure that the code is correct C/C++. It then
gets passed to a compiler, which turns the human readable code into
machine readable instructions (object files). Then, the code gets
combined with (linked against) the standard Arduino libraries that
provide basic functions like digitalWrite() or Serial.print(). The result is a
single Intel lex file, which contains the specific bytes that need to be
written to the program (flash) memory of the chip on the Arduino board.
This file is then uploaded to the board: transmitted over the USB or serial
connection via the bootloader already on the chip or with external
programming hardware.
Since the sensor considers the distance to an obstacle that reflects the
ultrasonic wave, we cannot use it to make trustworthy measurements of
the position of moving objects. This is majorly due to the fact that this
sensor works on the principle of transmitting a set of pulses and receiving
their reflection, before transmitting again, as we shall see later.
Hence, there is no way that we can continuously track the position of an
object with such a sensor. As far as we know, that can only be done by
some type of a camera, which would've introduced the concepts of
computer vision and taken us beyond the scope and costs of the current
project
2.3.3 HC-SR04 : Pin Definitions
. Vo - 5V Power Supply
• Trig - Trigger Pin (Input)
• Echo - Receive Pin (Output)
• GND - Power Ground
The Trig and Echo pins are used for transmission and reception of
ultrasonic waves, respectively.
We had to use a servo motor in order to rotate the HC-SR04 and give it a
wider field of view over the area around it. This Micro-Servo can rotate
approximately
180 degrees (90 in each side) with an operating speed of 0.1s/60degrees.
Moreover, it has an operating voltage of 4.8V(5V) which is in the same
range as of the Arduino UNO.
Other details:
• Weight: 9 g
• Dimension: 22.2 x 118 x 31 mm approx.
• Stall torque: 18 kgf.cm
• Operating speed: 0.1 s/60 degrees
• Operating voltage: 4.8 V (5V)
• Deadband width: 10 us (The servo will not move so long as subsequent
commands to it are within the deadband timing pulse width)
• Temperature range: 0-55C
The Micro-Servo has a signal pin to which the Arduino sends the value
of angle that it should turn to.
Pins of micro-servo motor
The Ultrasonic Sensor was mounted on top of it and the apparatus
connected to the Arduino was kept in a modified transparent plastic case.
Types
There are different types of jumper wires. Some have the same type of
electrical connector at both ends, while others have different connectors.
Some common connectors are:
Solid tips – are used to connect on/with a breadboard or female header
connector. The arrangement of the elements and ease of insertion on a
breadboard allows increasing the mounting density of both components
and jump wires without fear of short-circuits. The jump wires vary in size
and colour to distinguish the different working signals.
System Overview:
The above figure represents a brief overview of this radar system. Here,
as it is shown the controller we are using is Arduino, with the input
Ultrasonic sensor and the output is the servo motor which rotates 180
degrees. The microcontroller controls all the operations of this system,
from rotation of the motors to the obstacle detection of the ultrasonic and
representation of the result on the screen.
System block diagram:
Figure represents the system’s block diagram. Here, it can be seen how
the work flow in this radar system. The sensor is going to sense the
obstacle and determine the angle of incident and its distance from the
radar. The servo motor is constantly rotating to and fro, hence making the
sensor move. The data obtained is encoded and fed to the processing IDE
which represents it on the screen. The results are displayed further in this
paper. All these operation are done by Arduino microcontroller from the
rotation of the servo, data collection from the sensor, feeding the data to
encoder to transferring it to the display.
3.2 Connections
For Ultrasonic Sensor:
3.3 Working
The basic objective of our design is to ascertain the distance position and
speed of the obstacle set at some distance from the sensor. Ultrasonic
sensor sends the ultrasonic wave in various ways by rotating with help of
servo motors. This wave goes in air and gets reflected back subsequent to
striking some object. This wave is again detected by the sensor and its
qualities is analyzed and output is shown in screen indicating parameters,
for example, distance and position of object. Arduino IDE is utilized to
compose code and transfer coding in Arduino and causes us to detect
position or angle of servo motor and it is communicated through the
serial port alongside the covered distance of the nearest object in its way.
Output of all of this working is shown in the software called processing,
it will display the input/output and the range of the object [4].
Implementations of the sensors are done in such a way that ultra-sonic
sensor is attached on top of the servo motor because it have to detect the
object and its distance. Arduino (micro- controller) will control the ultra-
sonic sensor and servo motor and also powered will be given to both of
them through micro-controller.
The above flow chart explains the working and the decision flow of this
framework. As it can be seen the system starts with an input i.e. when the
ultrasonic sensor detects an object, or does not detects any object, at any
condition the encoder feeds the information in the controller while the
servo keeps constantly rotating. As soon as any obstacle is detected by
the ultrasonic sensor the data is immediately processed by the controller
and is fed to the IDE which shows it on the display screen. Here the
process ends with an estimated distance of the object from the system
with the angle at which it is placed.
Chapter 4
4.1 Discussion and Result
In this project we have mentioned that our system is designed consisting
following components such as, a servo- motor, an ultra-sonic sensor and
a micro- controller (Arduino). System’s objective is to track the distance
and angle of the object and to represent this information graphically,
means its output should be in graphical form which will be represented
through processing software. We can have an idea of an efficiency of this
radar by testing objects at different levels and observe how faster or
smoothly it detects an object that it finds in a way and gives us an
expected range of the obstacle. Following figure show the results of the
monitor screen of our design when the sensor rotates through the area
and detects obstacle in the way. The red area indicates the presence of
obstacle and below the angle of incident and distance is being displayed.
Testing of the system:
a) Object 1 is placed 30.5cm far from the radar, radar gives the distance
32 cm, so: error = (32-30.5)/30.5) * 100= 4.918% efficiency 1 = 100-
error =95.08%
4. It has high frequency, high sensitivity, therefore, it can easily detect the
external or deep objects.
5. This radar sensor is not affected by dust, rain, snow, and many more.
8. The Ultrasonic sensor can easily interface with any types of the
microcontroller.
5. While the radar using for inspection purpose, make sure it should
be water resistive. Otherwise highly chances of damage.
Chapter 5
5.1 Applications
This Radar System have various applications for security purposes and it
is mainly used for mapping.
o APPLCATION IN AIR FORCE: It is used in airplanes or aircraft
machines which have implemented radar system in it to detect the objects
that comes in a way. It is also used to calculate height readings.
o APPLICATION IN MARINE: This radar system also used in
ships or marine. It is implemented on big ships to calculate the distance
of other boats or ships, with the help of this sea accidents can also be
reduced by not colliding. It can also be implemented on ports to see the
distance of other ships and to monitor or control the ship movements.
o APPLICATON IN METEROLOGY: Meteorologists also uses
radar systems to track or monitor the wind. It has been become an
important equipment for climate testing. For example, to detect tornados,
storms.
5.2 Conclusions
Numerous advanced control methods gave designers to have more
command over different advanced applications. In our paper, the
recommended mapping method of whole system is assessed on small
principles or scale. The field that we have chosen for our design “Radar
System” is a very vast field and future scope of this technology is very
high. We have tremendous applications in which radar system have been
implemented or used. There is a lot of future scope of this design because
of its security capacity. It can be used in many applications. This
framework can also be developed or modified according to the rising
needs and demand.
As we have designed a short range radar therefore our research was
specified and limited. This system can only detect objects from 0 to 180
degrees only because the servo motor that we have used can rotate only
to this range. So, due to this limitation our design cannot be applied to
places or areas for obstacle detection on a larger scale. Usage of a 360
degrees rotating servo motor can make the system more efficient. We
look forward to modify this system and enhance our research work by
using a fully 360 degrees rotating servo and a higher ranged ultrasonic
sensor. We can further add features to this system i.e. making it mobile,
mounting an alarm system to it which turns on when obstacle is detected.
Further modifications could be an obstacle avoiding robot with
surveillance system.
References
[1] http://www.arduino.cc/
[2] http://www.arduinoproducts .cc/
[3]http://www.atmel.com/atmega328/
[4]http://en.wikipedia.org/wiki/File:16MHZ_Crystal.jpg
[5] http//:www.sproboticworks.com/ic%20pin%20configurat
ion/7805/Pinout.jpg/
[6] http://www.sproboticworks.com/ic%ultrasonicsensor%2 0pinout.jpg
[7] http://www.instructables.com/id/ ATMega328-usingArduino-/
[8] http://www.google.co.in/imgres/Radar_antenna.jpg&w=
546&h=697&ei=wuuK
Appendix A: Arduino Code
#include
<Servo.h>. const
int trigPin = 8;
const int echoPin =
9; // defining time
and distance long
duration; int
distance;
Servo myServo; // Object servo
void setup() {
pinMode(trigPin, OUTPUT); // trigPin as
an Output pinMode(echoPin, INPUT); //
echoPin as an Input Serial.begin(9600);
myServo.attach(10); // Pin Connected To
Servo
}
voi
d
loo
p()
{
// rotating servo i++ depicts increment of
one degree for(int i=15;i<=165;i++)
{ myServo.write(i); delay(30);
distance = calculateDistance();
Serial.print(i);
Serial.print(",");
Serial.print(distance);
Serial.print(".");
}
// Repeats the previous lines from 165 to 15
degrees for(int i=165;i>15;i--){
myServo.write(i);
delay(30);
distance = calculateDistance();
Serial.print(i);
Serial.print(",");
Serial.print(distance);
Serial.print(".");
}
}
int calculateDistance(){
digitalWrite(trigPin, LOW);
delayMicroseconds(2);
// Sets the trigPin on HIGH state for 10
micro seconds digitalWrite(trigPin, HIGH);
delayMicroseconds(10); digitalWrite(trigPin,
LOW); duration = pulseIn(echoPin, HIGH);
distance= duration*0.034/2;
return distance;
}
void
draw
() {
fill(98,245,31);
// simulating motion blur and slow fade of the
moving line noStroke(); fill(0,4);
rect(0, 0, width, height-height*0.065);
stroke(98,2
45,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);
// draws the angle lines line(-width/2,0,width/2,0); line(0,0,
(-width/2)*cos(radians(30)),(-width/2)*sin(radians(30)));
line(0,0,(-width/2)*cos(radians(60)),(-
width/2)*sin(radians(60))); line(0,0,(-
width/2)*cos(radians(90)),(-width/2)*sin(radians(90)));
line(0,0,(-width/2)*cos(radians(120)),(-
width/2)*sin(radians(120))); line(0,0,(-
width/2)*cos(radians(150)),(-width/2)*sin(radians(150)));
line((-width/2)*cos(radians(30)),0,width/2,0); popMatrix();
}
void drawObject()
{ pushMatrix();
pushMatrix();
if(iDistance>40)
{ noObject = “Out
of Range”;
}
else { noObject
= “In Range”;
}
fill(
0,0,
0);
no
Str
oke
();
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);
textSize(40); text(“Harsh Sharma”, width-width*0.875, height-
height*0.0277); text(“Angle: ” + iAngle +” °”, width-
width*0.48, height-height*0.0277); text(“Distance: “, width-
width*0.26, height-height*0.0277); if(iDistance<40) {
text(” ” + iDistance +” cm”, width-width*0.225, height-height*0.0277);
}
textSiz
e(25);
fill(98,
245,60
);
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();
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();
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();
translate(width-width*0.513+width/2*cos(radians(120)),(height-
height*0.07129)- width/2*sin(radians(120))); rotate(radians(-30));
text(“120°”,0,0); resetMatrix();
translate((width-width*0.5104)+width/2*cos(radians(150)),(height-
height*0.0574)- width/2*sin(radians(150))); rotate(radians(-60));
text(“150°”,0,0); popMatrix();
}