The Design of Heart Rate Detector and Body Temperature Measurement Device Using ATMega16

The research discussed health services in the role of diagnostics and life support. The designed system was a system able to provide information on the user's health condition, in this case, a measure of heart rate and body temperature using a heart rate sensor (finger-tip sensor). It took the data from the blood flow on the index finger for 60 seconds, then displayed it on the LCD. The LM35 temperature sensor was used for body temperature data collection. Changes in the sensor heat would be converted into electricity, translated into digital form through a 10-bit ADC, processed by the ATMega 16 microcontroller, and displayed on the LCD. The results showed that the error of each parameter of heart rate and body temperature was <1.702% and <0.55%. Keywords— finger-tip, body temperature, microcontroller


INTRODUCTION
Physical health is measured from the basic parameters of normal values of the body's vital signs, including heart rate and body temperature. The heart is the most important organ in the human body because it is the main organ to circulate blood throughout the body. People usually utilize a stethoscope and thermometer to measure them. In fact, because of the high price but less practical, few people use such devices. Hence, a device that can test the body's state in a practical and portable way is required.
Some researchers have researched on temperature sensors and microcontrollers such as Yilei and Airong who designed a real-time temperature monitoring based on the operating system [1]. The system consisted of a DS18B20 sensor, an nRF24L01 wireless module, and a STM32F103ZET6 microcontroller. Fuady et al studied extreme machine learning and neural network to control the temperature and humidity of oysters based on microcontrollers [2]. The system consisted of a microcontroller and a DHT 11 sensor. Wang and Chi investigated the Arduino Uno platform wireless temperature and humidity monitoring system consisting of an Arduino microcontroller, a temperature sensor and humidity sensor, a 128641 LCD, and an nRF24L0 wireless module [3].
Other temperature measurement research includes an experiment to precise temperature measurement using platinum RTD PT1000 temperature sensor and Matlab by Chauhan and Neelakantan [4], a unit design for measuring the temperature of moving parts of the crank mechanism by Elkhutov using a temperature sensor and accelerometer [5], and Arduino-based temperature and humidity controls for condensation on engineered surface wettability by Gupta et al using a temperature sensor, a humidity sensor, and an Arduino Uno microcontroller [6].
Some other researchers have conducted research on body temperature. Saha, Raun, and Saha monitored the health of patients with smart ambulance systems using the Internet of Things (IOTs) [7]. The system consisted of a heart rate sensor, a temperature sensor, a microcontroller using Arduino, and a Raspberry Pi. Priyadharshini developed an embedded web server for health care systems using E-cards consisting of a heart rate sensor, a blood sugar sensor, a blood pressure sensor, a weight sensor, and an ATMEGA16 microcontroller [8]. Jayswal, Gupta and Gupta studied patient health monitoring systems based on the Internet of Things including a heart rate sensor, a temperature sensor, an ATMEGA328 microcontroller, and a Wi-Fi module [9].
Asmidar et al developed infant incubators for clinics in rural areas of Malaysia [10]. The system consisted of an ATMEGA2560 microcontroller, a DHT11 incubator temperature and humidity sensor, a DS18B20 baby body temperature sensor, a weight sensor, and an LM35 heating element temperature sensor. Sudha et al designed a system for patient monitoring in hospital management using Li-Fi [11]. The system consisted of a heart rate sensor, a blood sugar sensor, a temperature sensor, a respiratory sensor, a PIC 16F844 microcontroller, and a LIFI transmitter. Aziz et al developed a smart real-time health monitoring and tracking system using GSM/GPS technology that included a GPS position sensor, a microcontroller, a pulse sensor, a temperature sensor, and a GSM module [12]. Ganesh [13]. The system consisted of a blood pressure sensor, a temperature sensor, a weight sensor, an analog signal processing module, microcontrollers, a GSM module, a Wi-Fi module, and a Bluetooth module. Dhande et al developed portable systems for monitoring vital signs with a Java-based computer display and recording of data that consisted of a heart rate sensor, a temperature sensor, a microcontroller, and a laptop [14]. Thomas et al examined sensing heart rate and body temperature digitally including an Arduino Uno microcontroller, a temperature sensor, a heart rate sensor, and a Bluetooth module [15].
Other research on body temperature measurements include body temperature measurements for remote health monitoring systems consisting of a temperature sensor, microcontrollers, and Zigbee by Mansor et al [16], continuous heart rate and body temperature monitoring systems using Arduino UNO and Android devices containing a temperature sensor, heart rate sensor, Arduino, low pass filter module and Bluetooth module by Asaduzzaman Miah et al [17], and design and implementation of smart health bands for measurement of blood pressure, pulse, and body temperature by Rahman, Islam and Ahmad [18].
Kioumars and Tang studied wireless networks for health monitoring, using heart rate and temperature sensors [19]. The system consisted of an Arduino microcontroller, a TMP36 temperature sensor, a heart rate sensor, and a wireless communication module. Gulcharan et al investigated the stability and reliability of the patient's wireless temperature monitoring devices using a temperature sensor, an Arduino microcontroller, and a Zigbee [20]. Rahman et al developed a device for remote monitoring of heart rate and body temperature using a heart rate sensor, temperature sensor, Ethernet host, web server, and a microcontroller [21].
Heart rate monitoring can be done indirectly by utilizing blood vessels, namely, by conducting leads or sensors on the blood flow. The first-time blood from a vein enters the Right Atrium, then goes to the Right Ventricle, next to the Lungs, wherein the lungs the air exchange from CO2 to O2. From the lungs, the blood goes to the Left Atrium, then to the Left Ventricle, and the entire body and head through the Aorta veins. The research aims to measure heart rate and body temperature using a heart rate sensor (finger-tip sensor), an LM35 temperature sensor, and an ATMega16 microcontroller.

