# An Embedded System Based on Raspberry Pi for Effective Electrocardiogram Monitoring
## 8 Results and Discussion
### The Results Measured from the Final Device  
The final device was tested using ECG signals with different heart rates in beats per minute (BPM) in the range of (60-300) BPM generated from the Patient Simulator. The signal was displayed on the screen of the device as well as on the VNC Viewer of the raspberry pi that was opened on the phone and/or the laptop. The device was able to successfully measure the ECG signals at all tested heart rates as shown in Figure 7. The measured ECG signal includes all the important peaks that can be used as an indicator for the health condition by comparing the ECG from healthy cases with that from patients who have heart diseases. Moreover, we have tested the final device by measuring ECG signals from human body (Figure 7g). We have achieved good results that show the ability of the device to monitor the ECG signal from human body at different heart rates and different conditions (Figure 8a-d). The device designed in this work can be used for monitoring the ECG signals at different rates and variable conditions. In our work, we have considered the safety rules in designing and applying our system. We have used RLD in the main circuit to avoid any common mode interference with the human body, we have designed our final device to be compatible with the regular ECG leads that are used in hospitals, and we have used the medical pads that are typically used in clinics to collect the ECG signals from human body. We also use codons with medical alcohol to clean the skin before and after putting the pads on. Moreover, we have received an IRB from the Dean of Scientific Research and Graduate studies at Yarmouk University to be able to use the device for measuring the ECG signal from human. The entire procedure was confirmed with a Specialist doctor and nurse from King-Abdullah hospital, Irbid, Jordan as a part from the scientific research rules in Yarmouk University. Figure 5: The ECG output signal: **(a)** The first electrode. **(b)** The second electrode. **(c)** The IA output. **(d)** The HPF output. **(e)** The LPF output. **(f)** The summing amplifier output. **(g)** The final output. **(h)** The peak detector output. Figure 6: The Bread Board ECG output signal: (**a**) 30 BPM. (**b**) 60 BPM. (**c**) 80 BPM. (**d**) 120 BPM. (**e**) 180 BPM. (**f**) 300 BPM. The device's utilization of a graphical LCD screen enhances its portability and enables easy usage in various locations. Additionally, the ECG signal can be displayed on a smartphone (refer to Figure S7 in Supplementary Material) or a personal computer through VNC viewer. Furthermore, the recorded data can be stored on the cloud and accessed through a mobile application, which facilitates continuous monitoring of the patient's condition and aids the doctor in future diagnostics. As a result, this approach simplifies and expedites ECG signal monitoring when compared to embedded systems that rely on microcontrollers [3; 23; 24]. Figure 8: The Final Device ECG output signal from four different males of ages between 18–20. Figure 7: The Final Device ECG output signal: (**a**) 60 BPM. (**b**) 60 BPM. (**c**) 80 BPM. (**d**) 120 BPM. (**e**) 180 BPM. (**f**) 300 BPM. (**g**) Measuring ECG signals from human body. Moreover, incorporating Raspberry Pi offers advantages in terms of data storage and facilitates signal analysis and classification using machine learning models. Our proposed work provides more comprehensive details about the entire system, including improved signal quality with all the necessary peaks, making it more reliable and suitable for researchers and industries compared to previous publications [11; 25; 26; 27; 28; 29; 30]. By contrast, the system described in [5] exhibits inferior signal conditioning, allowing noise to affect the ECG signal shape and peaks, potentially impacting the accuracy of heart disease diagnosis. Additionally, their reliance on a simple PIC microcontroller limits data storage capabilities and continuous monitoring of the patient's ECG signal.