Monitoring System Heartbeat and Body Temperature Using Raspberry Pi

. The development of the current monitoring system has become interesting to investigate, especially wireless sensor network based monitoring. Implementation of the wireless-based monitoring system widely implemented in the application of natural disasters, health monitoring, and military operations. One of the health services applications is the monitoring system of heartbeat and body temperature. Examination of the vital sign is a fundamental parameter for medical personnel in performing treatment early to maintain the safety and physical condition of patients. However, the problems that occur in health services is that medical staff need a long time to examine patients, patient data retrieval is still conventional, and equipment used still using the cable media. To solve the problem, the authors propose a heart rate monitoring system and body temperature using Raspberry Pi. This study aims to relieve the burden of medical personnel in monitoring the patient, shorten the time in taking patient data, and reduce the occurrence of misdiagnosis. Test results showed that the success rate of the system in detecting the heartbeat of 97.78% and body temperature of 99.73%. Distance range of sensor data transmission for open space without obstructions of 67 meters and enclosed space with a barrier of 13 meters.


Introduction
The development of the current monitoring system becomes exciting and challenging in to be researched, especially in wireless sensor network based monitoring systems (WSN). Implementation of WSN-based monitoring has been many done on emergency situations such as forest fire detection, flood detection, earthquake detection, bridge health structure, health monitoring, and military operations. One of the health monitoring applications currently under development is a vital sign monitoring system such as heart rate [1], blood pressure, and body temperature. Examination of vital signs such as heart and body temperature is critical to be done by every human being to know the condition of the new illness suffered and the physical health. The heart organ [2] is the center of the human circulatory system and occupies the highest position in the world. Recorded 35% or 1.8 million Indonesians in 2014 died of a heart attack. Factors of body temperature changes affect the body condition that can cause infection, inflammation, and stress. Patient healthcare factors, especially heart examination and body temperature are fundamental parameters for medical personnel in diagnosing disease, maintaining the safety of the soul, and the patient's physical condition. However, the problem that occurs in health services is the limited medical personnel will need a long time in checking the status of the patient and require adjustment of examination schedule along with the increasing number of patients, the retrieval of patient data that is still conventional, and equipment used still using the cable media. This problem takes time for medical personnel to provide diagnostic results and rapid health administration services. To solve the problem, we propose heart rate monitoring system and wireless-based body temperature using Raspberry Pi as storage media and data delivery. This study aims to relieve the burden of medical personnel in monitoring patient health, shorten the time in taking patient data, reducing the occurrence of misdiagnosis [3], supporting the application of health services involving various disciplines [4], reducing patient administration costs [5], and realize the development of low carbon in the development process. Several studies related to heart rate and body temperature monitoring systems have proposed including wireless heart rate monitoring systems based on wireless sensor networks (WSN) using XBee as data transmission on server computers [6]. The results showed that the position placement of Xbee module dramatically effects of the parameters throughput, packet loss, and delay. However, the development of body temperature design has not evaluated. ECG monitoring system in elderly patients based on RFID [7], a global positioning system (GPS) [8], and microcontroller [9]. The use of RFID on the wrist of elderly patients can help reduce the occurrence of emergency errors and GPS methods used to detect the heart rate of patients through portable, as well as monitor the activity of the hearts of sports in real time. But the condition of body temperature monitoring for patients has not been evaluated. ECG monitoring system and body temperature using Arduino [10]. The proposed research can monitor ECG and body temperature well based on monitoring result on LCD and computer server. However, the concept of wireless-based monitoring has not evaluated. The performance of AODV, DSDV, and OLSR routing protocols on health monitoring uses NS3 [11]. This study analyses the performance of routing protocols based on the quality of service (QoS). The results of the study were carried out using NS3 simulations without device modules. Figure 1 shows the design stage of the system performed. This stage consists of designing, component installation, testing, data processing, and system analysis. The design of the heart rate monitoring system and body temperature includes hardware and software.

Hardware Design
Stage of hardware design consists of raspberry pi model B + [12], Arduino [13], LCD, power supply, heartbeat pulse sensor (pulse heartbeat 3554) and body temperature sensor (DS18b20 board). Pulse heartbeat 3554 sensors connected to the Arduino module and a DS1820 temperature sensor connected to the raspberry pi. Pulse heartbeat 3554 sensor serves to retrieve the patient's heartbeat data by insert the thumb to the end of the sensor. Any detected sensor (patient) data will receive by Arduino and perform data processing in beats per minute (bpm). Results of sensor data processed Arduino module will be forwarded to the raspberry pi and displayed on the LCD. DS1820 temperature sensor serves to retrieve body temperature data by put or holding the tip of the sensor. The result of body temperature detection will receive by raspberry pi and processed through conversion from temperature to voltage. The resulting voltage changes will adjust to the condition of the body temperature of the patient at that time. The result of a translation made by raspberry pi will display on LCD or portable. All patient data stored on raspberry pi can be called or viewed on the portable or personal computer. The block diagram of the hardware design of the heart rate monitoring system and body temperature can see in figure 2.

