MP-Home Security System Paper

You might also like

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 8

HOME SECURITY SYSTEM WITH

ESP32- CAM AND TELEGRAM APP


Ms.R.Breesha1,K.R.Ganesh prasath2 ,R.Anandraj3 ,K.R.Mahesh kumar4
Assistant professor1 and Student2,3,4.
Vel Tech High Tech Dr.Rangarajan Dr.Sakunthala Engineering College, Avadi, Chennai-600061

Abstract
Home Automation allows you to access your home control CAM installed. If all sensors and warnings are working, the
devices from your mobile device anywhere in the world. One of system will issue a warning in the telegram when a safety-
related event occurs. Example - fire or smoke alarm. You can
thebiggest benefits of home automation is keeping your home
operate from anywhere in the world. All you need is a Telegram
safe and preventing accidental fires, water leaks, gas leaks and
application with an approved bot and an internet connection to
otherdisasters. This project shows how Telegram can be used in your mobile phone. Only approved/approved users (whose chat
IoT and home automation projects. A home security system with ID is registered) can interact with this Telegram bot. To interact
ESP32 CAM can take and send a photo to notify you via the with your security system and receivealert notifications, you
telegram app and control the door with a chatbot. In this project, need to create a Telegram bot in your smartphone's Telegram
Telegram app with motion sensor and door sensor can be used to application."Bots are third-party applications that run within
take multiple photos to unlock and lock the door. The project also Telegram. Users can interact with Telegram bots by sending
implemented a smoke and gas leak detection system.This way you them messages and commands.Control your bot with HTTPS
can also receive notifications of gas or smoke leaks detected by requests to the bot API. The Arduino IDE is used to program the
the sensor. The system is designed with an IoT module and uses ESP32 CAM board, so please make sure you have the Arduino
an ESP32 microcontroller. This chapter describes the design of IDE installed, which details how to install the ESP board into
the system, its hardware components, software implementation, the Arduino IDE. The ESP32-CAM does not come with a USB
security solutions, communications, collection and monitoring of port, so youwill need a CP2102 or FT232RL USB to TTL serial
processed data, and quantifying the costs of manufacturing and converter connected to your PC. When using Wi- Fi, the ESP32
draws more power than is supplied over USB through these
deploying this system. The proposed systemdetects an intruder in
devices, which can cause the module to crash and reboot. The
the building, triggers an alarm, captures everything with the
top unit worked fine, but the FT232RL did not. If you are using
intruder's camera image, and sends the datato the owner's smart a 5V 3.3V FT232, set the voltage jumper to 3.3V. It may be
mobile phone. Protect your home. possibleto use 5V from the side of the board to power the
Index- Home security. camera's 5V pin. The ESP32-CAM module features an ESP32-S
chip, an OV2640 camera and a microSD card slot. There are
other ESP32-based camera modules that work when pinned to a
I. INTRODUCTION
sketch.
In this project, I used ESP32-CAM to build a home security
system. The system notifies her Telegram app by taking and
sendinga picture when intruders try to break into her home. For
this I used the motion sensor and the door sensor.The project also II. LITERATURE SURVEY
implemented fire, smoke and gas leak detection systems. Using the Some of the recent research works are discussed below.
knowledge gained from the concept of IoT and its application in Anjali Shrivastav et al.,(2018) [1] proposed an idea or a
the medical field, we have investigated and studied many research concept for home automation using ESP32 with Blynk, IR
papers related to our problem. All sensors connected to the ESP32- remote and manual switch to control 8relays with and without
CAM development board. The ESP-CAM is Wi-Fi enabled, so internet and monitor the real time feedback in the Blynk app.
connect it to a wireless router that is also connected to the internet. Automation of device hasa wide scope for this generation as
ESP32 CAM Wi-Fi Module Bluetooth with OV2640 Camera well as in forthcoming generation. In this mobile
Module 2MP for Face Recognition Features a very competitive communication technology is playing a major role in the world
small camera module that can be operated independently as a of automation. This article is fully based on low cost and
minimal system with a footprint of only 40 x 27mm . With deep reliable home control monitoring system for accessing and
sleep current up to 6mA, it is widely used in various IoT controlling devices and appliances remotely using Android
applications.Suitable for smart devices, industrial wireless based smart phone application.
control,wireless monitoring and other his IoT applications. The V. Pravalika, Ch. Rajendra Prasad et al.,(2019) [2]
module adopts a DIP package and can be directly inserted into the proposed a low-cost flexible and reliable home monitoring and
backplane for rapid production of products, providing customers control system with additional security using ESP32, with IP
with a reliable connection mode suitable for applications in connectivity through local Wi-Fi for accessing and controlling
various IoT hardware terminals.To interact with your security devices by formal user remotely using android smart phone
system and receive alert notifications, you need to create a application.. Home monitoring and device control system not
Telegram bot in your smartphone's Telegram application. This only refers to decrease human efforts but also save the energy
Telegram bot allows you to arm/disarm (arm/disarm) your home and time competence. To demonstrate the effectiveness and
security system and all alerts. The Telegram app also allows you to feasibility of this system, in this we present a home monitoring
take/receive live photos of the monitored area with the ESP- system by using ESP32 module.
Diwakar B, Madiha Farheen et al.,(2019) [3] proposed a
low cost and flexible home control and environment monitoring
1
system. It employs an embedded micro-web server

