0% found this document useful (0 votes)
38 views

LSiot

Uploaded by

mca.lokesh24
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views

LSiot

Uploaded by

mca.lokesh24
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 25

VISVESVARAYA TECHNOLOGICAL UNIVERSITY

JNANA SANGAMA, BELGAVI-590018, KARNATAKA

Mini-Project Report
[22MCAL37]
on

“Location Security using ultrasonic sensor as a radar”

Submitted in partial fulfillment of the requirements for the award of degree of

Master of Computer Applications

By

Lokesha S
1RN22MC023
Under the guidance of

Ms. Jyothi T
Assistant Professor

Department of Master of Computer Applications

RNS Institute of Technology


Dr. Vishnuvardhan Road, Rajarajeshwari Nagar Post, Channasandra Bangalore - 560098.
2022-2023
RNS INSTITUTE OF TECHNOLOGY
Dr. Vishnuvardhan Road, Channasandra, Rajarajeshwari Nagar Post, Bengaluru - 560098.

DEPARTMENT OF MASTER OF COMPUTER


APPLICATIONS

CERTIFICATE
This is to certify that Mr. Lokesha S of 3rd Semester MCA, bearing the USN:
1RN22MC023, has completed their 3rd Sem IoT mini- project topic entitled “Location
Security using ultrasonic sensor as radar” as a partial fulfilment for the award of the
degree of Master of Computer Applications, during the year 2024, under our supervision.

Project Coordinator

Ms. Jyothi T
Assistant Professor
Dept. of MCA, RNSIT
Bengaluru – 98.

Head of Department Principal

Dr. N P Kavya Dr. M K Venkatesha


Head of Department Principal
Dept. of MCA, RNSIT RNSIT
Bengaluru – 98. Bengaluru – 98.
DECLARATION

I am Mr.Lokesha S students of 3rd MCA, RNS Institute of Technology, bearing


1RN22MC023 hereby declare that the project entitled “Location Security using
ultrasonic sensor as radar” has been carried out by us under the supervision of Project
Coordinator Ms. Jyothi T, Assistant Professor, Department of MCA and submitted in
partial fulfillment of the requirements for the award of the Degree of Master of Computer
Applications by the Visvesvaraya Technological University during the academic year 2023-
2024. This report has not been submitted to any other Organization/University for any award
of degree or certificate.

Name: Lokesha S
USN: 1RN22MC023

Signature of the candidates

i
ACKNOWLEDGEMENT

The successful completion of Mini-Project work depends on the co-operation and help of
many people, other than those who directly execute the work. We take this opportunity to
acknowledge for the help received for valuable assistance and cooperation from many
sources.

Our institution has played a paramount role in guiding us in right direction. We would like
to profoundly thank the Management of RNS Institute of Technology for providing such
healthy environment for successful completion of this project work.

We express us sincere words of gratitude to our Chairman Sri Dr. R N Shetty, for creating
an academic environment to brighten our career.

We would also like to thank our beloved Principal, Dr. M K Venkatesha, for providing
the necessary facilities to carry out this work.

We are extremely grateful to our beloved HoD, Dr. N P Kavya, for having accepted to
patronize us in the right direction with all her wisdom.

We would also express us heartfelt thanks to our Project Coordinator Ms. Jyothi T,
Assistant Professor, Department of MCA for her constant guidance and devoted support.

Name: Lokesha S
USN: 1RN22MC023

ii
ABSTRACT

The project is design to develop distance measurement system using ultrasonic waves
and interfaced with arduino we know that human audible range is 20hz to 20khz we can utilize
these frequency range waves through ultrasonic sensors HC-SR04 the advantage of this sensor
when interfacing with ardiuno which is control and sensing system a proper distance
measurement can be made with new techniques as large amount. The distance measurement
system can be widely used as range meters in industries. The hardware part of ultrasonic sensor
is interfaced with arduino this method of measurement is efficient way to measure small
distance. The distance of an obstacle from the sensor is measured through ultrasonic sensor
after knowing the speed of the sound the distance can be calculated.

iii
TABLE OF CONTENTS

Chapter Name Page No


Declaration i
Acknowledgement ii
Abstract
iii
Table of contents
iv
List of Tables v
List of Figures vi

