Design and Implementation of Non-Contact Infrared Thermometer based MLX90614 and Ultrasonic Sensors

: Measurement of body temperature is essential to know the condition of the individual’s body. Temperature measurements need to be carried out without contact between individuals and devices or individuals with other individuals to prevent the transmission of Covid-19. In this study, a non-contact thermometer has been designed using an MLX90614 sensor to measure body temperature, and an HC-SR04 ultrasonic sensor to detect objects at 5-30 cm. The sensor reading results will be displayed via the TFT LCD in real-time. If the detected object temperature exceeds 37.5 o C, the buzzer will sound, and the LED will light up. The constructed thermometer is supplied by 12 V DC adapter to provide 5 V output to the microcontroller. Proximity sensor, temperature sensor, and TFT LCD work on 5 V DC voltage. A Resistor and a transistor were needed to turn on the LED and 12 V high decibel buzzer. This instrument has been tested and compared with a commercial thermometer AD801 model for measuring palms and forehead. Based on our study, the difference in palm and forehead temperature readings between the two thermometers in two individuals ranges from 0 to 0.2 o C. This reading error was still within the tolerance of the reading error listed on the MLX90614 sensor datasheet, which is ± 0.3 o C.


I. INTRODUCTION
Temperature measurements need to be carried out without contact between individuals and devices or individuals with other individuals to prevent the transmission of Covid-19. In general, body temperature measurement was conducted using a mercury thermometer [1]. However, there is a contact between the device and the individual in its uses, thus allowing the transmission of Covid-19. In addition, the device takes two to five minutes to find out the body temperature value, so a new device is needed to get the body temperature value in a shorter time without reducing the accuracy of the device.
Thermoguns, which are often used today, have become the solution to mercury thermometers. However, this device still uses human assistance, allowing for contact between individuals and other individuals. Therefore, a non-contact thermometer is required. This thermometer can be designed by employing MLX90614 and HC-SR04 ultrasonic sensors with Arduino microcontroller. The application of the MLX90614 sensor as a temperature sensor has been widely used. The main application is to measure body temperature [2,3] or/and the temperature of objects [4][5][6].
The MLX90614 sensor is an infrared sensor that is used to measure temperature without contact with objects. When this sensor connects to a microcontroller, the sensor will convert the ambient temperature into a digital value [7]. This sensor consists of two chips, the infrared thermopile detector MLX81101 and signal conditioning ASSP MLX90302. This sensor has a stable response to DC radiation, is not very sensitive to variations in ambient temperature, captures a wide infrared spectrum, and does not require a voltage or current source [8]. The MLX90614 sensor is supported by a low noise amplifier, 17-bit ADC, DSP unit, and a thermometer that has high accuracy and resolution. This sensor is calibrated with the digital output of PWM and SMBus. As a standard 10-bit PWM, this sensor shows temperature changes measured continuously with an ambient temperature range of -40 to 125 o C and an object temperature range from -70.00 to 382.19 o C with an output resolution of 0.14 o C [9]. The MLX90614 IR sensor has four pins. SCL pin as the serial clock input, PWM/SDA pin as data in/out, VDD as external supply voltage, and VSS/GND as ground. The MLX90614 sensor can use two alternative voltage sources, 5 or 3 V batteries [10].
The HC-SR04 ultrasonic sensor is a sensor that is used to detect the presence of objects at a certain distance. This sensor works based on the principle of sound wave reflection with a working frequency in the area above the sound wave, which is from 20 kHz to 2 MHz [11]. The ultrasonic sensor has a detection range of 2-450 cm with a resolution of 1 cm [12]. This sensor consists of two parts, transmitter and receiver. If there is a solid object in front of the sensor, the transmitter will emit a beam of ultrasonic signals, and the receiver will receive the reflected ultrasonic signal. The receiver will read the pulse width (PWM) reflected by the object and the difference in transmitting time [13]. The ultrasonic sensor has four pins, the VCC pin as the voltage input pin, the GND pin as grounding, the trigger pin to trigger the sensor output, and the echo pin to capture the reflected signal from objects. This sensor works on 5 V DC voltage [14].
Arduino Mega 2560 is a microcontroller board based on the Atmega2560 which has 54 digital input/output pins (which 15 can be used as PWM outputs), 16 analog inputs, 4 UARTs (hardware serial ports), 16 MHz crystal oscillator, USB connection, a power jack, ICSP adapter and reset button. This microcontroller will receive an analog signal from the connected sensor and convert the analog signal into a digital signal that can be displayed through the output unit. This microcontroller requires an input voltage of 7-12 V [15]. Referring to practical uses of each aforementioned component, we design a noncontact thermometer using MLX90614 and HC-SR04 ultrasonic sensors controlled Arduino microcontroller.

