1 Introduction

Coronavirus (SARS-CoV-2) is one of the deadliest viruses in the twenty-first century [1,2,3]. It shook the world from December 2019 to today, and millions of people worldwide suffered. Many people died and were affected mentally and physically due to virus symptoms, and the rate of mutations continues to increase, making the virus resistant to vaccinations [4,5,6]. The newly mutated virus, such as Delta and Omicron spread faster than the parental virus strain. Due to these new strains, the efficiency of vaccines has decreased dramatically [8]. So, we still have to wait for improved vaccines and maintain preventive measures to avoid spreading and eventually stopping the COVID-19 virus. As people do not follow these rules and regulations, many countries are already relieved of their lockdown and rapid regional mutation of the virus, the only way to avoid spreading the coronavirus is to maintain personal hygiene and wash hands regularly [9, 10]. Studies [11, 12] show that washing hands using soap and alcohol-based sanitizer is one of the effective ways to kill the COVID-19 virus on our hands. This model proposes a contactless sanitizer dispenser with a temperature monitoring system, Dispensing and monitoring sanitizer consumption, and an alert system for individuals suffering from an infection. In addition, it is simple and easier to implement at a public facility or transportation hub by interfacing it with an electronic door at the major passageways instead of manual sanitation. Thus, symptomatic users can be identified and quarantined safely by alerting authorities. The data collected from this IoT-based dispenser can be accessed through the ThinkSpeak platform, and passive carriers (vectors) of the virus are sanitized automatically by the dispenser.

2 Literature survey

COVID-19 spreads rapidly from a single city to the entire country in 30 days and the sheer speed of geographical expansion and the sudden rise in cases urge the importance of hand sanitizer usage to avoid spreading the coronavirus [4]. As a practical solution, Lee et al. [11] proposed a universal automatic sanitizer using various containers and it uses IR (Infrared) based hand detection. Nokerov et al. [26] also uses the same mode of hand detection. Whereas Das et al. [25] use LDR (light-dependent resistor) sensors for detecting hands. The drawback of the usage of IR and LDR is unreliable as it falls in the line of sight compared to the ultrasonic sensor and can be prone to false detection due to interference of light in the outdoors. Further, the other drawbacks of the proposed system [11] are the presence of a fixed capacity of sanitizer fluid, frequent replacement of sanitizer containers, and the inability to predict the amount of sanitizer remaining in the container. Sarkar and Abhinandan [12] proposed a system using ultrasonic and temperature sensors for dispensing and analyzing the temperature of persons. However, the drawback of the system is that the temperature sensor is not contactless, which can be a carrier of deadly viruses. Still, it had an LCD (Liquid crystal display) status display and an integrated sanitizer tank with a submersible pump to dispense the sanitizer. The authors [3,4,5,6,7,8,9,10,11,12,13,14,15, 25,26,27,28] proposed an integrated sanitizer tank with the added feature of a sanitizer level indicator, but it lacks an LCD to show the status of the sanitizer. The drawbacks of the previous works [5,6,7, 16,17,18,19,20] between 2020 and 2021 were the lack of remote real-time monitoring of the availability of the sanitizer and the statistical report on the frequent use of the sanitizer. Sathwara et al. [30] improved the above works by including the integrated LCD status display but failed to mitigate the problem of allowing symptomatic accessing the automatic dispenser. Duth et al. [24] proposed an IoT-based automated sanitizer dispenser with data acquisition that can be interfaced with a door but the author neglected to use contactless temperature sensors, instead using LM35 sensors, which is the contact temperature sensor. Using a contact temperature sensor, results in the spread of viruses, despite the fact that the prototype is nothing more than a simulation in Proteus. Okafor et al. [31] proposed a sanitizer dispenser using Raspberry Pi with integrated face mask detection. Unfortunately, [31] did not include IoT-based data logging, alert notifications, and provision for integrating doors. The work by Vardhan et al. [27] approached the solution to the problem similar to the proposed model by implementing a cost-effective automated sanitizer dispenser with level monitoring but [27] does not consider IoT-based data logging and alert systems to survey and alert symptomatic persons. Kurhe et al. [29] work has made a significant improvement to the automated dispenser by proposing IoT based data dogging feature along with an automated sanitizer dispenser. Unfortunately, [29] did not take into consideration of post data processing of collected data and the inclusion of an integrated door. In this proposed system, IoT-based real-time tracking on the sanitizer level and its usage report and temperature of the persons is updated to the organization/authority. From the statistics report, it is possible to check the person's temperature and decide on quarantine to prevent further virus spread. Also, the sanitizer's level indicates the sanitizer's usage and will help refill the dispenser. Table 1 presents the comparative analysis concerning the sensors, status display, data logging, data interpretation, alert notifications, and costs.

