0% found this document useful (0 votes)
8 views

Jurnal Penting

Uploaded by

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

Jurnal Penting

Uploaded by

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

Journal of Telecommunication Network (Jurnal Jaringan Telekomunikasi) Vol. 12, No.

2 (2022)

Design and Build a Home Security System based


on an ESP32 Cam Microcontroller with Telegram
Notification

Filantropi Yusuf Aji Cahyono1, Nugroho Suharto2, Lis Diana Mustafa3


1
Digital Telecommunication Networks Study Program, 2,3Telecommunication Engineering Study Program
Department of Electrical Engineering, State Polytechnic of Malang, Malang, Indonesia
1
[email protected], [email protected], [email protected]

Abstract— Along with the times and technology, the need for fast information is needed in various sectors of life, thus supporting the
performance of these sectors, one of which is the security aspect, especially in security at home, considering that there are many things
that happen such as crimes and negligence of residents of the house that can cause problems such as fires. In this case, a system is needed
that can visually monitor the condition of the room from remote location. This is useful for the surveillance process so that if there is a
crime and fire in the surveillance room, the system can monitor the state of a room via a smartphone. This study aims to create a device
that is able to increase the security of the room at home by utilizing the Esp32 cam as a microcontroller and the PIR sensor as a detector
of movement when crossing the corner area of the sensor and also the Fire sensor key as a detector of fire. In this study, the ESP32 cam
is used as the main brain of the system which will read data from the fire sensor, PIR sensor, and remotely control the door lock and
door unlock. The data from the sensor will be sent to the server by Esp32 cam. The test results have been running in accordance with
the designed system. So that pictures taken and notifications of fire can be sent to the telegram application with a 100% success
percentage.
Keywords—AM312 Passive Infrared Sensor (PIR), Esp32 cam microcontroller, KY-026 Flame sensor, Quality of Services (QoS), telegram
applications

I. INTRODUCTION program a room security monitoring system using Esp32 Cam,


Security has become a very important requirement, where photos from image shooting can be viewed through
especially for security at home, considering that there are many mobile devices such as laptops and smartphones that are
things that happen such as crimes and negligence of residents connected to the network so as to increase home security for
of the house that can cause problems such as fires. In this case, the owner [5][6][7]. In carrying out room surveillance and
a system is needed that can visually inform the state of the room remote control of home security, certain customizations of
from a remote location. This is useful for the surveillance security devices are needed so that residents of the house can
process so that if there is a crime and fire in the surveillance manage home security facilities according to the system
room, the system can inform the state of a room via a designed[8].
smartphone[1][2]. Camera technology has now become one of
the most important technologies as a room monitoring medium. II. METHOD
Images present information that can be easily seen by the user. This section describes the type of research, research design,
In the field of security, technology in the microcontroller plays system design, preparation of tools and materials, as well as the
an important role for monitoring and controlling[3][4]. In determination of procedures and parameters for using facilities
practice, room monitoring technology already exists, but its from "Design of a Home Security System Based on an Esp32
application to houses that are often left out by residents has its CAM Microcontroller with Telegram Notifications".
own challenges, how to make a simple home security device
A. Research Design
that is able to monitor the state of the room and control the side
of the door[3]. There is a microcontroller that can be used in The research design to be carried out in making the system
terms of room monitoring is the Esp32 cam. In practice, room is shown in Fig. 1.
monitoring technology already exists, but its application to In Fig. 1 the research flowchart can be described the process
houses that are often left out by residents has its own challenges, carried out during the research. Looking for various references
how to make a simple home security device that is able to to support what the author wants in terms of applying his design
monitor the room and control the side of the door[4]. Based on based on previous related research theories such as PIR sensors,
these problems, it is necessary to conduct research to create and fire sensors, Esp32 cam microcontrollers, relay modules and

E-ISSN: 2654-6531 P- ISSN: 2407-0807 58


Journal of Telecommunication Network (Jurnal Jaringan Telekomunikasi) Vol. 12, No.2 (2022)

telegrams. After the literature study process is complete, it is


