PROJECT
REPORT
RADAR SIMULATION USING
ARDUINO
ADITYA OJHA
(2K19/CE/007)
ADITYA GARG
(2K19/CE/006)
INTRODUCTION  In this project,We will show you how to design a simple Radar
Application usingArduino and Processing.This Arduino Radar
Project is implemented with the help of ProcessingApplication.
 Even though the title says Arduino Radar Project, technically the
project is based on Radar technology but I will be using an Ultrasonic
Sensor to determine the presence of any object in a particular
range.
 An ultrasonic sensor is an electronic device that measures the
distance of a target object by emitting ultrasonic sound waves, and
converts the reflected sound into an electrical signal.
PROJECT
OVERVIEW
The Arduino Radar Project is more of a visual project than it is a
circuit implementation. I will be using different hardware like
Arduino UNO, LCD screen, HC-SR04 Ultrasonic Sensor and a Servo
Motor but the main aspect is the visual representation in the
ProcessingApplication.
Arduino is an open-source platform used for building electronics
projects. Arduino consists of both a physical programmable circuit
board (often referred to as a microcontroller) and a piece
of software known as IDE (Integrated Development Environment)
that runs on computer, used to write and upload computer code
to the physical board.The programme is written in C or C++.The
programmes write on IDE is known as sketches.
 It will collect the information from the Ultrasonic Sensor with the
help of Arduino and pass it to Processing where distance is
displayed on LCD screen.
The flowchart of system is shown below:
CIRCUIT DIAGRAM
COMPONENTS
Arduino Uno JumperWires LCD display
Potentiometer Breadboard Resistor
Ultrasonic
Distance
Sensor
Servo Motor
PRINCIPLE Ultrasonic sensors emit short, high-frequency sound pulses at
regular intervals.These propagate in the air at the velocity of
sound.
These pulses strike an object, then they are reflected back as
echo signals to the sensor, which itself computes the distance
to the target based on the time-span between emitting the
signal and receiving the echo.
As the distance to an object is determined by measuring the
time of flight and not by the intensity of the sound, ultrasonic
sensors are excellent at suppressing background interference.
Virtually all materials which reflect sound can be detected,
regardless of their colour. Even transparent materials or thin
foils represent no problem for an ultrasonic sensor.
DISTANCE
CALCULATION
 Micro-sonic ultrasonic sensors are suitable for target distances