2
sensor, gas sensor, motion sensor etc., have been
III. COMPONENTS REQUIRED integrated with proposed home control
The hardware and Software components required for
Mini PIR motion sensor:
Home security system are
 AI thinker ESP32-CAM Dev board A PIR sensor can detect changes in the amount of
 Mini PIR motion sensor infrared light that hits the sensor. This depends on the
temperature and surface texture of the object in front of the
 Magnetic Door sensor sensor. for objects. B. A person in the background, z. If there
 MQ6 gas/smoke detector sensor is a wall, the temperature at that point in the sensor's field of
view will rise from room temperature to body temperature and
 FTDI Programmer module then back to body temperature again. The sensor converts the
 Solder-less Breadboard resulting change in incident infrared radiation into a change in
output voltage, triggering detection. Objects with similar
 Arduino IDE(software) temperatures but different surface properties can also have
 Telegram (Android Application) different infrared radiation patterns, so these movements
relative to the background can also trigger the detector. PIRs
come in different configurations for different applications. The
most common models have a number of Fresnel lens or mirror
segments, an effective range of about 10 meters (30 feet), and
a field of view of less than 180°. Models with wider fields of
view including 360° are available and are typically designed
for ceiling mounting. Some large PIRs consist of a single
segment mirror and can detect changes in infrared energy more
than 30 meters (100 feet) from the PIR. PIR with reversible
pointing mirror that allows either a wide range (110° wide) or
a very narrow 'curtain' range, or even a PIR with individually
selectable segments to 'shape' the range I have.

AI thinker ESP32-CAM Dev board:

The ESP32-CAM is a small, low-cost ESP32-based development


board with an integrated camera. The perfect solution for IoT fig.2 PIR sensor
applications, prototyping and DIY projects. This board integrates
Wi-Fi, traditional Bluetooth and low-power BLE with two
powerful 32-bit LX6 CPUs. Using a 7-stage pipeline Magnetic Door sensor:
architecture, on-chip sensors, Hall sensors, temperature sensors,
etc., the main
frequency adjustment range is from 80MHz to 240MHz.All triggered by a magnet. The circuit is closed when the magnet is
compliant with Wi-Fi 802.11b and Bluetooth 4.2 standards, it closed and open when the magnet is away from the sensor.
can be used in master mode to build an independent network
controller
or to serve other host MCUs in an existing network. You can
also use it as a slave. You can add devices. ESP32-CAM can be
widely used in various IoT systems. Suitable for smart home
appliances, industrial wireless control, wireless monitoring,
wireless QR identification, wireless positioning system signals,
and other IoT applications.