Table 1 Comparison Analysis of previous research works

3 Idea of the proposed model

The proposed automated sanitizer system uses the microcontroller ESP-32 (Espressif Systems-32), which offers higher performance and lower power consumption than Arduino-based microcontrollers. The proposed model does all the normal automated sanitizer functions, such as automatically dispensing sanitizer by checking the user's body temperature. Along with that, it has an integrated storage tank, which stores all types of liquid sanitizer. Also, this dispenser comes equipped with a convenient refilling bay and a sanitizer level monitor that enables quicker and easier refills. As an additional feature, it can provide the current working status of the sanitizer operation, COVID-19 contact tracing, temperature, and sanitizer consumption on an integrated display. IoT plays a significant role apart from the automated sanitizer, which records daily captured data entries and updates it to the ThingSpeak cloud. From the ThingSpeak cloud, the building or transportation system administrator can get the analysis once every 30 min. This way, the administrator can understand the sanitizer's daily or monthly usage trends. Figure 1 shows the block diagram of the proposed automatic sanitizer dispenser. The system is classified into three subsystems: cloud block, input block, and output block.

Fig. 1
figure 1

Block diagram of the proposed automatic sanitizer

Cloud subsystems take care of getting live COVID-19 tracking details to the automated sanitizer's integrated LCD display and sending the real-time temperature monitoring and sanitizer consumption to the ThinkSpeak and IFTTT(If This Then That) cloud. The dotted lines in the cloud subsystem block represent the wireless transmission of data.

The input block consists of contactless hand detection, temperature detection, and sanitizer level detection sensors connected to ESP-32. It detects the user's hands and body temperature and calculates sanitizer consumption. Every information acquired by the input block is sent to the cloud wirelessly through Wi-Fi.

The output block comprises an integrated LCD display showing live monitoring of COVID-19 tracking details, which acquires data from the ArcGIS (Aeronautical Reconnaissance Coverage Geographic Information System) server through ESP-32 microcontroller and dispenser running status, submersible sanitizer pump for dispensing sanitizer from the integrated tank and electronic door actuator for opening and closing after the dispenser's operation. The solid line connection represents wired connections between the sub-blocks in the output block.

The prevailing research works [25, 26, 28,29,30,31] only focus on dispensing the sanitizer and permitting the infected persons to walk into the disinfected zone. This situation leads to a very high threat of spreading the virus from infected people. Washing an infected person's hands with COVID-19 symptoms using sanitizer does not prevent them from spreading the epidemic to non-infected persons, as they are the virus carrier and spread the virus through coughing and sneezing [4, 32]. Therefore, to overcome this situation, the proposed model has implemented an integrated electronic door along with an automated sanitizer, allowing the person who has used the sanitizer to pass a temperature check inside the particular building or transportation. This model also alerts the building administrator and guards by mobile notifications to prevent the movement of sick persons with fever to avoid spreading the virus in a particular building. Therefore, as a viable solution, the proposed prototype keeps track of people entering public buildings, campuses, and transportation from containment zones.

4 Methodology

4.1 Working model and hardware implementation

4.1.1 Working of the sanitizer dispenser

The primary function of the proposed automatic sanitizer starts when it detects the user's hand with an ultrasonic sensor. Initially, the temperature sensor checks the body temperature of the person. If a person's temperature is less than 99.4 °F (Fahrenheit), the controller pumps the sanitizer into the user's hand and issues control to the electronic door to open. 99.5° Fahrenheit and above is considered the threshold for fever [33], as one of the COVID-19 symptoms. So, temperature below 99.4 °F is selected as the threshold for this dispenser. The controller will pump the sanitizer into the user's hand, and the electronic door will open automatically. The door closes once the person enters the building. However, suppose the person's body temperature is more than 99.4 °F the dispenser alerts nearby guards and administrators to quarantine the person in a containment zone and to prevent further spread of the coronavirus epidemic. The automated door would not open for people who fail the temperature check in the public passageway.

