Smart Doors For Monitoring Body Temperature And Space Capacity Based On IoT

ABSTRACT


INTRODUCTION
At present, there is a growing focus on advancing innovation in healthcare by utilizing IoT technology.Specifically, this research aims to apply IoT in the clinical setting for specialist welfare.The primary focus of the study is to monitor indoor room temperature and capacity using IoT-based solutions.The system has been developed with a specific emphasis on indoor environments.
Numerous studies have been undertaken to address and prevent the spread of the virus such as automatic door control system based on body temperature [1], body temperature and blood pressure monitoring system [2], monitoring system for body temperature and oxygen saturation [3], body temperature detection system [4], IoT based body temperature detection system [5], monitoring system for body temperature [6].The objective of this study is to build upon and supplement the existing research that has been conducted previously.By doing so, the study aims to add valuable insights and contribute to the knowledge already available in the field.
The study proposes an innovative system based on the "Internet of Things" (IoT) to mitigate the impact of virus spread.This system is designed to detect body temperature and monitor room capacity.The temperature checking feature utilizes contactless sensors.When the temperature sensor reading surpasses the maximum limit of 37.3 ℃, the door is automatically closed, and an alarm warning is triggered, accompanied by an audio sound conveying the information about the temperature exceeding the limit.Conversely, if the temperature reading is below 37.3℃, the door remains open.In addition to monitoring body temperature, this automated door also serves to minimize crowds by keeping track of the number of visitors present in the room.

METHOD
The system's design is structured into three main blocks: input, process, and output.Each block serves a specific function in the overall functionality of the system.Here's a breakdown of the blocks and their components: 1) Input Block: a) IR Sensor: Used to detect infrared radiation, often utilized for proximity sensing.b) MLX90614: A temperature sensor capable of measuring infrared radiation to determine the temperature of an object.c) HCSR04: An ultrasonic distance sensor, utilized to measure the distance between the sensor and an object.2) Process Block: Wemos D1: An IoT development board that processes the data obtained from the input sensors and controls the system's actions accordingly.3) Output Block: a) Buzzer: An audio output device that emits a sound or alarm, used in this system to provide warnings or alerts.b) OLED: A display screen (organic light-emitting diode) that presents visual information, possibly used to show temperature or occupancy details. c) Door Lock Solenoid: An electromechanical device that controls the locking and unlocking of the door.d) Telegram Notification: The system can send notifications via the Telegram messaging application, providing real-time updates and alerts.Overall, this system's architecture enables it to take inputs from the IR sensor, temperature sensor, and distance sensor, process the data using the Wemos D1, and trigger appropriate outputs, such as the buzzer, OLED display, and door lock solenoid.Additionally, it has the capability to send notifications through Telegram, ensuring that relevant information is relayed to users or administrators in a timely manner.

Figure 1. System block diagram
The working system of the device is described in the flowchart of figure 2. The workflow of the IoT-based automatic door system is described as follows: 1) Power On: The system is powered on using an adapter, initiating its operation.
2) OLED Display: The OLED display shows the current count of visitors.At this stage, the red LED is turned on, indicating that the door is closed, and the green LED is off, indicating that the door is not yet open.3) Proximity Detection: The system's proximity sensor continuously monitors for human body objects, such as hands or foreheads, near the door.
4) Temperature Reading: When a human body object is detected within a distance of less than 10 cm, the mlx90614 temperature sensor reads the body temperature of the person.5) Temperature Check: If the temperature reading obtained by the mlx90614 sensor is below 37 °C and the number of visitors inside the room is less than the specified limit (e.g., 10 people), the system proceeds to open the solenoid door lock.

RESULTS AND DISCUSSIONS 3.1 Infrared sensor test results
In this scenario, the infrared sensor is being tested to evaluate its performance in detecting objects.The testing process involves the following steps: 1) Supply Connection: The infrared (IR) sensor requires a 5V power supply, which is provided by the ESP8266 (Wemos D1) development board.2) Pin Connection: The output pin of the infrared sensor is connected to the D7 pin on the Wemos D1 board.3) Object Detection Testing: The IR sensor is then tested for its ability to detect objects within its range.When an object is detected by the infrared sensor, it triggers an event.4) Counter Program: Once the infrared sensor detects an object, a counter program is activated to start counting the number of objects detected.This program likely runs on the ESP8266 board, which processes the input from the IR sensor and increments the count accordingly.5) Data Collection: The counter program keeps track of the number of objects detected over a period of time or in a specific scenario.This data can be used for further analysis or monitoring purposes.
Figure 3. Infrared sensor connection system Overall, the setup involves using the IR sensor to detect objects, and when detection occurs, the ESP8266based system responds by counting the detected objects.This type of system can have various applications, such as people counting in a room, tracking the movement of objects, or monitoring the flow of individuals through a specific area.
The results of the Infrared Sensor test indicate that the sensor is functioning correctly and capable of detecting objects.The sensor operates on a binary logic output, where specific voltage levels represent different states: 1) When No Object is Detected: • The Infrared sensor output is HIGH or at 5V logic level.
• This state signifies that the sensor is not detecting any objects within its range.2) When an Object is Detected: • The Infrared sensor output becomes LOW or at 0V logic level.
• This state indicates that the sensor has detected an object within its detection range.Table 1.infrared sensor test results Object Logic Voltage (V) Not detected HIGH 5 Detected LOW 0

