Vol. 8 No. 2 Juni 2025 Rang Teknik Journal http://jurnal. id/index. php/RANGTEKNIKJOURNAL RASPBERRY PI 3 BASED AUTOMATIC DOOR LOCK SECURITY SYSTEM WITH CAMERA AND SMARTPHONE INTEGRATION RIBELTA DWIRAMA1. DEDED ELVIYAN ARIYOS2. ALBENI FAKHRI3 Electrical Engineering Universitas Andalas Indonesia 1,3. Informatics Engineering Universitas Putra Indonesia YPTK Padang2 Email: ribeltadwirama@gmail. com , dededelviyanariyos@gmail. com2, albenifakhri@gmail. DOI: http://dx. org/10. 31869/rtj. Abstract: Theft cases are the most prevalent crime in Indonesia, with various variations in each case. One type of theft that often occurs in residential areas is breaking into houses, which can happen due to weak traditional security systems. To address this issue, an adaptive and technology-based home security system is required. Advancements in technology have driven innovation in enhancing home security systems, one of which is the AuAutomatic Door Lock Security System Based on Raspberry PI3 with Camera and Smartphone Integration. Ay This research aims to develop a security system that allows users to monitor the status of their front door in realtime and control it at any time using a smartphone in a practical and efficient manner. This device uses an application tailored to user needs on a smartphone, with input from a SW420 vibration sensor for security detection, a push button for the doorbell, and a webcam to display the door's status in real time. The Raspberry Pi 3 serves as the microcontroller, with output via a buzzer as an alarm and an MG996R servo motor for opening and locking the door. The research process began with modifying the door handle according to requirements and testing the app's connection with the microcontroller, testing the SW420 vibration sensor's readings, testing the webcam, and testing the MG996R servo motor to operate the door lock and handle. Based on the research results, the app can control the device in real-time at a distance of 1m to 15m. The system is designed such that when the SW420 sensor detects vibrations deemed hazardous, the Raspberry Pi 3 sends a danger notification to the user via smartphone and also triggers a buzzer on the active door as a danger signal. The user can then monitor the area around the door and open or lock the door via smartphone. Keywords: Raspberry Pi 3. SW420 Vibration Sensor. Security System. MG996R Servo. Smartphone. Introduction Home security is a very important aspect in maintaining the safety and valuable assets of With the increasing crime rate in Indonesia, especially in cases of burglary in vacant homes, a reliable and efficient home security system is greatly needed. Based on Indonesian police data showing an increase in burglary cases every year, especially in densely populated urban areas . address this issue, technology-based security systems have emerged as a highly relevant solution to Current technological advancements have enabled the creation of smart security systems that can be controlled and accessed in real-time. The Raspberry Pi 3 has been widely adopted as a microcontroller for developing smart security systems due to its low power consumption yet robust processing capabilities. By integrating the Raspberry Pi, a camera, and a connection to a smartphone, this system can be accessed in real time and provide immediate notifications to users when suspicious activity is detected. A Raspberry Pi-based home security system has been studied in previous research, but there are limitations in terms of data transmission efficiency, accuracy, and response to emergency conditions. For example, research conducted by Ahmad et al. demonstrated the successful integration of Raspberry Pi, cameras, and motion sensors to detect movement, but this study did not include a realtime notification system . Meanwhile, a study was also conducted by Putra and Santoso . , who successfully developed a system for sending images to Telegram, but did not use a camera for efficient visual identification . This study aims to improve both approaches by creating a security system using a Raspberry Pi 3 integrated with a vibration sensor to detect movement and a camera to provide real-time notifications on a smartphone. ISSN 2599-2081 EISSN 2599-2090 Fakultas Teknik UM Sumatera Barat Vol. 8 No. 2 Juni 2025 Rang Teknik Journal http://jurnal. id/index. php/RANGTEKNIKJOURNAL The AuRaspberry Pi 3 Based Automatic Door Lock Security System With Camera And Smartphone IntegrationAy door lock system has two modes for controlling the door: save mode for controlling the door via a smartphone app and manual mode for controlling the door manually using a traditional key. Users can also monitor the door status remotely in real time via their smartphone. It is hoped that this system will serve as an effective solution to enhance home security, thereby providing a sense of safety and comfort to the general public. Research Method System Design Before creating a circuit and system, a block diagram must first be created to ensure that the circuit is designed according to specifications. The following is a block diagram of the overall system. Picture 1. Overall Block Diagram Based on the image above, the functions of each block diagram are: Webcamera The webcamera functions to record the surroundings of the door. Vibration Sensor In this designed system, the vibration sensor functions as a detector of vibrations that occur on the door lock when it is locked. Smartphone Access the application used to control the door and monitor door security. Push Button The push button functions as a doorbell, activating alerts on the device and in the app when there are visitors. Raspberry Pi The Raspberry Pi functions as the overall system controller and main processor used to process data received from the vibration sensor and Android device so that the system can synchronize. Relay The relay is used to switch between save mode and manual mode, as well as to turn the buzzer on and off when the door is locked and unlocked. Servo Motor The servo motor functions as the door lock actuator when controlled via the app as a replacement for the key and door handle actuator to open the door. Buzzer The buzzer functions as a danger warning alarm in the form of sound. the buzzer is the output of data read by the vibration sensor. ISSN 2599-2081 EISSN 2599-2090 Fakultas Teknik UM Sumatera Barat Vol. 8 No. 2 Juni 2025 Rang Teknik Journal http://jurnal. id/index. php/RANGTEKNIKJOURNAL System Working Principle The working principle of this door lock system is that the device is controlled using a smartphone with a specially designed application tailored to the device's requirements. To control the door lock, there are two mode options: save mode and manual mode. In save mode, the entire door security system is active, meaning the door lock can only be controlled via the smartphone app using two MG996R servos installed on the door handle as the door lock and handle actuators. Servo 1 acts as the door lock actuator to lock and unlock the door when commanded by the app, while servo 2 acts as the door handle actuator when commanded to open the door. The vibration sensor will activate to detect forced opening attempts when the door is locked. If dangerous movement is detected, the buzzer installed on the door will sound, and the device will send a real-time danger notification to the app, allowing users to monitor the door's status directly from their smartphone based on camera recordings. Additionally, in manual mode, all security systems except the camera and push button will be deactivated, so the door lock can only be controlled manually using a key like a standard door lock. However, users can still monitor the door's status through the app. This door lock system is controlled using a smartphone app, which was created using Blynk with the following design: Picture 2. Virtual Pin Application Menu Based on Figure 2, we can see the design of the application buttons used to control the door, where each menu has its own function and uses a virtual pin to connect to the Raspberry Pi. The following is an explanation : Monitoring Screen The monitoring screen displays live streaming video from the webcam on the application. The screen is connected to the Raspberry Pi's IP address, which is http://192. 67:8081/. Menu Mode The mode menu is used to give commands to change the door control mode, where the mode menu uses virtual pin 0 (V. and is connected to a relay. Menu Key The menu key is used to control the door lock to lock and unlock the door. The menu key uses virtual pin 1 (V. on the application and is connected to servo 1 on the circuit. Menu Door The door menu is used to control the door handle, to move the door handle when given a command to open the door. The door menu uses virtual pin 2 (V. on the application and is connected to servo 2 on the circuit. ISSN 2599-2081 EISSN 2599-2090 Fakultas Teknik UM Sumatera Barat Vol. 8 No. 2 Juni 2025 Rang Teknik Journal http://jurnal. id/index. php/RANGTEKNIKJOURNAL Menu Buzzer The buzzer menu is used to control the buzzer, to turn the buzzer on and off from the application. The buzzer menu uses virtual pin 3 (V. on the application and is connected to the buzzer on the Notification Notifications serve to alert users to the status of the door on the app, whether the app is open or closed on the smartphone. Overall System Configuration Picture 3. Overall System Configuaration Figure 3 above shows an overview of the entire door lock security system, where each component used is connected to the Raspberry Pi using different pins, as shown in the table below: Table 1. The Relationship Between Raspberry PI3 and Components Name Pin Pin Name Pin Pin Module Raspberry Module Raspberry GPIO 24 Pulse GPIO 17 Sensor Servo VCC Pin 5V VCC Pin 5V SW 420 MG996R Raspberry Raspberry GND Raspberry GND Raspberry GND GND GPIO 20 Push Pin 1 Raspberry Button GND Relay Pin 2 GPIO 20 VCC Pin 5V Raspberry Pin 1 Raspberry GND Raspberry Buzzer GND GND Pin 2 GPIO 21 Webcam Raspberry Webcam USB Port USB Pulse GPIO 4 Servo VCC Pin 5V MG996R Raspberry GND Raspberry GND ISSN 2599-2081 EISSN 2599-2090 Fakultas Teknik UM Sumatera Barat Vol. 8 No. 2 Juni 2025 Rang Teknik Journal http://jurnal. id/index. php/RANGTEKNIKJOURNAL Name Sensor SW 420 Buzzer Table 2. System Design Conditions Conditions Data Descriptions Door Condition Not Safe OFF OFF LOCK Servo MG996R Servo MG996R Webcam UNLOCK Door Condition Not Safe Door Condition Safe Move 90A Clockwise Move 90A Counterclockwise and back to the starting point OFF OPEN Door Condition Safe Locked Door Open key Handle Opens and closes Live Streaming Actif Live Streaming Off In the creation of this security system device, we can see how the application initialization, vibration sensor, camera, relay, and buzzer work based on the flowchart shown below : Picture 4. Flowchart System ISSN 2599-2081 EISSN 2599-2090 Fakultas Teknik UM Sumatera Barat Vol. 8 No. 2 Juni 2025 Rang Teknik Journal http://jurnal. id/index. php/RANGTEKNIKJOURNAL Hasil dan Pembahasan Based on the tests conducted on each component used, the input voltage for all components can be determined, where the power supply provides an input voltage of 5Vdc to the vibration sensor circuit, relay, servo 1, and servo 2. After testing with a multimeter, the measured input voltage for the vibration sensor was found to be 4. 8Vdc, the relay had an input voltage of 4. 74 Vdc, and servo 1 and servo 2 had an input voltage of 4. 68Vdc. Next, testing was conducted on the overall security system conditions, as shown in Table 3 Table 3. Overall System Condition Based on Table 3 above, the overall condition of this door lock security system can be The door lock control has two modes that are configured via the application. The first mode is Save Mode, where the Key. Door. Buzzer, and Notification menus can be used. The Key button is used to control Servo 1, the Door menu is used to control Servo 2, the Buzzer menu is used to control the buzzer, and the notification is active when the buzzer is in the high state. The yellow color indicates a condition that may not occur during testing in Save Mode. The second mode is manual mode, which disables the door's security system. In this mode, the key, door, buzzer, and notification menus are disabled, so the door can only be opened using a traditional door key like a regular door. However, the webcam remains active, recording the area around the door in both save mode and manual mode, allowing users to monitor the door's status in real-time under any conditions. To determine the effectiveness of the device/system, direct testing was conducted by placing the device on the door lock and testing it. The results of the testing of the entire system can be seen in the table below: ISSN 2599-2081 EISSN 2599-2090 Fakultas Teknik UM Sumatera Barat Vol. 8 No. 2 Juni 2025 Rang Teknik Journal http://jurnal. id/index. php/RANGTEKNIKJOURNAL Table 4. Overall Circuit Test Results Table 5. Results of observation and testing of the entire circuit Data Input Expected Results Observation and Testing Results Data from the module. Both the input and output schemes of the system work well for controlling and securing door Both the input and output schemes of the system work well for controlling and securing door Based on Table 5, it can be seen that this door lock security system works well in controlling door locks and door security systems. Table 6. Application range test results Distance . Condition Descriptions The app connects to the The smartphone is connected to Wi-Fi and the app can control the device in real time. The app connects to the The smartphone is connected to Wi-Fi and the app can control the device in real time. ISSN 2599-2081 EISSN 2599-2090 Fakultas Teknik UM Sumatera Barat Vol. 8 No. 2 Juni 2025 Rang Teknik Journal http://jurnal. id/index. php/RANGTEKNIKJOURNAL The app connects to the The smartphone is connected to Wi-Fi and the app can control the device in real time. The app connects to the The smartphone is connected to Wi-Fi and the app can control the device, but sometimes there is a delay. The app connects to the The smartphone is connected to Wi-Fi and the app can control the device, but sometimes there is a delay. Based on Table 6 above, it can be seen that the application connects well within a range of 1 m Ae 14 m, while at a distance of 15 m Ae 20 m, the application sometimes experiences delays in responding to commands from the application due to reduced network speed. Closing Conclusion After conducting tests and collecting data directly from the device, the following conclusions can be drawn: Tests on the application's range in controlling the device after connecting to Wi-Fi showed that the application can connect well to the device and give commands in real time within a range of 1m to 14m. Testing on the SW420 vibration sensor shows that the resistance value setting affects the sensor's reading, where a lower resistance value makes the sensor more sensitive to vibrations, and a higher resistance value makes the sensor less sensitive. The resistance value range for the vibration sensor is 1 kOhm to 5 kOhm. The servo angle setting on the Raspberry Pi is calculated using the formula: DutyCycle = 1/18 x (DesiredAngl. Based on the above formula, the results for an angle of 180A are written as 12. 5% in the program, an angle of 90A is written as 7. 5% in the program, and an angle of 45A is written as 5% in the program. Advice In order to create a tool that works well for application in society, development is needed in terms of both benefits and overall system performance. Here are some suggestions from the author's research: In order for the tool to remain accessible from a greater distance, it is recommended to use additional modules such as sim800 or to create a web server. For live video streaming in the application, it is recommended that the results of the webcam recording be stored in memory or on a web server in future research. This is so that users can access videos that have already been recorded. To produce better recordings, it is recommended that better cameras or higher-end webcams be used in future research. Bibliography