A 16 × 2 LCD module displays the status of COVID-19 person tracking, sanitizer usage, general protocols to be followed, time and date whenever no person enters the building or any interruptions to the prototype. As soon as the system is interrupted, i.e., when this system detects the hand of the user, it exits the primary status loop. It enters into the sanitizer operation mode, showing the user's temperature, sanitizer pumping operations, and electronic door operations, respectively. Once the sanitizer operation is completed, it returns to the primary loop and remains in the loop until the next interruption. Figure 2 illustrates the operation of the sanitizer dispenser, and Fig. 3 shows the person's temperature and displays the same information on an integrated LCD display.

Fig. 2
figure 2

Flow chart for the functioning of the sanitizer dispenser

Fig. 3
figure 3

The temperature of a person is displayed on an LCD module

4.1.2 ThinkSpeak server – COVID-19 and dispenser statistics

A general precautionary measure to prevent the COVID-19 virus is displayed as soon as the automatic sanitizer dispenser is turned on, including frequently washing hands and wearing masks. The integrated display also provides information regarding live deaths and confirmed cases of the general population in a particular geographical location through ArcGIS to promote preventive measures to avoid COVID-19. Whenever the dispenser is interrupted by a user, the dispenser updates the person's temperature to the ThinkSpeak Server. If the person's temperature passes the temperature check (if the user's body temperature is less than 99.40°F), the proposed module dispenses the sanitizer, and the electronic door opens automatically, allowing the person to enter the public building/transport. The sanitizer consumption is also uploaded to the cloud every time after its usage. However, if a person does not pass the temperature check ( if the user's body temperature is more than 99.40 °F), the automated sanitizer updates the temperature on the ThinkSpeak server and eventually alerts the administrator. The electronic door remains closed until another person accesses it. Figure 4 illustrates a Flow diagram of the working of the dispenser and COVID-19 statistics updated to the ThingSpeak Cloud.

Fig. 4
figure 4

Flow diagram on the working of the dispenser and COVID -19 statistics updated to the ThingSpeak Cloud

In addition, the proposed module sends a notification alert message to the administration through the IFTTT application. The email alert of usage trends and statistics is received from the ThingSpeak cloud platform. Figure 4 illustrates the complete flow diagram to demonstrate the functioning of the prototype and the COVID-19 statistics updated to the ThingSpeak cloud platform.

Figure 5 illustrates the data analytics of the proposed system on a ThingSpeak cloud platform. The use of automated sanitizer by different people during February and March is represented in Figure 5(a).

Fig. 5
figure 5

ThingSpeak cloud data analytics of the proposed sanitizer in a Sanitizer usage b Temperature recorded temperature, c Sanitizer level, and d Confirmed COVID-19 cases form ArcGIS server in Tamil Nadu

The temperatures of people recorded in Fahrenheit during February and March are illustrated in Figure 5(b). The sanitizer capacity recorded in milliliters (ml) during March is represented in Figure 5(c), and the confirmed cases of COVID-19 recorded during March in Tamil Nadu through the ArcGIS server are represented in Figure 5(d). Finally, the complete status of the proposed sanitizer is received as an email from the ThingSpeak cloud, as depicted in Figure 6. Using the IFTTT Web server, the same information can be accessed through a mobile application. For example, whenever the temperature recorded is reported as excessive, or if the sanitizer level is depleted, it sends an alert message to notify the administrator. Figure 7(a) illustrates an alert message through the IFTTT platform when a person with a high temperature is accessing the sanitizer. Figure 7(b) represents an alert message whenever the sanitizer level is deficient. ThingShow is a visualizer for the ThingSpeak cloud platform for android phones, which shows the data recorded using a sanitizer dispenser, various recorded temperatures, live confirmed and death cases of COVID-19 of the general population of Tamil Nadu through ArcGIS for encouraging preventive measures, as shown in Figure 7(c). The administrator can also get complete statistics on sanitizer usage, the mean temperature recorded, sanitizer utilization, and COVID-19 tracking details from the ThingSpeak cloud platform. The proposed system is an automatic sanitizer and provides a complete COVID-19 statistics report for a building or transportation.