Ultrasonic sensor test results
In this testing scenario, ultrasonic sensors are being evaluated to determine their maximum and minimum distance detection capabilities.The testing process involves the following steps: 1) Supply Connection: The ultrasonic sensor requires a 3.3V power supply, which is provided by the Wemos board.
2) Distance Testing: The ultrasonic sensor is tested to determine its maximum and minimum distance detection range.The sensor emits ultrasonic waves and measures the time it takes for the waves to bounce back after hitting an object.Based on the time taken, the sensor calculates the distance between itself and the object.
Figure 4. Ultrasonic sensor connection system The distance sensor plays a crucial role in determining the presence of an object.Specifically, when an object is detected at a distance below 10 cm, the MLX90614 temperature sensor is then utilized to read the object's temperature.During testing, the focus is on evaluating the accuracy of measurements within this distance range.Based on the testing results, it is evident that the proximity sensor exhibits excellent accuracy, with a discrepancy of only 1 cm from the actual measurement.This level of accuracy is impressive and ensures that the system can reliably detect objects within the specified distance threshold.The precise detection capabilities of the proximity sensor contribute to the overall effectiveness of the setup, enabling accurate temperature readings from objects that are positioned close to the sensor.The combination of the distance sensor and the MLX90614 temperature sensor, along with the high accuracy of the proximity sensor, ensures that the system performs efficiently in determining object presence and measuring their temperatures when they are within the desired proximity range.This accurate and reliable data can be essential for various applications, including monitoring, safety, and automation systems.

Door Lock Solenoid Testing
To test the solenoid door lock components with the Wemos board, describe the steps below: 1. Components Needed: 1) Wemos board (e.g., Wemos D1).
3) 12V adapter/power supply.4) Connecting wires.5) Breadboard 2. Test Setup: 1) Connect the 12V adapter to power the solenoid door lock.Make sure the adapter's output voltage is 12V and that it can supply sufficient current to drive the solenoid.2) Connect the positive terminal (+) of the 12V adapter to one of the solenoid's power supply pins.
3) Connect the other power supply pin of the solenoid to the Wemos GND (ground) pin.4) Connect the control pin (e.g., D8) of the Wemos board to the solenoid's input pin.This pin will be used to control the solenoid's operation.5) Ensure that the Wemos board and solenoid are properly connected, and there are no loose connections or short circuits.
3. Test Procedure: 1) Upload the necessary code to the Wemos board.The code will control the solenoid based on the temperature readings from the MLX90614 sensor.It should activate the solenoid when the temperature is below 37 degrees Celsius.2) Power on the system by connecting the 12V adapter.
3) Observe the behavior of the solenoid door lock.It should remain locked when the temperature is above or equal to 37 degrees Celsius and unlock when the temperature is below 37 degrees Celsius.4) Monitor the temperature readings from the MLX90614 sensor to ensure the correct functionality of the temperature-based control.5) Test the system multiple times to ensure consistency and reliability.When the trigger condition is low, the solenoid locks the door for 2 seconds.This means that when the system a specific input (likely related to the temperature sensor reading or another signal), and the trigger condition is low, the solenoid activates and keeps the door locked for 2 seconds.

2) Trigger Condition High (Logic HIGH or 5V):
When the trigger condition is high, the solenoid opens the door for 2 seconds.This implies that when the system receives a different input (e.g., the temperature is below the specified threshold or another signal is received), and the trigger condition is high, the solenoid responds by unlocking the door for 2 seconds.In summary, the program successfully controls the solenoid door lock based on the trigger conditions.When the trigger condition is low, the door remains locked for 2 seconds, and when the trigger condition is high, the door opens for 2 seconds.This functionality allows for secure access control, where the door opens only under specific conditions, such as when the temperature is below the specified threshold or another predefined event occurs.The 2-second delay in locking or unlocking the door may be intended to ensure smooth operation and avoid rapid changes in the door state.

MLX90614 sensor testing
MLX96014 as a temperature sensor with infrared to detect the temperature of human objects.MLX96014 works with a voltage of 3.3 V from eso8266 and is connected to the SDA and SCL pins on Wemos.The following is a series of Wemos and MLX96014:  Based on the information from Table 3, the temperature sensor testing results show that measurements were obtained within the range of 36.20 to 37.00 degrees Celsius.These temperature readings were taken when the distance between the temperature sensor and the object was below 10 cm.Additionally, the average error between the temperature sensor readings and the thermometer readings is reported to be 1.33%.This average error value indicates the level of variation or discrepancy between the temperature values obtained from the temperature sensor and the more accurate thermometer readings.
With an average error of 1.33%, the temperature sensor demonstrates a relatively high level of accuracy in measuring temperatures.A low average error indicates that the temperature sensor's readings are close to the actual temperature values recorded by the thermometer.This level of accuracy makes the temperature sensor suitable for various applications where precise temperature measurements are required, such as in monitoring body temperature or environmental conditions.Based on the information from the testing results: 1) Ultrasonic Sensor Testing: The aim of the ultrasonic sensor testing is to determine the distance between the sensor and the target object.The error between the sensor's measurement and the actual measurement is reported to be 1 cm.This indicates that the ultrasonic sensor readings are quite accurate, with a small margin of error in measuring distances.