from 20 mm to 10 m and as they measure the time of flight they
can ascertain a measurement with pinpoint accuracy.
In our experiment, range of ultrasonic sensor will be from 2.5 cm
to 330 cm.
Distance is measured using given method:
Time taken by pulse is actually for to and from travel of
ultrasonic signals, while we need only half of this.
Therefore time is
taken as time/2.
Distance = Speed *Time/2
Speed of sound at sea level = 343 m/s or 34300 cm/s
Thus, Distance = 17150 *Time (unit cm)
SOURCE
CODE
#include <Servo.h>
#include <LiquidCrystal.h>
Servo robotNeck; //servo variable with name robotNeck
LiquidCrystal lcd(1, 2, 4, 5, 6, 7); // Creates an LCD object with parameters: (rs, enable, d4, d5, d6, d7)
//assign pin numbers
//const int trigPin = 9; //Pin 9 where ultrasonic distance sensor trig is connected
//const int echoPin = 10; //Pin 10 where ultrasonic distance sensor echo is connected
const int sigPin = 13;
int distanceCm, distanceIn;
long timeVal;
const int speedOfSound = 0.0343; //sets the speed of sound to a constant value
void setup() {
robotNeck.attach(3); //Servo is connected to arduino pin ~3
//pinMode(echoPin, INPUT); //sets echoPin as input
//pinMode(trigPin, OUTPUT); //sets trigPin as output
lcd.begin(16, 2); //Initializes the lcd and specifies the dimension (width and height, respectively) of the
display
lcd.setCursor(3,0);
lcd.print("Welcome to");
delay(1000);
lcd.clear();
lcd.setCursor(4,0);
lcd.print("ADITYA'S");
lcd.setCursor(1,1);
lcd.print("Radar System");
delay(2500);
lcd.clear();
lcd.setCursor(0,0);
lcd.print("Booting.");
delay(500);
lcd.clear();
lcd.print("Booting..");
delay(1000);
lcd.clear();
lcd.print("Booting...");
delay(1500);
lcd.clear();
}
void loop() {
//Rotate robotNeck from 15` to 165` because of limits which might draw too much current
for(int j=15; j<=165; j++){
robotNeck.write(j);
delay(10);
distanceCm = distCalc();
distanceIn = distCalc();
//To display value on the lcd
lcd.setCursor(0,0); // Sets the location at which subsequent text written to the LCD will be
displayed
lcd.print("Distance: "); // Prints string "Distance: " on the LCD
lcd.print(distanceCm); // Prints the distance value from the sensor
lcd.print("cm"); // Prints the unit of measurement
delay(10); //waits for 10 milliseconds
lcd.setCursor(0,1); // Sets the location at which subsequent text written to the LCD will be
displayed
lcd.print("Distance: "); // Prints string "Distance: " on the LCD
lcd.print(distanceIn); // Prints the distance value from the sensor
lcd.print("in"); // Prints the unit of measurement
delay(100); //waits for 100 milliseconds
}
for(int j=165; j>=15; j--){
robotNeck.write(j);
delay(10);
distanceCm = distCalc();
distanceIn = distCalc();
//To display value on the lcd
lcd.setCursor(0,0); // Sets the location at which subsequent text written to the LCD will be displayed
lcd.print("Distance: "); // Prints string "Distance: " on the LCD
lcd.print(distanceCm); // Prints the distance value from the sensor
lcd.print("cm");// Prints the unit of measurement
delay(100); //waits for 100 milliseconds
lcd.setCursor(0,1); // Sets the location at which subsequent text written to the LCD will be displayed
lcd.print("Distance: "); // Prints string "Distance: " on the LCD
lcd.print(distanceIn); // Prints the distance value from the sensor
lcd.print("in"); // Prints the unit of measurement
delay(100); //waits for 100 milliseconds
}
}
int distCalc(){
pinMode(sigPin, OUTPUT);
digitalWrite(sigPin, LOW);
delayMicroseconds(2);
digitalWrite(sigPin, HIGH);
delayMicroseconds(10);
digitalWrite(sigPin, LOW);
// The same pin is used to read the signal from the PING))): a HIGH pulse
// whose duration is the time (in microseconds) from the sending of the ping
// to the reception of its echo off of an object.
pinMode(sigPin, INPUT);
timeVal = pulseIn(sigPin, HIGH);
//converts time to distance
distanceCm = timeVal / 29 / 2;
distanceIn = timeVal / 74 / 2;
return distanceCm, distanceIn;
}
WORKING Breadboard, arduino uno, servo motor, lcd screen, ultrasonic
sensor are dragged and placed from sidebar to workplace.
Connections are made between various components as per
the circuit diagram using jumper wires.
Resistor and potentiometer is connected to the breadboard.
Processing code is entered in basicC++ language to give
suitable commands to the various components in the circuit.
Simulation button is pressed.
Potentiometer is set up to increase/decrease brightness of
LCD screen.
Distance is set up using ultrasonic distance sensor which is
further processed by arduino and LCD screen displays it,
while servo meter rotates from 15 to 165 degree.
Net rotation of servo motor is 150 degrees.
Subsequent readings are taken.
ADVANTAGES  It is not affected by color or transparency. Basically, the
Ultrasonic Sensors transmit the sound off of the object, hence
the color and transparency have no effect on the radar reading.
 Any dark environments have no effect on this Arduino radar
sensor’s detection procedure. So, it can also use at night.
 Easy to design and low price.The ultrasonic sensors are
available at the market with very cheap price.
 It has high frequency, high sensitivity, therefore, it can easily
detect the external or deep objects.
This radar sensor is not affected by dust, rain, snow, and many
more.
 It has a self-cleaning system to continue running and less
downtime.
The Arduino Radar Sensor is easy to use. Also, it is completely
safe during the operation to nearby objects, human or
equipment.
REAL LIFE
APPLICATIONS
DETECTING OBSTACLES: Ultrasonic sensors enable the
contactless protection of automated guided vehicles in the
driving direction.
CHECKING DIAMETER:The diameter of a roll or coil of
material can be detected by an ultrasonic sensor with analogue
output and the drive adjusted or brake applied accordingly.
FILLING LEVEL MONITORING: Detection of filling levels from
just a few millimetres up to 8 m can be made.
QUALITY CONTROL: on a packaging machine, A broad
spectrum of ultrasonic sensors are available for the detection
of objects during fast processes.
WIRE BREAK DETECTION: during the winding/unwinding of
wires, Depending on the size of the drum, ultrasonic sensors
can be used to detect any break in wire.
CONCLUSION
This project aims on the use of Ultrasonic
Sensor connected to the Arduino UNO board and the signal
from the sensor further provided to the screen formed on the
laptop to measure the presence of any obstacle in front of the
sensor as well as determine the range at which the obstacle
is detected by the sensor. Also, in addition to it, a LCD screen
connected to it displays the distance of the object from the
ultrasonic sensor in centimeter and inches.
This Photo by Unknown author is licensed under CC BY-SA.

