Journal of Applied Engineering and Technological Science Vol 1(1) 2019 : 30-42 30 DETECTING HEART RATE USING PULSE SENSOR AS ALTERNATIVE KNOWING HEART CONDITION Yuda Irawan1 Yunior Fernando2 Refni Wahyuni3 STMIK Hang Tuah Pekanbaru yudairawan89@gmail.com1, yuniorfernando1997@gmail.com2, refniabid@gmail.com3 A B S T R A C T Medical check-up done at the hospital for the first time is a heartbeat. This is done because the heart of the human body is the main organ, where the work function of the heart affects other important organs of humans. Based on these conditions, human heart health must be really considered. Things that can be done early is by checking the heart rate regularly. not everyone can do medical check-ups regularly. Even though by knowing the condition of a person's heartbeat, health will be maintained, it does not need expensive care from a doctor, but with a regular lifestyle, everything will be resolved. In this study, the researchers designed to measure heart rate as an alternative in maintaining health, using pulse sensors and Arduino circuits. This study resulted in a heart rate application system as a control to monitor the condition of the patient's heart rate, can provide information about the heart rate that uses the pulse sensor to patients and doctors who have an application to read the heart rate that has been made. Keywords: Pulse Sensor, Medical Check-up, Heart Rate, Android. 1. INTRODUCTION The development of technology in everyday life has been very much felt by everyone. The development in the field of electronics happens all the time, starting from very simple things. Even the development of electronic technology can already be developed in the medical field, especially in making measurements. Among other things can be as a means of health control, healing aids and others. For the initial stage of a medical examination, a medical check- up is usually done before a person's illness is diagnosed. From the results of medical check-ups it will be known whether a person is in good health or not. According to Siregar (2013) In general, the first medical check-up performed at a hospital is a heartbeat. This was done because the heart in the human body is the main organ, where the function of the heart's work affects other important human organs. Based on these conditions the health of the human heart must really be considered. What can be done early is to check your heart rate regularly. But in doing so you can say the difficulties If we use the manual method, we need a careful calculation and previously understood the basic principles in measuring heart rate. Lukman (2017) explain about android-based monitoring system is designed with the aim of protecting sufferers especially the elderly with the risk of sudden death at the location. Identification of abnormalities in the activity of heart function, temperature, and breathing and detection of the location of repeated heart attacks is carried out in real-time through technology without location, distance, and time restrictions. This device uses a microcontroller as a data processor from a sensor that will provide a logic decision on the buzzer to alarm the sufferer and user application if the logic condition meets the patient's critical condition. User applications are built with the Java programming language and utilize databases for sending data. The results of this study are expected to provide a response to the initial rescue treatment of patients who suddenly experience a recurring heart attack, by sending an alarm as a sign of danger so as to reduce the risk of paralysis, coma patients and even death. This factor causes not everyone can do regular medical check-ups. In fact, by knowing the condition of one's heartbeat, health will be maintained, there is no need for expensive treatment from a doctor, but with a regular lifestyle, all will be overcome. In this study, researchers designed to take measurements of heart rate as an alternative to maintaining health, using pulse sensors and arduino circuits. The data taken are 5 data as trial data. mailto:yudairawan89@gmail.com1 mailto:yuniorfernando1997@gmail.com2 mailto:refniabid@gmail.com3 Yuda Irawan, et. al. Vol 1(1) 2019 : 30-42 31 2. LITERATURE REVIEW Heart rate is one of the vital signs of body health. In addition, the heart is the main pillar of the body in daily activities. Heart rate measurement can be done anywhere with the number of applications on a smartphone, for example on Google Playstore. Today, the Digital Lifestyle is inseparable from smartphones. This can be seen when daily activities can not be separated from the smartphone. Today's digital lifestyle cannot be separated from music to support daily activities. Music is used by humans for various purposes. Some people use music to relax and others use music to inspire. This paper presents the relationship between heart rate and music so that it can be used for application development on smartphones(Afandi, et. al., 2014). This research activity aims to develop a triage network system to monitor the status of the severity of the health conditions of disaster victims so that the medical team can make decisions and prompt medical action against victims based on the severity of the victim's health condition. In this research a low-cost and reliable system will be developed using Wireless Sensor Network (JSN) technology so that it can be implemented in disaster areas where telecommunications infrastructure is damaged. In this study, we use an Arduino micro- controller which is an open-source electronic prototyping and uses a pulse sensor to detect the patient's pulse conditions. This sensor input will be classified by the microcontroller in the sensor node (SN) and sent to the coordinator node with XBee wireless technology. Based on this information, the medical team diagnoses and takes medical action based on the severity of the patient / victim's health condition. In this study a system performance test was performed and the results of the performance test showed that the JSN system we developed was able to work well in detecting the patient's pulse conditions and this application can display the patient's pulse conditions in real time which can be accessed via the internet network(Niswar, et. al., 2012). Helmy Nurbani (2015) made the Design and Implementation of Microcontroller-Based Pulse Detectors. This system uses a pulse sensor to retrieve pulse data which is then displayed in graphical form via the Nokia 5110 LCD. Dea Siska Utami Aziz (2014) made Room Temperature Observations Using a Website-Based Arduino Pro Mini 328 Microcontroller. This system is to measure room temperature using an Arduino Pro Mini 328 microcontroller and display the results of room temperature measurements on a website through a computer network access with a Local Area Network (LAN) system. Firgha Ali Pritantyo (2012), created the Design and Realization of Wireless Pulse Rate Monitoring Systems with Zigbee Transmission. This system uses a photodiode and red LED as a finger probe that functions as a pulse detector and uses the Atmega16 microcontroller as a data processor for pulse measurement and the Xbee module to transmit data with a wireless system. Presence Detection Information System and Media for Submitting Lecturer Announcements Using the QR Code Introduction Technique is an application that serves to support the process of disseminating information on the campus of the University of Muhammadiyah Riau University so that it becomes more effective and efficient and makes it easier for students to get information(Hussein et. al., 2018). Hamzah & Rusilawati (2019) research about NFC is a technology that can simplify and facilitate transactions, transfer data, and wireless connections between two communication devices that are very close to a few centimeters. This system is designed using an Android device that has NFC technology. By using an NFC-based management system on an Android smartphone it is expected to improve its quality and be able to compete in the current technological era nationally or globally. The purpose of this study is to facilitate students in finding information sources by simply attaching an Android smartphone to the NFC tag attached to the book so as to obtain information about the book. And they also reseach about Infrastructure Facilities System using Android-based NFC technology (Hamzah, et. al., 2018, Hamzah, et. al., 2019). Yuda Irawan, et. al. Vol 1(1) 2019 : 30-42 32 3. Research Methods The method in this research is the waterfall method. Broadly speaking, the waterfall method has the following steps: Analysis, Design, Writing, Testing and Application and Maintenance. (Kadir, 2014). Figure 1. Waterfall Model (Kadir, 2014) Stages of the Waterfall Method : 1. Requirements This step is an analysis of system requirements. The need for this research is data in the form of direct data, namely interviews with cardiologists and collecting references from previous research in order to be able to meet the research needs. 2. Design For the design of this study there are two designs that will be made first, namely making a prototype design of the device to be designed and the second is making a display design on an android application, which will describe the overall tool and application. The picture can be seen in 3.2 Figure 2. The Design Of The Prototype Tool 3. Writing the Program Code In this research, coding is done using C language, PHP as a database connector because it will function as a data container and JAVA programming using Android Studio tools. 4. Program Testing The final stage in which the new system is tested for capabilities and effectiveness so as to obtain weaknesses and weaknesses of the system which is then carried out a review and improvement of the application to be better and perfect. The test is done by testing a Yuda Irawan, et. al. Vol 1(1) 2019 : 30-42 33 sample which is done by testing it manually and using a tool that is designed so that it can see the accurate level of the sensor designed so that it is suitable for use. 5. Implementation of Program and Maintenance. Software that has been delivered to customers will definitely experience a change. These changes could be due to an error because the software has to adjust to the new environment (periperal or new operating system), or because the customer requires Building Prototyping. Next, after the prototyping development phase, the customer and the developer together define the format and requirements for the entire software, identifying all the requirements, and the outline of the system to be created. a. Encoding System In this stage the agreed prototyping is translated into the appropriate programming language. b. Test the System At the system testing stage, the code that has been made before will be tested whether it can run well or there are still parts that need to be repaired or whether there are still parts that are not in accordance with the wishes of the customer. c. System Evaluation System evaluation is not a prototyping evaluation, a system evaluation is evaluating a system or software that has been made whether it is in accordance with the wishes of the customer or not. If not, then the system will be revised again and returned to stages 4 and 5. If the system has been said to be OK then the system is ready to continue in the next stage. d. Use the System/Application This stage is the final stage of making the system with the Prototyping Model method. At this stage the ready-made and tested software is ready to be used by the customer / user. 4. RESEARCH RESULTS AND DISCUSSION 4.1. RESEARCH RESULT Figure 3. Results of cardiac Prototype App In Figure 3 can be seen the results of a prototype or simulation of a heartbeat detector using a pulse sensor. There is one pulse sensor and jumper cable and arduino uno connected to the leptop as a liaison with the heart rate application, to operate simply connect arduino to the Yuda Irawan, et. al. Vol 1(1) 2019 : 30-42 34 leptop plug the sensor on arduino and run the Netbeans program that has been created as a link between the database and arduino as a vibration detection device. issued by Arduino. Figure 4. Use of pulse sensors In Figure 4, it can be seen how to use a pulse sensor enough to put it on the search and then pressed with the other finger, then the sensor will detect vibrations from the pulse that moves on the body, so that it can be detected in the form of beats per minute (BPM). Figure 5. Results of the Rasberry Pi Circuit and and the pulse sensor In Figure 5 above you can see the signal series A0 Gnd, Gnd VCC + 5V connected using a jumping jumpper cable must be in accordance with the set instructions where the position of A0 Gnd, Gnd Vcc, and + 5v is exactly on the reading indicated on arduino, so that all functions run as desired. 1. Front view Yuda Irawan, et. al. Vol 1(1) 2019 : 30-42 35 Figure 6. Application front view In Figure 6 can be seen the initial appearance of this application that is the heartbeat application logo text box input name, entry button, and patient history button which has their respective functions when input the name and press enter it will enter the heartbeat detector display, while The patient's history application will display the display of anyone who has used the heart rate detection application. 2. Sensor data display Figure 7. Sensor Display In Figure 7 can display on the sensor display. When a finger is attached to the sensor, the Bmp number on the display will automatically change according to the specified seconds, below there is also a time display where when checking the patient's heart will put his hand on the device for 1 minute in order to get the right data accuracy from the results of the consideration made for 5 times at 10,20,30 to 1 minute and the results will automatically come out with a bad range, good and very good. Yuda Irawan, et. al. Vol 1(1) 2019 : 30-42 36 3. Sensor Results Display Figure 8. Display of sensor results In Figure 5.8 the image will be displayed automatically after the display results reach 1 minute the data that appears here in the form of conditions where the conditions are bad, good and very good. 4. Application Display When All Lights Off Figure 9. Display When All Lights Off In Figure 5.9 the display is a history of the application user who has checked up the heart rate. The display will display the results of the Bmp, the name and date when he made a check up, these results will be able to be seen continuously over time because it can see the heart progress per week or per day. 5. Display Tips Yuda Irawan, et. al. Vol 1(1) 2019 : 30-42 37 Figure 10. Display Tips In Figure 5.10 is a display of results which in the picture above is taken from one of the official health web to display tips on heart health. 4.2. TESTING 4.2.1. Testing Tools Testing the tool begins by checking the adruino application that the tool is ready and can display the appropriate data which will be called through the netbeans application and entered in the database so that the data can be raised on the android application. Figure 11. Sensor Testing Next we will see the arduino application display when the sensor is storing data so that it can be seen in the database. Yuda Irawan, et. al. Vol 1(1) 2019 : 30-42 38 Figure 12. Display of the Arduino application 4.2.2. Application Testing Testing the application is done by testing on all the appearance of the application is functioning properly and correctly so that the application can be used by users properly. Figure 13. Application Testing 4.2.3. System Testing In testing the system will be divided into 2 tests, namely testing a normal person system and testing a sports system. A. Testing of Sports Patients The results of the examination of the condition of the patient's normal heart beat were carried out by person, namely on behalf of Aditiya. Age 20 years, a running altit from Bengkalis was tested on May 20, 2019. Each examination was carried out with a duration of 1 minute. Yuda Irawan, et. al. Vol 1(1) 2019 : 30-42 39 Figure 14. Running Exercise Figure 15. Physical Exercise When testing manually for 1 minute the patient's heart rate reaches 130 bpm while when tested using a patient's heartbeat it reaches 125 bpm then we do the test for 5 times in a row to get the following results. Table 1. Heart rate values for Sports patients No. Testing Manual Sensor 1 Testing 1 125 130 2 Testing 2 130 137 3 Testing 3 123 129 4 Testing 4 130 130 5 Testing 5 135 137 (Source: Processed Data) It can be concluded that the level of comparison of testing manually and using sensors ranging from 3-4 digits in the calculation then the test is considered complete. B. Testing for Normal Patients The results of the examination of the condition of the normal patient's pulse were carried out randomly by involving 5 people as a sample on May 22 2019 Examination of the heart rate was done by checking the condition of the heart rate using a manual, pulse sensor. Each examination was carried out with a duration of 1 minute. The first test results are performed using a pulse sensor to check the condition of the patient's heart rate. Yuda Irawan, et. al. Vol 1(1) 2019 : 30-42 40 The value of the calculation results is used as the value of the patient's heart rate when examined using a pulse sensor. The heart rate of patients who were examined using a pulse sensor can be seen in Table 2. Table 2. Patient Heart Rate Values Using Pulse Sensors No. Name Heart Rate With Sensor Measurement Time 1 Nurul 81 1 minute 2 Nando 106 1 minute 3 Azren 161 1 minute 4 Nurul fahmi 78 1 minute 5 Wulan 89 1 minute (Source: Processed Data) From the results of the examination obtained two test results. The first test only checks the heart rate using a pulse sensor. While in the second test, a heart rate examination was performed using a manual with the same duration. Then the results of the heart rate value based on examination of the two devices are made to compare accuracy. Accuracy comparison is done to see the level of accuracy of the pulse sensor to check the heart rate, to determine the accuracy value is carried out the division of the value of the heart rate that is checked using a pulse sensor with examination using a manual that is used as a reference in examining the patient's heart rate. The formula for determining the accuracy percentage value from the pulse sensor check is to divide the heart rate value from the sensor with the heart rate value from the manual, then multiply by 100 to get the accuracy percentage value according to Equation 1. The formula for determining the error percentage value (error) from checking the pulse sensor is by first reducing the heart rate value of the pulse sensor with the heart rate value from the manual with the result in the form of an absolute number. Absolute numbers are numbers that will not have a minus (-) even if the actual result of the reduction is minus. Then the result of the reduction is divided by the value of the heart rate, then the result is multiplied by 100 to get a percentage error value. The formula can be seen clearly in Equation 2. From these calculations, it was found the error level of the pulse sensor on the examination of the patient's heart rate. The pulse sensor error level can be seen in Table 3. Table 3. Comparison of accuracy of heart rate values from pulse sensors with manual No. Name Heart rate with sensor Manual Measuring Tool Accuracy Level (%) Error Level (%) 1 Nurul 81 82 98 1 2 Nando 106 100 106 6 3 Azren 161 101 159 59 Yuda Irawan, et. al. Vol 1(1) 2019 : 30-42 41 4 Santika 78 76 102 2 5 Wulan 89 80 111 11 In Table 3, it can be seen that the pulse sensor has a low error rate, this is seen from the range of errors (margin of error) ranging from 0.69% to 1.84%. This can also be seen from the difference in the value of the heart rate in the manual with the pulse sensor which ranges between 78. With the low error rate of the pulse sensor, it can be concluded that the pulse sensor has a fairly high degree of accuracy. The high level of accuracy can be proven by calculating the percentage of the accuracy value of the sensor with the formula. 5. CONCLUSION & SUGGESTION Conclusion The heart rate application system as a control to monitor the condition of the patient's heart rate, can provide information about the heart rate using the pulse sensor to patients and doctors who have a heart rate reading application that has been made. Suggestions In working on this heart rate measuring device there are still shortcomings, therefore it is expected to need future development so that this tool can be better and more effective. Suggestions for the application are more developed, especially in the features section, where the features section is now still lacking so it is advisable to add additional features such as monthly, weekly and annual data recap. In further developments, other sensors can also be added which have a direct link to the examination of human health conditions: REFERENCES Afandi, I., Ferdiana, R., & Nugroho, H. (2016). Review: Musik dan Denyut Jantung Pada Era Digital. JSINBIS (Jurnal Sistem Informasi Bisnis), 4(3), 149-155. https://doi.org/10.21456/vol4iss3pp149-155. Ali, F. P. (2012). Perancangan dan dan Realisasi Sistem Pemantauan Denyut Nadi Nirkabel Dengan Transmisi Zigbee. Mahasiswa Teknik Elektro, Politeknik Negeri Bandung, Bandung. Hamzah, M. L., & Rusilawati, E. (2019). Teknologi Near Field Commucation Pada Perpustakaan Perguruan Tinggi Berbasis Android. INTECOMS: Journal of Information Technology and Computer Science, 2(2), 75-83. https://doi.org/https://doi.org/10.31539/intecoms.v2i2.927 Hamzah, M. L., Rusilawati, E., & Purwati, A. (2018). SISTEM APLIKASI SARANA PRASARANA PERGURUAN TINGGI MENGGUNAKAN TEKNOLOGI NEAR FIELD COMMUNICATION BERBASIS ANDROID. INTECOMS: Journal of Information Technology and Computer Science, 1(2), 251-261. https://doi.org/https://doi.org/10.31539/intecoms.v1i2.433 HAMZAH, M. L., DESNELITA, Y., PURWATI, A. A., RUSILAWATI, E., KASMAN, R., & RIZAL, F. (2019). A review of Near Field Communication technology in several areas. Revista ESPACIOS, 40(32). Hussein, O.K. S., Wahyuni, R., Irawan, Y., & Mukhtar, H. (2018). Sistem Informasi Deteksi Kehadiran dan Media Penyampaian Pengumuman Dosen dengan Menggunakan Teknik Pengenalan Qr Code. RABIT (Jurnal Teknologi dan Sistem Informasi Univrab, 3(2), 89- 99. Kadir, A. (2014). Pengenalan Sistem Informasi Edisi Revisi. Andi. Yogyakarta Lukman, M. P., & Surasa, H. (2017). Portable Monitoring Penderita Penyakit Jantung Terhadap Serangan Berulang Berbasis android. Seminar Nasional Teknologi Informasi 2017, 20- 26. Niswar, M., Ilham, A. A., Muslimin, Z., Indrabayu, Suyuti, A., Sadjad, R. S., Waris, T., Wahyudi P. A., & Tahir, Z. (2012). Aplikasi Jaringan Sensor Nirkabel Untuk Monitoring Medis Di Daerah Bencana. Prosiding InSINas 2012. https://doi.org/10.21456/vol4iss3pp149-155 Yuda Irawan, et. al. Vol 1(1) 2019 : 30-42 42 Nurbani, H.(2015) Perancangan dan implementasi alat pendeteksi denyut nadi berbasis mikrokontroler. Universitas Telkom, Bandung. Siregar, S. F. (2013). Prototype Sistem Informasi Akademik Berbasis Mobile Application dengan Teknologi Java 2 Micro Edition (J2ME). Retrieved from : http://jurnal.untan.ac.id/index.php/justin/article/download/3331/3352 Siska, D. U. A. (2014), Pengamatan Suhu Rungan Menggunakan Mikrokontroler Arduino Pro Mini 328 Berbasis Web. Mahasiswa Teknik Komputer, Institut Pertanian Bogor, Bogor. http://jurnal.untan.ac.id/index.php/justin/article/download/3331/3352