Fig. 6
figure 6

Status email alert from ThingSpeak Cloud

Fig. 7
figure 7

IFTTT Notifications on Mobile app (a). Person with high Temperature accessing the sanitizer (b). When the sanitizer level is low (c). ThingShow app showing data recorded on sanitizer usage, temperature, Confirmed and death cases of COVID-19 (General population data from ArcGIS server)

4.2 Layout and hardware implementation

The hardware implementation of the proposed automated sanitizer is shown in Fig. 8. Figure 8(a) displays the front view, and Fig. 8(b) displays the side view of the proposed prototype. The prototype is internally divided into two sections: top and bottom. The top section has dimensions of 22 cm x 18 cm × 12 cm, and the bottom segment has 18 cm x 18 cm × 19 cm. The top segment of the prototype has internal circuitry such as the ESP-32 microcontroller, 16*2 LCD, Buzzer, LED indicators, ultrasonic sensor, and IR temperature sensor.

Fig. 8
figure 8

Hardware implementation of the proposed system a front view and b side view

In contrast, the bottom segment consists of the integrated sanitizer tank and DC (Direct current) submersible pump connected to the rubber tubes to dispense sanitizer at the top front portion. The 16*2 LCD is placed at the front to display the current status of the sanitizer to the user. This automated sanitizer has a sanitizer refilling bay at the back for easy refilling into the integrated tank. The power supply circuit is placed at the bottom of the automatic sanitizer, which accepts a rated voltage from 5 to 12 V through a DC adapter. The electronic door is placed on the right side of the automatic sanitizer, where the door opens and closes perpendicularly to ease the person's entry into the building or transportation. Figure 9 shows the internal segments of the prototype, and Fig. 9(a) shows the top segment with the ESP-32 controller, which receives the input of the different sensors such as an ultrasonic sensor and a temperature sensor. It also controls the motor driver circuit to drive the DC motor pump. The ultrasonic sensor emits sound waves and receives an echo signal whenever a hand is detected. The IR-based temperature sensor is a contactless sensor that measures a person's temperature, which is proportional to the infrared energy emitted by the person. The ESP-32 controller controls the motor driver to drive the DC motor pump for dispensing the sanitizer. The bottom segment consists of a sanitizer tank and a submergible DC motor pump connected with rubber tubes, as shown in Fig. 9(b). The DC pump dispenses the sanitizer whenever the controller triggers the motor driver.

Fig. 9
figure 9

Internal segments of the automated sanitizer a top segment and b bottom segment

5 Results and discussion

In this section, the working of the proposed sanitizer is explained with its results. The proposed automated sanitizer works in three different modes. The three different modes are:

  1. A)

    Normal operation.

  2. B)

    When a person with high body temperature tries to access.

  3. C)

    When the sanitizer level is low.

The three modes are discussed briefly in the following sections.

5.1 Normal operation

If a person with an average body temperature is accessing the automated sanitizer, the automated sanitizer checks the person's body temperature. If the temperature is below body temperature (99.40 °F), the ESP-32 microcontroller displays the temperature on the LCD and drives the DC motor to pump the sanitizing liquid. Then the servomotor opens the electronic door for the person to enter the building. Once the person enters, the ESP-32 controller automatically drives the servo motor to close the electronic door. The entire flow diagram for regular operation with minimum temperature is shown in Fig. 10. The details of the entered person are updated in the ThingSpeak cloud for further analysis by the administrator. In this way, it only allows access to the asymptomatic people entering the passageway. It is more effective than manual sanitation by reducing the probability of virus transmission. Additionally, it's also safer than automatic sanitation without any secure access feature such as temperature detection and a guaranteed solution to contain symptomatic people by means of interfacing dispenser with electronic door.

Fig. 10
figure 10

Flow diagram for normal operation of sanitizer

5.2 When a person with high body temperature tries to access

In the second case, when a person with a high temperature tries to access the automatic sanitizer, the automated sanitizer checks the person's body temperature.

