Page 1 of 7
British Journal of Healthcare and Medical Research - Vol. 9, No. 3
Publication Date: June, 25, 2022
DOI:10.14738/jbemi.93.12582. Alshahrani, S. S., & Alokaily, A. O. (2022). Development of an IoT-Based Occupancy Control System to Minimize the Spread of Covid- 19 in Closed Environment. British Journal of Healthcare and Medical Research, 9(3). 209-215.
Services for Science and Education – United Kingdom
Development of an IoT-Based Occupancy Control System to
Minimize the Spread of Covid-19 in Closed Environment
Suhail S. Alshahrani
College of Applied Medical Sciences, Department of
Biomedical Technology, King Saud University, Riyadh, Saudi Arabia
Ahmad O. Alokaily
College of Applied Medical Sciences, Department of
Biomedical Technology, King Saud University, Riyadh, Saudi Arabia
ABSTRACT
Due to the recent COVID-19 pandemic, there has been a continued need to control
and monitor closed environment areas. Advances in technology and the Internet of
Things (IoT) applications could play an important role in facilitating and
automating the imposed regulations to limit the spread of airborne infections such
as COVID-19. In this paper, a cost-effective automated IoT-based occupancy system
to monitor and control visitor traffic in closed areas is proposed. The system was
built based on commercially available microcontrollers instructing visitors to
follow COVID-19 spread prevention measures. Prototype testing and validation
show the system was able to provide real-time occupancy information and prevent
entry to visitors with a fever. The system has the potential to be used in most critical
areas where visitor numbers should be limited and controlled.
Keywords: Covid-19, Internet of Things (IoT), Bidirectional, Occupancy.
INTRODUCTION
Since its initial recognition in December of 2019, the coronavirus disease (COVID-19) caused
by the severe acute respiratory syndrome coronavirus 2 (SARS-CoV-2) and its variants have
severely threatened global health and the economy [1-2]. The number of reported infections
exceeded 530 million by mid-2022, leading to more than 6.3 million deaths since the pandemic
was declared [3]. In response, authorities worldwide have implemented rules and regulations
to limit the transmission of COVID-19 and minimize its impact [4]. Monitoring close contact and
crowds have been one of the key protocols during the epidemic, especially in enclosed
environments such as colleges, hospitals, and shopping centers [5]. For instance, the ministry
of health (MOH) in Saudi Arabia applied several rules for entering a gathering place, such as
measuring body temperature, hand sanitizing, wearing a face mask, periodically disinfecting
common surfaces, and complying with maximum occupancy regulations. However, compliance
with these policies is often governed by humans, which may be inadequate.
Thus, technology plays an essential and influential role in monitoring and reducing the risk of
COVID-19. As a result, numerous technologies were proposed, developed, or implemented to
help combat the spread of COVID-19 [6]. For instance, Longo et al. presented a modular system
prototype that uses cameras and temperature sensors to monitor the occupancy of closed and
Page 2 of 7
210
British Journal of Healthcare and Medical Research (BJHMR) Vol 9, Issue 3, June - 2022
Services for Science and Education – United Kingdom
open areas and collect environmental data that could help analyze traffic in some high-traffic
regions [7]. In addition, more comprehensive system was proposed by Khayyat and Munshi to
monitor and control entry to public places [8]. Their approach considers the control of different
aspects, such as the measurement of body temperature, an automatic gate that only allows
people with normal body temperatures to enter the premises, a warning sensor for maintaining
social distancing, and a synchronized cloud-based database with official authorities.
Nevertheless, most proposed technological solutions are either theoretical or too complex to
implement.
This study aims to build a fully automated occupancy control and monitoring system that is
cost-effective and easy to use and maintain. The proposed system controls traffic in the most
critical, highly visited areas, such as colleges, hospitals, and commercial centers. In addition,
this system would help automate common regulations for entry into public spaces such as
monitoring body temperature and sanitizing hands. Moreover, it provides remote monitoring
of real-time information on occupancy and daily visitors. The presented prototype could have
other medical applications, such as monitoring visitors to an isolation room to prevent possible
infection in patients with low immunity.
METHODS
The block diagram of the smart monitoring system is shown in Fig.1. The system generally
consists of hardware components run by an appropriate software program. In the design
system, software and hardware must be used to operate and analyze the acquired data.
Fig.1: Block diagram of the occupancy control system
Hardware
The proposed system contains the following main components:
o Microcontrollers: Two low-cost microcontrollers (Arduino MKR1000 and Arduino UNO)
were used to control and regulate the occupancy monitoring system. A unidirectional
Page 3 of 7
211
Alshahrani, S. S., & Alokaily, A. O. (2022). Development of an IoT-Based Occupancy Control System to Minimize the Spread of Covid-19 in Closed
Environment. British Journal of Healthcare and Medical Research, 9(3). 209-215.
URL: http://dx.doi.org/10.14738/jbemi.93.12582
master/slave communication approach was adopted to facilitate the information flow
between the two microcontrollers.
o High-accuracy (± 0.2-degrees) contactless body temperature thermometer (Al Infrared
Thermometer): The contactless thermometer was modified to send a confirming signal
to the slave microcontroller so that the signal represents either a normal or high
temperature of the visitor.
o Infrared (IR)-activated contactless hand sanitizer dispenser.
o Three IR proximity sensors (SKU-7748) to detect the presence of entering (IR-in) or
exiting (IR-out) individuals at the gate within 30 cm range. Also, the third sensor was
placed in the contactless hand sanitizer to give feedback when the visitor sanitizes their
hands.
o Two liquid crystal displays (LCDs) that help to show the entering instructions to visitors
and show occupancy information.
o Actuator: A 180° digital servo motor with 20 KG torque (DS-3218 PRO) was used to open
and close the arm barrier at the gate.
o Power Supply: Provides the needed power to electrical components and actuators.
o Light emitting diodes (LEDs): Red, yellow, and green LEDs that illuminate in different
conditions.
Internet of Things (IoT)
ThingSpeakTM, the internet of things (IoT) analytics platform, was selected for this project as
it provides a simple user experience. Hence, a private channel was created to receive, retrieve,
and display real-time information on room occupancy and the number of rejected individuals
due to high body temperature. The channel feeds were set to be updated every 15 seconds.
Software architecture
The flowchart of the proposed system is shown in Fig.2. The system consists of two modules
configured in a master and slave approach. The master module controls and monitors the
occupancy at the closed area's gate. In addition, this circuit uploads the required data to the
cloud using the IoT-enabled microcontroller (Arduino MKR1000). Further, the slave module is
responsible for writing visitor instructions, measuring body temperature, and performing hand
sanitization. When the system starts, the main gate will be closed, and the visitor will be asked
automatically to measure their body temperature by placing a hand in front of the contactless
thermometer. If the visitor's body temperature is above the normal level (≥38°C), the visitor
will be warned by a message on the LCD display and will not be allowed to enter. In addition,
the event will be uploaded to the cloud to count the number of rejected cases. Alternatively, if
the body temperature is normal then the visitor will be asked to sanitize both hands and will
be reminded to wear a face mask before the bidirectional gate opens. The system will stop
allowing visitors to enter if the number of visitors reaches the maximum number of visitors
(MNV), representing the maximum occupancy of the closed place. However, the system will
allow entry again when one visitor leaves the closed place and the number of visitors inside
drops below the MNV.
System evaluation
Three different experiments were performed to evaluate the proposed IoT-based occupancy
monitoring system. First, the system was installed at the gate of a lecture hall with a maximum
capacity of 25 individuals during a scheduled class. Arriving students were instructed to follow