Fig.3 Magnetic Door Sensor

Fig.1 ESP32-CAM

The MC-38 Wired Door Window Sensor Magnetic Switch Home


Alarm System can be used as a door or window security system.
A signal can be generated when released and fed to the
microcontroller to perform the desired action as per the
requirements.This sensor is suitable for triggering alarms or
on/off lights on sliding closet doors. This wired sensor is
MQ6 gas/smoke detector sensor: Solder-less Breadboard:

The MQ6 (LPG Gas Sensor) is an easy-to-use


The Breadboards are used to quickly build and test
liquefied petroleum gas (LPG) sensor. Can be used in gas leak
circuits before finalizing the circuit design. Breadboards have
detection devices for consumer and industrial applications.
many holes where circuit components such as ICs and
This sensor is suitable for detection of LPG, isobutane,
resistors can be inserted. The holes are most commonly 0.1
propane and LNG. Avoid the noise of alcohol, cooking smoke,
pitch to accommodate standard DIP components.
and cigarette smoke. Sensitivity can be adjusted with a
potentiometer.

Fig.6 Solder-less breadboard

Fig.4 MQ6 gas sensor To use the breadboard, insert the component leads into
the holes. Each set of holes connected by an underlying strip
FTDI Programmer Module: of metal forms a knot. A node is a point in a circuit where two
or more components connect. Connections between different
The original FT232R chip is one of the new chips components are made by inserting their leads into a common
manufactured by FTDI (Future Technology Devices node. Long rows of holes at the top and bottom, identified by
International). Besides being a USB-to-serial UART, it has an red and blue stripes, are typically used for power connections.
onboard EEPROM and an optional clock generator output. The rest of the circuit is built by inserting components and
The chip also includes an FTDIChip-ID feature (giving each connecting them with jumper wires. Solid rather than stranded
chip a unique identifier for security) and a USB terminator. A wire works best for such breadboards.
cloned board (using a cloned chip) would likely eliminate the
unique ID feature, would not contain EEPROM, and would The IC is centered on the board with half of the leads
not be able to invert the signal. Internal clocks (6MHz, on one side of the centerline and half on the other side.
12MHz, 24MHz, and 48MHz) can be brought out of the
device and used to drive a microcontroller or external logic. A few simple hand tools are also very handy to have
The module has a mini-B USB connector, used to connect to on hand. A pair of small wire cutters, often called side cutters,
the USB port of an attached device (such as a PC). The FTDI cut the wire and component leads to length. Small needle nose
USB to TTL Serial Converter module, on the other hand, has pliers for bending and shaping wires and tubes. And, of
breakout pins (Tx, Rx, Vc, and GND) that connect to course, a pair of wire strippers for stripping the ends of jumper
corresponding pins on the microcontroller. Communication is wires. A small screwdriver is also useful for adjusting things
via TTL (transistor-transistor logic). It has a 3.3/5V DC like potentiometers.
jumper and provides 500mA from the Vc pin.
Arduino IDE(software):

The Arduino integrated development environment (or


Arduino software (IDE)) includes a text editor for writing
code, a message area, a text console, a toolbar with buttons for
common functions, and numerous menus. Connects to
Arduino hardware for program upload and communication.

Fig.5 FTDI USB to TTL serial converter module

The FTDI USB to TTL serial converter module contains 6


male, 5 x2.54mm header pins and 18 through-hole connectors.
Header pins are breadboard compatible and all
pins/connectors are clearly labeled.