CHAPTERS

1. INTRODUCTION 01
1.1.
Project Overview 01

2. AIM, OBJECTIVE AND SCOPE OF THE PROJECT 02


3. LITERATURE SURVEY 03

4. REQUIREMENTS SPECIFICATION 04

4.1. Hardware and Software Requirements 04

4.2. Hardware Requirements 05

1.2.
Software Requirements 07

5. ANALYSIS AND DESIGN 08


6. SYSTEM ANALYSIS 09

7. IMPLEMENTATION 09

7.1 Source Code 10

7.2 Snapshot of Project 15

8. CONCLUSION 16

8.1 Future Enhancement 16

REFERENCES 17

iv
LIST OF TABLES

Table No. Name Page No.

4.1 Hardware Requirements 04


4.2 Software Requirements 04

v
LIST OF FIGURES

Figure No. Name Page No.

4.1 Arduino board 05

4.2 Ultrasonic sensor 05

4.3 Servo motor 06

4.4 Jumper wires 07

5.1 Circuit diagram 08

6.1 Block diagram 09

CHAPTER - 1

INTRODUCTION

Proposed design provides security and saving of electricity at home, office, and Godown. It
is suitable for remote location where electricity not available. This system operates in real
time to provide security using Sonar sensor and Data storage. Data storage can send store
message to our application when sonar detector detect any distance and also switch on the
warning sound. It also incorporates employees to get message transaction with the admin and
with the other employees. This system also store the data at the time of alert. At the time of
alert signal the system will store the data such as angle at which the object is coming and the
distance that it is appearing this system will provide security to the particular location where
the location is located in the vast space.

1.1 Project Overview

Today's the developing world shows various adventures in every field. In each field the small
vi
requirements are very essential to develop big calculations.

By using different sources we can modify it as our requirements and implement in various
field. In earlier days the measurements generally occur through measuring devices. But now
a day's digitization as is on height. Therefore we use a proper display unit for measurement
of distance. We can use sources such as sound waves which are known as ultrasonic waves
using ultrasonic sensors and convert this sound wave for the measurement of various units
such as distance, speed. This technique of distance measurement using ultrasonic in air
includes continuous pulse echo method, a burst of pulse is sent for transmission medium and
is reflected by an object kept at specific distance.

The time taken for the sound wave to propagate from transmitter to receiver is proportional
to the distance of the object. In this distance measurement system we had ultrasonic sensor
HC-SR04 interfaced with arduino uno.programming and hardware part of ultrasonic sensor
interfacing with arduino.

CHAPTER - 2

AIM, OBJECTIVE AND SCOPE OF THE PROJECT

Aim:
Giving security to the location for a building needs sensing Technology which senses any
object which comes around the place. In our project we use ultrasonic sensor to identify the
objects.

Objective:

The term sonar is also used for the equipment used to generate and receive the sound. The
acoustic frequencies used in sonar systems vary from very low (infrasonic) to extremely high
(ultrasonic). The study of underwater sound is known as underwater acoustics or hydro
acoustics.

vi
Scope of the project:

In our project we are going to implement the sonar system for the security the specified
location. Here sonar will identify the objects and inform the admin with sound alert. We also
store the data of the sonar and store them in the database regarding the object arrival and
distance of that object at various time interval

CHAPTER - 3
LITERATURE SURVEY

Existing System:

Existing system the security for the location of VIP people will be given using security peoples
but sometimes they fail to find out the unauthorised person to get into the VIP house. If the
security area is big then it is difficult to you security with the minimum number of people in
such situation there may be chances of getting enter into the house. this can be detected using
sensor Technology

vi
Proposed System:

In proposed system we will provide security by using sonar technology. Sensory detector
distant object district by sensing the sound signal. Whenever the sensor detects the object it will
automatically give signal to the administrator then administrator will send messages to the user
what coordinated with security alert so that they can find out the victim. This system also saves
the details and location of the sensing area and stores the details in the cloud. Thus Cloud
Security will be used in our project to check the data

CHAPTER – 4

REQUIREMENT SPECIFICATION

4.1 Hardware and Software Requirements