II. METHOD
The device was expected to meet the specification, namely, to count the number of heartbeats in one minute, and to measure body temperature constantly. Figure 1 displays the block diagram of the system. It shows that one of the fingers is inserted into the finger sensor transducer block, then the LED light that penetrates the finger will be received by the LDR where the frequency of the blood flow will be detected. The data will be processed on the microcontroller, and the results will be displayed on seven segments that show the number of hearts beats every minute [21] - [25]. In the hardware design, the system was divided into important parts, namely the Heart Rate Sensor block [20], LM35 Temperature Sensor [25]-[30], Main Controller (ATMega16), LED, LCD, and Power Supply. Figure 2 displays the heart rate sensor schematic. This series of blocks work as a detector of the heart rate through the fingers. This sensor circuit is inserted via PORTB.0 on the microcontroller. Figure 3 illustrates the temperature sensor schematic. Based on the Figure 3, the temperature sensor works by utilizing changes in temperature converted into electrical signals. The IC ATMega 16 serves as the main control in processing data. In the application of the system, the PORTB.0 is as the input from BPM (Heart Rate Gauge) and PORTA.0 as the temperature (Temperature Gauge) input. The main system schematic was shown in Figure 4.

b. Firmware design
The workflow of the system illustrated in Figure 5 shows that the sensor starts to work (counting the number of the heartbeats and body temperature) when the start button is activated. The reset button works to repeat the counting from the beginning. SYSTEM TEST a. Heart rate measurement In the heart rate measurement test, the device calculated the frequency of blood flow flowing of two patients for 60 seconds five times. The other device used as a comparison was Mindray Oximeter. The results of the test were presented in Table 1.

IV. CONCLUSIONS
The error value of the LM35 sensor measurement compared to the thermometer is 1.903%. This sensor is very sensitive to vibration and light. If one pulse is lost in monitoring, it will cause a loss of six beats counting. The error of the BPM measurement compared to the calibration devices 0.55%.