0% found this document useful (0 votes)
111 views68 pages

Report FINAL2-1

This document describes the design, construction, and implementation of a smart robust security system for the Federal University of Technology Owerri (FUTO) campus by Njoku Chima Emmanuel. It includes a dedication, acknowledgements, abstract, definition of terms, and certification. The project was carried out to fulfill the requirements for a Bachelor of Engineering degree in Electrical and Electronic Engineering at FUTO under the supervision of Engr. Opara F.K.

Uploaded by

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

Report FINAL2-1

This document describes the design, construction, and implementation of a smart robust security system for the Federal University of Technology Owerri (FUTO) campus by Njoku Chima Emmanuel. It includes a dedication, acknowledgements, abstract, definition of terms, and certification. The project was carried out to fulfill the requirements for a Bachelor of Engineering degree in Electrical and Electronic Engineering at FUTO under the supervision of Engr. Opara F.K.

Uploaded by

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

DESIGN, CONSTRUCTION, AND IMPLEMENTATION OF SMART

ROBUST SECURITY SYSTEM FOR FUTO CAMPUS

BY

NJOKU, CHIMA EMMANUEL

20171032063

ECE

SUBMITTED TO

THE DEPARTMENT OF ELECTRICAL AND ELECTRONIC


ENGINEERING

SCHOOL OF ELECTRICAL SYSTEMS ENGINEERING


TECHNOLOGY

FEDERAL UNIVERSITY OF TECHNOLOGY, OWERRI

IN PARTIAL FULFILMENT OF THE REQUIREMENTS FOR THE


AWARD OF THE BACHELORS OF ENGINEERING DEGREE (B. Eng.)

IN ELECTRICAL AND ELECTRONIC ENGINEERING

AUGUST, 2023

1
CERTIFICATION
This is to certify that this work, Design, Construction, and Implementation of
Smart Robust Security System for FUTO Campus, was an authentic work carried
out by NJOKU CHIMA EMMANUEL and AGBO FRANKLIN KELECHI, in
partial fulfilment of the requirements for the award of the Bachelor of Engineering (B.
Eng.) degree in Electrical and Electronic Engineering, Federal University of
Technology, Owerri (FUTO).

Approved By:

…………………………… ……………………

Engr. Opara F.K. Date

(Project Supervisor)

…………………………… ……………………

Engr. Dr. N. Chukwuchekwa Date

(Head of Department)

…………………………… ……………………

(External Examiner) Date

2
DEDICATION
This work is dedicated to my family and friends who have been my support system
throughout my academic life, and most especially in the university.

This work is also dedicated to my teachers, tutors, lecturers, professors, and


supervisors, both past and present. They have all contributed in some shape or form to
my academic development.

Last but not least, I dedicate this report to God almighty.

3
ACKNOWLEDGEMENT
I would like to acknowledge every person who has had a major or even minor impact
on my development till date.

Firstly, I would like to acknowledge my parents, siblings, and extended family for the
moral and financial support they have provided over the years. I most certainly do not
take them for granted.

I would also like to acknowledge my course adviser – Engr Paulinus Nwammuo, for
his support and encouragement throughout my undergraduate journey.

A grand acknowledgement to all the lecturers and laboratory staff – Engr Prof.
Ephraim N.C Okafor, Engr Prof. Micheal C. Ndinechi, Engr Prof. Gloria N. Ezeh,
Engr Prof. Damian O. Dike, Engr. Dr. Ifeyinwa E. Achumba, Engr Prof. Felix K.
Opara, Engr Prof, Christain C. Mbaocha, Dr. Ondoma J. Onojo, Engr Dr. Lazarus O.
Uzoechi, Engr. Dr. N. Chukwuchekwa, Engr. Dr, Cosmos K. Agubor, Engr. Dr.
Isdore O. Akwukwaegbu, Engr. Dr. Matthew Olubiwe, Engr. Dr. Onyebuchi C.
Nosiri, Engr.Uche H. Diala, Engr. Raymond Opara, Engr. Dr. Samuel O. Okozi, Engr.
Dr Longinus S. Ezema, Engr. Mrs Ehinomen E Atimati, Engr. Dr. Chijioke K. Joe,
Engr. Dr. Nnaemeka C. Onuekwusi, Engr. Reginald Okpara, Engr. Dr. Adekunlee O.
Akande, Engr. Mrs Blessing Dike, Engr. Ernest O. Ezeugwu, Mr Olivia O. Ozioko,
Engr. Mrs. Chika J. Anyalewechi, Engr. C.F. Paulinus Nwammuo, Engr. Ernest
Ezeugwu, Engr. Chinazom Otubelu, Mr Olivia Ozioko, Mr Onyema Nduka, Mr.
Obinna Unigwe, Mr Donald T. Azuatalam, Mr. Peter Eze, Mr Cherechi Ndukwe, Mr.
Chinoso Ubbaonu, Mr Ohiri Bascal Chinedu, Mrs Ifeoma Onugha, Mr Elochukwu
Ifediora, Miss Olivia Okechukwu, Mr Abubakar Idiris Musa, Engr. Emmanuel U.
Ekwueme, Mr. Oparah Richard, Mr. Prince Murako, James, Mr. Ekwue Godwin, Mrs
Ekechukwu Ebere, Engr. Onyiaji, Belechukwu, Engr Onyiaji Chiweze, Mr Nwogu
Valentine, Mr Ezenwobodo Onyebuchi, Mrs Obioha Oluchi, Mr Ozo Micheal, Mr
Ajaji Kingsely, Mrs Nwachukwu Darlene, Mrs Agwu Mary, Mr Lawrence
Okechukwu, Mr Obiekwe Chizoba.

4
I would like to specially acknowledge my Project Supervisor, Prof. F. K. Opara, for
his constant commitment to the success of those of us he is in charge of, and the
successful execution and defense of our respective projects.

Not forgetting the staff of Kenol Nigeria Limited for the experiences that I gained in
my SIWES Industrial Training are largely down to the following people in no
particular order; Mrs. Yemisi Alagbe, Mr. Paul (from HR Department), Engr.
Iyinyemi Gideon, Engr Olanipekun Eunice, Engr. Folake Ogunbanwo, Engr.
Obanigba Abiola, Engr. Niyi (Planning Department), Engr. Seun Akinlabi, Engr. Peter
Adegun, Engr. Olugbemi Oluwole, Engr. Adenike Akinade, Engr. Jide Hassan, Engr.
Atanda Musiban, Engr. Ojelabi Tunde, Engr. Adegboyega Adekile, Mr. Akinrelere
Bola, and Engr. Bunmi Adegbesan.

Finally I would like to appreciate and acknowledge every institution that has
positively shaped me over time, from schools, to churches, to organizations, and so
on.

It is my belief that this seminar report will do justice to all your investments in me.

5
ABSTRACT
This study examines the relevance of sensors, cameras, and remote monitoring apps in
the development of robust security systems. The objective is to identify the strengths
and limitations of these technologies and determine how they can be integrated into
effective security systems.
The study begins by reviewing the literature on the use of sensors, cameras, and
remote monitoring apps in security systems. It identifies key trends, challenges, and
opportunities in the field, highlighting the potential for these technologies to enhance
the effectiveness of security systems.
The study also includes a case study analysis of the use of sensors, cameras, and
remote monitoring apps in a large-scale security system. The case study examines the
design and implementation of the system, as well as its effectiveness in detecting and
preventing security breaches.
The study concludes by highlighting the importance of integrating sensors, cameras,
and remote monitoring apps into security systems to enhance their effectiveness. It
also identifies key areas for future research, including the development of more
advanced sensors and cameras, the integration of artificial intelligence and machine
learning, and the exploration of new applications for remote monitoring apps in
security systems.

6
DEFINITION OF TERMS
• Infrared: Infrared (IR) refers to a type of electromagnetic radiation with
wavelengths longer than those of visible light. It is commonly used in technologies
such as remote controls, infrared communication, and thermal imaging. Infrared
radiation is invisible to the human eye but can be detected and utilized by
specialized devices.

