Digital Door Lock System Using QR Code project based on Embedded System. - Codeprg

Breaking

programing News Travel Computer Engineering Science Blogging Earning

Friday, 8 May 2020

Digital Door Lock System Using QR Code project based on Embedded System.

                 Digital Door Lock System Using QR Code 



Abstract : Door locks are a common occurrence in our everyday lives. Yet, we still rely on traditional doorknobs that use physical keys that brings with it many problems such as key duplication from photos and lock-picking. There are also costs associated with making keys. This project aims to create a digital door lock system as a better alternative that accepts QR codes for the Postgraduate Research Labs of the Faculty of Computing, UTM. It is built using an Android device and an Arduino microcontroller. User Acceptance Testing has been performed with the help of the Postgraduate Lab Technician.

Keywords: qr code, digital door lock, android development, Arduino development

1. Introduction :)

Currently, the main method of restricting room access to certain people involves the use of physical keys. Physical keys carry with them a great number of security issues; among them the risk of physical loss, inventory tracking and lock-picking. Hence, the proposed system (called Lockmate) offers a solution through the use of QR codes as a means of authentication. QR codes are easily produced and are low cost compared to making a new physical key. They can also be easily tracked digitally ensuring an up to date access log of people entering and exiting. Any compromised QR code can be easily deleted or disabled.


The objectives of this project are: - 

  1.  To investigate and analyze the requirements of a quick to use, QR code-based door lock.
  2.  To design and develop the system primarily using an Android device and an Arduino board 
  3.  To evaluate the system such that it meets all the project goals 

The scope of this project are as follows: -

  1.  The Lockmate will be built for the Postgraduate Research Labs in the Faculty of Computing, UTM 
  2.  The Lockmate is intended as an alternative solution to the current proximity card lock used .
  3.  The system assumes that there is only one door to be controlled. - The only valid form of input will be QR codes.
  4. The system is designed to work with a sliding latch lock. 

Design and Development :


  •  The functional requirements include unlocking the door with a QR code, recording exit and entries, managing (adding, removing and editing) valid keys and providing a Lab Technician interface for key management. 
  • The non-functional requirements of the system are that the system must unlock the door within 5 seconds of scanning the QR code and that the system should indicate the validity of a QR code with sound effects. 
  • The system has been developed using Client-Server architecture. The Client-Server architecture is a network architecture where each computer on a network is either a client or a server. Figure 1 shows the components in the Lockmate system. The Lockmate Scanner and Lockmate Admin are both applications running on Android devices that act as clients to the server which holds the database. The database stores all valid keys of the system. The Arduino board is connected to the Lockmate Scanner via USB and acts as a physical hardware interface to the servo motor
  • The Lockmate system has been built with an Arduino Uno microcontroller and an Android device with a camera. In terms of software, the Arduino IDE and the Android Studio IDE has been used to develop the Lockmate software. 
  • The Lockmate system as a whole comprises of four major components. These are the Lockmate Scanner, the Lockmate Admin interface and the server. 
  • The Lockmate Scanner runs on an Android device fixed to the lock itself and scans any QR code presented to it by the user. It validates the QR code by comparing it with the QR codes stored in the database. If it is valid, it sends a signal to the Arduino board connected to it and moves the servo motor to unlock the door. 
  • The Lockmate Admin interface is another Android application that provides an interface for the Lab Technician to manage all of the valid keys in the system. It also allows the Lab Technician to view an Access Log that shows when and whom have scanned their QR code. 
  • Finally, the server stores the database where all the valid key data is stored. It has a REST API written in PHP for the Lockmate and Lockmate Admin applications to interface with it via HTTP POST and GET requests. 

Evaluation:)

User Acceptance Testing was performed to test the Lockmate system. The Lockmate Scanner was tested with the students of the Faculty of Computing. The scanner was connected to the Arduino board and the servo motor. Five random students were selected and they were each provided a copy of a valid QR code and invalid. They were then asked to present their QR codes to the camera of the Lockmate Scanner. The test was successful as the system moved the servo motor when the valid QR code was presented in all five instances. 
                                                      For the Lockmate Admin application, User Acceptance Testing was performed with the assistance of the Lab Technician. The technician is asked to perform the use-cases of the system (Unlock Door, Add Key, Remove Key, View Access Log and Update Key). Various questions as detailed in the full UAT document were asked. Briefly, it was concluded that the applications user interface could be improved and made less barebones. The ability to restrict the time of the key validity period was also missing. However, the technician noted that adopting QR code was a step in the right direction and would be an improvement over the existing system.  

Discussion and Future Work: 

  • The main goal of this project was to achieve serveral objectives. The first objective was to investigate and analyse the requirements of a quick to use, QR code based door lock. The Lockmate system is able to validate a QR code in less than 3 seconds which passes for a quick to use QR code door lock. 
  • The second objective was to design and develop the system primarily using an Android device and an Arduino board. The Lockmate system has been built with an Arduino board that connects to a Lockmate Scanner running on an Android device via USB. 
  • The third objective was to evaluate the system such that it meets all the project goals stated in the section above. The Lockmate system has been tested as detailed in the full project report’s appendix document, the Software Testing Documentation. 
Digital Door Lock System 
  • Throughout this project, there have been a few considerable challenges faced throughout the development of the Lockmate system. Amongst them, the most time consuming would be interfacing the Arduino board with the Android devise. 
  • Communicating to an Arduino board from an Android device was possible but highly undocumented and was not commonly done. Even more so if it were to be done wirelessly via Bluetooth. This had an influence on making USB as the interface between the Arduino board and the Lockmate Scanner device.
  •  For future work, a few potential improvements and polishing could be done to the Lockmate system to make it more marketable. Firstly, a proper hardware enclosure could be built making the system look more like a finished product. Secondly, for the management application one could add support for managing multiple locks instead of just a single one. 
  • Thirdly, the UI of the Lockmate application could be improved to look less barebones. Fourth, new functionalities such as remote lock/unlock and restricting of key validity time period could be added to the Lockmate system making it competitive with commercial solutions such as the Lockitron Bolt.

Conclusion :

The main goal of this project was to achieve several objectives. The first objective was to investigate and analyze the requirements of a quick to use, QR code-based door lock. The Lockmate system is able to validate a QR code in less than 3 seconds which passes for a quick to use QR code door lock