Table. 4.1: Hardware requirements

Sl.no. Components
1 Arduino Uno
2 Servo motor
3 ultrasonic Sensors
4 Jumper Wires
vi
5 USB cable

Table. 4.2: Software requirements

Sl.no. Software
1 Arduino software
2 Processing software

4.2 Hardware Requirements

ARDUINO UNO:
Arduino is an open-source platform used for building electronics projects. Arduino consists
of both a physical programmable circuit board and a piece of software or IDE (Integrated
Development Environment) that runs on your computer, used to write and upload computer
code to the physical board. Arduino platform has become quite popular with people just
starting out with electronics and for good reason.

vi
Figure. 4.1: Arduino board

Ultrasonic Sensor:

SONAR is a technique that uses sound propagation to navigate, communicate with or detect
objects on or under the surface of the water,such as other vessels.

vi
Figure. 4.2: ultrasonic sensor

Servo motor:

A servo motor is a type of motor that can rotate with great precision. Normally this type of
motor consists of a control circuit that provides feedback on the current position of the motor
shaft, this feedback allows the servo motors to rotate with great precision.

Figure. 4.3: Servo motor

vi
Location security using ultrasonic sensor as radar Page 13

Jumper Wires:

Figure. 4.4: Jumper wires

Jumper wires are simply wiring that have connector pins at each end, allowing them to be used to
connect two points to each other without soldering. Jumper wires are typically used
with breadboards and there are three types of jumper wires male to male, female to female, male
to female.

4.3 Software Requirements

Arduino IDE

The Arduino Integrated Development Environment (IDE) is a cross-platform application that


is written in functions from C and C++. It is used to write and upload programs
to Arduino compatible boards.

RNSIT Department of MCA 2022-2023


Location security using ultrasonic sensor as radar Page 14

CHAPTER-5

ANALYSIS AND DESIGN

5.1 Circuit Diagram:

Figure. 5.1: Circuit diagram of location security using sensor

The above diagram shows the pin diagram of our model. It consists of one Arduino Uno, one
servo motor, one 16*2 LCD display and two IR sensors. The Arduino Uno is the brain of our
system which powers all other devices. The 16*2 LCD display is powered by Arduino Uno by
connecting jumper wires from the display to the Arduino Uno board. The IR sensors, servo
motor are also powered by Arduino Uno through breadboard. After successful completion of
connection of all the components smart parking system is done.

RNSIT Department of MCA 2022-2023


Location security using ultrasonic sensor as radar Page 15

CHAPTER – 6

SYSTEM ANALYSIS

An ultrasonic wave is a high frequency sound wave which is not audible by normal human being
but has a special property of high reflectivity. The frequency of the ultrasonic waves is higher than
20KHz this property is also used in the sonar technology. This property of ultrasonic waves is
used by bats which is known as echolocation in which they emit ultrasonic waves & receives the
reflected waves from the objects. The same technology is used by the ultrasonic sensors in which
they emit & receive the waves & calculate the distance from the object. This is a robust motion
sensing technology which is not effected by the environmental factors.. The HC-SR04 ultrasonic
sensor modules have transmitter & receiver. Internal circuitry of the module is so design it is
capable. Our system is a simple solution for this problem in which or system will do the patrolling
work & detects the intrusion & eliminate that intrusion. This system is fully automated which
needs only one or two persons for maintenance purpose. This paper will basically concentrate on
the human interfacing & knowledge towards our project system i.e. the detection & alerting the
soldiers to take necessary action to the problems at the border. This system has ultrasonic sensors
which are responsible for the detection of intrusion. As they are mounted over the section pillars.
The sensors continuously rotate back & forth in the range of certain degrees (30-160) & show the
intrusion over the radar with its location

BLOCK DIAGRAM

RNSIT Department of MCA 2022-2023


Location security using ultrasonic sensor as radar Page 16

CHAPTER – 7

IMPLEMENTATION

7.1 arduino Code:

#include<Servo.h>
const int TriggerPin = 8;
const int EchoPin = 9;
const int motorSignalPin = 10;

const int startingAngle = 90;


const int minimumAngle = 6;
const int maximumAngle = 175;
const int rotationSpeed = 1;