continued with system planning, at this stage it will be carried
out to start activities in planning an overview of the system to
be built. The tools and materials needed are AM312 PIR sensor,
Fire sensor, Esp32 cam microcontroller, L2596 stepdown
module relay modules, solenoids, and for the software needed,
namely Arduino IDE, fritzing, and the telegram application on
a smartphone to display the results. Then the next process is
making a system, where at this stage a program is made such
as Arduino programming, and both telegram applications and
mechanical tools are made and enter the program on the device
to be used, with the hope of getting the desired results. The next
stage is to test the system, which will test the tool made as a
whole, this test is carried out to find out whether the tool is
running according to plan or not. If there are still errors or
errors, repairs and re-planning will be carried out. While the
Fig. 2. System block diagram
data collection process is needed to measure the maximum
distance that cannot be accepted by the AM312 PIR sensor, the
In Fig. 2 the block diagram of the system will explain the
maximum distance of objects that cannot be accepted by the
work process of the system carried out during the study, the
PIR sensor is 5M, the object distance on the PIR sensor can
description of Figure 2 is as follows: first, the fire sensor as a
also affect the delay in the PIR response. Measuring the
detector if there is a fire in the room, the program will send a
average delay in sending remote control commands, the remote
notification in the form of a text message to the user's telegram
control can be said to be able to respond to orders with an
application. On PIR sensor serves as an active camera trigger
average delivery delay of 4.0975 Seconds, and the delay in
if there is a moving object, the camera on the Esp32 cam will
Quality-of-Service Wireshark. For testing the Quality of
take pictures and then send the data to the cloud database [9].
Service on Delay the value obtained is 0.0597 s. While the
Where the data that has been sent can be monitored remotely
block diagram of the system can be illustrated In Fig. 2. in real time on the telegram application. Second, as a remote
control on door security can be accessed via the telegram
application [10]. Remote control on the door functions to lock
the door and unlock the door if for example the occupants of
the house are active outside the home and forget to lock the
door, then the occupants of the house can lock the door via a
smartphone on the telegram application by utilizing the Esp32
cam which is connected to the relay module so that the solenoid
can controlled by the occupants of the house via a smartphone
[11][12].
B. Design of am312 pir sensor tool
In the design of the AM312 PIR sensor, the PIR sensor
functions to detect movement, the magnetic door switch sensor
functions as a switch on the state of the house door, the buzzer
as an alarm if the PIR sensor and Magnetic door switch are
logic 1 or in a High state. So if there is movement there will be
a change in the readings on the sensor. The PIR sensor consists
of three legs, namely the Vin pin, the Out pin (Data), and the
GND pin, the Magnetic door switch sensor consists of 2 legs
namely the Out pin (Data) and the GND pin, and the Buzzer
consists of 2 legs, namely the pin pin. Out (Data), and Pin
GND.
In Fig. 3 is the design of a PIR sensor device, for a voltage
source it requires 5V. where the pin out of the PIR sensor is
connected to the GPIO 12 of the microcontroller for data, the
Vin pin of the PIR sensor is connected to the 5V VCC on the
microcontroller and the ground pin of the PIR sensor is
Fig. 1. Research flowchart
connected to the GND pin of the microcontroller. On the
positive (+) buzzer pin connected to the GPIO pin 2 Esp32 cam
microcontroller and the negative (-) buzzer pin is connected to

E-ISSN: 2654-6531 P- ISSN: 2407-0807 59


Journal of Telecommunication Network (Jurnal Jaringan Telekomunikasi) Vol. 12, No.2 (2022)

the Esp32 cam microcontroller GND pin. The positive (+)


magnetic door switch pin is connected to the GPIO 15 pin of
the Esp32 cam microcontroller, and the negative (-) buzzer pin
is connected to the Esp32 cam microcontroller GND pin
[13][14].

Fig. 5. Fire sensor design

E. Planning the Display of Information Messages on


Fig. 3. PIR sensor design Telegram
Fig. 6 is a design for displaying information messages on
C. Design of door security controls Telegram.
Fig. 4 is a design for door security control. The power supply
is obtained from the PLN electricity network and uses a 12v 1a
Power Jack adapter as a solenoid voltage source, the negative Display Name
adapter pin is connected to IN- on the stepdown and also
connected to the negative solenoid pin, while the positive pin
is connected to the IN+ stepdown pin and is also connected to Buka Kunci Pintu
the relay pin NO. The COM pin on the relay is connected to the
positive solenoid pin. The OUT+ stepdown pin is connected to
the 5V pin of the microcontroller, while the stepdown module
Kunci pintu sudah
OUT pin is connected to the GND pin of the microcontroller. terbuka
The VCC pin on the relay is connected to the 3v pin of the
microcontroller, the IN pin on the relay is connected to the
GPIO PIN 15 of the microcontroller, and the GND pin on the Kunci Pintu
relay is connected to the GND pin on the microcontroller.
Pintu sudah terkunci

Notif Foto

Terdeteksi Api!!!

Fig. 4. Door security control design Tulis Pesan


