0% found this document useful (0 votes)
37 views32 pages

Security System Using Ultrasonic Sensor Report 2

Uploaded by

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

Security System Using Ultrasonic Sensor Report 2

Uploaded by

Charishma Reddy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 32

SECURITY SYSTEM

USING ULTRASONIC SENSOR


A PROJECT REPORT
Submitted by

NEKKANTI SATYA SARANYA (111721104085)


CHITTANI CHARISHMA REDDY (111721104301)
DODDI POOJITHA (111721104302)

in partial fulfilment for the award of the degree


of
BACHELOR OF ENGINEERING
IN
ELECTRONICS AND COMMUNICATION ENGINEERING

R.M.K. ENGINEERING COLLEGE


(An Autonomous Institution)
R.S.M. Nagar, Kavaraipettai-601 206

ANNA UNIVERSITY: CHENNAI 600 025


NOVEMBER 2023
R.M.K. ENGINEERING COLLEGE
(An Autonomous Institution)
R.S.M. Nagar, Kavaraipettai-601 206

BONAFIDE CERTIFICATE
Certified that this project report titled “SECURITY SYSTEM USING ULTRASONIC
SENSOR” which is done by NEKKANTI SATYA SARANYA (111721104085),
CHITTANI CHARISHMA REDDY (111721104301), DODDI POOJITHA
(111721104302) who carried out the work under my supervision.

SIGNATURE SIGNATURE
Dr. T. Suresh, M.E.,Ph.D Dr.A. Merline, M.E.,Ph.D
PROFESSOR AND THE SUPERVISOR
HEAD OF THE DEPARTMENT PROFESSOR
Electronics And Communication Electronics And Communication
Engineering Engineering
R.M.K Engineering College, R.M.K Engineering College,
R.S.M. Nagar, Kavaraipettai, R.S.M. Nagar, Kavaraipettai,
Kavaraipettai-601 206 Kavaraipettai-601 206

Submitted for the Project Viva - Voce held on ..................... at R.M.K. Engineering College,
Kavaraipettai, Tiruvallur District – 601 206.

INTERNAL EXAMINER EXTERNAL EXAMINER

1
ACKNOWLEDGEMENT

We would like to express our heartfelt thanks to the Almighty, our beloved parents for their
blessings and wishes for successfully doing this project.

We convey our thanks to Chairman Thiru R.S. Munirathinam and Vice Chairman Thiru
R.M. Kishore who took keen interest on us and encouraged throughout the course of
study and for their kind attention and valuable suggestions offered to us.

We express our sincere gratitude to our Principal Dr. K. A. Mohamed Junaid M.E.
Ph.D., for fostering an excellent climate to excel.

We are extremely thankful to Dr. T. Suresh M.E Ph.D., Professor and Head, Department
of Electronics and Communication Engineering, for having permitted us to carry out this
project effectively.

We convey our sincere thanks to Dr.A.Merline M.E Ph.D, Professor for her valued ideas in
effectively carrying out this project.

We convey our sincere thanks to our mentor, skillful and efficient Supervisor,
Ms.P.Anusha M.E Ph.D,Assistant Professor for his extremely valuable guidance
throughout the course of project.

We are grateful to our Project Co-ordinators and all the department staff members for their
intense support.

2
ABSTRACT

In this paper we design and implement a security system with an ultrasonic sensor module to
module is placed in a rotating motor. It is assumed that an ultrasonic sensor is set in a rotating
motor to cover a wide range. The Ultrasonic transmitter periodically emits ultrasonic signals
into an open area. A rotating motor is used to allow the sensor to cover whole 360 degrees. If
the signal ever hits any physical objects, it will be reflected back and the receiver part of the
sensor will then capture it. The microcontroller unit will constantly check for the receiver
output of the ultrasonic transmitter. If the receiver output is high, the system will perform
distance analysis of the object from the sensor using the fact that ultrasonic waves travel in
air at 340m/s. The time taken for the waves to hit the object and return can be calculated as
the time taken for the receiver output to be high after the transmitter has been initiated to send
ultrasonic waves. Once the distance is calculated, it checks whether the object is within the
range threshold specified within the alert. If the object is within the range threshold, the
security system initiates a sound alarm

Keywords : GSM Module ,Ultrasonic sensor

3
TABLE OF CONTENTS