The more commonly used pins (RX, TX, VCC, and GND) are
connected to the corresponding pins on the microcontroller
(RX -> TX and TX -> RX).The DTR pin is connected to the
microcontroller's reset pin and triggers an auto-reset signal Fig.6 Arduino IDE (Software)
after the sketch is uploaded.
A program created with the Arduino software (IDE) is called a Telegram optionally offers end-to-end encrypted chat. Cloud
sketch. These sketches are created in a text editor and saved Chat and Groups are encrypted between client and server, so
with the .ino file extension. The editor has text cut/paste and your data is inaccessible to ISPs and other third parties on
find/replace functionality. The message area provides your network. Users can send text and voice messages, make
feedback on saving and exporting and also displays errors. voice and video calls, share unlimited images, documents (2
GB per file), there are many options for sending messages on
The console displays text output from the Arduino software smartphones. Many developers have created many Internet-
(IDE), including full error messages and other information. based messaging apps. In this article, we will discuss his
The bottom right corner of the window shows the configured Telegram, one of the most famous messengers. Also
board and serial port. Toolbar buttons let you review and connected he creates a Telegram NodeMCU based home
upload programs, create sketches, open and save, and open the automation project and controls the device with the Telegram
serial monitor. app.

Fig.9 Telegram App Interface


Fig.7 Arduino IDE Interface
So,Telegram is a free messaging application. It is used to
You can manage sketches with multiple files, each in send text, images, videos and transfer large files for free. This
its own tab. These are regular Arduino code files (no visible allows you to integrate the API with Telegram and build
extension), C files, C++ files, or header files. Before custom apps and bots. This is Telegram's big advantage
compiling the sketch, all of the sketch's regular Arduino code among all messaging apps. Custom bots can be created using
files (.ino, .pde) are concatenated into one file in the order the Telegram which is easy to set up. These bots can be connected
tabs appear. Other file types remain unchanged. to other applications to trigger events. You can download this
"Telegram" app from your smartphone's Play Store or Apple
Telegram (Android Application): Store.

Telegram is a globally accessible, encrypted, freemium, cross- IV. DESIGN OF PROPOSED SYSTEM
platform, cloud-based centralized instant messaging (IM)
service. The service also offers optional end-to-end encrypted
chat and video calling, VoIP, file sharing, and a few other  All sensors connected to the ESP32-CAMdevelopment
features. Released on October 20th. Telegram's servers are board. The ESP32-CAM is Wi-Fi enabled, so connect it to a
located in five data centers around the world, with an wirelessrouter that is also connected to the internet.
operations center in Dubai, United Arab Emirates. A variety of  To interact with your security system and be notified of
client apps are available for desktop and mobile platforms, alerts, you need to create a Telegram bot in your smartphone’s
including official apps for Android, iOS, Windows, macOS, Telegramapplication.
and Linux (registration requires an iOS or Android device and  With this telegram bot you can arm/disarm (arm/disarm)
a valid phone number). There are also two official Telegram your home security system and all alarms. The Telegram app
web twin apps (WebK and WebZ) and a number of unofficial also allowsyou to take/receive live photos of the monitored
clients using the Telegram protocol. All official Telegram area with ESPCAM installed.
components are open source. However, the server is closed  If all sensors and warnings are working, the system
source and proprietary. issues warnings in telegrams when safety-relevant events occur.

Fig.10 Block diagram of Home Security System


Fig.8 Telegram Application (Android)
V. RESULT VI. CONCLUSION
A home security system consists of sensors that can
monitor the state of your home.The sensors used in this project
are MQ6 (gas sensor), magnetic door sensor and PIR motion A through investigation into the Internet of Things has
sensor. ESP32- CAM is used to connect all sensors and has a revealed that its intended use is only hypothetical. This
camera to take pictures of intruders and acts as the main means that IoT offersa lot of automation in connecting
controller. Telegram app is used to monitor home conditions. All things. Various sensors and devices have made things easier to
sensors are connected to the ESP32-CAM development board. connect. In our Telegram Messenger use case, we used bots
The ESP32-CAM is Wi-Fi enabled, so connect it to a wireless to communicate with connected things in our homes. Each
router that is also connected to the internet.From this system, a user can then decide whether to automate Home based on the
user can easily receive intruder alerts and photos as mobile statistical reports generated by the bot. With emerging
notifications using his Telegram Bot and smartphone. If all technologies, we explored the connectivity ofdifferent things in
sensors and alerts are activated, the system will alert you the home, and as a network expert, we shared the pros andcons
via telegram when security-relevant events occur. The project is of connecting things.
economical, easy to use, and can be worked on from anywhere
in the world. All you need is a Telegram application with an
approved bot and an internet connection to your phone. Only REFERENCES
approved/approved users (whose chat id is registered) can
interact with this bot.
[1]. Ch. Manohar Raju, N. Sushma Rani. An android based
automatic gas detection and indication robot . In International
Journal of Computer Engineering and Applications.
2014; 8(1).