D. Fire sensor design
Fig. 5 is a design for a Fire Sensor. The power supply
obtained from USB to ttl is connected to the laptop as a fire Fig. 6. Design information messages on telegram display
sensor voltage source, the negative adapter pin is connected to
the GND pin of the fire sensor and is also connected to the In Fig. 6, shows the design of the message notification
GND pin of the Esp32 cam microcontroller, while the positive content that is obtained when the homeowner controls the
adapter pin is connected to the VCC pin of the fire sensor and remote control on the Telegram application. Homeowners can
is also connected to the pin 5V Esp32-cam microcontroller. Pin also find out the condition of the door of the house that is
D0 on the fire sensor is connected to pin 2 on the Esp32 cam currently locked or unlocked, and can also find out the state of
microcontroller [15]. the surveillance room in real time.

E-ISSN: 2654-6531 P- ISSN: 2407-0807 60


Journal of Telecommunication Network (Jurnal Jaringan Telekomunikasi) Vol. 12, No.2 (2022)

F. Preparation of Tools and Materials key. Furthermore, on the pir sensor if movement is detected,
Here are the tools and materials needed as shown in Table the Esp32 cam will take a picture and send it to the telegram
I. bot application, and on the fire sensor if a fire is detected then
TABLE I the sensor will take data processed by the microcontroller and
TOOLS AND MATERIAL NEEDED sent to the telegram application and the telegram application is
used to give orders to Esp32 cam in the form of Lock the door,
Tools name Total
Status, Unlock the door. then if the door lock command then
ESP32 CAM Microcontroller 1 Unit the solenoid on the door will be locked, if the door unlock
PIR AM312 Sensor 1 Unit
command then the door solenoid will open, and if the status
command will display the status on the telegram application
Adapter 12V 1A 1 Unit that the door is locked or not locked. While the motion
Solenoid 1 Unit
detection circuit of the AM312 PIR sensor, fire sensor and door
security remote control with Esp32 cam is illustrated in Fig. 8,
Smartphone 1 Unit 9 and 10.
Relay 3V 1 Channel 1 Unit

Acces Point 1 Unit

Stepdown LM2596 Module 1 Unit

Flame ky-026 Sensor 1 Unit

III. RESULTS AND DISCUSSION


The results of this study begin with the display of the system
flowchart. The overall system flowchart of the tool is shown in
Fig. 7.

Figure 8 PIR sensor implementation.

Figure 7 Overall flowchart system. Figure 9 Door security implementation.

from Fig. 7 can be described as follows: When the system Fig. 9 show the implementation of the door security tool that
is first run Esp32 cam will connect to the wifi network has been made. The information for each number is as follows :
according to the specified network. If it is successfully 1.Adapter 12V DC 1A
connected, the system will try to connect with the telegram API

E-ISSN: 2654-6531 P- ISSN: 2407-0807 61


Journal of Telecommunication Network (Jurnal Jaringan Telekomunikasi) Vol. 12, No.2 (2022)

2.ESP32 cam microcontroller results of the PIR sensor test can be said to be able to capture
3.Relay module 3V 1 channel movements that occur during the day and night.
4.Solenoid
B. Remote Control Test
Remote control testing aims to determine the delay in
sending each order for door locks, door unlocks, status, photos
on telegram bots. The following are the results obtained during
the measurements shown in table III.

TABLE III
DELAY IN SENDING DATA FROM TELEGRAM TO THE SYSTEM
Status Transfer Delay
Lock door 3.92 Second
Unlock the door 2.62 Second
Status 2.32 Second
Photo 7.53 Second

Delay in shipping options that will be used as security on