Servo motor;
void setup(void)
{
pinMode(TriggerPin, OUTPUT);
pinMode(EchoPin, INPUT);
motor.attach(motorSignalPin);
Serial.begin(9600);
}
void loop(void)
{
static int motorAngle = startingAngle;
static int motorRotateAmount = rotationSpeed;

motor.write(motorAngle);
delay(10);
SerialOutput(motorAngle, CalculateDistance());

motorAngle += motorRotateAmount;
if(motorAngle <= minimumAngle || motorAngle >= maximumAngle) {
motorRotateAmount = -motorRotateAmount;
}}
int CalculateDistance(void)
{

digitalWrite(TriggerPin, HIGH);
delayMicroseconds(10);
digitalWrite(TriggerPin, LOW);
long duration = pulseIn(EchoPin, HIGH);
float distance = duration * 0.017F;
return int(distance);
}
RNSIT Department of MCA 2022-2023
Location security using ultrasonic sensor as radar Page 17

void SerialOutput(const int angle, const int distance)


{
String angleString = String(angle);
String distanceString = String(distance);
Serial.println(angleString + "," + distanceString);
}

7.2 Processing code:

import processing.serial.*;
import java.awt.event.KeyEvent;
import java.io.IOException;

Serial myPort;
PFont orcFont;
int iAngle;
int iDistance;
void setup() {
size(1000, 500);
smooth();

myPort = new Serial(this, "COM4", 9600);


myPort.clear();
myPort.bufferUntil('\n');
orcFont = loadFont("ArialNarrow-48.vlw");
}
void draw()
{
fill(98, 245, 31);
textFont(orcFont);
noStroke();
fill(0, 4);
rect(0, 0, width, 0.935 * height);
fill(98, 245, 31);

DrawRadar();
DrawLine();
DrawObject();
DrawText();
}
void serialEvent (Serial myPort)
{
try {
String data = myPort.readStringUntil('\n');
if (data == null) {
return;
}
int commaIndex = data.indexOf(",");

RNSIT Department of MCA 2022-2023


Location security using ultrasonic sensor as radar Page 18

String angle = data.substring(0, commaIndex);


String distance = data.substring(commaIndex+1, data.length()-1);
iAngle = StringToInt(angle);
iDistance = StringToInt(distance);
} catch(RuntimeException e) {}
}
void DrawRadar()
{
pushMatrix();
translate(width/2, 0.926 * height);
noFill();
strokeWeight(2);
stroke(98, 245, 31);

// draws the arc lines


DrawRadarArcLine(0.9375);
DrawRadarArcLine(0.7300);
DrawRadarArcLine(0.5210);
DrawRadarArcLine(0.3130);

// draws the angle lines


final int halfWidth = width/2;
line(-halfWidth, 0, halfWidth, 0);
for(int angle = 30; angle <= 150; angle+=30) {
DrawRadarAngledLine(angle);
}
line(-halfWidth * cos(radians(30)), 0, halfWidth, 0);
popMatrix();
}
void DrawRadarArcLine(final float coefficient)
{
arc(0, 0, coefficient * width, coefficient * width, PI, TWO_PI);
}
void DrawRadarAngledLine(final int angle){
line(0, 0, (-width/2) * cos(radians(angle)), (-width/2) * sin(radians(angle)));
}
void DrawObject()
{
pushMatrix();
translate(width/2, 0.926 * height);
strokeWeight(9);
stroke(255,10,10);
int pixsDistance = int(iDistance * 0.020835 * height);
if(iDistance < 40 && iDistance != 0) {
float cos = cos(radians(iAngle));
float sin = sin(radians(iAngle));
int x1 = +int(pixsDistance * cos);
int y1 = -int(pixsDistance * sin);

RNSIT Department of MCA 2022-2023


Location security using ultrasonic sensor as radar Page 19

int x2 = +int(0.495 * width * cos);


int y2 = -int(0.495 * width * sin);

line(x1, y1, x2, y2);


}
popMatrix();
}
void DrawLine()
{
pushMatrix();
strokeWeight(9);
stroke(30, 250, 60);
translate(width/2, 0.926 * height);

float angle = radians(iAngle);


int x = int(+0.88 * height * cos(angle));
int y = int(-0.88 * height * sin(angle));
line(0, 0, x, y);
popMatrix();
}
void DrawText()
{
pushMatrix();
fill(0, 0, 0);
noStroke();
rect(0, 0.9352 * height, width, height);
fill(98, 245, 31);
textSize(25);
text("10cm", 0.6146 * width, 0.9167 * height);
text("20cm", 0.7190 * width, 0.9167 * height);
text("30cm", 0.8230 * width, 0.9167 * height);
text("40cm", 0.9271 * width, 0.9167 * height);

textSize(40);
text("Object: " + (iDistance > 40 ? "Out of Range" : "In Range"), 0.125 * width, 0.9723 *
height);
text("Angle: " + iAngle + " °", 0.52 * width, 0.9723 * height);
text("Distance: ", 0.74 * width, 0.9723 * height);
if(iDistance < 40) {
text(" " + iDistance +" cm", 0.775 * width, 0.9723 * height);
}
textSize(25);
fill(98, 245, 60);
translate(0.5006 * width + width/2 * cos(radians(30)), 0.9093 * height - width/2 *
sin(radians(30)));
rotate(-radians(-60));
text("30°",0,0);

RNSIT Department of MCA 2022-2023


Location security using ultrasonic sensor as radar Page 20

resetMatrix();

translate(0.497 * width + width/2 * cos(radians(60)), 0.9112 * height - width/2 *


sin(radians(60)));
rotate(-radians(-30));
text("60°",0,0);
resetMatrix();
translate(0.493 * width + width/2 * cos(radians(90)), 0.9167 * height - width/2 *
sin(radians(90)));
rotate(radians(0));
text("90°",0,0);
resetMatrix();

translate(0.487 * width + width/2 * cos(radians(120)), 0.92871 * height - width/2 *


sin(radians(120)));
rotate(radians(-30));
text("120°",0,0);
resetMatrix();

translate(0.4896 * width + width/2 * cos(radians(150)), 0.9426 * height - width/2 *


sin(radians(150)));
rotate(radians(-60));
text("150°",0,0);
popMatrix();
}

