The Design of Digital Heart Rate Meter Using Microcontroller

Cardiac tests generally use an electrocardiograph, the results of which are used by medical teams to diagnose heart conditions. Individual ECG examination is held in a health care institution so that it cannot be held independently, considering the high costs and the need for analysis by a specialist. It is, therefore, necessary to have a functional and portable device to detect heart rate. The heart rate measuring device, equipped with a finger sensor, was designed for adults. The 15-second measurement interval showed the heart rate in one minute and the results were shown on an LCD. The minimum system circuit used ATMega 16. Keywords— heart rate, beat per minute, microcontroller


INTRODUCTION
The health condition of a person may change at any time if it is not properly controlled and maintained. Similarly, people who have a healthy body can also potentially be affected by the disease, one of which is the heart organ. Efforts required to maintain health as the first step to prevent heart disease is knowing the number of heartbeats in normal or abnormal conditions. BPM is the number of heartbeats in one minute. The normal pulse for healthy adult ranges from 60 to 100 BPM. Bradycardia occurs when the pulse rate is less than 60 per minute, while tachycardia occurs when the heart rate is more than 100 BPM. The working principle of this diagnostic device is to calculate the number of heartbeats in minutes. The heart rate will determine whether the patient's heart condition is normal or not.
Some researchers have researched heart rate. Biniyam designed and implemented heart rate monitoring using a PIC microcontroller. The project used an infrared sensor and a photodiode detector that monitored the heart rate and LM358 to process signals [1]. Mahmood developed a wireless body area network to monitor patients' health remotely. The detection of fall used various sensors, including electrocardiography (ECG), temperature, and accelerometer [2]. Turner utilized a smartphone to monitor heart rate. The AD8232 Single Lead Heart Rate Monitor was the main part of the design [3]. Sosa designed a wireless heartbeat monitor operated without batteries. This design was based on commercial ultra-low-power microcontrollers, optimized custom full front-end RF, ultra-low-power threshold comparison, and programmable amplifiers implemented in 90 nm commercial CMOS [4]. Tjiharjadi created the application of the Human Heart Rate Detection applying IoT technology to measure the human heart rate monitored using gadgets [5]. Pawar used Arduino Uno for a heart rate monitoring system based on an IR sensor. The system consisted of IR-based heart rate sensors, Arduino Uno, and GSM modules [6]. Priya implemented a wireless technique for real-time monitoring of vital signs. The design of a portable wireless ECG system used for remote monitoring of cardiac activity is one of the most important fields of telemedicine and telecare [7]. Mansor studied portable heart rate measurements for remote health monitoring systems. The main components of this project were pulse sensors, microcontrollers (Arduino with Ethernet shields), and wireless communication devices (Xbee) [8]. Heart rate measurements using photoplethysmography was studied by Saquib. The method used to measure heart rate in this project was widely known as photoplethysmography (PPG) [9]. Lee studied and implemented low-cost automatic blood flow control devices via smartphones for biomedical applications based on microcontrollers [10].
Hodge investigated Wireless Heart Rate Monitoring and the Vigilant System, which aimed at bringing a cheaper and more efficient system to monitor heart rate [12]. Gobhinath S. designed and examined a GSM automatic driver sleepiness warning system. When the driver was asleep, the vehicle stops and monitors the heart rate, breathing rate, and dry temperature of the driver and then displayed it on the computer [13]. Nature studied a portable photoplethysmogram acquisition and analysis device. It was an acquisition of simple PPG and early-level analysis tools using laptops [14]. Megalingam investigated an HDL-based controller for a continuous monitoring system of multiple vital health parameters for recording. He monitored various parameters, including heart rate, temperature, pressure, blood oxygen levels, sugar levels, etc. [15].
Natumploy used an Arduino microcontroller in a portable ECG display for experimental learning through a senior The incubator can also measure the length and weight of a baby automatically using an ultrasonic sensor and a load cell sensor [20].
The objectives of making this system are (a) to provide good software accuracy, (b) to ensure proper work of the total system operation, and (c) to make a program, used to examine the heart condition by measuring the heart rate.

II. METHOD
The finger sensor [21] detects the flow of blood that passes through the index finger, the infrared light [22] - [24] that emits is reflected by the eye, and the light is captured by the Photodiode [17], [25] as described in figure 1. Heartbeats affected the pressure of the blood, resulting in a signal. The signal obtained by the sensor would be afterward transmitted to the Amplifier circuit and filtered to make the real heart rate signal visible. After filtering, the signal obtained was still low and would be reinforced for a comparison. When the signal reached the comparator block, it was compared to the reference voltage. After compared, the signal would be activated by the Monostable signal, which generated a logical signal. Monostable was an input to be processed from the IC Microcontroller. The results shown on the data display would be stored [26] - [30].

A. System work flow
The system workflow is shown in Figure 2. First, Initialization starts the software and initializes the LCD. The LCD is programmed by the microcontroller before it runs the program. Counting the heart rate to begin to monitor it and Saving the data are the next steps. Reset EEPROM functions to erase the saved data, while Reset to repeat the program. Finish tells that the plan has been complete. The minimum system as it is shown in Figure 3 consists of several components, namely the ATMega16 microcontroller interface circuit with an external oscillator, the button interface circuit for program work processes, and the LCD interface circuit used to display measurement data.

III. IMPLEMENTATION
The next step after creating the module was testing and measuring. The author collected the data through several phases of the measurement and testing process, which aimed to determine the density of the module production and to ensure that each part of the entire set of modules had worked as planned.
The steps to measure and test the module were first, preparing the devices needed, especially the measuring module and comparison device, second, the making a table to present the measurement results, third, testing the module by conducting BPM measurements on SP02 and writing the results of the measurements and calculations in the table provided. Finally, computing the measurement results to determine the level of error, the average, and the standard deviation In measuring the BPM, the author compared the pulse oximetry device, already feasible to use with the module device designed. The calibrator and comparator were with the specifications of (a) brand: Huge Industry, AH-50D, (b) type: Fingertip Pulse Oximeter. In the measurement of the BPM, the authors compared the model device to the standard pulse oximetry. The calibrator and the comparator comply with the specifications of (a) brand: Huge Industry, AH-50D, and (b) type: Fingertip Pulse Oximeter. The advantages of the device include portable, rechargeable power supply, ease of use, and relatively accurate results. The disadvantages of this device include no indicator when the battery capacity was weak and applicable to adults only.

IV. CONCLUSION
After a process of designing, experimenting, testing, and data collecting, the author concludes that the heart rate detector works properly according to the experimental results on several patients compared to standard medical devices. The device's minimum system circuit works properly as it controls and displays the BPM measurement results. The finger sensor circuit shows satisfactory results in the detection of heart rate.