LSiot
LSiot
Mini-Project Report
[22MCAL37]
on
By
Lokesha S
1RN22MC023
Under the guidance of
Ms. Jyothi T
Assistant Professor
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.
Name: Lokesha S
USN: 1RN22MC023
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
CHAPTERS
1. INTRODUCTION 01
1.1.
Project Overview 01
4. REQUIREMENTS SPECIFICATION 04
1.2.
Software Requirements 07
7. IMPLEMENTATION 09
8. CONCLUSION 16
REFERENCES 17
iv
LIST OF TABLES
v
LIST OF FIGURES
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.
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:
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
Sl.no. Components
1 Arduino Uno
2 Servo motor
3 ultrasonic Sensors
4 Jumper Wires
vi
5 USB cable
Sl.no. Software
1 Arduino software
2 Processing software
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.
vi
Location security using ultrasonic sensor as radar Page 13
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.
Arduino IDE
CHAPTER-5
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.
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
CHAPTER – 7
IMPLEMENTATION
#include<Servo.h>
const int TriggerPin = 8;
const int EchoPin = 9;
const int motorSignalPin = 10;
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
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();
DrawRadar();
DrawLine();
DrawObject();
DrawText();
}
void serialEvent (Serial myPort)
{
try {
String data = myPort.readStringUntil('\n');
if (data == null) {
return;
}
int commaIndex = data.indexOf(",");
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);
resetMatrix();
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.
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
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