• Ethernet: Ethernet is a widely used technology for local area networking (LAN). It
provides a standardized method for connecting computers and devices in a
network using wired connections. Ethernet allows for the transmission of data
packets between devices, enabling communication and data sharing within a
network.

• Microcontroller: A microcontroller is a compact integrated circuit (IC) that


consists of a microprocessor core, memory, and input/output peripherals. It is
designed to execute specific tasks and control electronic systems. Microcontrollers
are commonly used in various applications, such as embedded systems, robotics,
consumer electronics, and automation.

• PIR (sensor): Passive Infrared (PIR) sensor is a type of electronic sensor that
detects infrared radiation emitted by living beings or objects in its field of view. It
is commonly used in security systems to detect motion and trigger alarms or
automated actions.

• IP (Camera): IP stands for Internet Protocol. An IP camera is a digital video


camera that can transmit and receive data over a network or the internet using IP. It
captures and streams video footage, allowing users to access and view the camera
feed remotely.

• PoE: Power over Ethernet (PoE) is a technology that enables network devices,
such as IP cameras, to receive power and data through a single Ethernet cable. It
eliminates the need for separate power cables and simplifies installation in
situations where power outlets are not readily available.

7
• PTZ: PTZ stands for Pan-Tilt-Zoom. It refers to the capability of a camera to pan
(move horizontally), tilt (move vertically), and zoom in or out, often controlled
remotely. PTZ cameras are commonly used in surveillance systems to provide
flexible and adjustable coverage.

• WDR: WDR stands for Wide Dynamic Range. It is a feature commonly found in
cameras and imaging devices that allows for better capture and display of details in
scenes with a high contrast between bright and dark areas.

• IoT: IoT stands for Internet of Things. It refers to the network of physical devices,
vehicles, appliances, and other objects embedded with sensors, software, and
connectivity to exchange data and interact with each other through the internet.

• GSM: GSM stands for Global System for Mobile Communications. It is a standard
for digital cellular networks used for voice and data communication. GSM is the
most widely used mobile communication standard globally.

• Wi-Fi: Wi-Fi is a technology that enables wireless communication and


connectivity between devices using radio waves. It allows devices to connect to
local area networks and the internet without the need for physical cables.

• ESP32: ESP32 is a popular microcontroller module developed by Espressif


Systems. It is widely used in IoT applications due to its built-in Wi-Fi and
Bluetooth capabilities, as well as its powerful processing capabilities.

• iOS: iOS is a mobile operating system developed by Apple Inc. It is the operating
system used on Apple's mobile devices, including iPhones, iPads, and iPod Touch.

• Zigbee: Zigbee is a wireless communication protocol designed for low-power,


short-range communication between devices. It is commonly used in home
automation, industrial control systems, and other applications that require low-
power wireless connectivity.

• MQTT: MQTT stands for Message Queuing Telemetry Transport. It is a


lightweight messaging protocol designed for machine-to-machine communication,

8
especially in IoT applications. It allows devices to publish and subscribe to topics
and exchange messages efficiently.

• HTTPS: HTTPS stands for Hypertext Transfer Protocol Secure. It is a secure


version of the HTTP protocol used for transmitting data between a web browser
and a website. HTTPS encrypts the data to ensure its confidentiality and integrity,
commonly used for secure online.

9
LIST OF SYMBOLS AND ABBREVIATIONS
• PIR - Passive Infrared

• IP - Internet Protocol

• PoE - Power over Ethernet

• PTZ - Pan-Tilt-Zoom

• WDR - Wide Dynamic Range

• IoT - Internet of Things

• GSM - Global System for Mobile Communications

• MQTT - Message Queuing Telemetry Transport

• HTTPS - Hypertext Transfer Protocol Secure

10
LIST OF TABLES

TABLE I – COST ANALYSIS

11
LIST OF FIGURES AND DIAGRAMS
Fig. 2.1 A Motion Sensor
Fig. 2.2 A Door and Window Sensor
Fig. 2.3 A Glass Break Sensor
Fig. 2.4 A Proximity Sensor
Fig. 2.5 A Pressure Sensor
Fig. 2.6 A Vibration Sensor
Fig. 2.7 A PTZ Camera
Fig. 2.8 A 360-Degree Camera
Fig. 2.9 An Arduino Uno Microcontroller
Fig. 2.10 A Raspberry Pi Microcontroller
Fig. 2.11 A Node MCU Microcontroller
Fig. 2.12 An ESP32 Microcontroller
Fig. 2.13 Blynk App User Interface
Fig. 3.1 Block Diagram of Smart Security System

12
TABLE OF CONTENTS

CHAPTER ONE.........................................................................................................15
INTRODUCTION......................................................................................................15
1.1 Background of the Research..............................................................................15
1.2 Statement of Problem.........................................................................................15
1.3 Research Objectives...........................................................................................18
1.4 System Features.................................................................................................18
1.5 Justification........................................................................................................19
1.6 Scope of the Study.............................................................................................21
1.6.1Boundary Conditions....................................................................................21
1.6.2Environment of the Research........................................................................22
CHAPTER TWO........................................................................................................23
LITERATURE REVIEW............................................................................................23
2.1 Review of Related Technologies, Applications, and Use Cases........................23
2.2 Review of Related Journals, Articles, and Related Past Projects.......................40
CHAPTER THREE.....................................................................................................43
METHODS AND METHODOLOGY........................................................................43
3.1 Components and Resources Used......................................................................43
3.1.1 Components Used........................................................................................43
3.1.2 Resources and Software Used......................................................................44
3.2 Methodology......................................................................................................45
3.3 Project Implementation Details..........................................................................48
CHAPTER FOUR.......................................................................................................55
RESULTS AND DISCUSSION.................................................................................55
4.1 Implemented Features........................................................................................55
4.2 Challenges and Solutions...................................................................................56
4.3 Discussion..........................................................................................................56
4.4 Limitations and Future Work.............................................................................57
CHAPTER FIVE........................................................................................................58
CONCLUSION AND RECOMMENDATIONS........................................................58
5.1 Conclusion.........................................................................................................58

13
5.1.1 Key Findings...............................................................................................58
5.1.2 Project Objectives Achievement..................................................................59
5.2 Recommendations..............................................................................................59
5.2.1 Camera Module Enhancement.....................................................................59
5.2.2 Two-Way Communication..........................................................................59
5.2.3 Cloud Integration.........................................................................................59
5.3 Future Work.......................................................................................................60
5.4 Conclusion.........................................................................................................60
COST ANALYSIS......................................................................................................61
REFERENCES...........................................................................................................62

14
CHAPTER ONE

INTRODUCTION
1.1 Background of the Research
In recent years, the advancement of Internet of Things (IoT) technology has paved the
way for innovative solutions in various domains. One such domain is security and
surveillance, where IoT-based systems are being leveraged to create intelligent and
responsive security setups. With increasing concerns about safety and security in
educational institutions, there is a growing need for effective and modern security
systems that can monitor and protect school campuses efficiently.

This project focuses on implementing an IoT-based security system using sensors and
a camera module in school classrooms and other parts of the campus. By integrating
various sensors, real-time monitoring capabilities, and the Blynk app, we aim to
enhance security measures within the school environment.

1.2 Statement of Problem


School campuses, including classrooms and other facilities, are places of learning and
growth for students. However, ensuring the safety and security of students, staff, and
resources is paramount. Traditional security systems often fall short of providing
comprehensive and interactive solutions that cater to the dynamic needs of modern
educational institutions.

The existing security measures, such as manual security personnel and traditional
alarm systems, might have limitations in terms of real-time monitoring, response
times, and remote accessibility. Additionally, the inability to interact remotely with
security systems limits the flexibility of administrators and teachers to manage
security situations effectively.

This project seeks to address these challenges by developing an IoT-based security


system that combines sensor technology, camera modules, and the Blynk app. By

15
doing so, we aim to provide a practical and efficient solution for monitoring and
enhancing security within school classrooms and campus areas.

The implementation of security systems can be a challenging and complex process.


Some of the key problems include:

• Cost: Security systems can be expensive to purchase and install, particularly if


they require extensive wiring, hardware, or software. Additionally, ongoing
maintenance costs can add up over time, making these systems a significant
investment.

• Compatibility: There are many different types of security systems on the


market, and not all of them are compatible with each other. This can make it
difficult to integrate different systems and components, and can limit the
effectiveness of the overall security solution.

• False alarms: Security systems can be triggered by false alarms, which can be
costly and time-consuming to investigate. False alarms can also lead to
complacency among security personnel, which can leave the organization
vulnerable to real threats.

• Privacy concerns: The use of security systems can raise privacy concerns,
particularly if they involve video surveillance or other forms of data collection.
Organizations need to be aware of these concerns and take steps to address
them in their security planning and implementation.

• Choice of components: The problem of choice of materials and components for


security systems can be a significant challenge for security system designers
and installers. This is because the effectiveness of the security system largely
depends on the quality and suitability of the materials and components used.

• One of the primary concerns is the durability and resistance of the materials
and components to potential threats such as vandalism, tampering, and
environmental factors. For example, cameras and sensors may need to be
placed in exposed outdoor locations and must be able to withstand harsh

16
weather conditions such as extreme temperatures, high humidity, and heavy
rainfall.

• Vandalism: To mitigate the problem of vandalism, security system designers


and installers may need to consider the use of materials and components that
are resistant to tampering and damage. For example, cameras can be installed
in vandal-resistant housings or enclosures, and sensors can be placed in areas
that are less accessible to potential vandals.

• Lack of Suitability of Blynk App: Regarding the Blynk app, while it offers
many useful features for remote monitoring of security systems, it may not be
the most suitable option for all scenarios. Blynk relies on an internet
connection, and if the connection is lost or interrupted, the app may not work
correctly. Additionally, the Blynk app may not be compatible with all types of
sensors and cameras, and the data transfer rate may not be fast enough for some
applications.

Challenges of Implementing Security Systems in Nigeria and Other Developing


Countries

Implementing security systems in Nigeria and other third-world countries can be


challenging due to various factors. Some of the challenges include:

• Cost: Security systems can be expensive, and many organizations and


individuals in third-world countries may not have the resources to invest in
them. The high cost of security systems can make it difficult for people to
secure their homes, businesses, and communities.

• Lack of infrastructure: In many third-world countries, there is a lack of basic


infrastructure such as reliable electricity and internet connectivity, which can
be necessary for the proper functioning of security systems.

• Lack of technical expertise: There may be a shortage of skilled personnel who


can design, install, and maintain security systems in third-world countries. This

17
can limit the effectiveness of security systems and lead to frequent breakdowns
or malfunctions.

• Poor Response Time of Security Agencies: In the event that there is a breach in
security, the response time of security agents like the police are very
inadequate due to negligence on their part and lack of security apparatus and
personnel. Only rarely is this not the case.

Overall, implementing security systems in third world countries can be challenging


due to a combination of economic, social, and political factors.

1.3 Research Objectives


The aim of this research is to:

• To determine the best choice of components and materials with cost and
interoperability in mind

• To understand the role of sensors, cameras, remote monitoring apps and


software, and indeed other security system components play in keeping the
campus safe

• To find out current advancements in security systems

• To improve the security of lives and properties on campus

1.4 System Features


The proposed IoT-based security system for implementation within the FUTO campus
and classrooms is designed to offer a range of features to enhance security and
surveillance. These features include:

1. Sensor Integration: The system integrates various sensors such as the SW420
Vibration Sensor, HC-SR04 Proximity Sensor, and HC-SR501 PIR Motion
Sensor. These sensors collectively enable the system to detect physical
disturbances, measure distances, and identify motion within defined areas.

18
2. Real-time Monitoring: With the Blynk app as a communication platform, the
system provides real-time monitoring of sensor data. Users, including
administrators and teachers, can access live readings of sensor states and
receive instant notifications in case of detected disturbances or motion.

3. Remote Accessibility: Users can remotely access and control the security
system using the Blynk app. The app allows manual triggering of alarms,
enabling or disabling specific sensors, and viewing real-time images captured
by the ESP32-CAM camera module.

4. Alarm Activation: The system includes an active buzzer module that generates
audible alarms in response to sensor activations. The buzzer enhances
situational awareness and notifies individuals present within the vicinity of
potential security breaches.

1.5 Justification
The justification for undertaking the IoT-based security system project within school
campuses, focusing on classrooms and other areas, stems from the pressing need to
enhance security measures in educational institutions. This section outlines the key
justifications for the project, highlighting its significance and potential impact.

Safety and Security Concerns in Educational Institutions

Educational institutions are tasked with providing a safe and conducive learning
environment for students, teachers, and staff. However, the increasing prevalence of
security threats, including unauthorized access, vandalism, and safety concerns, poses
challenges to achieving this goal. Incidents such as unauthorized entry, theft, and
safety breaches underscore the urgency to implement modern and effective security
solutions.

Limitations of Traditional Security Approaches

19
Traditional security approaches, such as manual security personnel and basic alarm
systems, have limitations that hinder their ability to address modern security
challenges adequately. These limitations include:

1. Delayed Response: Manual security measures often result in delayed responses


to security breaches, which can lead to greater consequences.

2. Lack of Real-time Monitoring: Traditional systems lack real-time monitoring


capabilities, making it difficult to detect and respond promptly to security
incidents.

3. Absence of Remote Accessibility: Administrators and teachers often lack the


ability to remotely access security systems, limiting their ability to manage and
respond to security situations in real-time.

Importance of IoT-based Solutions

The integration of Internet of Things (IoT) technology provides a transformative


solution to address the limitations of traditional security approaches. IoT-based
security systems offer several advantages:

1. Real-time Monitoring: IoT systems offer real-time monitoring of sensor data,


enabling immediate awareness of security breaches.

2. Remote Accessibility: IoT platforms such as the Blynk app facilitate remote
accessibility, allowing users to control and monitor security systems from their
smartphones.

3. Customizability: IoT systems can be tailored to specific needs, incorporating a


variety of sensors and functionalities to address unique security challenges.

Relevance to School Campus Security

20
The implementation of the IoT-based security system within school campuses,
focusing on classrooms and campus areas, is highly relevant due to the following
reasons:

1. Comprehensive Protection: By combining various sensors and camera


modules, the system offers comprehensive protection against unauthorized
access and security breaches in different areas of the school campus.

2. Educational Environment: Educational institutions require security measures


that align with the unique needs and sensitivities of a learning environment.
The system's ability to monitor and respond to incidents without disrupting the
learning process is crucial.

3. User-friendly Interaction: The Blynk app's intuitive interface makes it suitable


for administrators, teachers, and staff, enabling easy interaction with the
security system without requiring technical expertise.

Potential Impact

The successful implementation of the IoT-based security system has the potential to
achieve the following impacts:

1. Enhanced Safety: The system contributes to enhancing the safety of students,


teachers, and staff within the school campus, fostering a secure learning
environment.

2. Timely Response: Real-time monitoring and remote accessibility empower


administrators and teachers to respond promptly to security incidents,
minimizing potential risks.

3. Technology Adoption: The project encourages the adoption of modern


technology in school security measures, demonstrating the feasibility and
benefits of IoT-based solutions.

21
1.6 Scope of the Study
1.6.1Boundary Conditions
Physical Locations

The system is designed to operate within indoor environments, primarily classrooms


and other enclosed areas within the school campus. The sensor coverage areas and
placement are optimized to cater to the specific layout and requirements of each
classroom or designated space.

Wi-Fi Connectivity

For proper functioning, the system requires a stable Wi-Fi network within the school
campus. The connectivity quality directly affects the real-time communication
between the hardware components and the Blynk app.

1.6.2Environment of the Research


School Campus

The research is conducted within the premises of a school campus, focusing on


specific areas such as classrooms and other facilities. The choice of school campus as
the research environment is based on the need for comprehensive security measures
within educational institutions.

Classroom Settings

The primary deployment of the security system occurs within classroom


