A prototype of gate control system based on body temperature using Arduino

Since the COVID-19 pandemic people tend to avoid physical contact and to maintain a distance from other people. Most office buildings have now a main gate equipped with body temperature checks for all visitors. A security guard is required to maintain and operate a such main gate system. A gate system, equipped with body temperature check which is operated automatically, is proposed in this paper. The goal of this system is to reduce human intervention in its operation. System requirements, both in hardware and software side is first identified and defined, before analyzing and designing the system. The goal of this system is to reduce human intervention in its operation. System requirements, both in hardware and software side is first identified and defined, before analyzing and designing the system. Implementation and testing are carried out to obtain results as a basis for conclusions.


Introduction
Since September 2019 the COVID-19 outbreak has spread throughout the world.Almost all countries have been impacted by the pandemic including Indonesia.Indonesia's latest official COVID-19 figures show 3,565 new confirmed COVID-19 cases at the end of October 2020 [1] for the total of more than 400,000 cases that are positively infected and around 13.700 casualties..This figure clearly shows a significant increase compared to data at the beginning of 2020.This condition is predicted to continue increasing until the beginning or even the end of 2021 [2,3].
The government has issued a set of policies to enforce health protocols to stop or at least reduce the spread of the COVID-19.One of the government policies related to this is the obligation of each building to check the body temperature of all visitors [4].The entrance to each building must be guarded by a security guard who checks the body temperature of the visitors.Potential problems may arise when security guards have to interact with visitors at close distance or even physical contact.
A system is proposed in this paper to maintain distance and avoid physical contact in accessing buildings.No more security guards has to check visitor one by one, instead each visitor needs to tap his/her ID card to activate the gate control system.
When the ID card is recognized then the sytem will scan the visitor's body temperature.It opens the gate when the body temperature is still in a safe condition (below 38 o C) [4].Otherwise, it turns the alarm on to get the security guards attention for further actions.

Materials and Methods
The system that is constructed consists of two main components: hardware and software.The hardware part consists of a microcontroller as the main control which is connected to other required modules or devices to form a circuit system.The agile process model [5] was adopted for developing software parts because it promotes quick system development.The XP method [6,7] with modification as part of the agile process model was chosen to be used as a reference for the steps of system development.System requirements must be identified in advance before carrying out system analysis and design.Implementation and testing the system will be taken after the design process accomplished.Conclusion is withdrawn from the results of system testing.
The microcontroller is the main control system used in this research.Just like computers, microcontrollers are also constituted and consist of a CPU, memory and, programmable input/output peripherals [8,9].Data and instructions that enter from the input unit will be stored into memory.The CPU will retrieve data and instructions from memory which are then processed.The results of this processing are stored in memory or directly sent to the output unit.The data that comes from the input unit can be in the form of sensor signals, while the data that comes out of the output unit as a result of the process can be control signals (for example a control command to sound an alarm or open a door).
Arduino is one type of microcontroller that is widely used because of availability and ease of programming.The control process can be written using a programming language similar to C++ through an editor called an IDE (Integrated Development Environment).List of written program code is called Sketch [10].Arduino as a main control system needs to be equipped with several other hardware modules such as sensors and devices [8] so that it becomes the desired gate control system.
Two important hardware sensors are required to complete the main control functions of this gate control system.The first is a sensor for measuring human body temperature without touching the module.The second is a sensor for reading the RFID card which is used by visitors to activate the system.System activation is done by tapping the card on the sensor.To meet the need of measuring human body temperature, the MLX90615 (also called GY906) digital infrared sensor module [11] was chosen because it has the ability to measure temperature via infrared.The use of an infrared sensor allows measurements to be carried out without touching the device.Whereas Radio-frequency identification (RFID) sensor is required to read a card so that the system is activated and ready to receive data.The RFID system uses radio frequency to transmit data from sender to receiver [12].

Result and discussion
The results of developing a gate control system for checking body temperature are discussed below.The discussion will be divided into 3 main parts, namely identification of system requirements, system design and implementation, system testing.

Identification of System Requirements
Identification of the requirement for a gate control system for checking body temperature can be provided by explaining the capabilities and features of the system.It should be noted that the gate control system not only has a feature to check body temperature, but also has a feature to record the identity of visitors along with their time and temperature.This method is useful for completing the health history of visitors when it is needed.
The capabilities and features of the system can be explained using use case diagrams.The capabilities and features of the system can be explained using two use case diagrams, namely a diagram for the visitor case and a diagram for the administrator case.The system is initiated using the use case for administrator cases which is shown at Fig. 1.

