Unauthorized access to restricted areas presents a significant security challenge, particularly in locations where continuous human surveillance is difficult. This paper presents the design and development of an Automatic Intrusion Detection and Defense Device Using an Embedded System. The developed prototype combines an Arduino UNO controller with an HC-SR04 ultrasonic sensor, servo motors, an ESP32-CAM, LEDs, and a buzzer. The ultrasonic sensor detects objects within a defined distance, while servo-based movement enables directional scanning. Sensor measurements are processed by the Arduino to determine whether an object satisfies the intrusion threshmold. When detection occurs, the system activates visual and audible alerts, while the ESP32-CAM provides visual information about the monitored region. The ultrasonic sensor detects objects within a predefined range, while the servo mechanism enables scanning across different directions. The Arduino UNO processes the sensor data and determines whether an intrusion condition has occurred. When an object is detected within the specified range, the system provides visual and audible alerts through LEDs and a buzzer, while the ESP32-CAM enables visual monitoring of the detected area. A servo-controlled mechanism is incorporated to demonstrate an automated, safe and non-projectile response. The system is developed as a prototype to demonstrate the integration of sensing, processing, monitoring, alerting, and automated actuation in an embedded security application. Experimental testing can be performed at different distances and angles to evaluate the detection, scanning, alert, monitoring, and response functions of the system.
Introduction
The proposed Automatic Intrusion Detection and Defense Device Using an Embedded System is a low-cost security prototype designed to detect unauthorized physical presence and provide an automated response. Conventional surveillance often depends on continuous human monitoring, which can be challenging in large or remote areas. Embedded systems offer a practical alternative by integrating sensing, processing, monitoring, alert generation, and actuation into a single platform.
The proposed system uses an HC-SR04 ultrasonic sensor to detect objects within a predefined distance, servo motors to scan different directions, and an Arduino UNO to process sensor data and determine whether an intrusion has occurred. An ESP32-CAM provides visual monitoring, while LED indicators and a buzzer generate visual and audible alerts. A controlled servo-based mechanism supports the response function.
The literature review examines recent IEEE-related research from 2024 and 2025 on IoT intrusion detection, deep learning, federated learning, side-channel analysis, host-based detection, lightweight artificial intelligence, privacy preservation, and explainable AI. Existing studies demonstrate promising detection performance, improved privacy, and adaptive threat identification. However, many approaches depend on computationally demanding algorithms, communication between multiple devices, or centralized and distributed processing. Furthermore, most focus on cyber and network-based attacks rather than physical intrusion detection.
The comparative analysis identifies several research gaps, including limited integration of physical detection and automated response, high computational requirements, insufficient directional sensing, limited visual verification, and the lack of complete low-cost embedded security solutions. Although existing approaches achieve high detection accuracy, detection alone does not ensure an immediate and effective response to an intrusion.
The proposed system addresses these gaps through an integrated architecture consisting of ultrasonic sensing, servo-assisted directional scanning, Arduino-based processing, intrusion decision-making, LED and buzzer alerts, ESP32-CAM visual monitoring, and controlled mechanical actuation. Its main objective is to demonstrate a practical, affordable, and automated security solution that reduces dependence on continuous human supervision.
Conclusion
The reviewed studies indicate increasing interest in real-time and embedded approaches to intrusion detection, including machine learning, deep learning, federated learning, and explainable AI. However, the reviewed approaches largely address cyber or network-level threats. The proposed prototype extends the concept toward physical intrusion monitoring by combining ultrasonic sensing, directional scanning, camera-based observation, local processing, alerts, and controlled actuation. Existing studies have explored deep learning, machine learning, federated learning, side-channel analysis, adaptive detection, and explainable AI for improving intrusion detection in IoT environments. However, most of these approaches primarily concentrate on cyber or network-based intrusion detection, with limited integration of physical intrusion sensing and automated response. The proposed Automatic Intrusion Detection and Defense approach to automated physical intrusion detection. Its performance can be evaluated through detection accuracy, scanning capability, response time, alert reliability, camera monitoring, and safe response operation under different distances and angles. Future improvements may incorporate lightweight AI, IoT connectivity, sensor fusion, remote monitoring, and adaptive decision-making to further enhance the reliability and intelligence of the system.
References
[1] S. Racherla, P. Sripathi, N. Faruqui, M. A. Kabir, M. Whaiduzzaman, and S. A. Shah, “Deep-IDS: A Real-Time Intrusion Detector for IoT Nodes Using Deep Learning,” IEEE Access, vol. 12, pp. 63584–63597, 2024, doi: 10.1109/ACCESS.2024.3396461.
[2] A. Domínguez Campos, F. Lemus-Prieto, J.-L. González-Sánchez, and A. Caro Lindo, “Intrusion Detection for IoT Environments Through Side-Channel and Machine Learning Techniques,” IEEE Access, vol. 12, pp. 98450–98465, 2024, doi: 10.1109/ACCESS.2024.3362670.
[3] M. K. Nallakaruppan, S. R. K. Somayaji, S. Fuladi, F. Benedetto, S. K. Ulaganathan, and G. Yenduri, “Enhancing Security of Host-Based Intrusion Detection Systems for the Internet of Things,” IEEE Access, vol. 12, pp. 31788–31797, 2024, doi: 10.1109/ACCESS.2024.3355794.
[4] M. H. Bhavsar, Y. B. Bekele, K. Roy, J. C. Kelly, and D. B. Limbrick, “FL-IDS: Federated Learning-Based Intrusion Detection System Using Edge Devices for Transportation IoT,” IEEE Access, vol. 12, pp. 52215–52226, 2024, doi: 10.1109/ACCESS.2024.3386631.
[5] S. S. Mahadik, P. M. Pawar, and R. Muthalagu, “Edge-Federated Learning-Based Intelligent Intrusion Detection System for Heterogeneous Internet of Things,” IEEE Access, vol. 12, pp. 81736–81757, 2024, doi: 10.1109/ACCESS.2024.3410046.
[6] A. Vyas, P. C. Lin, R. H. Hwang, and M. Tripathi, “Privacy-Preserving Federated Learning for Intrusion Detection in IoT Environments: A Survey,” IEEE Access, vol. 12, pp. 127018–127050, 2024, doi: 10.1109/ACCESS.2024.3454211.
[7] P. Turaka and S. K. Panigrahy, “Dynamic Attack Detection in IoT Networks: An Ensemble Learning Approach With Q-Learning and Explainable AI,” IEEE Access, vol. 12, pp. 161925–161940, 2024, doi: 10.1109/ACCESS.2024.3485989.
[8] H. Liao, M. Z. Murah, M. K. Hasan, A. H. M. Aman, J. Fang, X. Hu, and A. U. R. Khan, “A Survey of Deep Learning Technologies for Intrusion Detection in Internet of Things,” IEEE Access, vol. 12, pp. 4745–4761, 2024, doi: 10.1109/ACCESS.2023.3349287.
[9] S. Abdulkareem, C. H. Foh, M. Shojafar, F. D. Carrez, and K. Moessner, “Network Intrusion Detection: An IoT and Non IoT-Related Survey,” IEEE Access, vol. 12, pp. 147167–147191, 2024, doi: 10.1109/ACCESS.2024.3473289.
[10] N. A. Hamad, K. A. Abu Bakar, F. Qamar, A. M. Jubair, R. R. Mohamed, and M. A. Mohamed, “Systematic Analysis of Federated Learning Approaches for Intrusion Detection in the Internet of Things Environment,” IEEE Access, vol. 13, pp. 95410–95444, 2025, doi: 10.1109/ACCESS.2025.3574672.
[11] C. Gutti, K. Thumula, and P. Balbudhe, “Federated Learning for Distributed IoT Security: A Privacy-Preserving Approach to Intrusion Detection,” IEEE Access, vol. 13, pp. 135863–135875, 2025, doi: 10.1109/ACCESS.2025.3592481.
[12] R. Manzano, M. Zaman, D. Upadhyay, N. Goel, and S. Sampalli, “Federated Learning Framework Based on Distributed Storage and Diffusion Model for Intrusion Detection on IoT Networks,” IEEE Access, vol. 13, pp. 79571–79595, 2025, doi: 10.1109/ACCESS.2025.3565409.
[13] M. Baich and N. Sael, “A Federated Learning-Based Intrusion Detection System Using Dynamic Ensemble Aggregation for IoT Networks,” IEEE Access, vol. 13, pp. 205826–205839, 2025, doi: 10.1109/ACCESS.2025.3640521.
[14] M. A. Bilal, I. U. Islam, N. Iltaf, M. J. Khan, et al., “Federated Learning With Explainable AI for Malicious Traffic Detection in IoT Networks,” IEEE Access, vol. 13, pp. 173368–173383, 2025, doi: 10.1109/ACCESS.2025.3613459.
[15] “Intrusion Detection System Framework for SDN-Based IoT Networks Using Deep Learning Approaches With XAI-Based Feature Selection Techniques and Domain-Constrained Features,” IEEE Access, vol. 13, pp. 136864–136880, 2025, doi: 10.1109/ACCESS.2025.3595595