Development of an Ethernet-based Portable Embedded Isolated ECG System

Patient monitoring is an important issue in the medical field, requiring planning, effort, and time. One of the challenges that physicians, nurses, paramedics, and emergency medical technicians face is the shortage of specialized medical equipment and staff with the ability to measure, display, store, and transmit the vital signs of patients for remote diagnosis under critical conditions. Therefore, and based on our evaluation for such needs, our main research objective was to develop a new system to enable these professionals to perform such monitoring functions with a higher level of safety, performance, and time effectiveness with reduced cost. An advanced, integrated, effortless, and portable system was developed, which is capable to measure, monitor, display, store, and transmit data related to the Electrocardiography (ECG) signal along with its derivatives, such as the heart rate using a hybrid system that combines hardware and software. Keywords-ECG; biomedical instrumentation; embedded system; medical isolation

INTRODUCTION Electrocardiography (ECG) [1] is an interpretation of the electrical activity of the heart, detected by electrodes attached to the surface of the skin and recorded by a device, external to the body. Detection is conducted in the form of tiny rises and falls in the voltage between two electrodes placed at the sides of the heart. The display looks like a wavy line either on a screen or on paper. The electrodes are standardly applied on the four extremities and the chest surface. The display indicates the overall rhythm of the heart and weaknesses in different parts of the heart. The ECG device detects and amplifies the small electrical changes on the skin that are caused when the heart muscle depolarizes during each heartbeat. It provides information on the condition and performance of the heart. ECG is one of the vital signs monitored in many medical and intensive care procedures. Any deviation from the normal in a particular electrocardiogram is indicative of a possible heart disorder. Any ECG instrument is provided with an alert mechanism that warns the medical staff of any abnormal changes detected in the cardiac function. ECG equipment has been developed over the years [2]. Digital hardware programmable logic was used to develop an ECG system in late '60s [3] and computer based ECG systems came into use in many hospitals [4,5]. Wireless and digital technologies have been used to develop ECG home monitoring and telehealth systems [6][7][8]. To reduce size and cost, embedded technology has been used in portable medical systems [9][10][11].
Cardiovascular Diseases (CVDs) are one of the leading mortality causes accounting for 31% of deaths worldwide [12]. In Saudi Arabia and in the Gulf Countries, CVDs are becoming a major health concern as being contributing to more than 45% of total deaths [13]. This percentage increases in rural areas where the healthcare is provided in primary health centers with shortage of specialized medical equipment and staff. The most affected people with CVD are elderly and adults with low income. Patients of CVDs need emergency care as soon as they occur.
Our case study is the Hail region in the north of Saudi Arabia, having a high number of rural villages (59). The goal of our research, based on our evaluation of the needs of the Primary Health Centers (PHCs), is to develop a new system with the required features to enable healthcare professionals to perform monitoring functions with higher safety, performance, and time effectiveness with reduced cost using embedded technology and advanced signal processing that can be used remotely via the Virtual Instrumentation (VI) technology. This system should also overcome the lack of expert physicians in rural regions or some urban clinics or health centers, who can be consulted remotely in real-time if needed. The proposed dedicated new system consists of a low cost computer, with a developed portable device connected via Ethernet, and dedicated developed software (National Instruments Inc.). The Graphical User Interface (GUI) -VI system has been designed for easy measurement and analysis. In addition, it provides a user-friendly interface and the ability for advanced analysis of the acquired ECG signals using advanced signal processing techniques in time and frequency domains to help accurately diagnose such events at early stages without the need for consultation except from very critical situations.
The proposed integrated, effortless, and portable system measures, monitors, displays, stores, and transmits data related to the ECG signal along with its derivatives. The system is planned to have the capability to easily process, control, and send the resulted signal through the Ethernet technology.