CHAPTER TITLE PAGE NO


No
ACKNOWLEDGEMENT 2
ABSTRACT 3
1 INTRODUCTION 6
1.1OBJECTIVES
1.2CIRCUIT DIAGRAM
2 EXISTING SYSTEM 8
2.1 ADVANTAGES
2.2 DISADVANTAGES 9
2.3 HARDWARE/SOFTWARE REQUIREMENT 10
2.3.1 HARDWARE REQUIREMENTS
2.3.2 SOFTWARE REQUIREMENT
3 LITERATURE SURVEY 11
3.1 PAPER-1
3.2 PAPER-2
4 HARDWARE DESCRIPTION 13
4.1 ULTRASONIC SENSOR HC-SR04
4.2 LED
4.3 PIEZO ELECTRIC BUZZER
4.4 RESISTOR
4.5 BREAD BOARD

4
5 SOFTWARE DESCRIPTION 23
5.1 ARDUINO(IDE)
5.2 C-PROGRAMMING
6 WORKING PRINCIPLE 26
6.1 IMPLEMENTATION
7 APPLICATIONS 29
8 RESULTS 30
8.1 CIRCUIT PICTURES
9 CONCLUSION 31
10 REFERENCES 32

5
CHAPTER-1

1.INTRODUCTION

Many were inspired to build a Security system based on ultrasonic sensor technology.
Security is an important part of home, banks, shops and so on. The traditional security
systems based on opening of doors and windows. Our ultrasonic sensor technology is used,
it detects the intruders on their physical presence. An ultrasonic sensor can measure the
distance to an obstacle within its conic beam. The AVR family microcontroller was used to
interface with the ultrasonic sensor.

The key features that we used for this paper are the three timers and the serial. The timers are
responsible of scheduling periodical execution of various tasks, generate alarm tone, and
generate PWM signal with appropriate duty cycle and frequency to control the motor. Also,
use the motor drivers and it acts as current amplifiers since they take a low current control
signal and provide a higher current signal. The range of the ultrasonic sensor can be changed
by using an external adjustment device. shows the logical structure of Security system based
on ultrasonic sensor technology.

Some alarm systems serve a single purpose of burglary protection; combination systems
provide fire and intrusion protection. Intrusion-alarm systems are combined wire (CCTV)
systems to record intruders' activities and interface for electrically locked doors. There are
many types of security systems. Homeowners typically have small, self-contained
noisemakers. These devices can also be complicated, multirole systems with computer
monitoring and control. It may even include a two-way voice which allows communication
between the panel and monitoring station. These active detectors transmit ultrasonic sound
waves.

6
1.1 OBJECTIVE

Home Security includes both the security hardware placed on a property and
individuals' personal security practices. Security hardware includes doors, locks, alarm
systems, lighting, motion detectors and security camera systems Personal security involves
practices like ensuring doors are locked, alarms are activated, owning a Dog, windows are
closed, and extra keys are not hidden outside.

According to an FBI report, 58.3% of burglaries in the United States involved forcible entry.
Per the most recent statistics, the average burglary in the United States takes about 90 seconds
to 12 minutes, and on average, a burglar will break into a home within 60 seconds. Most
target cash first followed by jewels, drugs, and electronics. Common security methods
include never hiding extra keys outside, never turning off all the lights, applying small CCTV
stickers on doors, and keeping good tabs with neighbours .

1.2CIRCUIT DIAGRAM

FIGURE 1

7
CHAPTER-2
2.EXISTING SYSTEM
2.1 ADVANTAGES
 It has sensing capability to sense all the material types

 This sensor is not affected due to atmospheric dust, rain, snow etc.

 It can work in any adverse conditions.

 It has higher sensing distance (in centimeters and inches) compare to


inductive/capacitive proximity sensor types.

 It provides good readings in sensing large sized objects with hard surfaces

 Interconnected and Convenient.

 It can give signals.

 Broad Coverage.

 Simple Maintenance.

 More reliable.

8
2.2 DISADVANTAGES

 It is very sensitive to variation in the temperature.

 It has more difficulties in reading reflections from soft, curved, thin objects

 It required careful attention for an experienced technician.

 Change in nature for example temperature, airborne particles, weight, air turbulence,
influence ultrasonic reaction.

 In this sensor, the main focuses of low thickness similar to froth and fabric have a