environments. Classroom settings offer controlled environments for testing and
implementation, allowing us to evaluate the system's effectiveness in a space with
diverse activities and potential security concerns.

22
CHAPTER TWO

LITERATURE REVIEW
2.1 Review of Related Technologies, Applications, and Use Cases
Sensors

Sensors are vital components in various industries and applications, enabling the
measurement and detection of physical properties or environmental conditions. They
play a crucial role in fields such as healthcare, automotive, manufacturing, agriculture,
and smart cities.

In the realm of security systems, sensors play a crucial role in detecting and
responding to potential threats or unauthorized activities. Here are some key sensor
technologies used in security systems:

• Motion Sensors: Motion sensors are commonly used in security systems to


detect movement in an area. They can be based on various technologies such as
passive infrared (PIR), microwave, ultrasonic, or dual-technology
combinations. When motion is detected, these sensors trigger an alarm or
activate other security measures.

A motion sensor is shown in the figure below:

Fig. 2.1
23
• Door and Window Sensors: These sensors are typically magnetic contact
sensors that monitor the status of doors, windows, or other entry points. They
consist of two components—a magnet and a sensor—that create a magnetic
field. When the connection is broken, such as when a door or window is
opened, an alarm is triggered.

The figure of a door and window sensor is shown below:

Fig. 2.2

• Glass Break Sensors: Glass break sensors are designed to detect the sound or
vibrations produced when glass is shattered or broken. They can help identify
attempted forced entry or break-ins through windows or glass doors. Some
sensors use acoustic detection, while others combine acoustic and
shock/vibration sensing.

Below is the figure of a glass break sensor:


24
Fig. 2.3

• Proximity Sensors: Proximity sensors detect the presence of objects or


individuals within a specific range. They can be used in access control systems,
where they trigger an alert or authentication process when someone approaches
a secured area. Technologies such as capacitive, inductive, or optical sensors
are employed for proximity detection.

Some types of proximity sensors are shown in the figure below:

Fig. 2.4

• Video Surveillance Sensors: Video surveillance systems utilize various sensors


to capture and analyze visual information. This includes cameras with features
like motion detection, facial recognition, and object tracking. Advanced video
25
analytics and machine learning algorithms can enhance security by
automatically detecting suspicious activities or identifying specific individuals.

• Vibration Sensors: Vibration sensors are employed to detect unauthorized


tampering or attempts to bypass physical security measures such as safes,
vaults, or fences. They can detect vibrations caused by drilling, cutting, or other
mechanical actions.

A pair of vibration sensors is shown in the figure below:

Fig. 2.5

• Biometric Sensors: Biometric sensors, such as fingerprint scanners or facial


recognition systems, can enhance security by providing reliable and unique
identification. These sensors capture and analyze biological traits to grant or
deny access to secure areas.

These sensor technologies, when combined with appropriate alarm systems,


monitoring software, and response mechanisms, create robust security systems that
help protect people, property, and assets from potential threats or intrusions.

26
Cameras

Cameras play a crucial role in security systems, providing visual surveillance and
monitoring capabilities. Here's a review of technologies related to cameras in security
systems:

• Analog Cameras: Analog cameras are traditional cameras that capture video in
analog format. They require a direct connection to a recording device or
monitor. However, their image quality and resolution are typically lower
compared to digital cameras.

• Digital/IP Cameras: Digital or IP cameras capture video in digital format,


allowing for higher image quality, resolution, and flexibility. These cameras
connect to a network, enabling remote access, video storage, and integration
with other security systems. They often utilize Power over Ethernet (PoE) for
simplified installation.

• High Definition (HD) Cameras: HD cameras provide enhanced video quality


and resolution compared to standard analog cameras. They offer improved
clarity and detail, enabling better identification and recognition of objects or
individuals within the camera's field of view.

• Pan-Tilt-Zoom (PTZ) Cameras: PTZ cameras are motorized cameras that can
be remotely controlled to pan (move horizontally), tilt (move vertically), and
zoom in or out. This allows for flexible surveillance coverage and the ability to
focus on specific areas or objects of interest.

A PTZ camera is shown in the figure below:

27
Fig. 2.7

• Thermal Cameras: Thermal cameras capture infrared radiation emitted by


objects to create images based on temperature differences. They are particularly
useful for detecting heat signatures and can be effective in low-light or
complete darkness. Thermal cameras are commonly used for perimeter
surveillance, detecting intruders, and monitoring equipment or critical
infrastructure.

• Day/Night Cameras: Day/Night cameras are designed to provide optimal video


surveillance in various lighting conditions. They have features such as wide
dynamic range (WDR) and infrared (IR) illumination to capture clear images
during both daytime and nighttime scenarios.

• Wide Dynamic Range (WDR) Cameras: WDR cameras are equipped with
technology that enables them to capture scenes with a wide range of lighting
conditions. They can handle high-contrast scenes, such as areas with both
bright and dark areas, ensuring details are visible in both bright and shadowed
regions of the image.

• 360-Degree Cameras: Also known as panoramic cameras, these cameras


capture a complete 360-degree field of view. They eliminate blind spots and
provide a comprehensive view of the surroundings, making them suitable for
large areas, such as open spaces, parking lots, or city surveillance.

28
Below is a figure of a 360-degree Camera:

Fig. 2.8

• Facial Recognition Cameras: Facial recognition cameras use advanced


algorithms and artificial intelligence to detect and identify individuals based on
their facial features. They can be used for access control, identifying known
suspects, or enhancing security in high-security areas.

These camera technologies provide a range of options for capturing, analyzing, and
storing video footage in security systems. The choice of camera technology depends
on the specific requirements of the surveillance application, including the desired
image quality, coverage area, lighting conditions, and integration capabilities.

Microcontrollers

Microcontrollers play a significant role in smart security systems by acting as the


central processing unit that coordinates and controls various components of the
system. They are compact integrated circuits that combine a microprocessor core,
memory, input/output interfaces, and other peripherals into a single chip.

29
How Microcontrollers Work in Smart Security Systems:

• Input Acquisition: Microcontrollers receive input from sensors such as motion


detectors, door/window sensors, or temperature sensors. These sensors detect
changes in their respective parameters and convert them into electrical signals
that the microcontroller can understand.

• Data Processing: The microcontroller processes the incoming data, applying


predefined algorithms or rules to analyze and interpret the sensor readings. It
compares the data against predefined thresholds or patterns to determine if a
security event has occurred or if further action is required.

• Decision-Making and Control: Based on the processed data, the


microcontroller makes decisions on how to respond to the detected events. This
may involve activating cameras to capture images or videos, sending alerts or
notifications to users, or triggering other response mechanisms such as alarms
or automated actions.

• Communication and User Interface: Microcontrollers facilitate communication


between the security system and the user interface, which can be a mobile app,
a web interface, or a dedicated control panel. They transmit relevant data,
alerts, and status updates to the user interface, allowing users to remotely
monitor and control the security system.

• Storage and Logging: Microcontrollers can also handle data storage and
logging functions. They can store sensor readings, event logs, and system
configurations in onboard memory or external storage devices. This data can be
used for later analysis, generating reports, or forensic purposes.

Microcontrollers are programmed using specialized software tools and programming


languages. Developers write code that defines the behavior and functionality of the
microcontroller, including sensor input handling, event detection, response
mechanisms, and communication protocols.

30
In summary, microcontrollers are essential components of smart security systems,
providing control, processing capabilities, and communication interfaces. They enable
real-time monitoring, efficient control of system components, and seamless
integration with sensors, cameras, and user interfaces. Microcontrollers play a crucial
role in ensuring the reliable and effective operation of smart security systems.

Some of the more popular microcontrollers that are used in smart security systems are:

• Arduino: Arduino boards, such as Arduino Uno, Arduino Mega, and Arduino
Nano, are widely used in DIY IoT projects due to their simplicity and extensive
community support. Arduino offers a user-friendly development environment
and a vast range of shields and modules for various IoT applications.

Below is a figure of an Arduino Uno microcontroller board:

Fig. 2.9

• Raspberry Pi: While not strictly a microcontroller, Raspberry Pi boards are


highly versatile and often used in IoT projects. Raspberry Pi provides a
complete single-board computer with a Linux-based operating system, offering
more computational power and connectivity options compared to traditional
microcontrollers.

Below is the figure of a Raspberry Pi board:

31
Fig. 2.10

• ESP32: The ESP32 is a powerful microcontroller with built-in Wi-Fi and


Bluetooth capabilities. It's commonly used in IoT projects that require wireless
communication. The ESP32 offers a large number of GPIO pins, a dual-core
processor, and ample memory, making it suitable for complex IoT applications.

An ESP32 microcontroller is shown in the figure below:

Fig. 2.11

• ESP8266: The ESP8266 is an earlier version of the ESP32 but is still widely
used due to its low cost and Wi-Fi capabilities. It is often employed in IoT

32
projects requiring basic connectivity features and is compatible with the
Arduino IDE.

• STM32: STM32 microcontrollers from STMicroelectronics are popular for


more advanced IoT projects. These microcontrollers offer a broad range of
features, including high processing power, various connectivity options, and a
rich ecosystem of development tools.

• NodeMCU: NodeMCU is an open-source IoT platform based on the ESP8266


microcontroller. It combines the ESP8266 with firmware that simplifies
programming, making it beginner-friendly for IoT projects.

A NodeMCU microcontroller is shown in the figure below:

Fig. 2.12

Blynk App

33
Blynk is a popular mobile app platform that enables the development of IoT (Internet
of Things) applications and provides an interface for controlling and monitoring
connected devices.

Features of the Blynk App

While Blynk itself is not specifically designed for security systems, it can be utilized
as a component in creating IoT-based security solutions. Below are the features of the
Blynk app:

• IoT Devices: Blynk is compatible with a wide range of IoT devices, such as
microcontrollers (Arduino, ESP8266, and Raspberry Pi), development boards,
and smart sensors. These devices can be used to interface with various security-
related components, such as sensors, cameras, alarms, or access control
systems.

• Wireless Communication Protocols: Blynk supports popular wireless


communication protocols used in IoT, including Wi-Fi, Bluetooth, and GSM.
This allows for seamless connectivity between the Blynk app and IoT devices
in security systems, enabling real-time data exchange and control.

• Sensor Integration: Blynk can interface with different types of sensors


commonly used in security systems. This includes motion sensors,
door/window sensors, temperature sensors, gas sensors, and more. By
integrating these sensors with Blynk, users can monitor environmental
conditions, detect intrusion, or receive alerts through the app.

• Video Streaming and Surveillance: Blynk can integrate with IP cameras or


video surveillance systems that support network streaming protocols. This
enables live video streaming, remote viewing, and control of security cameras
through the Blynk app. Users can monitor their premises or specific areas in
real-time, view recorded footage, and receive alerts based on motion detection
or other events.

34
• Push Notifications and Alerts: Blynk provides the capability to send push
notifications and alerts directly to the mobile app. This feature can be leveraged
in security systems to notify users of security breaches, alarm triggers, or any
other critical events. Users can stay informed and take necessary actions
promptly.

• Remote Control and Automation: Blynk allows users to remotely control and
automate connected devices in security systems. This can include arming or
disarming security systems, controlling lights or locks, adjusting surveillance
camera positions, or managing access control mechanisms. Users can use the
Blynk app to conveniently control and monitor their security infrastructure
from anywhere.

• Data Logging and Analytics: Blynk provides data logging and analytics
capabilities, allowing users to store and analyze sensor data over time. This can
be valuable in security systems for tracking and analyzing patterns, generating
reports, or identifying anomalies. Data visualization tools provided by Blynk
can help users gain insights into the security system's performance.

• User Management and Access Control: Blynk offers user management features,
enabling multiple users to access and control the security system. This allows
for granular control over who can access the system and what actions they can
perform. User authentication mechanisms can be implemented to ensure secure
access to the Blynk app.

While Blynk itself does not provide complete security system functionalities, its
flexibility, compatibility with various IoT devices, and mobile app interface make it a
viable platform for integrating and controlling components of security systems. It
offers customization options, real-time monitoring, and remote control capabilities,
empowering users to create IoT-based security solutions tailored to their specific
requirements.

Below are figures showing the user interface of the Blynk app:

35
Fig. 2.13a

Fig. 2.13b

Blynk App Alternatives

• Home Assistant: Home Assistant is an open-source home automation platform


that supports a wide range of smart security devices. It allows you to integrate
and control multiple devices from different manufacturers in a unified
interface. You can monitor and receive data from your security system using
the Home Assistant app on your phone.

• Blue Iris: Blue Iris is a video surveillance software that supports a variety of IP
cameras and security systems. It offers mobile apps for iOS and Android that

36
allow you to remotely monitor your cameras, receive alerts, and review
recorded footage.

• iSpy: iSpy is another video surveillance software that supports various IP


cameras and webcams. It offers mobile apps for iOS and Android that let you
monitor your cameras, receive notifications, and access recorded video
remotely.

• ZoneMinder: ZoneMinder is a Linux-based video surveillance system that


works with a range of IP cameras. While it doesn't have an official mobile app,
there are third-party apps available for both iOS and Android that allow you to
access and monitor your ZoneMinder system remotely.

These apps provide a DIY approach to monitoring your smart security system, and
they offer flexibility in terms of device compatibility and customization.

Limitations of Blynk App

Here are some limitations you may encounter with the Blynk app and possible
solutions:

• Limited Free Tier: Blynk offers a free tier with limitations on the number of
devices, widgets, and data usage. If you have a large-scale project or require more
resources, you may need to upgrade to a paid plan.

Solution: Evaluate your project requirements and consider upgrading to a paid


plan if the limitations of the free tier hinder your progress. Blynk offers flexible
pricing plans that provide additional resources and features.

• Internet Dependency: Blynk requires an internet connection for communication


between the app and the devices. If your internet connection is unstable or goes
down, it can disrupt the functionality of your IoT project.

Solution: Consider implementing a backup or redundant internet connection to


ensure continuous operation. Additionally, explore alternative local
communication protocols such as Bluetooth or Zigbee, which can function
without an internet connection.

37
• Security Considerations: As with any IoT system, security is a critical aspect.
Blynk uses the Blynk Cloud server to facilitate communication, which means your
data passes through a third-party server.

Solution: If security is a concern, you can set up your own local Blynk server.
This allows you to have more control over your data and ensures that
communication remains within your local network. The Blynk documentation
provides resources on setting up a local server.

• Limited Customization: While Blynk offers a variety of widgets and customization


options, the level of flexibility may not fulfill highly specific or unique project
requirements.

Solution: If you require extensive customization beyond what Blynk offers,


consider exploring alternative IoT development platforms that provide more
flexibility and customization options. Some examples include PlatformIO,
Arduino IDE, or writing custom code using IoT frameworks like MQTT or
Node-RED.

• Platform Compatibility: Blynk primarily targets mobile devices and offers support
for iOS and Android. If you require compatibility with other platforms, such as
Windows or macOS, you may need to seek alternative solutions.

Solution: Look for alternative IoT platforms that support the specific platforms
you require. There are various open-source IoT frameworks available that offer
cross-platform compatibility.

Prevention of Security System from Vandalism, Tampering, or Theft

Implementing vandal-proof security measures for smart security systems may require
technical expertise and resources beyond what an individual student can handle.
However, there are steps the average person interested in setting up a security system
can take to enhance the security of their personal belongings or small-scale setups:

38
• Secure Placement:

• Position security cameras and sensors in visible and well-lit areas to deter
potential thieves or vandals.

• Use locking mechanisms or anti-tamper brackets provided by the


manufacturers to secure cameras and sensors in place.

• Alarm and Notification Systems:

• Integrate the security system with an intrusion detection alarm system. If


someone attempts to tamper with or remove the cameras, cables, or sensors, an
alarm can be triggered, notifying security personnel or sounding audible alerts.

