Implementation of Intelligent Automated Gate System with QR Code-An IOT System to Help Gate Management

This paper is about QR code-based automated gate system. The aim of the research is to develop and implement a type of medium-level security gate system especially for small companies that cannot afford to install high-tech auto gate system. IAGS is a system that uses valid staffs’ QR code pass card to activate the gate without triggering the alarm. It is developed to connect to the internet and provide a real-time email notification if any unauthorized activities detected. Besides that, it is also designed to record all the incoming and outgoing activities for all staff. All QR code pass cards that are generated to staff will be encrypted to provide integrity to the data. The system is based on items such as PIR motion sensor, servo motor, Arduino microcontroller, Piezo buzzer, and camera. The software is implemented using VB.NET and the QR recognition level is about 99% accurate. Keywords—Component; internet of things; gate system; VB.NET; QR code


I. INTRODUCTION
In this modern society, crime rate is increasing and among the popular victims are the small companies.This is because small companies usually do not have appropriate gating system to prevent unauthorized entries.This is very dangerous and may put the companies at risk.IAGS uses QR code technology to identify the identity of the staff.This technology not only can be used in the companies' premises, but also in residential areas, paid parking zones, and several other significant areas.This paper proposes the development of a gate system to allow only authorized staff to enter the company premises.The regular web camera will capture the QR codes scanned by the staff and have them verified by the VB.NET software application.

II. RELATED WORK
QR (Quick Response) code refers to a combination of black and white square machine-readable code [1] [2].It is usually used for storing information and is scanned with QR code scanners.QR code scanners can be any kinds of camera, including smartphones camera or webcams.QR code can be easily generated by any online software tools, and it supports any type of data.QR code is possible to be read by the QR code scanner even though the QR code is damaged.Basically, it is still detectable by scanners if the code loss/damage is less than 30%.It also support 360-degree of reading [3].
To increase the security level of the QR code, salted algorithm and hashing algorithm are implemented [4] [2].Hashing algorithm is an algorithm that will take a string or data source and create an encrypted looking string with no meaning value.There are various hashing algorithms such as MD5 for 128 bits, SHA256 for 256 bits, and SHA512 for 512 bits that may be used [5].Salted algorithm on the other hand, is a randomly generated data used as an additional input to a oneway function that "hashes" a password or passphrase.By implementing both the salted and hashing algorithms, the QR code will not be easily cracked.Based on the criteria stated above, the QR code is most suitable to act as a pass card to implement in the gate system.The example of the salted hashing algorithm is shows in the Figure 1.The functionality of the current gate systems in the market is not comprehensive [6][7] [8][9].This is because the automated gate systems in the market require expensive installation and maintenance fees which are not affordable by most of the small companies.Small companies rather bear the risks of not installing any gate systems because they could not afford those [7][10].This is very risky and dangerous as any unauthorized person can freely enter and exit the companies' premises.
Besides that, some of the automated gate system in the market does not provide any monitoring tool or interface to monitor the gate system [11] [12].Some of them are also unable to open the gate manually if there are any problems to www.ijacsa.thesai.org the system.Furthermore, some of the gate system do not record the ‗check-ins' and ‗check-outs' of the staff [13].This is very inefficient as it could not trace who enters and exits in a specific time range if any suspicious activities happened.
Most of the existing gate systems also do not support online connection [11].The gate system only trigger the alarm without sending out any notification/email to the relevant department.This is inefficient if the company is not located in urban areas and less people will notice that the alarm has been triggered.The immediate actions cannot be taken and may cost the company huge losses.

A. Theoritical Framework
Basically, the implementation of nowadays gate system shows the apparent similarities from the theoretical perspective and its implementation.It involves the process of identifying the identity of the person that want to enter the premises, confirming and authorizing the person to enter the premises.
Basically IAGS (Intelligent Automatic Smart System with QR Code) is part of a defense system.It focuses security task including's user authorization, intrusion alarm and uses to protect the organization from the unwanted access.Current implementation for systems such as IAGS are including biometric-based applications, RFID/passcode, vehicle license identification and QR code.IAGS focuses on the implementation of the QR Code for the purposes of user authorization in order to ensure only the right person can enter the premises [10].The basic theoretical framework of Intelligent Automated Gate System with QR Code is briefly illustrated in Figure 2 below.

B. The Process
First, in this project, Rapid Application Development (RAD) model will be implemented [14].This methodology is the most suitable as it designs to produce a high-quality output in the shortest time compared to traditional lifecycle software development.Besides that, the RAD methodology can also provide some output of the product in a very short time and get feedback from the end users regarding their requirements.
RAD is a four-phase software development cycle that combines the element of Standard System Development Life Cycle (traditional SDLC) [14].The four phases are Requirement Planning, User Design, Construction, and Testing and Cutover.Figure 3 shows the RAD process.