II. METHOD
The methods used in this study is classified into several steps, including component requirements analysis, sensor calibration, device design, and device testing. Calibration is car- ried out on the MLX90614 sensor and ultrasonic sensor. Device design consists of hardware design and software design. Device testing was conducted by comparing the constructed thermometer with a commercial thermometer.

A. MLX90614 and Ultrasonic Sensors Calibration
The MLX90614 sensor calibration is conducted by connecting the Arduino Mega with the MLX90614 sensor. This circuit serves to detect infrared radiation, which has a wavelength of 5.5-14.0 m. The MLX90614 sensor has four pins, Vin, GND, SCL, and SDA, which has sequentially connected to pins 5V, GND, A15, and A14 on the Arduino Mega pin. This circuit is also connected to a PC as an object temperature reader detected by the sensor, as illustrated in Fig. 1(a). Ultrasonic sensor calibration is performed by connecting Arduino Mega with HC-SR04 ultrasonic sensor. This circuit serves to measure the distance of objects detected at a distance of 2-400 cm. The ultrasonic HC-SR04 sensor has four pins, VCC, Trig, Echo, and GND, which has sequentially connected to pins 5V, 3, 2, and GND on the Arduino Mega pin, as shown in Fig. 1(b). This circuit was connected to a PC to see the results of the distance reading of the object detected on the available serial monitor.

B. Hardware Design
The equipment used in designing this thermometer consists of the MLX90614 sensor, the HC-SR04 ultrasonic sensor, and the Arduino Mega microcontroller. This device was also equipped with a TFT LCD, buzzer, LED, and supporting components such as a v2.0 shield, transistor, resistor, jumper cable, and a 12 V adapter. The block diagram of the device system is shown in Fig. 2. The MLX90614 sensor was used to measure the temperature of the object without contact; the ultrasonic sensor detects the presence of the object at a certain distance; the Arduino Mega microcontroller was used as the control unit, the TFT LCD is the output display; while the buzzer and LED are as sound and light indicators.

C. Software Design
The software used in this research is Arduino IDE (Integrated Development Environment). Arduino IDE is a distinctive program for designing or sketching programs on Arduino boards. The implementation of the program on this device can be seen in Fig. 3. The ultrasonic sensor will detect an object. Then the MLX90614 sensor will measure the object temperature at 5-30 cm. If the distance of the detected object is less than 5 cm, then the system will give a message to keep the object away. If the distance of the detected object is more than 30 cm, the system will give a message for the object to come closer. This message is displayed via the TFT LCD. Furthermore, if the object temperature is more than 37.5 o C, the sound indicator (buzzer) will sound, and the indicator light (LED) will light up.

D. Implementation
The implementation was conducted by assembling all the hardware on a breadboard. This circuit consists of three parts, input, process, and output. The input section consists of an HC-SR04 ultrasonic sensor and an MLX90614 sensor, Arduino Mega as a processor, a TFT LCD (equipped with a shield), Buzzer (high decibels), and LED as outputs. Other supporting components such as the resistor connected to the LED works to block the current, while the transistor connected to the buzzer works as a current amplifier. Hardware implementation on the breadboard is shown in Fig. 4(a).
After the hardware design on the breadboard has been successfully connected and the software design on the Arduino IDE has been successfully built, the next step is to test the device to ensure the system can run properly. The design is successful if the ultrasonic sensor can detect the presence of an object at a certain distance, the MLX90614 sensor can measure the temperature of the object, and the reading results can be displayed via the TFT LCD. The next step was to implement the circuit on the Vero board, solder each component, and perform a continuity test to ensure that the soldering worked correctly. Then arranged in a circuit box and placed in a proper position. The constructed is shown in Fig. 4(b).

E. Performance and Evaluation
The constructed thermometer was tested by measuring the temperature of the palms and foreheads at 5-30 cm from the detection terminal. Measurements were taken three times at each distance, then averaged to reduce the possibility of reading errors. A commercial thermometer model AD801 was used as the reference value of the actual temperature to determine the accuracy of the constructed thermometer. The measurement error can be calculated using Eq. 1, where α f is the value of constructed thermometer and α i is the value of the commercial thermometer.

