The Design of Wireless Portable Electrocardiograph Monitoring System Based on ZigBee

The emerging trend in wireless hospitals requires the development of bio-signal acquisition devices to be easily integrated into a single clinical routine. The wired devices used in hospitals and clinics, which makes setup very inconvenient, costly, and difficult to manage patients. It is crucial to develop and design a clinical diagnostic system that takes bio-signal from the body of the patient and transmits wirelessly to the physicians/hospital. In this paper, we have designed a novel portable system for ECG signal acquisition, processing, and wireless transmission using a ZigBee module. Our portable design enhances mobility, small in size, and very cheap for long term monitoring of cardiac patients. The results show that the ECG wave successfully transmitted to the physician, and heartbeat values are visible to the patient. Furthermore, the results of the ECG wave are unclear when the position of electrodes is dislocated.


Introduction
Electrocardiogram (ECG) is a graphical recording of the electrical activity of the heart. It is the most recognized biosignal commonly used for the diagnosis of some heart diseases and abnormalities by analysis of the signal in the ECG wave shape. As per the recent world health organization (WHO) survey, 31% (17.9 million) of deaths occur worldwide due to cardiovascular diseases (CVD) attacks each year [1]. For the hospital information systems, wireless local area networks (WLAN) can frequently move of all types of the terminal in comparison to extended wireless networks, which make the system complex and costly. The authors in [2] have studied that WLAN can improve the communication expedient, working proficiency for hospital employment and can effectually optimize the procedure of hospital management.
The real time bio-signal was taken from the patient generally gets corrupted due to external noise. Hence, the only solution is a noise-free ECG signal. Researchers concentrate on designing a functional system, replace wired devices, to minimize the total cost and attempts to increase the feasibility of wireless ECG devices [3][4]. A signal acquisition system has the number of stages, including signal acquisition through electrodes, instrumentation amplifier, noise filtering, band-limiting the signal, and processing for the extraction of information [5][6][7][8]. [6] studies the distortion occurs during long-term ECG signal recordings for the free human activity where different types of nonlinear threshold filters are employed together with the empirical mode decomposition approach. In order to automatically detect, localize, and classify the noises of single and combined ECG signals, a novel and unified framework has been proposed in [7]. The authors in [8] have used stationary wavelet transform (SWT) in the Weiner filter in order to estimate the free noise ECG wave, where they have showed that their proposed algorithm performs better than classical Weiner filter.
The electrical activity of the heart is used in a clinical environment and the personal healthcare scenario. An important benefit of this system includes the mobility of patients due to remote monitoring and reduces hospital costs [9][10]. The four, i.e., pulse oximeter, temperature, blood pressure, and ECG sensors, have been used in [10] for the development of a portable patient monitoring system, where all the sensors are integrated on a single system with the help of Arduino. With the rapid growth of technology, everything is inter-connected and easy to access for humans. Most of the researches have been conducted on wireless hospital and efficient ECG monitoring system at a distance in wireless body area networks (WBANs) over Bluetooth and Wi-Fi to improve quality of the signal and secure hospital environment [11][12][13][14]. Whereas, cost effective solution with low computational complexities and patient mobility is still a big challenge. A Wi-Fi transmission technology-based ECG patient monitoring system with seven leads has been studied in [11], where physicians can get the real time ECG status of the patients, the system gives the high performance and is less expensive. The author in [12] has studied the main concepts, future trends, and challenges from the perspective of wireless ECG health monitoring systems.
In terms of power and complex circuit, the authors in [15] have proposed a fuzzy logic-based variable resolution controller in order to design an efficient analog to digital converter (ADC). As power is very crucial for wireless ECG monitoring systems, and the proposed design has effectively reduced the power consumption in the system. A novel mobile application based wireless ECG health monitoring system for individual healthcare scenario has been designed in [16], where a low power 16-bit microcontroller is considered to be the core unit of the system. This design contains a wireless Bluetooth module, a storage module, and a module for ECG signal measurement in order to construct the complete ECG health monitoring system. Furthermore, the authors in [17] have designed a portable single channel 12-lead ECG device for home patients. [18] designed a healthcare ECG monitoring system that contains a BMD101 sensor for monitoring biosignals, a CC2640R2F module for wireless transmission of collected biosignals, a ferroelectric microprocessor to provide low power consumption and an MSP430FR2433 microcontroller unit (MCU) which is the core of ECG monitoring system.
In this paper, a wireless ECG monitoring system is designed in a manner that contains three electrodes single lead (one channel), AD8232 ECG module, Arduino, and ZigBee. Electrodes detect bio-signal, which is filtered and amplified simultaneously through signal conditioning circuitry (ECG module). Afterward, ECG signals transmitted through ZigBee to an appropriate physician/hospital at the receiver side. The system is designed as small-sized, low-power, and low-cost solution for appropriate monitoring of cardio patients without compromising their daily doings or activities at home or in a nursing facility. The device provides necessary information in real time with remote availability and detects irregularities in the measured data. Furthermore, it allows physicians to monitor the patient at any time, as routine monitoring is very crucial for proper medical care. This work aims to develop a portable system for wireless ECG monitoring using ZigBee. The system is proposed as a home appliance for patients, which requires constant or routine monitoring by the physician or family. Our system provides patients current health status directly to the physician, and also patients can check the values of ECG, so that they can act in a proactive approach before any critical situation. This system measures, records, and presents the electrical activity of the patient's heart in realtime while conserving their comfort. The overall objective of this paper is to design and implement a portable wireless ECG monitoring system that replaces wired connections and also able to access remote patients. Successful implementation of the proposed system would be beneficial to all heart patients. The design of this system leads to the flexibility and mobility of the patients.
The rest of the paper is organized as follows. Section II contains the system model and discussed in detail the connectivity and working of the ECG monitoring system. Section III discusses programming and software tools. Section IV describes results and discussions. Finally, section V concludes the paper.