[2]. Zhao Yang, Mingliang Liu, Min Shao, Yingjie Ji


Research on leakage detection and analysis of leakage point in
the gas pipeline system. In Open Journal of Safety Science and
Technology; 2011

[3]. Dokic K, Martinovic M and Radisic B. Neural Networks


with ESP32 - Are Two Heads Faster than One? Conference on
Data Science and Machine Learning Applications, CDMA
2020. DOI: 10.1109/CDMA47397.2020.00030.

[4]. Harikrishnan G.R., Noufal V.P., Latheesh S., “Third Eye -


Fig.11 Output result An Efficient Home Security Automation System”,
International Journal of Computer Applications (0975 – 8887)
Volume 117
–No. 17, May 2019.

[5]. Sanjana Prasad, P. Mahalakshmi, A. John Clement Sunder,


R. Swathi, “Smart Surveillance Monitoring System Using
Raspberry PI and PIR Sensor”, International Journal of
Computer Science andInformation Technologies, Vol. 5 (6),
2018.

[6]. Priya B. Patel, Viraj M. Choksi, Swapna Jadhav. M. B.


Potdar,PhD, “Smart Motion Detection System using
Raspberry Pi”, International Journal of Applied Information
Systems (IJAIS),
Volume 10 –No.5, February 2020 ISSN: 2249-0868

[7]. Shivprasad Tavagad, Shivani Bhosale, Prakash Singh,


Deepak Kumar, “Survey Paper on Smart Surveillance
Fig.12 Telegram BOT Output result System”,International Research Journal of Engineering and
2395 -0056, p- ISSN:

[8]. Khushbu H Mehta, Niti P Gupta, “Vision Based – Real


Time Monitoring Security System for Smart Home, Vol. 4,
Issue 2,February 2020.
I2CT, IEEE, India. https://doi.org/10.1109/I2CT.2017.8226251

[9].https://www.hackster.io/make2explore/home-security- [22] Kumar A., Thakur S., & Bhattacharjee P., (2018). Real time
system-using-esp32- cam- and-telegram-app-dce4f8 monitoring of AMR enabled energy meter for AMI in smart city-an
IoT application, IEEE International Symposium on Smart Electronic
[10].https://www.instructables.com/. Systems (iSES) (Formerly iNiS), IEEE, India.