house and room doors. Remote control can be said to be able
Figure 10 Flame sensor implementation. to respond to orders with an average delivery delay of 4097
seconds. Figure 3.4 shows an example of the test results for
A. PIR sensor test
sending remote control on the telegram application.
PIR Sensor Testing aims to determine the delay in the PIR
response to the distance of the object and the state of the room C. Fire Sensor Test
during the day and night as a monitoring place. The following The Fire sensor test aims to determine the success of sending
are the results obtained during the measurements shown in notifications to Telegram. The following results obtained
Table II. during the measurements are shown in Table IV.
TABLE II
AM312 PIR SENSOR TEST RESULTS TABLE IV
PIR Response FIRE SENSOR TEST RESULT
State
Delay To Telegram
of the Distance Condition Status Distance Conditions
Object Status
room
Distance 5 cm Detect fire Successfully sent
Successfully 10 cm Detect fire Successfully sent
Detect
1M 1 Second send photo to 15 cm Detect fire Successfully sent
motion
telegram bot
20 cm Detect fire Successfully sent
Successfully 25 cm Detect fire Successfully sent
Detect
2M 1 Second send photo to
motion 30 cm Detect fire Successfully sent
telegram bot
35 cm Detect fire Successfully sent
Successfully
Detect 40 cm No detected fire Not sent
Day 3M 1 Second send photo to
motion
telegram bot
Detect
Successfully Table IV shows the results of sending notifications in the
4M 1,5 Second send photo to form of a fire being detected which will be used as security.
motion
telegram bot
The fire sensor can be said to be able to detect the presence of
Successfully
No detected fire in a 3x3M room with a distance of 35cm from the source
5M - send photo to
motion
telegram bot of the fire on the candle, the rest cannot detect the presence of
Detect
Successfully a fire source in the candle.
1M 1,2 Second send photo to
motion
telegram bot D. Telegram Application Implementation Results
Successfully
2M
1,7 Detect
send photo to In this test it can be concluded that all the menus in the
Second motion application used can work well and successfully perform each
telegram bot
Successfully function.
Night Detect send photo to
3M 2 Second E. Measuring Delay on Wireshark
motion telegram bot
Not successfully
No detected Delay measurement is carried out to test the quality of the
4M - send photo to
motion system that is made to have adequate quality or not. Testing is
telegram bot
Not successfully done using Wireshark by looking at the IP of the destination
No detected
5M -
motion
send photo to used. Based on the IP obtained later, it will be able to process
telegram bot data for communication that is built from this system. Here is
Table 2 shows the results of measurements in room samples a picture of the delay reading on Wireshark.
taken from differences in the state of the room during the day
and night which will be used as security in the room. The

E-ISSN: 2654-6531 P- ISSN: 2407-0807 62


Journal of Telecommunication Network (Jurnal Jaringan Telekomunikasi) Vol. 12, No.2 (2022)

TABLE V
DELAY VALUE FROM TESTING USING WIRESHARK
Source Destination Protocol Time Delta Previous
192.168.2.77 149.154.167.99 TCP 0,00000
192.168.2.77 149.154.167.99 TCP 0,000329
192.168.2.77 149.154.167.99 TCP 0,250652
192.168.2.77 149.154.167.99 TCP 0,115237
192.168.2.77 149.154.167.99 TCP 0,00006
192.168.2.77 149.154.167.99 TCP 0,254377
192.168.2.77 149.154.167.99 TCP 0,116828
192.168.2.77 149.154.167.99 TCP 0,000673
192.168.2.77 149.154.167.99 TCP 0,000054
192.168.2.77 149.154.167.99 TCP 0,004798
192.168.2.77 149.154.167.99 TCP 0,000533
192.168.2.77 149.154.167.99 TCP 0,000058
192.168.2.77 149.154.167.99 TCP 0,248121
192.168.2.77 149.154.167.99 TCP 0,000682
192.168.2.77 149.154.167.99 TCP 0,015415
192.168.2.77 149.154.167.99 TCP 0,007808
192.168.2.77 149.154.167.99 TCP 0,000098
Average 0,05974 seconds

Figure 11 Notification Messages on the Telegram Application.

Figure 13 Capture File Properties results on the Statics tab.

Based on the data obtained in Figure 13, it can be seen that


the packet loss value is 7%. based on the classification of
packet loss in the previous chapter, it is concluded that the
packet loss category includes index 2 (medium).

IV. CONCLUSION
Figure 12 Delay Reading Results. The design of the security system uses the Esp32 Cam
microcontroller which is connected to the Am312 PIR sensor
Based on the data obtained in Fig. 12, it can be seen the data and the MC-38 magnet sensor, the Ky-026 fire sensor runs very
in the delay Table 5. well with an average delay value of 1.37 seconds. Data
From Table 5 it is found that the delay for this system is transmission is transmitted via the internet by utilizing the wifi
0.0597 seconds. based on the existing delay classification, it module on the Esp32 Cam microcontroller. If the smartphone
can be concluded that the average delay is index 4 (very good). is connected to the internet network, the system can send data
F. Packet Loss Test on WireShark to the Telegram application. For testing the Quality of Service
Packet Loss is the number of packets lost on a packet on Delay, the average result is 0.0597s in the good category,
network caused by collisions, full network capacity, and packet while for packet loss testing the value obtained is 7.0%
drops caused by the end of TTL (Time to Live) packets. Testing including the good category.
packet loss using a Wireshark software.

E-ISSN: 2654-6531 P- ISSN: 2407-0807 63


Journal of Telecommunication Network (Jurnal Jaringan Telekomunikasi) Vol. 12, No.2 (2022)

REFERENCES Intercity Bus Management System for Smart City,” Int. J.