• Set up real-time notifications or alerts through mobile apps or email systems to


notify security personnel or system administrators of any tampering attempts or
suspicious activities.

• Password Protection:

• Change default passwords on cameras, storage devices, and any other system
components to strong, unique passwords.

• Ensure that all devices are protected with passwords or PIN codes, including
smartphones or laptops used for remote monitoring.

• Awareness and Vigilance:

• Stay informed about common security threats and techniques used by criminals
to target security systems.

• Regularly check the physical integrity of the system components, such as


cables and mounting brackets, for signs of tampering or damage.

• Data Backup:

• Create regular backups of recorded footage or critical data stored in the security
system.

39
• Store backups on external devices or in the cloud to prevent loss in case of theft
or system failure.

• Reporting Suspicious Activities:

• Report any suspicious activities, such as attempted theft or tampering, to the


relevant authorities or campus security personnel.

While these measures provide a basic level of security, it's advisable to consult with
security professionals or IT experts if you require a more robust security solution.
They can provide guidance on advanced security practices, integration with alarm
systems, or professional monitoring services suitable for your specific needs.

2.2 Review of Related Journals, Articles, and Related Past Projects


Smart systems are birthed from Internet of Things and come in many forms depending
on the user’s specific needs. Here are some of the works published on smart systems
and more specifically smart security systems.

The main theme of [04] were the loopholes in smart security systems especially in the
area of cybersecurity. They talked about how the security of smart home systems can
be compromised via attacks such as:

• Man in the Middle Attacks

• Denial of Service Attacks

• Baby Monitor and CCTV Attacks

• Mirai/Ransomware Attacks

• Weak Permission Management

They then proposed solutions to cyber threats using the following

• Device Registration

• Device Profiling

• Fine grained permission management and conflict resolution


40
[05] talks about the loop holes that CCTV has despite the progress that has been made
over the years. They talked about improving security of the places under surveillance
by monitoring hand gestures and detecting suspicious ones. They also speak about
making efforts to prevent attacks by hackers on the security systems. Plate number
recognition is also discussed. Deep learning is the tool used for the gesture and
number recognition.

Since my seminar is focused on wireless systems as mentioned in my Introduction, I


will not focus on CCTV in this report. The methodology of its application, however is
very similar to smart and wireless security systems.

[06], [08], [01], [02], and [03] basically treat the same topic which is, smart security
systems using sensors, alarms, microcontrollers, additional modules as the case may
be, and finally the Blynk App for remote monitoring. In these works we see the
respective algorithms, architectures, block diagrams, flow diagrams, circuit diagrams,
and specific components of the smart security systems. We also get to see how the
Blynk app is interfaced with the central microcontroller and the system in general.

Of all the articles, journals, and past projects I reviewed, these were the most relevant
to this seminar topic.

[07] deals with using Artificial intelligence for face detection. It talks about the
improvements that have been made in recognition performance such as color
processing and edge detection. It delves into the mathematics and theoretical
knowledge behind the Artificial Intelligence. Applying AI in security systems is not
so common especially in Nigeria but with time it would be inevitably.

[10] talked about Internet of Things in smart cities with emphasis on making use of a
panic button when there is a security risk or emergency. The proposed system
implemented IoT, Message Queue Telemetry Transport (MQTT), and NODE MCU
ESP8266 12-F. Such a project would be very difficult and expensive to implement
because of its scale and would require proper planning and expertise.

[09], and [11] describe the implementation of smart security systems but with remote
monitoring apps and software other than Blynk. They show that other monitoring

41
applications are capable of performing the same or better functions than the Blynk
app.

42
CHAPTER THREE

METHODS AND METHODOLOGY


3.1 Components and Resources Used
3.1.1 Components Used
1. 12V Rechargeable Lithium-ion Battery:

Voltage: 12V

Battery Capacity: 8000mAh

Function: A power source for the entire system. Provides the required voltage and
current for the components to operate.

2. LM2596 Buck Converter:

Input Voltage Range: Up to 12V

Output Voltage: Adjustable (commonly used to step down to 5V)

Maximum Output Current: Typically around 2A

Function: Converts higher input voltage to a lower output voltage while regulating the
output current. Powers sensors and components requiring 5V.

43
3. SW420 Vibration Sensor (5V):

Operating Voltage: 5V

Operating Current: <20mA

Function: Detects vibrations and physical disturbances. Consumes low current while
detecting potential unauthorized entry or movement.

4. HC-SR04 Proximity Sensor (5V):

Operating Voltage: 5V

Operating Current: ~15mA (during measurement)

Function: Measures distances using ultrasonic signals. Consumes moderate current


during measurements to detect objects within a range.

44
5. HC-SR501 PIR Motion Sensor (5V):

Operating Voltage: 5V

Operating Current: <50mA

Function: Detects infrared radiation emitted by moving objects. Consumes low current
while identifying motion and presence.

45
6. ESP32 Camera Module (5V):

Operating Voltage: 5V

Operating Current: Varies based on usage, but can range from ~50mA in idle mode to
~200mA during data transmission.

Function: Captures images and videos, integrated with Wi-Fi capability for remote
transmission. Consumes varying current depending on the activity.

46
Figure 3.1: ESP32 CAM Schematic Diagram

7. Active Buzzer Module (5V):

Operating Voltage: 5V

Operating Current: Typically around 20-30mA

Function: Generates audible alerts or alarms. Consumes moderate current while


producing audio cues for security breaches or detected motion.

47
3.1.2 Resources and Software Used
1. Blynk App: Blynk is a platform that allows you to create custom mobile
applications for controlling and monitoring hardware remotely. It enables the
creation of interactive interfaces and dashboards for IoT projects.

2. Arduino IDE: Arduino Integrated Development Environment (IDE) is a


software tool used to write, compile, and upload code to Arduino and
compatible microcontrollers. It provides a code editor, compiler, and uploader
in a single interface.

3. EasyEDA: EasyEDA is a cloud-based electronics design software that allows


you to design, simulate, and create printed circuit board (PCB) layouts. It offers
a user-friendly interface for schematic capture and PCB design.

3.2 Methodology
System Architecture

The IoT-based security system architecture consists of the following key components:

1. Sensors: SW420 Vibration Sensor, HC-SR04 Proximity Sensor, HC-SR501


PIR Motion Sensor.

2. Controller: ESP32-CAM.

3. Communication Platform: Blynk App.

4. Actuator: Active Buzzer Module.

Methodology

Hardware Setup and Connection

1. Set up the ESP32-CAM module using the Arduino IDE.

48
2. Connect the SW420 Vibration Sensor, HC-SR04 Proximity Sensor, and HC-
SR501 PIR Motion Sensor to the appropriate pins on the ESP32-CAM.

3. Connect the active buzzer module to the ESP32-CAM for generating sound
alerts.

4. Power the components using the 12V rechargeable lithium-ion battery


regulated to 5V using the LM2596 buck converter.

Blynk App Configuration

1. Create a Blynk account and project.

2. Obtain the authentication token for the project.

3. Add widgets to the Blynk app interface to visualize sensor data, control the
buzzer, and display camera images.

Coding and Logic Implementation

1. Write the Arduino code for the ESP32-CAM using the Arduino IDE.

2. Configure the code to read data from the sensors and activate the buzzer based
on sensor outputs.

3. Integrate the Blynk library and configure the code to communicate with the
Blynk app using Wi-Fi.

4. Implement logic for capturing images using the ESP32-CAM and transmitting
them to the Blynk app.

Continuity Tests

Continuity testing is a simple and essential method used to check if a circuit is


complete and has a continuous path for electric current to flow. Here's a brief
summary of how continuity testing is done on the components and why it's important:

How Continuity Test is done:

49
1. Set Up: Ensure that the multimeter is set to the continuity or "beep" mode.

2. Power Off: Disconnect any power source from the circuit to prevent
interference.

3. Touch Probes: Touch the multimeter probes to the two points of the component
or circuit you want to test for continuity.

Final Testing and Calibration

1. Upload the code to the ESP32-CAM and verify its functionality.