A. MLX90614 Sensor Calibration
The MLX90614 sensor has been calibrated by the factory with the Arduino program contained in the sensor library. This sensor has an object measurement range from -70 to 382.19 o C. The calibration is designed only to see sensor readings with a commercial thermometer. Therefore, calibration is conducted by measuring a person's body temperature at a distance of 15 cm for ten measurements. Table I shows that the difference between the readings of a commercial thermometer and a constructed thermometer is still within the tolerance of the reading error, which is ±0.3  o C. In addition, this sensor is also sensitive to changes because in 10 iterations of the measurement, the readings show differences in measurements. It depends on the infrared radiation captured by the sensor.

B. HC-SR04 Ultrasonic Sensor Calibration
The calibration of the HC-SR04 sensor is carried out using a flat plate as the object detected and a 30 cm ruler as a standard measurement device. This sensor has a range of 2-400 cm. The calibration is designed to measure changes in distance between 5-30 cm. This is adjusted to the measurement   range that will be carried out using a constructed thermometer. From the data in Table II, a graph of the relationship between the sensor and ruler measurement results was obtained, where the sensor readings are the y-axis and the ruler readings are the x-axis (Fig. 5). Based on the graph, an equation is obtained to be embedded in the Arduino program by taking the x value as the result of the calibrated sensor reading, while the y value is the sensor reading value.

C. Constructed Thermometer Testing
The constructed thermometer was supplied by a 12 V DC adapter to provide a 5 V output to the microcontroller. The ultrasonic sensor, infrared sensor, and TFT LCD (connected to the shield) work at 5 V DC voltage. To turn on the LED requires a forward voltage (Forward Bias), so it requires a resistor to limit the current and voltage so as not to damage the LED. Meanwhile, to turn on a high decibel buzzer (12 V) takes a transistor as a current amplifier. The HC-SR04 ultrasonic sensor will detect an object at 5-30 cm. If the object is detected by the sensor, the MLX90614 sensor will measure the temperature of the object. The Arduino Mega microcontroller will process the input data and deliver the output in a digital signal on the TFT LCD screen.
The design and implementation of a non-contact infrared thermometer based on the MLX90614 sensor and ultrasonic sensor were successfully achieved. The test was carried out by comparing the temperature readings between the constructed thermometer and the commercial thermometer model AD801 to check the accuracy of the constructed thermometer. The test was repeated 3 times for the temperature measurement on the palms and foreheads of two differences people at a distance of 5-30 cm. Determination of the optimal distances is defined based on the research that has been conducted previously [16]. The iteration method is used to determine the error value and sensitivity of the sensor in the measurement. The results obtained are shown in Fig. 6 and 7.
Based on the palm and forehead temperature measurements that have been carried out, the constructed thermometer has good sensitivity to environmental changes. It is shown by the change of the reading value measurements. Therefore, there is a measurement error between the constructed thermometer and the commercial thermometer shown in Table III and IV. According to Table I and II, the difference in palm and forehead temperature readings between the two thermometers for two individuals ranged from 0 to 0.2 o C. This reading error is still within the tolerance of the reading error listed on the MLX90614 IR sensor data sheet, which is ±0.3 o C. It happens because at a distance of 5-30 cm, the object is near the sensor, and the area of the object exceeds the spot, so the measurement results have good accuracy. This constructed thermometer was designed using the MLX90614 and HC-SR04 sensors, by using this device, the object only can be detected at a distance of 5-30 cm. If the object is at a distance of less than 5 cm or more than 30 cm, then the object cant be detected. In addition, this device can detect the temperature of the object in less than 5 seconds.

IV. CONCLUSION
The design and implementation of a non-contact infrared thermometer based on the MLX90614 sensor and ultrasonic sensor, which is the focus of this research, was successfully achieved. Constructed thermometer works at 5-30 cm in realtime. If the detected object temperature exceeds 37.5 o C, the buzzer will sound, and the LED will light up. The constructed thermometer has been tested and compared with a commercial thermometer AD801 model. Based on the research, the difference in palm and forehead temperature readings between the two thermometers in two individuals ranges from 0 to 0.2 o C; this reading error is still within the tolerance for reading error stated on the MLX90614 sensor datasheet, which is ±0.3 o C.