Arduino radar system

  • 1.
    PROJECT REPORT RADAR SIMULATION USING ARDUINO ADITYAOJHA (2K19/CE/007) ADITYA GARG (2K19/CE/006)
  • 2.
    INTRODUCTION  Inthis project,We will show you how to design a simple Radar Application usingArduino and Processing.This Arduino Radar Project is implemented with the help of ProcessingApplication.  Even though the title says Arduino Radar Project, technically the project is based on Radar technology but I will be using an Ultrasonic Sensor to determine the presence of any object in a particular range.  An ultrasonic sensor is an electronic device that measures the distance of a target object by emitting ultrasonic sound waves, and converts the reflected sound into an electrical signal.
  • 3.
    PROJECT OVERVIEW The Arduino RadarProject is more of a visual project than it is a circuit implementation. I will be using different hardware like Arduino UNO, LCD screen, HC-SR04 Ultrasonic Sensor and a Servo Motor but the main aspect is the visual representation in the ProcessingApplication. Arduino is an open-source platform used for building electronics projects. Arduino consists of both a physical programmable circuit board (often referred to as a microcontroller) and a piece of software known as IDE (Integrated Development Environment) that runs on computer, used to write and upload computer code to the physical board.The programme is written in C or C++.The programmes write on IDE is known as sketches.  It will collect the information from the Ultrasonic Sensor with the help of Arduino and pass it to Processing where distance is displayed on LCD screen. The flowchart of system is shown below:
  • 4.
  • 5.
    COMPONENTS Arduino Uno JumperWiresLCD display Potentiometer Breadboard Resistor Ultrasonic Distance Sensor Servo Motor
  • 6.
    PRINCIPLE Ultrasonic sensorsemit short, high-frequency sound pulses at regular intervals.These propagate in the air at the velocity of sound. These pulses strike an object, then they are reflected back as echo signals to the sensor, which itself computes the distance to the target based on the time-span between emitting the signal and receiving the echo. As the distance to an object is determined by measuring the time of flight and not by the intensity of the sound, ultrasonic sensors are excellent at suppressing background interference. Virtually all materials which reflect sound can be detected, regardless of their colour. Even transparent materials or thin foils represent no problem for an ultrasonic sensor.
  • 7.
    DISTANCE CALCULATION  Micro-sonic ultrasonicsensors are suitable for target distances from 20 mm to 10 m and as they measure the time of flight they can ascertain a measurement with pinpoint accuracy. In our experiment, range of ultrasonic sensor will be from 2.5 cm to 330 cm. Distance is measured using given method: Time taken by pulse is actually for to and from travel of ultrasonic signals, while we need only half of this. Therefore time is taken as time/2. Distance = Speed *Time/2 Speed of sound at sea level = 343 m/s or 34300 cm/s Thus, Distance = 17150 *Time (unit cm)
  • 8.
    SOURCE CODE #include <Servo.h> #include <LiquidCrystal.h> ServorobotNeck; //servo variable with name robotNeck LiquidCrystal lcd(1, 2, 4, 5, 6, 7); // Creates an LCD object with parameters: (rs, enable, d4, d5, d6, d7) //assign pin numbers //const int trigPin = 9; //Pin 9 where ultrasonic distance sensor trig is connected //const int echoPin = 10; //Pin 10 where ultrasonic distance sensor echo is connected const int sigPin = 13; int distanceCm, distanceIn; long timeVal; const int speedOfSound = 0.0343; //sets the speed of sound to a constant value void setup() { robotNeck.attach(3); //Servo is connected to arduino pin ~3 //pinMode(echoPin, INPUT); //sets echoPin as input //pinMode(trigPin, OUTPUT); //sets trigPin as output lcd.begin(16, 2); //Initializes the lcd and specifies the dimension (width and height, respectively) of the display lcd.setCursor(3,0); lcd.print("Welcome to"); delay(1000); lcd.clear(); lcd.setCursor(4,0); lcd.print("ADITYA'S"); lcd.setCursor(1,1); lcd.print("Radar System"); delay(2500); lcd.clear(); lcd.setCursor(0,0); lcd.print("Booting."); delay(500); lcd.clear(); lcd.print("Booting.."); delay(1000); lcd.clear(); lcd.print("Booting..."); delay(1500); lcd.clear(); } void loop() { //Rotate robotNeck from 15` to 165` because of limits which might draw too much current for(int j=15; j<=165; j++){ robotNeck.write(j); delay(10); distanceCm = distCalc(); distanceIn = distCalc(); //To display value on the lcd lcd.setCursor(0,0); // Sets the location at which subsequent text written to the LCD will be displayed lcd.print("Distance: "); // Prints string "Distance: " on the LCD lcd.print(distanceCm); // Prints the distance value from the sensor lcd.print("cm"); // Prints the unit of measurement delay(10); //waits for 10 milliseconds lcd.setCursor(0,1); // Sets the location at which subsequent text written to the LCD will be displayed lcd.print("Distance: "); // Prints string "Distance: " on the LCD lcd.print(distanceIn); // Prints the distance value from the sensor lcd.print("in"); // Prints the unit of measurement delay(100); //waits for 100 milliseconds
  • 9.
    } for(int j=165; j>=15;j--){ robotNeck.write(j); delay(10); distanceCm = distCalc(); distanceIn = distCalc(); //To display value on the lcd lcd.setCursor(0,0); // Sets the location at which subsequent text written to the LCD will be displayed lcd.print("Distance: "); // Prints string "Distance: " on the LCD lcd.print(distanceCm); // Prints the distance value from the sensor lcd.print("cm");// Prints the unit of measurement delay(100); //waits for 100 milliseconds lcd.setCursor(0,1); // Sets the location at which subsequent text written to the LCD will be displayed lcd.print("Distance: "); // Prints string "Distance: " on the LCD lcd.print(distanceIn); // Prints the distance value from the sensor lcd.print("in"); // Prints the unit of measurement delay(100); //waits for 100 milliseconds } } int distCalc(){ pinMode(sigPin, OUTPUT); digitalWrite(sigPin, LOW); delayMicroseconds(2); digitalWrite(sigPin, HIGH); delayMicroseconds(10); digitalWrite(sigPin, LOW); // The same pin is used to read the signal from the PING))): a HIGH pulse // whose duration is the time (in microseconds) from the sending of the ping // to the reception of its echo off of an object. pinMode(sigPin, INPUT); timeVal = pulseIn(sigPin, HIGH); //converts time to distance distanceCm = timeVal / 29 / 2; distanceIn = timeVal / 74 / 2; return distanceCm, distanceIn; }
  • 10.
    WORKING Breadboard, arduinouno, servo motor, lcd screen, ultrasonic sensor are dragged and placed from sidebar to workplace. Connections are made between various components as per the circuit diagram using jumper wires. Resistor and potentiometer is connected to the breadboard. Processing code is entered in basicC++ language to give suitable commands to the various components in the circuit. Simulation button is pressed. Potentiometer is set up to increase/decrease brightness of LCD screen. Distance is set up using ultrasonic distance sensor which is further processed by arduino and LCD screen displays it, while servo meter rotates from 15 to 165 degree. Net rotation of servo motor is 150 degrees. Subsequent readings are taken.
  • 11.
    ADVANTAGES  Itis not affected by color or transparency. Basically, the Ultrasonic Sensors transmit the sound off of the object, hence the color and transparency have no effect on the radar reading.  Any dark environments have no effect on this Arduino radar sensor’s detection procedure. So, it can also use at night.  Easy to design and low price.The ultrasonic sensors are available at the market with very cheap price.  It has high frequency, high sensitivity, therefore, it can easily detect the external or deep objects. This radar sensor is not affected by dust, rain, snow, and many more.  It has a self-cleaning system to continue running and less downtime. The Arduino Radar Sensor is easy to use. Also, it is completely safe during the operation to nearby objects, human or equipment.
  • 12.
    REAL LIFE APPLICATIONS DETECTING OBSTACLES:Ultrasonic sensors enable the contactless protection of automated guided vehicles in the driving direction. CHECKING DIAMETER:The diameter of a roll or coil of material can be detected by an ultrasonic sensor with analogue output and the drive adjusted or brake applied accordingly. FILLING LEVEL MONITORING: Detection of filling levels from just a few millimetres up to 8 m can be made. QUALITY CONTROL: on a packaging machine, A broad spectrum of ultrasonic sensors are available for the detection of objects during fast processes. WIRE BREAK DETECTION: during the winding/unwinding of wires, Depending on the size of the drum, ultrasonic sensors can be used to detect any break in wire.
  • 13.
    CONCLUSION This project aimson the use of Ultrasonic Sensor connected to the Arduino UNO board and the signal from the sensor further provided to the screen formed on the laptop to measure the presence of any obstacle in front of the sensor as well as determine the range at which the obstacle is detected by the sensor. Also, in addition to it, a LCD screen connected to it displays the distance of the object from the ultrasonic sensor in centimeter and inches.
  • 14.
    This Photo byUnknown author is licensed under CC BY-SA.