2. Test each sensor's response to disturbances, proximity, and motion.

3. Verify the correct functioning of the active buzzer and image capture process.

4. Monitor the Blynk app's response to sensor triggers and image transmission.

Deployment and Usage

Once the system is tested and verified, deploy it within the desired environment, such
as school classrooms or other areas. Users can interact with the Blynk app to monitor
real-time data, receive alerts, trigger the buzzer, and view captured images.

50
51
3.3 Project Implementation Details
Microcontroller Set Up

These are the steps to upload code wirelessly to the ESP32-CAM:

1. Initial Setup (Wired Connection):

2. Connect your ESP32-CAM to your computer using a USB cable.

3. Open the Arduino IDE.

4. Select the appropriate board and COM port under the "Tools" menu.

5. Upload your code to the ESP32-CAM as you would with any Arduino board.

Wireless Upload (Over-the-Air, OTA):

1. Ensure that your ESP32-CAM is connected to the same Wi-Fi network as your
computer and has a static IP or DHCP reservation.

52
2. Modify your code to include OTA support. Add the following lines to your
setup function:

ArduinoOTA.onStart([]() {

Serial.println("OTA update started");

});

ArduinoOTA.onEnd([]() {

Serial.println("OTA update finished");

});

ArduinoOTA.onError([](ota_error_t error) {

Serial.printf("OTA update error[%u]: ", error);

if (error == OTA_AUTH_ERROR) Serial.println("Auth Failed");

else if (error == OTA_BEGIN_ERROR) Serial.println("Begin Failed");

else if (error == OTA_CONNECT_ERROR) Serial.println("Connect Failed");

else if (error == OTA_RECEIVE_ERROR) Serial.println("Receive Failed");

else if (error == OTA_END_ERROR) Serial.println("End Failed");

});

ArduinoOTA.begin();

Performing OTA Update:

1. After the initial sketch is uploaded, disconnect the USB cable from your
ESP32-CAM.

2. In the Arduino IDE, go to "Sketch" > "Upload Using Programmer".

3. The IDE will prompt you to select the network port of your ESP32-CAM.
Select the appropriate port.

53
4. The OTA update will begin. Monitor the Serial Monitor for progress and status.

Program to initialize other components and interface them with blynk app:

#include <WiFi.h>

#include <BlynkSimpleEsp32.h>

#include <esp_camera.h>

char auth[] = "YourAuthToken";

char ssid[] = "YourWiFiSSID";

char pass[] = "YourWiFiPassword";

const int vibrationPin = 2;

const int proximityTrigPin = 4;

const int proximityEchoPin = 5;

const int motionPin = 6;

const int buzzerPin = 7;

BlynkTimer timer;