System Model
The design of a wireless portable electrocardiograph monitoring system based on the ZigBee module is shown in figure 1. Three sensor pads (Electrodes) of different colors i-e red, yellow, and green capture the electrical signals from the human body, and the ECG module (AD8232) is used to obtain the electrocardiography (ECG) signal. The AD8232 is an integrated signal conditioning module for ECG. It can extract, amplify, and filter small bio-signals in noisy conditions created by movement or motion of electrodes. This design allows an embedded microcontroller or a low power analog-to-digital converter (ADC) to acquire the output signal with ease. In our design, we have used a single-lead (one channel) integrated signal conditioning block for ECG. AD8232 is integrated with several amplifiers like instrumentation, operational, and right leg drive. It has an automatic fast restore circuit, leads off detection circuitry, and mid supply reference buffer. Arduino on the receiver side is connected with ZigBee Rx to receive the ECG signal transmitted by ZigBee Tx and displaying the real time ECG wave on the physician's personal computer (PC). ZigBee is the communication protocol of the IEEE 802.15.4 ZigBee standard and used to connect Arduino with ZigBee. XCTU software is used for testing and configuration of both Tx, Rx ZigBee modules, and ZigBee RF modules.

Interfacing AD8232 with Arduino UNO R3
The heart rate module AD8232 comprises a total of 20 pins. We have used 5 pins which are desired to obtain the ECG signal, i-e LO+, LO-, OUTPUT, VCC & GND. Pin no. 17 is used to provide power to AD8232, which operates on 3.3 volts and is connected with VCC pin of Arduino UNO R3, which also operates at the same voltages. Pin no. 16 of AD8232 is grounded & is the same in case of GND pin of Arduino UNO R3. The Output Pin i-e Pin no.10 of AD8232 is connected to A0 pin of Arduino. LOD-(pin no. 11) and LOD+ (pin no. 12) of AD8232 are connected with pin no.11 and pin no.10 of Arduino, respectively, as given in table 1. LOD+ is the output of leads-off comparator. In dc leadsoff finding mode, LOD+ is low when +IN electrode is connected and is high when disconnected. However, LOD+ is low when both the electrodes (+IN and −IN) are connected and are high when any of the electrodes are disconnected in case of ac leads-off finding mode. LOD− is low when −IN electrode is connected and is high when disconnected in dc leads-off finding mode. However, LOD− is always low in the case of ac leads-off finding mode.

Interfacing LCD with Arduino UNO R3
At the transmitting side, we have used 16x2 LCD to display the ECG values. Out of 16 pins, 12 pins and connected them with the same Arduino UNO R3. VSS pin of LCD is connected with GND pin of Arduino. A power of 5 volts is provided from Arduino to VDD pin of LCD. V0 pin of LCD is connected with a resistor and then grounded. Readwrite (RW) and cathode (K) pins of LCD are connected with GND pin of an Arduino. Anode (A) pin of LCD is connected with 5v pin of an Arduino. RS, E, D4, D5, D6, D7 pins of LCD are connected with 7, 6, 5, 4, 3, 2 pins of an Arduino, respectively, as shown in table 2.