Comput. Digit. Syst., vol. 10, no. 1, pp. 1219–1226, 2021.
[1] K. Firdausy, S. Riyadi, T. Sutikno, dan M. Muchlas,
[9] W. Puspitasari and H. Y. Perdana R, "Real-Time
“Aplikasi Webcam Untuk Sistem Pemantauan Ruang
Monitoring and Automated Control of Greenhouse Using
Berbasis Web,” TELKOMNIKA (Telecommunication
Wireless Sensor Network: Design and Implementation,"
Computing Electronics and Control), 2008.
2018 International Seminar on Research of Information
[2] Samuel mahatma Putra, “Analisis Dan Perancangan
Technology and Intelligent Systems (ISRITI), 2018, pp.
Aplikasi Monitoring Ip Camera Menggunakan Protokol
362-366, doi: 10.1109/ISRITI.2018.8864377.
Http Pada Mobile Phone,” J. Teknol. Inf., vol. 2010, no.
[10] Hudiono, M. Taufik, R. H. Y. Perdana, and A. E.
Snati, hal. 1–7, 2010.
Rakhmania, “Digital centralized water meter using 433
[3] E. P. Dewa dan R. Kartadie, “Integrasi Sensor Gerak Dan
mhz lora,” Bull. Electr. Eng. Informatics, vol. 10, no. 4,
Ponsel Pada Arduino Sebagai Sistem Kontrol Keamanan
pp. 2062–2071, 2021, doi: 10.11591/EEI.V10I4.2950.
Rumah,” JIPI (Jurnal Ilm. Penelit. dan Pembelajaran
[11] H. Hudiono, M. Taufik, R. Perdana, and A. Rakhmania,
Inform., vol. 1, no. 02, hal. 30–37, 2016..
“Telemetering of Rainfall Measurement Results Using
[4] M. S. Annas dan D. Maulana, “Perancangan Audio
433 MHz Wireless Transmission”, INFOTEL, vol. 13,
Streaming Menggunakan Wifi Berbasis Mikrokontroler
no. 3, Aug. 2021.
ATMega 328,” vol. 1, no. 1, hal. 27–32, 2019.
[12] A. E. Rakhmania, M. Taufik and M. Sa’adah,
[5] R. Saleha, P. Studi, T. Informatika, F. Teknik, dan U.
"Centralized Post Paid Water Meter Controller Using
Mataram, “Klasifikasi Data Time Series Pola Pergerakan
Wireless Sensor Network," 2019 International
Manusia Di Depan Rumah Menggunakan Sensor Passive
Conference on Advanced Mechatronics, Intelligent
Infrared Dan Camera Ov2640 Dengan Metode,” 2020.
Manufacture and Industrial Automation (ICAMIMIA),
[6] R. H. Yoga Perdana, N. Hidayati, A. W. Yulianto, V. Al
2019, pp. 302-305, doi:
Hadid Firdaus, N. N. Sari and D. Suprianto, "Jig
10.1109/ICAMIMIA47173.2019.9223421.
Detection Using Scanning Method Base On Internet Of
[13] A. Hariyadi, M. Taufik, H. Hudiono, N. Hidayati, A. E.
Things For Smart Learning Factory," 2020 IEEE
Rakhmania, and R. H. Y. Perdana, “Efisiensi Daya
International IOT, Electronics and Mechatronics
Perangkat Wireless Sensor Network Pada Penerangan
Conference (IEMTRONICS), 2020, pp. 1-5.
Jalan Umum (PJU) Berbasis Algoritma Leach”, tech, vol.
[7] R. H. Y. Perdana, Hudiono, M. Taufik, A. E. Rakhmania,
20, no. 2, pp. 101–112, Oct. 2021.
R. M. Akbar, and Z. Arifin, “Hospital queue control
[14] A. Hariyadi, Y. Ratnawati, and R. H. Y. Perdana, “Jurnal
system using Quick Response Code (QR Code) as
iptek,” J. IPTEK, vol. 24, no. 1, pp. 11–18, 2018, doi:
verification of patient’s arrival,” Int. J. Adv. Comput. Sci.
10.31284/j.iptek.2020.v24i1.
Appl., vol. 10, no. 8, 2019.
[15] Taufik, M., Hudiono, H., & Rakhmania, A. E. (2019).
[8] M. Taufik, H. Hudiono, A. E. Rakhmania, R. H. Y.
Sistem Monitoring Keberadaan Pengunjung Pariwisata
Perdana, and A. S. Sari, “An Internet of Things Based
Secara Realtime Dengan Metode Wireless Network
Clustering. Jurnal IPTEK, 23(2), 63-70.

E-ISSN: 2654-6531 P- ISSN: 2407-0807 64

You might also like