0% found this document useful (0 votes)
27 views12 pages

Project Details

Uploaded by

k.thanvin
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views12 pages

Project Details

Uploaded by

k.thanvin
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd

PROJECT DETAILS: RADAR

SYSTEM
DONE BY SATVICK,VARUN KRITHIK,VARUN PRAMOTH,VIVAAN & THANVIN
REQUIRING MATERIALS

* ARDUINO U.N.O (MICROCONTROLLER)


* ULTRASONIC SENSOR
* DC SERVO MOTOR
* BREAD BOARD
* JUMPER WIRES
* PIECE OF PLASTIC
* ARDUINO UNO CABLE
PIN DIAGRAM

PIN DIAGRAM OF RADOR SECURITY SYSTEM


* USE ONLY JUMPER WIRES TO CONNECT
PURPOSE OF MAKING

The purpose of making Radar Security System is to sense objects which are near to us. It
is used in Military purpose, Space Stations, Shipping purpose, Airplane, Jets, etc. it is even
be used in our school which is efficient for the securities to guard our schools from
burglars and thieves.
HOW TO MAKE

 INSTALL ADUINO IDE SOFTWARE (USED FOR CODING)


 TAKE THE ADUINO WIRE CONNECT IT TO COMPUTER AND ARDUINO U.N.O
 TYPE THE CODE (NEXT PAGE)
 UPLOAD IT TO ARDUINO U.N.O
 AFTER IT HAD UPLOADED , CONNECT THE JUMPER WIRES AS SHOWN INT PIN DIAGRAM
 STICK THE PIECE OF PLASTIC IN THE SERVO MOTOR AND STICK THE ULTRASONIC
SENSOR TO THE PIECE OF PLASTIC
 TYPE YOUR CODE TO PROSSCESCING 4 APP AND RUN IT
 YOUR RADOR SYSTEM IS READY
CODE PAGE

// 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;
CODE PAGE

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 connected}
CODE PAGE

void loop() {
// rotates the servo motor from 15 to 190 degrees
for(int i=15;i<=190;i++){
myServo.write(i);
delay(30);
distance = calculateDistance();// Calls a function for calculating the distance measured
bythe Ultrasonic sensor for each degree
CODE PAGE

void loop() {
// rotates the servo motor from 15 to 190 degrees
for(int i=15;i<=190;i++){
myServo.write(i);
delay(30);
distance = calculateDistance();// Calls a function for calculating the distance measured
by the Ultrasonic sensor for each degree
CODE PAGE

// Repeats the previous lines from 190 to 15 degrees


for(int i=190;i>15;i--){
myServo.write(i);
delay(30);
distance = calculateDistance();
Serial.print(i);
Serial.print(",");
Serial.print(distance);
Serial.print(".");
}
}
CODE PAGE

// 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
CODE PAGE

digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);
duration = pulseIn(echoPin, HIGH); // Reads the echoPin, returns the sound wave travel
timein microseconds
distance= duration*0.034/2;
return distance;
}

You might also like