Arduino Based RADAR System
Arduino Based RADAR System
Chapter2 aims at the literature survey of the project consisting of the basic idea of the project,
and how we got the idea to make this project, all the help like websites, journals etc.
Chapter3 covers the list of the components used in the projects and how to use them.
Chapter 4 covers the implementation of the project like boot loading to make own Arduino
board, software used and the problems faced during the course of action.
Finally, Chapter 5 deals with the present as well as the future scope of the project, like how
we can make use of this project for the betterment of the mankind.
1.4 Overview
Project is based on Adriano System.
RADAR is an acronym for Radio Detection And Ranging.
Arduino is an open-source prototyping platform able to read inputs and turn it into an
output by sending a set of instructions to the microcontroller on the board.
Often it has real time computing constraints.
Is used to detect the object in air and water.
Can potentially also be used for imaging the object.
Computerized objects will able communicate without human intervention.
Moreover, in this fast moving world there is an immense need for the tools that can be used
for the betterment of the mankind rather than devastating their lives. Hence, we decided to
make some of the changes and taking the advantage of the processing capabilities of Arduino,
we decided to make up the module more application specific.
Hence, from the idea of the self driving cars came the idea of self parking cars. The main
problem of the people in India and even most of the countries is safety while driving. So, we
came up with a solution to that by making use of this project to continuously scan the area for
traffic, population etc. and as well as protection of the vehicles at the same time to prevent
accidents or minor scratches to the vehicles.
To Display
Microcontroller
Operating Voltage
Input Voltage
(recommended)
Input Voltage (limits)
Digital I/O Pins
Analog Input Pins
DC Current per I/O Pin
DC Current for 3.3V Pin
Flash Memory
ATmega328
5V
7-12V
6-20V
14 (of which 6 provide PWM output)
6
40 mA
50 mA
32 KB (ATmega328) of which 0.5 KB used by
bootloader
2 KB (ATmega328)
1 KB (ATmega328)
16 MHz
SRAM
EEPROM
Clock Speed
Features:
Inexpensive: Arduino boards are relatively inexpensive compared to other
microcontroller platforms. The least expensive version of the Arduino module can be
assembled by hand.
Cross-platform: The Arduino Software (IDE) runs on Windows, Macintosh OSX, and
Linux operating systems. Most microcontroller systems are limited to Windows.
Simple, clear programming environment: it's conveniently based on the Processing
programming environment, so students learning to program in that environment will
be familiar with how the Arduino IDE works.
Open source and extensible software: he language can be expanded through C++
libraries
Open source and extensible hardware: designers can make their own version of the
module, extending it and improving it.
The ATmega328 is a single chip micro-controller created by Atmel and belongs to the mega
AVR series. The high-performance Atmel 8-bit AVR RISC-based microcontroller combines
32 KB ISP flash memory with read-while-write capabilities, 1 KB EEPROM, 2 KB SRAM,
23 general purpose I/O lines, 32 general purpose working registers, three flexible
timer/counters with compare modes, internal and external interrupts, serial programmable
usart, a byte-oriented 2-wire serial interface, spi serial-port, a 6-channel 10 bit Analog to
Digital converter (8-channels)in tqfp and qfn/mlf packages),programmable watchdog timer
with internal oscillator and five software selectable power saving modes. The device operates
between 1.8-5.5 volts. By executing powerful instructions in a single clock cycle, the device
achieves throughputs approaching 1 MIPS per MHz, balancing power consumption and
processing speed.
wristwatches), to provide a stable clock signal for digital integrated circuits, and to stabilize
frequencies for radio transmitters and receivers. The most common type of piezoelectric
resonator used is the quartz crystal, so oscillator circuits incorporating them became known
as crystal oscillators, but other piezoelectric materials including polycrystalline ceramics are
used in similar circuits.
Quartz crystals are manufactured for frequencies from a few tens of kilohertz to hundreds of
megahertz. More than two billion crystals are manufactured annually. Most are used for
consumer devices such as wristwatches, clocks, radios, computers, and cell phones. Quartz
crystals are also found inside test and measurement equipment, such as counters, signal
generators, and oscilloscopes.
Ultrasonic sensors (also known as transceivers when they both send and receive, but more
generally called transducers) work on a principle similar to radar or sonar which evaluate
attributes of a target by interpreting the echoes from radio or sound waves respectively.
Ultrasonic sensors generate high frequency sound waves and evaluate the echo which is
received back by the sensor. Sensors calculate the time interval between sending the signal
and receiving the echo to determine the distance to an object.
This technology can be used for measuring wind speed and direction (anemometer), tank or
channel level, and speed through air or water. For measuring speed or direction a device uses
multiple detectors and calculates the speed from the relative distances to particulates in the air
or water. To measure tank or channel level, the sensor measures the distance to the surface of
the fluid. Further applications include: humidifiers, sonar, medical ultra sonography, burglar
alarms and testing. Systems typically use a transducer which generates sound waves in the
10
ultrasonic range, above 18,000 hertz, by turning electrical energy into sound, then upon
receiving the echo turn the sound waves into electrical energy which can be measured and
displayed.
Hardware Features
PIO control
Software Features
Default Baud rate: 38400, Data bits:8, Stop bit:1,Parity:No parity, Data control: has
supported baud rate: 9600,19200,38400,57600,115200,230400,460800.
12
module HC-05
3.8 Using
Arduino Software
The
Arduino
integrated
development
environment (IDE) is
a
cross-platform
application written in
Java, and is derived from the IDE for the Processing programming language and the Wiring
projects. It is designed to introduce programming to artists and other newcomers unfamiliar
with software development. It includes a code editor with features such as syntax
highlighting, brace matching, and automatic indentation, and is also capable of compiling and
uploading programs to the board with a single click. A program or code written for Arduino is
called a "sketch".
Arduino programs are written in C or C++. The Arduino IDE comes with a software library
called "Wiring" from the original Wiring project, which makes many common input/output
operations much easier.
Users only need define two functions to make a run able cyclic executive program:
Setup(): a function run once at the start of a program that can initialize settings
Loop(): a function called repeatedly until the board powers off.
Open the Arduino IDE software and select the board in use.
To select the board:
Go to Tools.
Select Board.
software
13
Boot loading an Atmega328 using the Arduino board by uploading the boot loader
program to the Microcontroller.
14
Making the connections on a general purpose PCB, connecting the crystal osicillator,
capacitors, connectors for the connections to Arduino board etc.
15
After you have done all this, then only the minimum circuitry like crystal oscillator,
capacitors, connectors, power supply is required to complete the board. The same circuit can
be made on the PCB, either designed or general purpose. Since, Arduino is an Open-Source.
Hence, it is easy to make and can have any enhancements as per the requirements.
A servomotor is a rotary actuator that allows for precise control of angular position, velocity
and acceleration.
A normal servo motor has three terminals:
1.VCC
2. GND
17
3. PULSE
A servo motor works at normally 4.8 to 6 volts. Gnd is provided by connecting it to the
Ground of the Arduino. The total time for a servo motor pulse is usually 20ms. To move it to
one end of say 0 degree angle, a 1ms pulse is used and to move it to other end i.e 180 degree,
a 2ms pulse is applied. Hence, according to this to move the axis of the servo motor to the
center, a pulse of time 1.5 ms should be applied. For this, the pulse wire of the servo motor is
connected to the Arduino that provides the digital pulses for pulse width modulation of the
pulse. Hence, by programming for a particular pulse interval the servo motor can be
controlled easily.
18
19
an open
environment (IDE)
built
source programming
for
the
electronic
media
art,
development
and visual
20
21
22
4.7 Program
void setup() {
size (1920, 1080); // ***CHANGE THIS TO YOUR SCREEN RESOLUTION***
smooth();
myPort = new Serial(this,"COM4", 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.
orcFont = loadFont("OCRAExtended-30.vlw");
}
void draw() {
fill(98,245,31);
textFont(orcFont);
// simulating motion blur and slow fade of the moving line
noStroke();
fill(0,4);
rect(0, 0, width, height-height*0.065);
fill(98,245,31); // green color
// calls the functions for drawing the radar
drawRadar();
drawLine();
drawObject();
drawText();}
The idea of making an Ultrasonic RADAR appeared to us while viewing the technology used
in defense, be it Army, Navy or Air Force and now even used in the automobiles employing
features like automatic/driverless parking systems, accident prevention during driving etc.
The applications of such have been seen recently in the self parking car systems launched by
AUDI, FORD etc. And even the upcoming driverless cars by Google like Prius and Lexus.
The project made by us can be used in any systems you may want to use like in a car, a
bicycle or anything else. The use of Arduino in the project provides the flexibility of usage of
the above-said module according to the requirements.
5.1
Applications in Air Force
In aviation, aircraft are equipped with radar devices that warn of aircraft or other obstacles in
or approaching their path, display weather information, and give accurate altitude readings.
The first commercial device fitted to aircraft was a 1938 Bell Lab unit on some United Air
Lines aircraft. Such aircraft can land in fog at airports equipped with radar-assisted groundcontrolled approach systems in which the plane's flight is observed on radar screens while
operators radio landing directions to the pilot.
24
25
Figure
5.4
Army Using Radar to Spot Suicide Bombers From100 Yards
Two video cameras automatically detect and track individuals walking anywhere near the
system, within the range of a soccer field. Low-level radar beams are aimed at them and then
reflected back to a computer, which analyzes the signals in a series of algorithms. It does this
by comparing the radar return signal (which emits less than a cell phone) to an extensive
library of normal responses. Those responses are modeled after people of all different
shapes and sizes (SET got around to adding females in 2009). It then compares the signal to
another set of anomalous responses any anomaly, and horns go off. Literally, when the
computer detects a threat, it shows a red symbol and sounds a horn. No threat and the symbol
turns green, greeting the operators with a pleasant piano riff.
short-term weather
forecasting and
storms,
watching
for severe
precipitationtypes,
26
weather such
}
// 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(".");
}
}
// Function for calculating the distance measured by the Ultrasonic sensor
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); // Reads the echoPin, returns the sound wave travel
time in microseconds
distance= duration*0.034/2;
29
return distance;
}// Includes the Servo library
#include <Servo.h>.
// Defines Tirg and Echo pins of the Ultrasonic Sensor
const int trigPin = 10;
const int echoPin = 11;
// Variables for the duration and the distance
long duration;
int distance;
Servo myServo; // Creates a servo object for controlling the servo motor
void setup() {
pinMode(trigPin, OUTPUT); // Sets the trigPin as an Output
pinMode(echoPin, INPUT); // Sets the echoPin as an Input
Serial.begin(9600);
myServo.attach(12); // Defines on which pin is the servo motor attached
}
void loop() {
// rotates the servo motor from 15 to 165 degrees
for(int i=15;i<=165;i++){
myServo.write(i);
delay(30);
distance = calculateDistance();// Calls a function for calculating the distance measured by
the Ultrasonic sensor for each degree
30
31
REFERENCES
1.http://www.arduino.cc/
2.http://www.arduinoproduct.cc/
3.http://www.atmel.com/atmega328/
4.http://en.wikipedia.org
32
5.http://www.google.co.in/sevomotor
6. http://www.sprobotics.com/ic%ultrasoicsensor
7.http://www.google.co.in/radarantenna
8.http://www.sprobotics.com/7805
9.http://www.google.co.in/images
10.http://https://encrypted.google.com/search?q=bluetooth
33