void setup() {

Serial.begin(115200);

Blynk.begin(auth, ssid, pass);

54
pinMode(vibrationPin, INPUT);

pinMode(proximityTrigPin, OUTPUT);

pinMode(proximityEchoPin, INPUT);

pinMode(motionPin, INPUT);

pinMode(buzzerPin, OUTPUT);

// Initialize camera

camera_config_t config;

// Configure camera settings here

esp_err_t err = esp_camera_init(&config);

if (err != ESP_OK) {

Serial.printf("Camera initialization failed with error 0x%x", err);

// Timer for sensor readings and Blynk updates

timer.setInterval(1000L, sendSensorData);

void loop() {

Blynk.run();

timer.run();

55
void sendSensorData() {

int vibrationState = digitalRead(vibrationPin);

int motionState = digitalRead(motionPin);

if (vibrationState == HIGH || motionState == HIGH) {

activateAlarm();

captureAndSendPhoto();

} else {

deactivateAlarm();

void activateAlarm() {

digitalWrite(buzzerPin, HIGH);

Blynk.notify("Alert: Vibration or motion detected!");

void deactivateAlarm() {

digitalWrite(buzzerPin, LOW);

void captureAndSendPhoto() {

camera_fb_t *fb = esp_camera_fb_get();

56
if (fb) {

// Send the captured photo to Blynk app

Blynk.virtualWrite(V0, "Photo", fb->buf, fb->len);

esp_camera_fb_return(fb);

Hardware Wiring and Connections

1. Connect the positive terminal of the 12V battery to the input of the LM2596
Buck Converter and connect the negative terminal of the battery to the ground
of the buck converter and to the ground rail of the breadboard.

2. Set the output voltage of the LM2596 Buck Converter to 5V. Connect the
output of the buck converter to the 5V rail on the breadboard.

3. Connect the VCC (power) of the SW420, HC-SR04, HC-SR501, ESP32


Camera Module, and Active Buzzer Module to the 5V rail on the breadboard.

4. Connect the GND (ground) of the sensors, camera module, and buzzer to the
ground rail on the breadboard.

5. Connect the signal pins of the sensors and components to suitable digital pins
on the ESP32. Below are example connections:

6. SW420: Connect the sensor output pin to a digital input pin on the ESP32 (e.g.,
GPIO 2).

7. HC-SR04: Connect trig to a digital output pin (e.g., GPIO 4) and echo to a
digital input pin (e.g., GPIO 5).

8. HC-SR501: Connect the sensor output pin to a digital input pin on the ESP32
(e.g., GPIO 6).

57
9. Buzzer: Connect the buzzer control pin to a digital output pin on the ESP32
(e.g., GPIO 7).

10. Camera Module: Follow the documentation for your specific camera module to
connect it to the appropriate pins on the ESP32.

58
CHAPTER FOUR

RESULTS AND DISCUSSION

In this chapter, we present the outcomes of our project, discussing the implemented
features, the challenges encountered, and the implications of the project. The project
aimed to create a security system using various sensors and an ESP32-CAM module,
integrated with the Blynk app for remote monitoring and control.
4.1 Implemented Features

Hardware Integration

The project successfully integrated several components, including:

1. SW420 Vibration Sensor: Detects physical vibrations or disturbances.

2. HC-SR04 Proximity Sensor: Measures distances using ultrasonic signals.

3. HC-SR501 PIR Motion Sensor: Detects motion within its field of view.

4. ESP32-CAM: Camera module capable of capturing and transmitting images.

5. Active Buzzer: Generates sound alerts.

6. LM2596 Buck Converter: Regulates voltage to provide stable 5V power.

Blynk Integration

The Blynk app was utilized to establish communication between the hardware and a
user's smartphone. We utilized Blynk's features to:

1. Display real-time sensor readings.

2. Send notifications upon detecting vibrations or motion.

3. Provide remote control to trigger the buzzer manually.

4. Display captured images on a virtual camera widget.

59
4.2 Challenges and Solutions

Hardware Configuration and Compatibility

One challenge was configuring the camera module (ESP32-CAM) due to variations in
pin assignments and libraries. Careful referencing of the module's documentation and
online resources enabled successful integration.

Wireless OTA Update

Implementing Over-The-Air (OTA) updates required configuring static IPs and


understanding network settings. Initial wired uploading was crucial for setting up
OTA capability.

4.3 Discussion

The project effectively demonstrated the integration of various sensors and a camera
module with the Blynk app. Users can monitor their surroundings, receive real-time
alerts, and remotely trigger the alarm using the app. The project's implications are
discussed below:

Security and Surveillance

The developed system presents a simple but practical security solution. It allows
homeowners to keep an eye on their property remotely, enhancing security and
surveillance capabilities.

Accessibility and User Interaction

The Blynk app adds a layer of accessibility, enabling users to interact with the system
using their smartphones. The app's user-friendly interface simplifies control and
monitoring, making the system more user-centric.

60
Customizability and Expansion

The modular design of the system makes it easily customizable and expandable.
Additional sensors, features, or improvements can be integrated, adapting to the
evolving needs of users.

4.4 Limitations and Future Work

Camera Quality and Connectivity

The camera module's resolution and image quality were limited by hardware
constraints. Future iterations might involve using higher-resolution camera modules
for clearer images.

Enhanced User Interaction

Integration of two-way communication capabilities, such as microphone and speaker,


could allow users to interact with the environment remotely.

61
CHAPTER FIVE

CONCLUSION AND RECOMMENDATIONS


5.1 Conclusion

In this chapter, we conclude the project by summarizing the key findings and
achievements. We also provide recommendations for further improvements and
potential areas of future work.

5.1.1 Key Findings

1. The project aimed to create a security system integrating multiple sensors, an


ESP32-CAM module, and the Blynk app. Through careful implementation and
testing, several significant findings were identified:

2. Successful Hardware Integration: The project effectively integrated various


sensors, such as the SW420 Vibration Sensor, HC-SR04 Proximity Sensor, and
HC-SR501 PIR Motion Sensor, alongside the ESP32-CAM module and other
components. This integration allowed for comprehensive security and
monitoring capabilities.

3. Remote Monitoring and Control: The Blynk app played a pivotal role in
establishing a remote connection between the hardware and users' smartphones.
Real-time monitoring, notifications, and remote control of the security system
were successfully achieved, enhancing accessibility and user interaction.

4. Customizability and Expandability: The modular nature of the system allowed


for easy customization and expansion. Users can adapt the system to their
unique needs by incorporating additional sensors, features, or improvements,
making it a versatile and adaptable solution.

62
5.1.2 Project Objectives Achievement

The project effectively met its objectives by successfully demonstrating the


integration of sensors, the ESP32-CAM module, and the Blynk app. The system
showcased the potential of Internet of Things (IoT) technology in security applications
and provided a practical solution for enhancing home security and surveillance.

5.2 Recommendations

While the project achieved its goals, several opportunities for improvement and
further development have been identified. The following recommendations are
provided to guide future iterations of the system:
5.2.1 Camera Module Enhancement

The camera module's image quality and resolution were limited by hardware
constraints. Future iterations could involve upgrading to higher-resolution camera
modules, enabling clearer and more detailed images for better surveillance and
identification.
5.2.2 Two-Way Communication

Integrating two-way communication capabilities, such as a microphone and speaker,


could enable users to interact with their environment remotely. This enhancement
would allow users to not only monitor but also communicate with potential intruders
or visitors.
5.2.3 Cloud Integration

Consider integrating cloud-based storage solutions to store captured images and data
remotely. This would ensure that important information is preserved even if the
hardware is tampered with or damaged.

63
5.3 Future Work

1. The project serves as a foundation for further exploration and development.


The following potential areas of future work are identified:

2. Machine Learning Integration: Implement machine learning algorithms to


enhance the system's ability to distinguish between legitimate and false alarms
based on patterns and image analysis.

3. Security Protocols: Enhance the system's security by implementing encryption


and authentication protocols to prevent unauthorized access to the hardware
and app.

4. Energy Efficiency: Optimize power consumption to prolong the system's


battery life, especially for outdoor applications where continuous power supply
might be challenging.

5.4 Conclusion

In conclusion, the project successfully integrated various sensors, the ESP32-CAM


module, and the Blynk app to create a comprehensive security system. Through
overcoming challenges and leveraging IoT technology, the project demonstrated the
potential for practical and user-friendly security solutions. The findings and
recommendations presented in this chapter provide a roadmap for future
enhancements and developments.

64
COST ANALYSIS
Below is the cost of the components used:
Components Bought Price in Naira
Dupont Cables 8100
Breadboard 1000
12V Rechargeable Li-ion Battery 9670
LM2596 Buck Converter 3600
SW-420 Vibration Sensor 1500
Active Buzzer Module 2000
HC-SR04 Proximity Sensor 1200
HC-SR501 PIR Motion Sensor 1200
ESP32 DevKit 7500
ESP32 Camera Module 8500
Total 44270
Table I

65
REFERENCES
[01] Dr. Venkateshappa, Chethan H., Jayaraj C. L., Jatinjayasimha V. N., Srihari D.
S., "Home Automation With Blynk and Node MCU," Turkish Journal of Computer
and Mathematics Education, Vol. 12, pp 2669-2674, 23 May 2021.

[02] S. Ramakrishnan and S. Suma (2020), "IoT Based Motion Detector Using Node
MCU and Blynk App," Journal of Xidian University [Electronic]. Volume 14 (Issue
5), pp 3112-3115. Available https://doi.org/10.37896/jxu14.5/356 [May 10, 2023]

[03] Nabilah Binti Mazalan, "Application of Wireless Internet in Networking Using


Node MCU and Blynk App," Jabatan Kejuruteraan Electrik, Politeknik Merlimau,
2019.

[04] Bhuvana Janita and Jagadeesh Kannan, "Smart Monitor for Enhancing Security
in Smart Home Systems," IOP Conf. Ser.: Mater. Sci. Eng. 925012036, 2022, pp 1-8

[05] Md Arham Siddiqui and Kunal Agarwal, "Creating CCTV Camera System Using
Artificial Intelligence, Image Processing, and Cybersecurity Tool," International
Research Journal of Engineering and Technology (IRJET), Volume: 10, pp 243-250,
Feb 2023

[06] A. Anitha, "Home Security System Using Internet of Things," IOP Conf. Ser.:
Mater. Sci. Eng. 263 042026, 2017, pp 1-10

[07] Deep Shikha, Sayali Mahajan, Pratiksha Shinde, Prakash Solanki, "A Survey on
Smart Security System Using Artificial Intelligence," International Research Journal
of Engineering and Technology (IRJET), Volume: 6, pp 1078-1080, Nov 2019

[08] Bharat Bohara, Sunil Maharjan, and Bibek Raj Shrestha, "IoT Based Smart Home
Using Blynk Framework," Kathmandu University, Dhulikhel, Nepal and IoE,
Pulchowk, Lalitpur, Nepal

[09] Chong -Yao Xu, "The Design and Implementation of a Low Cost and High
Security Smart Home System Based on WiFi and SSL Technologies," J. Phys.: Conf.
Ser. 806 012012, 2017, pp 1-8

66
[10] Sandy Suryo Prayogo, "Design and Built IoT Home Panic Button for Smart
City," J. Phys. Conf. Ser.: 1175 012097, 2019, pp 1-8

[11] Kashaboina Radhika and Ramaswamy Dr. Velmani, "Bluetooth and GSM based
Smart Security System Using Raspberry Pi," IOP Conf. Ser.: Mater. Sci. Eng. 981
042009, 2020, pp 1-8

[12] CASA Security Pty Ltd, "A Complete Guide to Vandal-proof Security Cameras"
Internet: https://casasecurity.com.au/a-complete-guide-to-vandal-proof-security-
cameras/, 2021[April 5, 2023]

[13] Mammoth Security Inc., "How to Make Your CCTV System Vandal Proof"
Internet: https://mammothsecurity.com/blog/vandal-proof-cctv, 2016-2023[March 18,
2023]

[14] Veeru, "ESP32 Cam and Blynk App-based Security Camera with Motion
Detection" Internet: https://www.cctvsecuritypros.com/blog/how-to-tamperproof-
your-security-cameras/, Aug 10, 2022[April 11, 2023]

[15] Cove Smart, "Types of Security Cameras - and When to Use Each Type"
Internet: https://www.covesmart.com/resources/security-cameras/different-types-of-
security-cameras/, 2023[May 15, 2023]

[16] Joy Dice, "What are the Different Types of Security Sensors?" Internet:
https://www.securityalarm.com/blog/what-are-the-different-types-of-security-sensors/,
April 14, 2021[May 11, 2023]

[17] Riddhi Sultania, "Which Microcontroller is Suitable for the Internet of Things
(IoT)?" Internet: https://www.tutorialspoint.com/which-microcontroller-is-suitable-
for-the-internet-of-things-iot#:~:text=Some%20common%20microcontrollers%20in
%20IoT,USB%20or%20serial%20port%20connection, Feb 14, 2023[March 10, 2023]

[18] Kerem Gulen, "Building Trust in IoT Ecosystems: A Privacy-enhancing


Approach to Cybersecurity" Internet: https://dataconomy.com/2023/02/17/what-is-iot-
cybersecurity/, Feb 17, 2023[March 10, 2023]

67
68

You might also like