C. System Architecture and Design
Figure 4 shows the System Architecture of the Intelligent Automated Gate System.An interface is created using VB.NET to control the Arduino Uno Microcontroller.The Arduino Uno Microcontroller receives the command via a serial port and performs the rotation of the servo motor.If an authorized scanning is detected, the servo motor will rotate 90 degrees as the gate opens, or else it will not rotate and an email will be sent to the relevant department regarding the unauthorized scanning detected.Besides that, there are two cameras that will be used as a scanners to detect the QR code pass card and also perform as security cameras.All information of staffs will be saved into the SQL database including the created QR code and check in/out record.

A. Hardware Development
The hardware needed in this project includes the Arduino Uno microcontroller, Piezo buzzer, PIR motion sensor, servo motor, LED light, and a web camera.The web camera is connected to the PC via USB cable while the rest of the hardware is connected to the Arduino Uno by using jumper wires.Table 1 shows the connection of the Arduino Uno. Figure 4 also shows the hardware connections implemented in this project.The servo motor is attached to Arduino Uno microcontroller using the male to male jumper wire.The rotation command will be sent from the VB.NET software application to the Arduino Uno microcontroller via a serial port.PIR sensor is used to detect the motion of the said vehicle.Once the vehicle is detected, it will control the rotation of servo motor to make it rotate 90 degrees to close the gate.The piezo buzzer will be triggered if any unauthorized scanning is detected to alert the security department.Figure 5 below shows the implementation of IGAS in real environment.

B. Software Development
A monitoring application created by the VB.NET language is used to monitor and control the IGAS.There are nine (9) main modules in the application as follows:  Login -This is an authorization process which allows only administrator to log into the software application to perform tasks such as registration for staff, checking check-in/out record, activate/deactivate the security camera, and others.
 Register -This process is to create a new account for new staff.The information of new staff will be saved into the database and the QR passcode will also be generated at the same time.
 Update Info -The staffs' information can be updated from time to time to include information such as telephone number or emails to make sure their information is up to date.
 Delete -Staffs' record can be deleted, if necessary, to avoid congestion in database.
 List of staff -All staffs' information will be shown in a table and can be viewed by the administrator.
 Report -Any check-in/out time activities will be recorded based on the name of the pass card holder.
 Email -An email alert will be send to the relevant department if any unauthorized/suspicious activities found/detected.QR code pass card can also be send to specific staff if there are any losses/updates to the QR code.
 Webcam scanner -A programmed webcam is used as a QR code scanner to detect the QR code for every checkin and check-out processes.
Figure 6 shows the functionality of the Intelligent Automated Gate System in details.

C. Evaluation
The IOT platform is successfully developed and implemented.It is able to open the gate by using a valid QR code which is generated by the monitoring software application.Overall, the system is 99% accurate.Table 2 shows the result of the testing for the IAGS.The implementation of the system consists of some limitations to be improved in future development.First, the VB.NET software application must be connected to the internet to ensure that the email is sent if any unauthorized activities are detected.The connection strength and speed is important to prevent any delay in the process of sending the email.Second, the light ray is important for the QR code scanner to read the QR code.If the light ray is insufficient, the function of reading the QR code may be affected and it will take longer to decode the QR code.

D. Future Work
We are looking forward to extend this project to make it more functionality and comprehensive.The features that we are looking at are as listed below.
 SMS/ WhatsApp Notification -IAGS can be improved by adding the SMS/WhatsApp notification instead of email notification.This features will be more efficient [15][16] in order to inform the security department for any immediate action related to intrusion.
 Voice Communication -Voice communication service will be added at the side of the barrier uses for the security department to communicate with the car driver (if needed).This allows better communication [17][18] if there is any problem in IAGS implementation.
 IP Camera -An IP camera will be introduced in IAGS instead of USB camera.IP Camera is more economical compared to USB Camera [17][19].It is also support to rotate the angle of camera and providing a real-time monitoring.

V. CONCLUSION
This paper explains the development of a medium-security level gate system with minimum cost.The system distinguishes the weaknesses of the current gate system in the market by applying a different technology-QR code.Also, the system can be used not only in company premises, but also be implemented in any places and works automatically without the need of human beings.It will definitely increase the performance of a company and prevent office brake-ins effectively.

Fig. 4 .
Fig. 4. System Architecture IV. RESULTS AND DISCUSSION The development of the system is divided into two parts: i. Hardware development ii.Software development

Fig. 6 .
Fig. 6.Functionalities of the monitoring softwareThe workflow of the hardware system is simplified in the Figure7below:

Fig. 7 .
Fig. 7. Work flow of the hardware system