Iot Report
Iot Report
INTERNET OF THINGS
21CC502
by
CERTIFICATE
This is to certify that A ANJANA KAMATH (4NM21CM001), HARSHITHA S
G (4NM21CM021) and BHAGIRATHI B (4NM21CM013) have successfully
completed the mini project work on ‘Intruder Alarm System’ and submitted in
partial fulfillment of the requirements of the Course on Internet of Things
(21CC502) prescribed by the NMAMIT, Nitte during the academic year 2023-2024.
i
TABLE OF CONTENTS
ii
Intruder Alarm System
CHAPTER 1
ABSTRACT
The intruder alarm system is targeted for the private areas, restricted areas and for the domestic home
applications to notify the entrance of the intruder or any person to the specified areas. Keeping your
private things safe from intruders can be a challenging job.[1] But with this Intruder Alarm project, it
is easy to keep your accessories safe. The intruder alarm system eliminates the theft and entrance of
the persons to the restricted areas by notifying the owner or the gardener through the registered
application when the system detects an intruder in the locality. This abstract provides a concise
overview of the key elements and functionalities of an advanced Intruder Alarm System. The system
employs various sensors to monitor physical spaces, analyzes data using machine learning algorithms
for intrusion detection, and utilizes IoT devices for real-time alerting.
CHAPTER 2
INTRODUCTION
An intruder alarm system is a security mechanism designed to detect and alert individuals or
monitoring stations about unauthorized entry or intrusion into a protected area. These systems play a
crucial role in safeguarding homes, businesses, and various facilities by providing an early warning
against potential threats. The central control unit manages the entire alarm system. It receives signals
from sensors, processes the information, and triggers the alarm if a breach is detected. These systems
are used for different purposes and in different contexts both residential or commercial. The
main purpose of an intrusion alarm system is to protect from burglary, vandalism, property
damage, and, of course, the security of the individuals inside the building.
Arduino IDE is an open-source software, designed by Arduino.cc, where IDE stands for Integrated
Development Environment provides to write, compile and upload code to most of the Arduino
modules. Many built-in codes are available, easy to compile makes a person who has no proper
technical knowledge operate very easily.
Operating systems such as Windows, Linux, MAC etc. can support Arduino IDE which runs on
the Java Platform also including built-in functions and commands available for debugging, editing
and compiling code. Arduino IDE supports both C and C++. It has both editor and compiler in it.
LCD stands for Liquid Crystal Display and 16x2 represents 16 columns and 2 rows of the characters.
It is very power efficient, low cost and has an extensive range of applications in circuits and devices
like mobile phones, laptops, TVs, Displays, etc. It is easy to program and even animations can be
displayed. It supports green and black displays also. It has the disadvantage of occupying quite a
large area, compatible with slow devices only and needs direct current.
The Arduino Uno is a popular open-source microcontroller board that is widely used for various
electronic projects. It is a versatile platform that allows both beginners and experienced developers
to create interactive and programmable projects without the need for extensive knowledge in
electronics or embedded systems. The Arduino Uno can be easily connected to a computer via a USB
cable. This USB interface is used for uploading sketches to the board and for serial communication
between the Arduino and the computer.
An ultrasonic sensor is a device that uses ultrasonic waves for measuring distance or detecting objects.
It works on the principle of echolocation, similar to how bats navigate. The sensor emits ultrasonic
waves (sound waves with a frequency higher than the human audible range) and then measures the
time it takes for the waves to bounce back after hitting an object. This information is then used to
calculate the distance between the sensor and the object.
A buzzer is an electronic signaling device that produces sound or tone, typically used to alert or
indicate something in various applications. It consists of a small, electromechanical component that
generates sound vibrations when an electrical current is applied to it. Buzzer sounds can range from
simple beeps to more complex tones, depending on the design and purpose of the device.
The mini project involves an ultrasonic distance sensor, a buzzer (connected to pin 13), and a red
LED (connected to pin 13). The project has two main functionalities: distance measurement and
intrusion detection.
The ultrasonic sensor is used to measure the distance between the sensor and an object. The distance
is calculated based on the time it takes for an ultrasonic pulse to travel from the sensor to the object
and back. The measured distance is then displayed on a 16x2 LCD screen and printed to the serial
monitor. Additionally, there is a defined intruder distance (30 units in this case), and if an object is
detected within this range, the red LED is turned on, and the LCD displays "Stop." If no object is
detected within the intruder distance, the LED is turned off, and the LCD displays "Clear."
Moreover, the project includes a siren effect triggered by the presence of an intruder within the
defined distance. When an object is detected within the intruder range, the buzzer emits a siren sound
with increasing and decreasing frequencies, creating a distinctive audible alert. The LCD is also
utilized to provide real-time feedback by displaying messages such as "Stop" or "Clear" based on the
presence or absence of an intruder.
CHAPTER 3
REQUIREMENT SPECIFICATION
Arduino UNO
Laptop or PC to upload code
Ultrasonic Sensor
LCD 16x2 display module
USB cable
Buzzer
Breadboard
LED
Jumper Wires (Male to Male , Male to Female)
Arduino IDE
Serial Monitor
Windows
LiquidCrystal.h library
CHAPTER 4
DESIGN
(Fig 4.1 [4] System architecture diagram for Intruder Alarm System)
Hardware components used are Arduino UNO, LCD module, Buzzer, Ultrasonic Sensor, LED
and Laptop or PC to upload code. Software Components are Arduino IDE and LiquidCrystal.h
library. Arduino communicates with the computer through the USB port for programming and
debugging purposes. The Serial Monitor in the Arduino IDE displays information sent by the
Arduino.
CHAPTER 5
IMPLEMENTATION DETAILS
5.1 Circuit
5.2 Code
#define echo 10
#define trig 11
#define outA 13// Red LED
#include <LiquidCrystal.h>
// initialize the library with the pins on the Arduino board
LiquidCrystal lcd(9, 8, 5, 4, 3, 2);
float duration; // time taken by the pulse to return back
float distance; // oneway distance travelled by the pulse
const int intruderDistance = 30; // the minimum distance upto which the sensor is able to sense any
object
void setup()
{
pinMode(trig, OUTPUT);
pinMode(echo, INPUT);
pinMode(outA, OUTPUT);
digitalWrite(outA, LOW);
lcd.begin(16, 2);
Serial.begin(9600);
void loop()
{
time_Measurement();
distance = (float)duration * (0.0343) / 2; // calculate the oneway distance travelled by the
pulse
Serial.println(distance);
alarm_condition();
lcd.setCursor(0, 1);
policeSiren();
// print the number of seconds
//lcd.print(millis() / 1000);
delay(100);
lcd.clear();
void time_Measurement()// function to measure the time taken by the pulse to return back
{
digitalWrite(trig, LOW);
delayMicroseconds(2);
digitalWrite(trig, HIGH);
delayMicroseconds(10);
Dept. of CCE, NMAMIT, Nitte-2023-24 12
Intruder Alarm System
digitalWrite(trig, LOW);
void alarm_condition()//function to execute the output commands based on the sensor input
{
if(distance<=intruderDistance)
{
digitalWrite(outA,HIGH);
lcd.setCursor(1, 0);
lcd.print("Stop");
else
{
digitalWrite(outA,LOW);
lcd.setCursor(1, 0);
lcd.print("Clear");
}
}
void policeSiren()
{
if (distance <= intruderDistance)
{
digitalWrite(outA, HIGH);
5.3 Steps
5. If the distance between the person and the ultrasonic sensor is greater than 50 cm
6. The buzzer creates a sound of siren to alert the owner of the intruder
8. The LCD then displays the message “stop” and if there is no person it displays “clear”
CHAPTER 6
RESULTS
CHAPTER 7
The intruder alarm system based on Arduino Uno, ultrasonic sensor, red LED, LCD display, and
buzzer provides a fundamental yet effective solution for detecting intruders within a specified
range.[2] The main purpose of an intrusion alarm system is to protect from burglary, vandalism,
property damage, and, of course, the security of the individuals inside the building. The
integration of visual and audible alerts enhances its capability to promptly notify users of potential
security breaches. This project serves as a valuable introduction to DIY security systems, combining
accessible hardware with straightforward Arduino programming.
The intruder alarm system, as it stands, serves as a robust foundation for a security mechanism, but
future enhancements could propel it into a more advanced and sophisticated solution. One potential
avenue for improvement is the incorporation of machine learning algorithms for pattern recognition.
By leveraging advanced algorithms, the system could learn and adapt to the environment over time,
distinguishing between normal and suspicious activities more accurately. This could reduce false
positives and enhance the overall reliability of the alarm system.
CHAPTER 8
REFERENCES
Websites Referred
[1] https://www.etechnophiles.com/5-arduino-ultrasonic-sensor-projects-with-
code-circuit-diagram-and-more/#google_vignette
[2] https://www.getkisi.com/overview/intrusion-alarm-systems
[3] https://www.tinkercad.com/
[4] https://app.diagrams.net/