The global logistics and supply chain sector is a critical enabler of international trade and industrial growth. However, it continues to face persistent challenges related to theft, unauthorized access, and tampering of goods during transit. Traditional mechanical locks and paper-based tracking methods lack the intelligence and interconnectivity required to provide end-to-end cargo security. To address these issues, this paper proposes a Smart Embedded Locking System (SELS) that integrates GPS-based geofencing, Zigbee presence detection, and NFC-enabled user authentication into a unified embedded platform managed by an ESP32 microcontroller. The system ensures that the lock can only be opened when three simultaneous conditions are satisfied: (1) the container is physically located within a predefined geofenced zone, (2) a Zigbee receiver at the destination verifies its presence, and (3) an authorized user successfully authenticates via NFC and password entry. Each unlocking event is securely logged with a timestamp and user ID, providing a verifiable audit trail for logistics operators and insurers. The proposed solution demonstrates how modern IoT and embedded systems can be leveraged to create a multi-factor, self-contained, and cost-effective cargo security mechanism for modern transportation.
Introduction
Cargo theft remains a major global problem despite advances in logistics technology, with traditional security methods such as padlocks and seals offering little protection or real-time awareness. To address these limitations, modern IoT and embedded systems provide opportunities for intelligent, automated cargo security. The proposed Smart Embedded Locking System (SELS) integrates hardware and software technologies to create a multi-factor, context-aware access control solution for logistics.
SELS secures cargo by validating three independent factors before unlocking: GPS-based geofencing to confirm the container’s location, ZigBee-based presence detection to ensure it is at an authorized facility, and NFC/password authentication to verify the user. This approach overcomes weaknesses in conventional locks by ensuring that unlocking is possible only when the correct location, infrastructure, and user identity all match.
The literature review shows significant advancements in IoT-based logistics systems, including RFID-GPS tracking, geofencing, smart locks, and cryptographic security. Studies highlight the importance of accurate positioning, reliable wireless communication, and secure authentication in preventing cargo theft. However, most existing systems solve these problems separately. SELS fills this gap by integrating geolocation, authentication, and device presence into one unified framework.
The project methodology uses an ESP32 microcontroller connected to a GPS module, ZigBee transceivers, an NFC reader, and a relay-driven solenoid lock. GPS coordinates are continuously monitored and compared with predefined geofences. ZigBee presence is confirmed through periodic wireless packets, initially validated using UDP testing. Users initiate authentication by tapping an NFC tag, which opens a local web interface to enter a password. Only after all three verifications succeed does the ESP32 activate the lock.
The system architecture is modular, with dedicated layers for location verification, infrastructure verification, user authentication, and physical lock actuation. The ESP32’s dual-core processor handles simultaneous tasks, including GPS parsing, ZigBee communication, and web hosting for user interaction.
Testing results showed reliable multi-factor locking behavior, with GPS accuracy around ±5 meters, stable ZigBee communication up to 25 meters, and authentication response times near 2.1 seconds. Power consumption remained suitable for battery operation. The software-controlled unlocking process worked correctly, and hardware lock integration is planned next. Overall, SELS provides a secure, intelligent, and scalable approach to modern cargo protection, improving safety, traceability, and operational efficiency in logistics environments.
Conclusion
The Smart Embedded Locking System for Secure Transportation of Goods presents a substantial advancement in the application of embedded and IoT technologies for logistics security. By integrating GPS-based geofencing, Zigbee presence detection, and NFC-based user authentication into a unified platform controlled by the ESP32 microcontroller, the system ensures that access to a container is granted only under verified and authorized conditions. The results obtained through extensive testing confirm that the system operates reliably, with accurate geolocation, fast authentication, and efficient power consumption suitable for continuous deployment in real-world conditions.
Unlike conventional locking mechanisms, which provide only physical deterrence, the proposed SELS offers contextual intelligence by verifying where, when, and by whom the container is being accessed. This combination of spatial, infrastructural, and user-level authentication creates a comprehensive security framework that not only prevents unauthorized access but also enhances accountability and transparency within the supply chain. The timestamped event logging feature further strengthens the auditing process, enabling logistics operators and insurance agencies to maintain verifiable records of each access attempt.
The implementation of SELS demonstrates how low-cost embedded hardware can deliver high-impact solutions for modern industry challenges. The ESP32 microcontroller proves to be an ideal choice for managing multiple wireless interfaces and executing complex decision-making tasks with minimal latency. The use of widely available components such as the Neo-6M GPS, XBee Zigbee modules, and MFRC522 NFC readers ensures that the system remains both scalable and cost-effective.
In practical applications, the SELS can be deployed across transportation fleets, warehouses, and cargo containers to enhance security and operational efficiency. It can be integrated with logistics management software to provide real-time monitoring and remote control. Future developments may include GSM or LTE connectivity for cloud synchronization, blockchain-based data integrity for tamper-proof event storage, and artificial intelligence algorithms for anomaly detection and predictive security analytics.
In conclusion, the proposed Smart Embedded Locking System represents a pivotal step toward the realization of secure, intelligent, and connected logistics infrastructure. It successfully merges the principles of embedded system design, IoT communication, and multi-factor authentication to deliver a next-generation security solution. By ensuring that access to goods in transit is both digitally and physically verified, SELS contributes to the development of a safer, more transparent, and more resilient global supply chain ecosystem.
References
[1] Espressif Systems, “ESP32 Technical Reference Manual,” Espressif Inc., 2023.
[2] TinyGPS++ Library Documentation, GitHub, 2024.
[3] Digi International, “Zigbee Communication Protocol Overview,” 2022.
[4] ISO 17712:2013, “Freight Containers – Mechanical Seals,” International Organization for Standardization.
[5] Chen et al., “RFID-GPS Based Container Tracking Systems,” IEEE Access, vol. 9, 2021.
[6] Karthikeyan R. and Rao P., “IoT-Based Container Monitoring Using GSM Alerts,” IJERT, vol. 11, no. 4, 2022.
[7] Y. Ding and M. Jin, “Smart logistics based on the Internet of Things technology: An overview and challenges,” *Int. J. Logistics Research and Applications*, vol. 24, no. 4, pp. 323-345, 2021.
[8] I. Sergi, F. Ferrari, G. Lucenteforte and G. C. Cardarilli, “A smart and secure logistics system based on IoT and edge computing,” *Sensors*, vol. 21, no. 6, pp. 1-16, 2021.
[9] R. Kumar and V. K. Sharma, “Fleet tracking and geofencing using the Internet of Things (IoT),” *Int. J. Advanced Res. in Electrical, Electronics and Instrumentation Engineering (IJAREEIE)*, vol. 12, no. 3, pp. 105-112, 2023.
[10] B. V. Sundawa and A. Batubara, “Implementation of Smart Lock JT701 for cargo security system,” *Int. J. Recent Vocational and Academic Research (IJRVOCAS)*, vol. 4, no. 1, pp. 45-52, 2024.
[11] S. M. Hussain, “An IoT–NFC lock system for efficient access management,” *Malaysian J. Science and Advanced Technology (MJSAT)*, vol. 4, no. 2, pp. 73-78, 2024.
[12] Y. Li, Y. Zhuang, X. Hu, Z. Gao, and N. El-Sheimy, “Location-Enabled IoT (LE-IoT): A survey of positioning techniques, error sources, and mitigation,” *IEEE Access*, vol. 8, pp. 116 320-116 340, 2020.
[13] DHL Trend Research, “Internet of Things in logistics,” DHL Trend Report, pp. 1-27, 2014. [Online]. Available:
https://www.dhl.com/content/dam/dhl/global/core/documents/pdf/glo-core-internet-of-things-trend-report.pdf
[14] S. Marksteiner, V. J. Expósito Jiménez, H. Vallant and H. Zeiner, “An overview of wireless IoT protocol security in the smart home domain,” *arXiv preprint arXiv:1801.07090*, 2018.
[15] A. Shamsoshoara, A. Korenda, F. Afghah and S. Zeadally, “A survey on physical unclonable function (PUF)-based security solutions for Internet of Things,” *IEEE Access*, vol. 7, pp. 87 807-87 822, 2019.
[16] C. Bapat, G. Baleri, S. Inamdar and A. V. Nimkar, “Smart-Lock Security Re-engineered using Cryptography and Steganography,” arXiv preprint arXiv:1901.06381, 2019.
[17] T. M. Fernández-Caramés, P. Fraga-Lamas, M. Suárez-Albela and L. Castedo, “Reverse Engineering and Security Evaluation of Commercial Tags for RFID-based IoT Applications,” arXiv preprint arXiv:2402.03591, 2024.
[18] “Enhancing Security in ZigBee Wireless Sensor Networks: A New Approach and Mutual Authentication Scheme for D2D Communication,” Sensors, vol. 23, no. 12, pp. 5703, 2023.