A. Hardware
The block diagram shown in Figure 1 consists of four stages: pre-amplification (surge arrester and low pass filter), amplification (ECG amplifier), controlling (µc, EEPROM, and JTAG), and Interfacing (USB to RS232 converter, Serial to Ethernet convertor, power adaptor and power modules). System block diagram.
The elements of the system are: • Surge arrester: It consists of a resistor and a gas discharge tube. It is used to prevent the circuit from high level defibrillation voltage (6000V) by reducing it into nearly 120V.
• Electro Magnetic Interference (EMI) Filter: It is built inside the ECG amplifier.
• Low Pass Filter: It is used to filter the weakly resulted ECG signal to become suited to processing, conditioning, and displaying. The ECG amplifier has 10 input leads: LL, RL, RA, LA, V1, V2 ,V3, V4, V5, and V6 with 3 power pens of −2.5V, 2.5V analog voltage, and 3.3V digital voltage.
• Serial Peripheral Interface (SPI): It is a protocol that allows bidirectional communication between the ECG amplifier and the microcontroller.
• Microcontroller (µc): It is used to represent the controlling stage after the end of the previous pre-amplification and amplification stages. The microcontroller is programmed in C language. The microcontroller will convert the RS232 serial interface into the SPI.
• JTAG: It is linked with a bidirectional linker with the µc and it is represented by a connector for the purpose of µc programming.
• Electrical Erased Programmable Read Only Memory (EEPROM): It is used for the temporary storage of data before receiving a server request of transmitting these data by the µc. It has a bidirectional linking with the µc because it is available for both writing and reading, even though it is called Read Only Memory (ROM).
• Digital Isolator: It is represented by a small power transformer and it is used for the isolation of the transmitting and receiving buses between the computer interface region and the patient interface region.
• Power Module Isolated: It consists of power regulators distributed through two stages, the first stage converts the 5VD power module output into 5V and -5V output while the second stage converts the 5V primary output into 2.5V and 3.3VD secondary output and the −5V primary output into −2.5V secondary output.
• Transmit (TX) Switch: It is used to switch between the input from Ethernet and the input from the USB controller ( Figure 2). • USB to RS232 Converter: It is used to convert the USB bus into the RS232 serial interface bus that is connected to the digital isolator.
• Power Module: It is one of the two input voltage sources. It converts the 6V input from the adapter into 5V and 3.3V (digital voltage). It is actually a low power transformer.
• Serial to Ethernet converter: It is used to convert the signal bus (RS232) which comes from the power module into Ethernet signal.
Our system has the ability to choose between two alternative input sources, the electrical adaptor and the USB adaptor. We can classify the components of our system into two classes: Isolated part components (patient-side components) and Non-Isolated part components (computer-side components). It is a high-safe system because it offers a safe protection to the patient by using a main digital isolator that separates the Non-Isolated from the Isolated parts. It also offers circuit protection from the high defibrillation voltage (6000V) by reducing it into a much lower voltage (120V) by using the surge arrester.

B. Software
To control the developed hardware, a graphical program has been developed in LabVIEW [14]. The Graphical User Interface (GUI) is termed as Virtual Instrument (VI) because its appearance and operation imitates physical instruments. LabVIEW contains a comprehensive set of tools for acquiring, analyzing, displaying, and storing data. LabVIEW is used to communicate with hardware for data acquisition via ports such as GPIB, RS232 and RS485. The front panel in Figure 3 shows 9 leads of normal ECG signals while the front panel in Figure 4 shows normal ECG with a red indicator detecting that the V1 lead is off. Heart rate derivation from the ECG is conducted as shown in the block diagram in Figure 5.    Wavelet-based peak detection is applied. The peaks in an ECG signal indicate the rhythm of the heart. Typically, one lead of an ECG signal (such as lead II) consists of 5 peaks and valleys. The first positive deflection is referred to as the P wave. The duration between the Q and S waves is called the QRS duration and indicates the ventricular condition. The peaks in ECG signals usually are corrupted by environment noise and cannot be detected properly by traditional curvingfitting methods. The wavelet-based peak detection method is naturally immune to noise and can detect both sharp and mild peaks/valleys accurately. The wavelet-based method also is less affected by trends in the signal. This item uses the WA Multiscale Peak Detection VI to detect the peaks in an ECG signal and computes the QRS duration as shown in the block diagram in Figure 6.