Software Design
This stage consists of the Integrated Development Environment (IDE) application program used in the Arduino module with the C ++ programming language. IDE application works to write, display, and upload program code. Results of program data created in the text editor (sketch) stored in files with extension (.ino). This design begins with the creation of pulse heartbeat 3554 sensor program on Arduino Uno in the form of input voltage from the sensor. Sensor data serial communication with raspberry pi. If pulse heartbeat 3554 sensors is readable then it will be sent to the raspberry pi, but if the sensor is not legible then go back to the initial reading. Raspberry Pi will read Arduino serial data simultaneously with temperature sensor readings. Temperature sensor data readings are sent directly to raspberries in the form of input voltage converted from the library in the way of Fahrenheit then turned to Celsius. Furthermore, the temperature sensor data and heart rate will store in the database. Sensor data is displayed on the LCD and can check in portable via an internet connection. Figure 3 shows the software design.  Figure 3. Design of software

Testing Heartbeat Device
Testing the tool performed before taking the data heartbeat. This test aims to ensure the sensor condition works well. The result of the pulse heartbeat 3554 sensor testing shows that the output value read on voltmeters of 3.27 volts is not much different from the voltage value on the pulsing heartbeat 3554 sensors of 3.3 volts. The next test performed on the sensor indicator by observing the red led indicator. The red led lights give a sign that the sensor is working correctly and if the red led does not light it indicates that the sensor is not working. This problem caused by the placement of the sensor position on the finger is not appropriate, and the sensor connectors are not connected properly.

Testing Body Temperature
DS18b20 temperature sensor testing is done by holding the end of the sensor or pair the sensor on the armpit for two or three minutes. Armpit is a body part that can use as a basis in the sensor readings. The readings of the body temperature sensor on the LCD in the form of celcius indicate that the sensor works well. Furthermore, to obtain accuracy testing of temperature sensor data used a digital thermometer as a comparison in getting the error rate. The success of this test can see in LCD or portable readings. The measurement results displayed on the LCD is an indicator that the sensor DS18b20 works appropriately or error. Body temperature and heartbeat test results can see in figure 4. Figure 4. Testing body temperature and heartbeat

Testing Transmission signal
Testing of health monitoring module is done by the scenario in open space without a wall and closed room with the wall. In free space without barrier where mobile phone device able to read health monitoring sensor data as far as 67 meters and closed room with the wall as far as 13 meters. The results of the testing transmission signal of the monitoring module can see on the server computer. Figure 5 shows the transmission signal testing of the health monitoring module.

Retrieval of Heartbeats Data
Retrieval of heartbeat data is done to see the condition of a person's heart whether under normal circumstances or not healthy. The results of measurements on ten men with a sampling of 5 experiments with a given time of 60 seconds each. The purpose of data retrieval five times from each object is to determine the average value generated by the sensor. The digital measurement is done to determine the error rate of the designed sensor device. The data obtained show that the heartbeat sensors between 79 -94 bpm. The measured heartbeat condition categorized as a normal condition with a limit of 60-100 bpm for ages 19 to 69 years [14]. The Heartbeat 3554 sensor used works well with an average error rate of 2.22%. The results of heartbeat data retrieval can see in table 1.

Retrieval Body Temperature Data
Retrieval temperature data is done to see the condition of a person's body temperature whether under normal circumstances or not healthy. Low or high body temperature conditions strongly influenced by physical, body temperature data position (stationary or moving), and activity. The results of measurements on ten men with sampling as much as five times the experiment with a given time every 3 minutes for each object. The purpose of data retrieval five times from each object is to determine the average value generated by the body temperature sensor. The average yield produced by the sensor compared to a digital thermometer. The digital thermometer serves as a benchmark for DS18b20 sensor readings to be able to determine the extent of error experienced during readings using DS18b20 sensors. The results of data retrieval indicate that the sensor DS18b20 measured between 36.2 -37 0 C. Measurable body temperature conditions categorized as normal conditions with a limit of 36.1 -37.2 0 C for ages 19 to 69 years [13]. The body temperature sensor used works well with an average error rate of 0.27%. The results of body temperature data capture can see in table 2. Figure 6 shows a prototype of a health monitoring system consisting of a 3554 pulse sensor, DS18b20 sensor, LCD, battery, Arduino Uno, and raspberry pi.

Results and Discussion
Before the patient data storage process done than first fill the data on the health monitoring application menu.
Charging patient data consists of name, age, address and phone number. After the finish of the data input process then automatically displayed patient data. The health monitoring information presented consists of the date, time, heart rate, body temperature, bpm signal that works in real time and checking time. Figure 7 shows the sensor readout information. The results of patient data processing and sensor data readings stored on the raspberry pi module. This module works to store and transmit patient data to portable or smartphone devices. Figure 8 shows the process of patient data storage. To display the results of the process of taking medical record data that has done previously. Admins or users can select the view button located on the right side of the patient data. Figure 9 shows the patient data information.

Conclusion
In this paper, we are implementing a heart rate monitoring system and body temperature using the raspberry pi. Health monitoring results can display on the LCD and server computer in real time. Any patient data stored in the database can display again based on id number or patient's name. Distance range of the proposed tool transmission reaches 67 meters for open space conditions without obstructions and 13 meters for enclosed spaces with obstructions. The proposed tool error rate in detecting the heartbeat of 2.22% and body temperature of 0.27%.