tendency to assimilate sound vitality these materials may be hard to sense at long
range.

 When these sensors are interfaced with a microcontroller or any controller then
experienced person or programmer is required.

 When these sensors are used for inspection purpose then these could be water-
resistive otherwise they could be damaged.

9
2.3 HARDWARE/SOFTWARE REQUIREMENTS
2.3.1HARDWARE REQUIREMENTS
1.ULTRASONIC SENSOR - HC-SR04
2.LED
3.PIEZO ELECTRIC BUZZER
4.RESISTORS-220 OHMS
5.BREAD BOARD

2.3.2 SOFTWARE REQUIREMENTS

1.ARDUINO IDE (INTEGRATED DEVELOPMENT ENVIRONMENT)


2.C-PROGRAMMING

10
CHAPTER-3
3. LITERATURE SURVEY
3.1 PAPER 1

TITLE 1- Ultrasonic Sensor for Security System

The basic need of this project is home security, and for security some project also
implemented previous different method as they such are PIC motion sensor based security
system, arduino based security system. In our project a new advancement simple technique
is used, in this project a digital photo camera is interfacing through microcontroller and for
operating camera shutter basically two relays are used. In which one relay is used for when
object is within 20- 30 cm range then it capture the image and that other instant other relay
will stops the dc motor and whole moving equipment will stop. In 1790, Lazzaro Spallanzo
was first whose discovered the BAT movement with the help of hearing for movement not
seeing forward. Jean-Dawel Col- ultrasonic security system discovered sonography 1826
using an underwater bell, and determine the speed of sound in liquid. Therefore further study
and research work proceed slowly on time to time. In 1881, when Pierce Curie’s design the
modern ultrasound transducer and he concluded that the relationship between electrical
voltage and pressure on any crystalline material, and on that time TITANIC tragedy
influences to take more interest to work in this field and as a consequences Paul Langevin
search the hydrophone to detect the iceberg and that device was the first ultrasonic transducer.

AUTHORS: JUNI KHYAT


YEAR : 2008

11
3.2 PAPER 2

TITLE 2- Military Security System Using Ultrasonic Radar

In paper [1], the objects can be detected, tracked and destroyed by capturing an image with
the camera kept in some fixed suitable place, from which complete and clear view of the
area under surveillance. It is very difficult to detect an object with the camera in adverse
environmental conditions and in night situations. In paper [2], it detects exact kind of
obstacles and its count by means of camera and image processing, the fundamental
principles of radar and image processing are used in combination to make a system which
prevent terrorism. In paper [3], The RC4 algorithm is better than AES. The RC4 algorithm
is well suited for real time processing because it is faster, easier than AES and energy
efficient for encryption and decryption. In paper the position of missile navigates as per the
user’s requirement by sending the co-ordinates through pc based server on the base station.
For security purpose encryption is done with RC4 algorithm and pic microcontroller is used.
It uses Human Computer Interaction and Visualization technology. The most important
factor is security of data for military applications and it is done by entering the position, an
angle of missile and giving directions such as forward/ reverse, left/ right directions of
missile onto user interface. For secured data transfer zigbee module is used.

AUTHOR: Vishwakarma

YEAR:2016

12
CHAPTER-4
4. HARDWARE DESCRIPTION

4.1Ultrasonic Sensor (HC-SR04)

Ultrasonic Sensors also known as transceivers when they both send and receive 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), fullness of a tank 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 the amount of
liquid in a tank, the sensor measures the distance to the surface of the fluid. Further
applications include: humidifiers, sonar, medical ultrasonography, burglar alarms and non-
destructive testing. Systems typically use a transducer which generates sound waves in the
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. The technology is limited by the shapes of surfaces and the density or
consistency of the material. For example foam on the surface of a fluid in a tank could
distort a reading

13
FIGURE 2

FEATURES:

 Supply voltage: 5V (DC).


 Supply current: 15mA.
 Modulation frequency: 40Hz.
 Output: 0 – 5V (Output high when obstacle detected in range).
 Beam Angle: Max 15 degrees.
 Distance: 2cm – 400cm.
 Accuracy: 0.3cm.
 Communication: Positive TTL pulse