III. RESULTS AND DISCUSSION
To test the developed system we did various tests using a patient simulator for normal ( Figure 7) and abnormal cases (Figures 8-10). Normal ECG signal.

1) Tachycardia
The heart rate is controlled by electrical signals sent across heart tissues. Tachycardia [15] occurs when an abnormality in the heart produces rapid electrical signals. In some cases, tachycardia may cause no symptoms or complications. However, tachycardias can seriously disrupt normal heart function, increase the risk of stroke, or cause sudden cardiac arrest or death. Treatments may help control a rapid heartbeat or manage diseases contributing to tachycardia. A healthy adult heart normally beats 60 to 100 times a minute when a person is at rest. If you have tachycardia the rate in the upper chambers or lower chambers of the heart, or both, are increased significantly as shown in Figure 8.

2) Atrial Flutter
Atrial Flutter (AFL) [15] is an abnormal heart rhythm that occurs in the atria of the heart. When it first occurs, it is usually associated with a fast heart rate or tachycardia (beats over 100 While this rhythm occurs most often in individuals with CVDs such as hypertension, coronary artery disease, and cardiomyopathy, it may occur spontaneously in people with otherwise normal hearts. It is typically not a stable rhythm, and frequently degenerates into Atrial fibrillation. Rarely, it persists for months to years. Atrial flutter is usually well tolerated initially (a high heart rate is for most people just a normal response to exercise), however, people with other underlying heart diseases or poor exercise tolerance may rapidly develop symptoms, which can include shortness of breath, chest pains, lightheadedness or dizziness, nausea and, in some patients, nervousness and feelings of impending doom. Prolonged fast flutter may lead to decompensation with loss of normal heart function (heart failure). This may manifest as effort intolerance (exertional breathlessness), nocturnal breathlessness, or swelling of the legs or abdomen.

3) Ventricular Fibrillation
Ventricular Fibrillation (V-fib or VF) [15] is a condition in which there is uncoordinated contraction of the cardiac muscle of the ventricles in the heart, making them quiver rather than contract properly as shown in Figure 10. Ventricular fibrillation is a medical emergency and the most commonly identified arrhythmia in cardiac arrest patients. While there is activity, it is undetectable by palpation (feeling) at major pulse points of the carotid and femoral arteries especially by the layperson. Such an arrhythmia is only confirmed by ECG. VF is a medical emergency that requires prompt basic life support interventions because should the arrhythmia continue for more than a few seconds, it will likely degenerate further into a systole ("flat line"). The condition results in cardiogenic shock, cessation of effective blood circulation, and Sudden Cardiac Death (SCD) will result in a matter of minutes.

C. The Realized System
The main designed and developed Embedded Isolated ECG system board with size of 75mm×75mm is shown in Figure 11. IV. CONCLUSION The developed ECG system development stages consist of designing the board, creating the layout, fabricating the printed circuit board, and assembling the components, in order to get the final system. The developed system has the capability to acquire different ECG signals from different sites on the body, protect the patient at this side, amplify the acquired signal, control it, transfer it from an isolated safely system's part www.etasr.com AlMerjad: Development of an Ethernet-based Portable Embedded Isolated ECG System (patient-end part) to a non-isolated one (computer-end part) with perfect isolation. A GUI was built for displaying the acquired signals using the LabVIEW program with the properties of displaying 9 ECG leads simultaneously or any selected specific lead and storing and transferring them through the Ethernet. The presence of physicians, nurses, and paramedics in the PHCs and private clinics ensures the developed system to be of low cost, small, portable, safe, biocompatible, effective, precise, simple, and durable. The system will be applied and validated in future work after Saudi Food and Drug Authority approval.