Overall device testing
2) Temperature Sensor Testing: The temperature sensor testing involves comparing the temperature readings obtained from the sensor with measurements taken using a thermometer gun.The reported error in percent is 1.33%.This level of error is relatively low, indicating that the temperature sensor provides accurate temperature readings with a small deviation from the actual values.
3) Telegram Notification Delay: The delay in Telegram notifications when the device detects an event and sends a message to the user is between 4 to 5 seconds.This indicates the time it takes for the system to process the event, generate the notification, and deliver it to the user through the Telegram messaging service.
4) Table 5 -Object Presence Detection: Table 5 shows the results of testing the device's ability to detect incoming and outgoing objects.When the infrared sensor detects an object going out, it reduces the number of visitors by 1 person.On the other hand, when the infrared sensor detects an incoming object at a distance of less than 10 cm, with a temperature below 37 degrees Celsius, and the total number of visitors is less than 10, it adds 1 visitor to the count.The visitors value represents the total number of people remaining in the area after considering both incoming and outgoing visitors.

CONCLUSION
Based on the measurement results and conclusions: 1. Object Temperature Detection: 1) The tool is capable of detecting the temperature of objects when the distance between the object and the sensor is less than 10 cm. 2) The temperature readings obtained during testing range from 36.10 to 37.00 degrees Celsius, indicating accurate temperature measurements within this range.

Visitor Counting and Control:
The system effectively counts visitors based on certain conditions: 1) When the temperature reading is below 37 degrees Celsius and the number of remaining visitors is less than or equal to 10, the visitor count increases by +1. 2) However, if the number of visitors exceeds 10, the system will not add any additional visitors, and the solenoid will close, preventing further entries.3) Additionally, if the Infrared sensor detects a person leaving (outgoing object), the visitor count will decrease by -1.

Sensor Testing Results:
1) The ultrasonic sensor testing yielded an error of 1 cm in distance measurements between the sensor and the object.This indicates accurate distance measurements with a small margin of error.
2) The temperature sensor testing resulted in an error of 1.33% when compared to a thermometer gun.This level of error is relatively low, demonstrating accurate temperature readings from the sensor.
3) The Telegram notification delay was observed to be between 4 to 5 seconds when the device detected an event and sent a notification to the user.This delay is reasonable for real-time notifications.4)

6 )
Open Door Scenario: a) OLED Update: The OLED display is updated to show the new count of visitors, including the person who just entered, and the temperature value of the recently detected person.b) LED Status: The green LED is turned on to indicate that the door is now open, and the red LED is turned off to show that the door is no longer closed.c) High Temperature and Overcrowding Scenario: If the temperature reading obtained by the mlx90614 sensor exceeds 37 °C or the number of visitors inside the room has reached the stipulated limit, the solenoid door lock will remain closed.7) Closed Door Scenario: a) LED Status: The red LED remains on, indicating that the door is still closed, while the green LED remains off, indicating that the door is not open.b) In/Out Counting: Two IR sensors are utilized to keep track of the number of visitorsentering and leaving the room, thus maintaining an accurate count of the visitors present.c) The system's workflow ensures that the door remains closed when there is a risk of high body temperature or overcrowding, while allowing entry when conditions are safe.The OLED display and LEDs provide real-time information about the number of visitors, temperature values, and the door's status, enhancing the overall monitoring and safety capabilities of the automatic door system.

Figure 5 .
Figure 5. Solenoid door lock connection system The test results of the program indicate that the solenoid door lock functions as intended based on the trigger condition.The behavior of the solenoid can be summarized as follows: 1) Trigger Condition Low (Logic LOW or 0V):When the trigger condition is low, the solenoid locks the door for 2 seconds.This means that when the system a specific input (likely related to the temperature sensor reading or another signal), and the trigger condition is low, the solenoid activates and keeps the door locked for 2 seconds.2) Trigger Condition High (Logic HIGH or 5V):When the trigger condition is high, the solenoid opens the door for 2 seconds.This implies that when the system receives a different input (e.g., the temperature is below the specified threshold or another signal is received), and the trigger condition is high, the solenoid responds by unlocking the door for 2 seconds.In summary, the program successfully controls the solenoid door lock based on the trigger conditions.When the trigger condition is low, the door remains locked for 2 seconds, and when the trigger condition is high, the door opens for 2 seconds.This functionality allows for secure access control, where the door opens only under specific conditions, such as when the temperature is below the specified threshold or another predefined event occurs.The 2-second delay in locking or unlocking the door may be intended to ensure smooth operation and avoid rapid changes in the door state.

Table 2 .
Ultrasonic Sensor Test Results