The ultrasonic sensor module comprises of one transmitter and one receiver. The transmitter
can deliver ultrasonic sound while the maximum receiver is designed to accept only 40 KHz
sound waves. The receiver ultrasonic sensor that is kept next to the transmitter shall thus be
able to receive reflected once the module faces any obstacle in front. Thus whenever any
obstacles come ahead of the ultrasonic module it calculates the time taken from sending the
signals to receiving them since time and distance are related for sound waves passing through
air medium at 343.2m/sec. Upon receiving the signal MC program while executed displays
the data i.e. the distance measured on an LCD interfaced with the microcontroller in cm.

14
4.2 LED

LED, in full light-emitting diode, in electronics, a semiconductor device that emits infrared
or visible light when charged with an electric current. Visible LEDs are used in many
electronic devices as indicator lamps, in automobiles as rear-window and brake lights, and
on billboards and signs as alphanumeric displays or even full-colour posters. Infrared LEDs
are employed in autofocus cameras and television remote controls and also as light sources
in fibre-optic telecommunication systems.

FIGURE 3

Benefits of LED:
 Along with the technology LED lighting offers many direct benefits to the
users.
 Up to 90% energy savings.
 Cool operation.
 Long life 50,000 hrs.
 Eliminates frequent light maintenance.
 No mercury - No UV rays.
 Accurate color rendering.

15
 Reduce eye strain – Headaches.
 Long warranties.
 No ballasts required - No hum or flickering.
 Easy to install - Uses existing fixtures.
 Made of recyclable materials.

FEATURES:

 Key Features of LED Lighting


 Here are a few of the important features of LED lights:
 A solid state light technology made with Light Emitting Diodes
 More energy efficient that incandescent, fluorescent.
 Operates at a much lower temperature (cool to the touch)
 Environmentally Friendly

4.3-PIEZO ELECTRIC BUZZER


In simplest terms, a piezo buzzer is a type of electronic device that’s used to produce
a tone, alarm or sound. It’s lightweight with a simple construction, and it’s typically a
low-cost product. Yet at the same time, depending on the piezo ceramic buzzer
specifications, it’s also reliable and can be constructed in a wide range of sizes that
work across varying frequencies to produce different sound outputs.

For instance, at APC International, Ltd., we offer piezo buzzers without signal
generators, self-oscillating buzzers that have signal generators and even multi-tone
sound generators — often used in alarms and sirens. Regardless of the model you
choose, our piezo buzzers offer high sound outputs. Plus, since they can be mounted
on circuit boards, they’re highly useful in a wide range of applications and assemblies.

16
Despite different construction methods that affect the cost of piezo buzzers, all of our
prices are highly competitive. In addition, thanks to our state-of-the-art production
facility, our delivery times are some of the fastest in the industry.

FIGURE 4

The use of the piezo ceramic buzzer was discovered thanks to an inversion of the
piezoelectricity principle that was discovered by Jacques and Pierre Curie back in 1880. They
found that electricity could be generated when a mechanical pressure was applied to
particular materials and the inverse was true as well.

So when certain piezoelectric materials are subjected to an alternating field of electricity, the
piezo buzzer element often a manmade piezoceramic material stretches and compresses in
sequence with the frequency of the current. As a result, it produces an audible sound.

Unlike magnetic buzzers that have a narrow operating voltage of somewhere between one
and 16 volts, piezo buzzers can typically operate anywhere between three and 250 volts. In
addition, magnetic buzzers have a higher power consumption of 30 to 100 milliamperes,
while piezo buzzers normally consume less than 30 milliamperes — even at higher rate
frequencies. And although piezo buzzers require a larger footprint than magnetic buzzers,
they produce a higher sound pressure level.

17
Typical Applications of a Piezo Buzzer

Thanks to both the reliability and flexibility of piezoelectric vibration plates to produce
audible signals ranging from monotone buzzes and alarms to multi-tones and melodies their
applications in small, high-density assemblies are wide-ranging. What’s more: Their low
power consumption makes them ideal for many battery-operated devices.

With such characteristics, piezo buzzers are regularly used in alarms, warning devices and
automobile alerts. In addition, since they can produce a wide range of audible signals, they’re
also used in pest deterrent devices. And in the consumer electronics field, some of their most
popular applications include sound generators in computers, telephones, toys and games —
to name just a few.

Audible Sound Transducers