[11] Benzi F., Anglani N., Bassi E., Frosini L., (2019). Electricity [23]Koay, B.S., Cheah, S.S., Sng Y.H., Chong P.H.J., Shum P., Tong
Smart Meters Interfacing the Households, IEEE Transactions on Y.C., Wang X.Y.,Zuo Y.X., Kuek H.W., (2016). Design and
Industrial Electronics, 58(10), 4487-4494. implementation of Bluetooth Energy Meter, Fourth International
https://doi.org/10.1109/TIE.2011.2107713 Conference on Information, Communications and Signal Processing,
2003 and the Fourth Pacific Rim Conference on Multimedia,
[12] Rashed Mohassel R., Fung, A., Mohammadi, F., & Raahemifar Proceedings of the 2003 Joint, IEEE, Singapore.
K., (2014). A survey on Advanced Metering Infrastructure, https://doi.org/10.1109/ICICS.2003.1292711
International Journal of Electrical Power & Energy Systems, 63,
473-484. https://doi.org/10.1016/j.ijepes.2014.06.025 [24] Kaur, M., Mathew, L., Alokdeep, A., Kumar, A., (2018).
Implementation of Smart Metering based on Internet of Things, IOP
[13] Amin S.M., Wollenberg B.F., (2015). Toward a smart grid: Conference Series: Materials Science and Engineering, 331(1),
power delivery for the 21st century,IEEE Power and Energy 012015. https://doi.org/10.1088/1757-899X/331/1/012015
Magazine, 3(5), 34-41. https://doi.org/10.1109/MPAE.2005.1507024
[25] Ahmed, T., Miah, M., Islam, M., & Uddin, M., (2012).
[14] Chooruang, Komkrit, Kraison Meekul, (2018). Design of an IoT Automatic electric meter reading system: A cost-feasible alternative
energy monitoring system, 16th International Conference on ICT and approach in meter reading for bangladesh perspective using low-cost
Knowledge Engineering (ICT&KE), IEEE. digital wattmeter and wimax technology, arXiv preprint arXiv.
https://doi.org/10.1109/ICTKE.2018.8612412
[26] Wu B., Tan N., (2019). An energy metering and measurement
[15]Govindarajan, R., Meikandasivam S., & Vijayakumar D., SoC with a novel low- power DSP architecture, IEEE Internet of
(2020). Performance Analysis of Smart Energy Monitoring Systems Things Journal, 6(2), 3298–3308.
in Real-time, Engineering, Technology & Applied Science Research,
10(3), 5808-5813. https://doi.org/10.48084/etasr.3566 [27] Woong Hee K, Sunyoung L., Jongwoon H., (2017). Real-time
Energy Monitoring and Controlling System based on ZigBee Sensor
[16] Galina, Mia, Muhammad Wahyu Ramadhani, & Joni Welman Networks, Procedia Computer Science, 5,794-797.
Simatupang, (2019). Prototype of Postpaid Electricity and Water https://doi.org/10.1016/j.procs.2011.07.108
Usage Monitoring System, 2019 International Conference on
Sustainable Engineering and Creative Computing (ICSECC), IEEE.
https://doi.org/10.1109/ICSECC.2019.8907095

[17] Kumar L.A., Indragandhi V., Selvamathi R., Vijayakumar V.,


Ravi L., Subramaniyaswamy, V., (2021). Design, power quality
analysis, and implementation of smart energy meter using internet of
things, Computers and Electrical Engineering, 93, 107203.
https://doi.org/10.1016/j.compeleceng.2021.107203

[18] Yaghmaee M.H., Hejazi H., (2018). Design and Implementation


of an Internet of Things Based Smart Energy Metering, In 2018
IEEE International Conference on Smart Energy Grid Engineering
(SEGE), IEEE, Canada. https://doi.org/10.1109/SEGE.2018.8499458

[19]Faisal M., Karim T.F., Ridwan Pavel A., Md. Hossen S.,
Hossain Lipu M.S., (2019). Development of Smart Energy Meter for
Energy Cost Analysis of Conventional Grid and Solar Energy, in
2019 International Conference on Robotics,Electrical and Signal
ProcessingTechniques (ICREST)

[20]Prathik, M., Anitha, K., Anitha, V., (2018). Smart energy meter
surveillance using IoT, Proceedings of the International Conference
on Power, Energy, Control andInt. J. Comput. Commun. Inf., 23-35 /
33 IEEE, Bangladesh.Vol. 4 Iss. 1 Year 2022 Paul Stone Macheso &
Doreen Thothoc /2022 Transmission Systems, ICPECTS,
https://doi.org/10.1109/ICPECTS.2018.8521650

[21] Visalatchi S., Kamal Sandeep, K., (2017). Smart energy


metering and power theft controlusing arduino & GSM, 2nd
International Conference for Convergence in Technology,

You might also like