int StringToInt(String string)


{
int value = 0;
for(int i = 0; i < string.length(); ++i) {
if(string.charAt(i) >= '0' && string.charAt(i) <= '9') {
value *= 10;
value += (string.charAt(i) - '0');
}}
return value;
}

RNSIT Department of MCA 2022-2023


Location security using ultrasonic sensor as radar Page 21

SNAPSHOTS OF THE PROJECT

RNSIT Department of MCA 2022-2023


Location security using ultrasonic sensor as radar Page 22

CHAPTER – 8

CONCLUSION

We have fabricated a robust and portable security system for the country borders. We believe that
our system is very simplified and have the features that other border security systems does not have
at portability level. Our system can be improved by doing the advancements according to the needs.
The accuracy & precision of the system can be improved by using multiple sensors & it will give
good & accurate results with high precision.

8.1 Future Enhancement

In future you can implement cameras and fire alarms for this system which acid detect enemies fire
and photographs of enemies this sentence the security system of the location so that the patient will
be safer compared to the previous system but this cost more implement and accuracy will be more
for the security system can also implement radar system for high Rangers so that we can target the
enemies from long distance

RNSIT Department of MCA 2022-2023


Location security using ultrasonic sensor as radar Page 23

REFERENCES

[1] Sungbok Kim and Hyunbin Kim, "Simple and Complex Obstacle Detection Using an
Overlapped Ultrasonic Sensor Ring,"2012 12th International Conference on Control,
Automation and Systems.

[2] Jun Hou, Chengdong Wu, Zhongjia Yuan, Jiyuan Tan, Qiaoqiao Wang and Yun Zhou,
"Research of Intelligent Home Security Surveillance System Based on ZigBee," International
Symposium on Intelligent Information Technology Application Workshops, pp.554-557,21-22
Dec.2008

[3] J. Borenstein, H. R. Everett, and L. Feng, "Where Am I?": Sensors and Methods for
Mobile Robot Positioning, The University of Michigan, 1995

RNSIT Department of MCA 2022-2023

You might also like