Simple, compact, and reliable, piezoelectric audible sound transducers—also called tone
generators, or buzzers can deliver a high sound output from a small (milliwatt) energy input.
Emitted sounds range from soft hums to strident alarms. These devices are well suited for use
in portable, battery powered equipment, and are employed in a wide variety of products,
including timers, smoke alarms, games, telephone ringers, metal detectors, watches,
automobile alarms, and many others.

The working component in most audible sound transducers is a thin disk of piezoelectric
ceramic bonded to a similarly thin metal diaphragm. When a voltage is applied to the ceramic
disk, the disk deforms, causing the metal diaphragm to bend. When a recurring voltage is
applied the ceramic / metal bending element vibrates at the frequency of the applied voltage,
and produces an audible sound.

18
4.4-RESISTOR (220-OHMS)

The most common type in electronic devices and systems is the carbon-composition resistor.
Fine granulated carbon (graphite) is mixed with clay and hardened. The resistance depends
on the proportion of carbon to clay; the higher this ratio, the lower the resistance.

Another type of resistor is made from winding Nichrome or similar wire on an insulating
form. This component, called a wire wound resistor, is able to handle higher currents than a
carbon-composition resistor of the same physical size. However, because the wire is wound
into a coil, the component acts as an inductors as well as exhibiting resistance. This does not
affect performance in DC circuits, but can have an adverse effect in AC circuits because
inductance renders the device sensitive to changes in frequency.

A resistor is a passive two terminal that implements electrical Resistance as a circuit


element. In electronic circuits, resistors are used to reduce current flow, adjust signal levels,
to divide voltages, bias active elements, and terminate among other uses. High-power
resistors that can dissipate many of electrical power as heat may be used as part of motor
controls, in power distribution systems, or as test loads for . Fixed resistors have resistances
that only change slightly with temperature, time or operating voltage.

Variable resistors can be used to adjust circuit elements (such as a volume control or a lamp
dimmer), or as sensing devices for heat, light, humidity, force, or chemical activity. Resistors
are common elements of electrical networks and electronic circuits and are ubiquitous in
electronic equipment. Practical resistors as discrete componentscan be composed of various
compounds and forms. Resistors are also implemented within integrated circuits.

19
FIGURE 5

The electrical function of a resistor is specified by its resistance: common commercial


resistors are manufactured over a range of more than nine orders of magnitude. The nominal
value of the resistance falls within the manufacturing tolerance, indicated on the component.

The current is proportional to the voltage across the terminal ends. This ratio is represented
by Ohm’s law: R=VI

Resistors are used for many purposes. A few examples include limiting electric current,
voltage division, heat generation, matching and loading circuits, gain control, and setting time
constants. They are commercially available with resistance values over a range of more than
nine orders of magnitude. They can be used as electric brakes to dissipate kinetic energy from
trains, or be smaller than a square millimeter for electronics.

Resistor Definition

In high frequency circuits, such as in radio electronics, the parasitic capacitance and
inductance can lead to undesired effects. Foil resistors generally have a low parasitic
reactance, while wire wound resistors are among the worst. For accurate applications
such as audio amplifiers, the electric noise of the resistor must be as low as possible.

20
This is often specified as microvolts noise per volt of applied voltage, for a 1 MHz
bandwidth. For high power applications the power rating is important. This specifies
the maximum operating power the component can handle without altering the
properties or damage. The power rating is usually specified in free air at room
temperature. Higher power ratings require a larger size and may even require heat
sinks. Many other characteristics can play a role in the design specification. Examples
are the maximum voltage or the pulse stability. In situations where high voltage surges
could occur, this is an important characteristic.

4.5-BREAD BOARD
Breadboards are one of the most fundamental pieces when learning how to build circuits. In
this tutorial, you will learn a little bit about what breadboards are, why they are called
breadboards, and how to use one. Once you are done you should have a basic understanding
of how breadboards work and be able to build a basic circuit on a breadboard.
Prototyping is the process of testing out an idea by creating a preliminary model from which
other forms are developed or copied, and it is one of the most common uses for breadboards.
If you aren’t sure how a circuit will react under a given set of parameters, it’s best to build
a prototype and test it out.
For those new to electronics and circuits, breadboards are often the best place to start. That
is the real beauty of breadboards--they can house both the simplest circuit as well as very
complex circuits. As you'll see later in this tutorial, if your circuit outgrows its current
breadboard, others can be be attached to accommodate circuits of all sizes and complexities.