If the temperature exceeds the user's average body temperature (if the temperature is more than 99.40 °F, a threshold for viral fever [24]), the microcontroller displays the temperature on the LCD, maintains the door closed, and prevents the user from entering the building. The controller then updates the temperature to the ThingSpeak cloud. Then, the building administrator receives an email alert and notification via the IFTTT application from the IFTTT Web server. The steps followed are given as a flow diagram in Fig. 11. The proposed solution is far more effective than previous works [25, 26, 28,29,30,31] in containing symptomatic people by alerting authorities, and reduces viral transmission inside the passageway by dispensing sanitizer. Additionally, the dispenser can be used to administer quarantine procedures from the passageway's entrance. This is due to the integration of an electronic door that operates autonomously, without requiring human intervention.

Fig. 11
figure 11

Flow diagram for the condition: When a person with a high body temperature is accessing the automatic sanitizer

5.3 When the sanitizer level is low

Usually, the level of the sanitizer is continuously monitored after every use. Whenever the sanitizer in the integrated tank is nearly empty, it sends the alert through the ThinkSpeak and IFTTT application to the administrator to refill it. The ESP-32 controller checks for the sanitizer level for every dispenser operation. If the sanitizer's level depletes below the threshold level (400 ml), it sends instant notifications to the building admin to refill the sanitizer tank. If it is not refilled, the automated sanitizer continues to work as the COVID-19 symptom detector until it has been replenished. Whenever a person with a suitable average body temperature enters the building, the automated sanitizer checks the temperature and allows them through the electronic door. The sanitizer level warning is displayed on the LCD as soon as the door is closed. Suppose that a symptomatic person tries to access the dispenser. It simply sends an alert to the building administrator through ThinkSpeak, and the IFTTT application for safer containment of that person, and the electronic door remains closed. It is similar to the previous operation except for dispensing sanitizer. So, this feature is advantageous and novel because it goes on scrutinizing symptomatic people from asymptomatic people. This feature has never been implemented in previous works. The flow diagram is described in steps and is represented in Fig. 12.

Fig. 12
figure 12

Flow diagram for the condition: If the sanitizer level is low in the automatic sanitizer

6 Future scopes and challenges

Although the above-proposed system is cost-effective and practical, fixing it in the hallway requires professionals, and the hallway design needs to be changed for a fixture of this dispenser. Even though the above-proposed model reduces the human factors for detecting temperature and dispensing sanitizer, it needed to be supervised by the guards for quarantining the infected person. The above problem can be alleviated by automatically rerouting symptomatic persons to the quarantine bay by using multiple entrances with the electronic door without the intervention of human factors. Installing a sanitizer dispenser in the hallways is challenging because it dramatically increases the layover time as it allows only one person at a time through the entrance. This problem can be mitigated by adding thermal cameras for detecting body temperature because it dramatically reduces the congestion at the entrance/exit of the passageway, in which congestion itself leads to the spreading of any airborne communicable pathogens. Instead of a single electronic door, multiple doors with sanitizer stations can be implemented to avoid crowding. The data collection can be implemented through a local server rather than a private server for faster analysis and warning if the symptomatic person tries to access the dispenser.

7 Conclusion

The Proposed solution has considered the dangers of spreading the COVID-19 virus in public places and promoting hand hygiene. This system works automatically without the intervention of human monitors on site, which is advantageous for preventing vector-borne transmission of COVID-19 through manual human sanitizing methods and facilitates the entry and exit of the passageways of public places and transport. This system also ensures that the entering person does not have symptoms of COVID-19, reducing the spread of the COVID-19 virus. This solution consistently sends statistics to the Thinkspeak server for alerting and surveying. It gives an analysis to the administrator of the building or transportation, which provides information about the usage of this system. This proposed solution is also very cost-effective because it uses a cheap and efficient microcontroller and reduces the cost of manual dispensing and temperature checks by humans. It can be deployed in mass markets because it is easy to install in public hallways and is compatible with any type of electronic door installed in passageways of any sort of public building and vehicle. This solution follows all the advantages of previously implemented solutions combined and overcomes all the shortcomings of previous work. Finally, this system is only a more straightforward and economically feasible way to prevent the spread of the COVID-19 virus in public places.