Figure 1 Admin Use Case Diagram
The figure shows that the system consists of four use cases.First is admin to upload the visitor data, second is admin to view visitor data, third is admin to search specific visitor temperature history and last admin manage login account.The use case diagram for handling visitor activities is shown at Fig. 2.

Figure 2 System Use Case Diagram
The description is given as follows.Visitor able to tap card as identification in the machine after they put their wrist below (arteries) to the infrared thermometer sensor then the system captures the temperature value from infrared thermometer.After the system gets the temperature value it will send the card ID and temperature to the putty system then putty system will save the data in CSV file format.The system will start to analyze the captured temperature value, if the temperature lower than 38 o C then open the gate and the LED green on, but if the temperature greater than 38 o C then start the alarm and the red light open.

System Design and Implementation.
The hardware of the gate control system for checking body temperature is designed as shown at Fig. 3. Arduino microcontroller is the main unit of the system.The card reader RFID RC522 is connected to the Arduino, allowing visitor's ID data to be read by the system for control processing.When the data is recognized, then a system will activate digital infrared sensor module (GY906) to measure visitor's body temperature.

Figure 3 System Circuit Scheme
The Buzzer will be sounding when the result of measuring body temperature shows the number of above 38 o C. Otherwise, the servo motor will be activated to open the gate allowing the visitor to enter the building.The results of body temperature measurements are also sent to the OLED screen for display.Detail design of the system software is represented in the Swim-Lane Diagram as shown by Fig. 4.

Figure 4 Work flow diagram for the system
Detail design of the system software is represented in the Swim-Lane Diagram as shown by Fig. 4. The system will get the ID of the visitor through the card tap action.If the card is detected as a recognized visitor, the temperature will be captured to check its value.If the value is bigger than 38, a command of "turn on the LED red and alarm" will be activated causing the red LED is light on and the alarm is sounding.When the visitor ID and body temperature are captured, it will be sent to the Putty system to be saved in CSV file format.
The program code is implemented by utilizing the available libraries, especially those related to the sensors used.Visitor ID and temperature are data that need to be retrieved and stored on the system.The card reader RFID RC522 is used to read Visitor IDcard through the implementation of command code rfid.readCardSerial().The commandcode mlx.readObjectTempC() is implemented to obtain the visitor's body temperature through the use of the MLX90615 digital infrared sensor.The following figure shows List of codes for the use of the Card Reader RFID RC522 and the MLX90615 Digital Infrared Sensor which is shown at Fig. 5.

System Testing
System testing is carried out to ensure that the system being built is working properly.The results of this test will represent the realization of all system requirements that have been identified and defined earlier.The success of the proposed idea to build a gate control system that introduces contactless body temperature measurement (without the involvement of a security guard) will depend heavily on the test results of this system.
The system needs the ability to detect and recognize each visitor via IDcard tapping.This system also has the ability to measure the body temperature of visitors and record it.shows the test results which indicate that the features mentioned above have been successfully realized as it is shown at Fig. 6.In this figure, it shows that the visitor's identity card is known and the result of body temperature measurement shows the number 32 (which means it is still below the maximum limit).The figure also shows a green led light which means visitors are allowed to enter together with the opening of the gate.
The system has been tested by several scenarios to obtain the robustness of the system.Table 1 shows the overall results of system testing, starting from the test scenario, the expected test results and the statement of the test results themselves.

Conclusion
The tests that have been carried out show the expected results where the defined system requirements are represented in the results of this test.This means that the idea of developing a gate control system that introduces contactless body temperature measurement can be applied in particular to reduce physical contact between humans especially in pandemic situation.Recording visitor ID and time along with the results of their body temperature measurements will be very useful to complete the visitor's health history if one day is needed.
However this idea still needs to be further developed, especially to reduce the occurrence of physical contact between humans.The use of cameras in this system can be an alternative solution to improve the system's capabilities, in particular the use of cameras which also have the ability to detect and measure body temperature.The adoption of a deep learning algorithm can make the system smarter and more intelligent because it has the ability to recognize visitors' faces.The use of identity cards becomes unnecessary if this kind of system is implemented.

Acknowledgement
We would like to express our respect and gratitude to all parties who have assisted with this research.

Disclosure of conflict of interest
The authors listed below declare that they have no affiliation or involvement in any organization or entity with a financial interest in the subject matter or materials discussed in this manuscript.

Figure 5
Figure 5 Codes for Card Reader

Figure 6
Figure 6 System Testing

Fig 6 .
Fig 6.  shows the test results which indicate that the features mentioned above have been successfully realized as it is shown at Fig.6.In this figure, it shows that the visitor's identity card is known and the result of body temperature measurement shows the number 32 (which means it is still below the maximum limit).The figure also shows a green led light which means visitors are allowed to enter together with the opening of the gate.

Table 1
System test results