Another common use of breadboards is testing out new parts, such as Integrated circuits
(ICs). When you are trying to figure out how a part works and constantly rewiring things,
you don’t want to have to solder your connections each time.

21
As mentioned, you don’t always want the circuit you build to be permanent. When trying
to duplicate a customer’s problem, Spark Fun’s Technical Support team will often use
breadboards to build, test, and analyse the circuit. They can connect the parts the customer
has, and once they’ve gotten the circuit setup and figured out the problem, they can take
everything apart and put it aside for the next time they need to do some troubleshooting.

FIGURE 6

The specifications & features of a breadboard, include the


following.

 Distribution Strips are two.


 Wire Size is 21 to 26 AWG wire.
 Tie Points are two hundred.
 Withstanding Voltage is 1,000V AC.
 Tie points within IC are 630.
 Insulation Resistance is DC500V or 500MΩ
 Dimension is 6.5*4.4*0.3

22
CHAPTER-5
SOFTWARE DESCRIPTION
5.1 ARDUINO(IDE)

Arduino is an open-source electronics platform based on easy-to-use hardware


and software. Arduino boards are able to read inputs - light on a sensor, a finger
on a button, or a Twitter message - and turn it into an output - activating a motor,
turning on an LED, publishing something online. You can tell your board what to
do by sending a set of instructions to the microcontroller on the board. To do so
you use the Arduino programming language (based on Wiring), and the Arduino
Software (IDE), based on Processing. Over the years Arduino has been the brain
of thousands of projects, from everyday objects to complex scientific instruments.
A worldwide community of makers - students, hobbyists, artists, programmers,
and professionals - has gathered around this open-source platform, their
contributions have added up to an incredible amount of accessible knowledge that
can be of great help to novices and experts alike.Arduino was born at the Ivrea
Interaction Design Institute as an easy tool for fast prototyping, aimed at students
without a background in electronics and programming. As soon as it reached a
wider community, the Arduino board started changing to adapt to new needs and
challenges, differentiating its offer from simple 8-bit boards to products for IoT
applications, wearable, 3D printing, and embedded environments. All Arduino
boards are completely open-source, empowering users to build them
independently and eventually adapt them to their particular needs. The software,
too, is open-source, and it is growing through the contributions of users
worldwide.

23
5.2 C PROGRAMMING

Embedded c is a set of language extension for the C Programming language by the


C Standards committee to address commonality issues that exist between C
extensions for different embedded systems. Historically embedded C programming
requires nonstandard extensions to the C language in order to support exotic features
such as fixed-point arithmetic, multiple distinct memory banks, and basic I/O
operations. Embedded C uses most of the syntax and semantics of standard C,
e.g.,main() function, variable definition, data type declaration, conditional
statements(if, switch, case),loops(while, for),functions, arrays and strings, structures
and union, bit operations, macros, etc. During infancy years of microprocessorbased
systems, programs were developed using assemblers and fused into the EPROMs.
There used to be no mechanism to find what the program was doing. LEDs, switches,
etc. were used to check for correct execution of the program .But they were too
costly and were not quite reliable as well .As time progressed, use of
microprocessor-specific assembly-only as the programming language reduced and
embedded systems moved onto C as the embedded programming language of
choice. C is the most widely used programming language for embedded
processors/controllers.

24
CHAPTER 6
WORKING PRINCIPLE
The working principle of an ultrasonic sensor revolves around the emission and reception
of high-frequency sound waves. These waves range from 20 kHz which is beyond the range
of human hearing. Here’s a simplified explanation of ultrasonic sensor operation

Coming to the working of the system, the system only works with the help of electricity.
When the ultrasonic sensor is active, the sensor sends ultrasonic waves. When any intrusion
occurs it will reflect the ultrasonic wave back to the echo pin and then calculates the distance
between the intruder and sensor. When the sensor detects any object it starts to make sound
and the LED lights start to blink.

Our primary objective is to prevent any event that may pose a security or safety concern
from implementation in the home networks. Security is a main concern in our day-today
life. Everyone wants to be more secure as possible. Knowing thatour home is protected
provides us a peace of mind both when we are away and when we are at home. Extra security
systems are important even if you have better public safety agencies (police, fire etc.) in
your area. So we have implemented a system that does almost everything in order to secure
a house , company or any other structure