Placement of Sensor Pads
The sensor pads or electrodes used in our design are disposable and cannot be used more than three times. ECG wave is notoriously noisy because it is the measurement of muscle activation. Therefore, it is essential to place these sensor pads properly on the human body in order to obtain accurate and noise-free ECG wave. Some simple tips to improve signal quality are given as: • Keep sensor pads as close to the heart as possible.
• Make sure that right arm (RA) and left arm (LA) sensor pads are on the correct sides of the heart. • Try not to move too much while taking the measurement.
• Try to use fresh pads for each measurement. The pads lose the ability to pass signals with multiple applications. • Prep and clean the body area at the pad's placement.
This will help to make a good connection (as the hair is not a good conductor).
Moreover, the proper sensor placement in the form of figure and table is given in figure 2 and table 5, respectively.

Design Flow
The flow of portable ECG monitoring design can be easily understood in figure 3. In our portable design, all the baud rates are set to 9600 in order to avoid any mismatch at transmitting and receiving Arduino UNO R3 and ZigBee modules. After the appropriate placement of electrodes on the human body, the heart rate module AD8232 will get electrical activities of heart, and ECG values will be shown on LCD, simultaneously the signal will be transmitted by ZigBee module at the transmitting side. If the same signal received by the ZigBee receiver, the ECG wave will be displayed on the doctor's/ physician's PC; otherwise, the ZigBee transmitter will send the signal again.

Design Layout
The complete layout of our design wireless portable ECG monitoring system based on ZigBee is shown in figure 4.

Figure 4. Design layout
Arduino UNO R3 is programmed by considering 10 and 11 pins that are connected with LOD+ and LOD-pins of AD8232 heart rate monitor in order to generate ECG values on LCD as shown in figure 5. If both electrodes are connected to the human body, both the pins will become low. They will display ECG values, however, if both electrodes are not connected to the human body, both the pins will become high, and LCD will show zero value.   figure 6. In order to enable developers to interact with digital radio frequency (RF) modules, XCTU software is designed as a free multi-platform application and is simple to use graphical interface. Before programming the ZigBee module, it must be placed on the Zjgbee adapter and connected with the USB cable to a PC. Both Tx and Rx ZigBee modules of S1 series should be tested first through XCTU software as shown in figure 7. In our design, we have set all the baud rates to 9600, as shown in figure 8.

Results and Discussions
The continuous numeric ECG values are displayed on LCD, as it is difficult for patients to understand the ECG wave. For the serial communication COM 7 is available in our system. However, it can be different. The high values are the sign of good health and these values can be lower if a patient has any heart disease. Furthermore, low ECG values were observed in some cases, such as when the same electrodes were used many times, when the patient was moving from its position and when electrodes were not placed on the correct body position. The ECG wave generates according to ECG values. If any of the electrodes are displaced, some of the values may not appear on LCD; zero values may be obtained in the case of all three electrodes. The ECG heartbeat values are shown in figure 9 at the transmitting side. Figure 10. ECG wave at the receiving side.
The processing IDE software is used at the receiving side on a laptop or PC to obtain the ECG signal of a patient. For the serial communication, COM port number must be different than that we had used to obtain ECG values. In our case, we have used COM 15, but it can be different. A user can only see the ECG heartbeat values on LCD, however the ECG wave will directly be sent to the receiving side with the help of wireless ZigBee modules as shown in figure 10. In case of any critical condition the doctor can contact to the corresponding patient if he finds any problem in the wave. Furthermore, we have observed that if the sensor pads the not placed at the correct body position, noisy ECG signal can be transmitted to the receiving side as shown in figure 11 and lower heartbeat values will be displaced at LCD as well as at the PC. The same scenario is also observed when receiving part is moved much away from transmitting part that depends on the range of ZigBee modules. S1 series only allows a range of 100m.
The Design of Wireless Portable Electrocardiograph Monitoring System Based on ZigBee Figure 11. ECG wave when electrodes are not placed on their exact position.

Conclusion
Cardiovascular and other heart diseases are very sensitive and requires continuous monitoring of patients. It is crucial to develop and design a clinical diagnostic system that take bio-signal from the body of the patient and transmits wirelessly to the physicians/hospital. In this paper, we have designed a novel portable system for ECG signal acquisition, processing and wireless transmission using ZigBee module. Our portable design enhances the mobility, small in size, and very cheap for long term monitoring of cardiac patients. The results show that the ECG wave successfully transmitted to the physician, and heartbeat values are visible to the patient. Furthermore, the results of the ECG wave are unclear when the position of electrodes is dislocated. The design can be used in hospitals, homes, military, sports training, and many other applications.
The design can be further improved by using a transceiver that can receive more than one signal, such as a ZigBee module of series 2, like star network topology. By using different ZigBee or other wireless modules, the range can be extended.