A piece of technology that makes use of ultrasonic sound waves is an ultrasonic sensor.
The ultrasonic sensor work involves the detection of the distance to a target item. The
sensor evaluates how long it takes for the sound to travel from the transmitter’s release
to the receiver. This helps to find out how far away the object is from it. They have
many uses across various industries. However, they also have a few limitations as
discussed in the blog.

25
6.1 IMPLEMENTATION

// defines pins numbers


const int trigPin = 9;
const int echoPin = 10;
const int buzzer = 11;
const int led pin = 13;

// defines variables
long duration;
int distance;
int safetyDistance;

void setup() {
pinMode(trigPin, OUTPUT); // Sets the trigPin as an Output
pinMode(echoPin, INPUT); // Sets the echoPin as an Input
pinMode(buzzer, OUTPUT);
pinMode(ledPin, OUTPUT);
Serial.begin(9600); // Starts the serial communication
}

void loop() {
// Clears the trigPin
digitalWrite(trigPin, LOW);
delayMicroseconds(2);

// Sets the trigPin on HIGH state for 10 micro seconds


digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);

// Reads the echoPin, returns the sound wave travel time in microseconds
duration = pulseIn(echoPin, HIGH);

// Calculating the distance


distance= duration*0.034/2;

26
safetyDistance = distance;
if (safetyDistance <= 5){
digitalWrite(buzzer, HIGH);
digitalWrite(ledPin, HIGH);
}
else{
digitalWrite(buzzer, LOW);
digitalWrite(ledPin, LOW);
}

// Prints the distance on the Serial Monitor


Serial.print("Distance: ");
Serial.println(distance);
}

27
CHAPTER 7

APPLICATIONS

 Commercial buildings
 Industry (production environment and offices)
 Public and Private Buildings
 Home Environments
 To Detect Intrusions
 They may be used in 360 degrees due to ultrasonic sensor.
 It acts as an Intruder Alert

28
CHAPTER-8
RESULTS
8.1 CIRCUIT PICTURES

29
CHAPTER-9
CONCLUSION

In this project, we successfully constructed a security system using ultrasonic sensor


which is easier and of low cost. And it is mostly used in home environments because
it is effective. The system has a user friendly interface which is easy to install and use.
The system is low cost, consumes low power and provides high security.

30
CHAPTER 10
REFERENCES

[1] https://ieeexplore.ieee.org/document/8319366/
[2] A.J. Jara, Y. Sun, H. Song, R. Bie, D. Genooud, Y. Bocchi, Internet of things for
cultural heritage of smart cities and smart regions, in: 2015 IEEE 29th Int. Conf. Adv. Inf.
Netw. Appl. Work, IEEE, Gwangiu, 2015, pp. 668–675. http://dx.doi.
org/10.1109/WAINA.2015.169.
[3] H. Gu, D. Wang, A content-aware fridge based on RFID in smart home for
homehealthcare, in: Adv. Commun. Technol. 2009. ICACT 2009. 11th Int. Conf., Phoenix
Park, 2009, pp. 987–990.
[4] http://education.rec.ri.cmu.edu/content/electronics/boe/ultras onic_sensor/1.html
[5] http://www.maxbotix.com/articles/ultrasonic-or-infraredsensor.htm
[6] https://www.maxbotix.com/articles/advantages-limitationsultrasonic-sensors.htm/
[7] www.arducam.com
[8] https://www.google.co.in/amp/s/www.wired.com/2016/01/xf initys-security-system-
flaws-open-homes-to-thieves/amp
[9]https://www.google.co.in/url?sa=t&source=web&rct=j&url=
http://iopscience.iop.org/article/10.1088/1757-
899X/149/1/012141/pdf&ved=2ahUKEwi_xIu8-
tXbAhUHM48KHZpTALsQFjAFegQIAxAB&usg=AOvVaw1EfxMDnjc3eGHO_FI7-
4LQ
[10] https://www.facilitiesnet.com/lighting/article/OccupancySensors-Passive-Infrared-
Ultrasonic-and-Dual-TechnologyFacility-Management-Lighting-Feature--9608
[11] https://en.m.wikipedia.org/wiki/Security_alar-m

31

You might also like