Keywords

1 Introduction

Within the period between 1990 and 2016, the death rate due to cardiovascular diseases (CVD) in India increased by almost 34% [1]. In 2016, there was an estimated 62.5 million premature loss of life due to CVD in India. Regular visits to a doctor’s chamber are a challenge for the elderly people. Also, in rural areas, there is acute shortage of health providers and infrastructure. India has 1 million doctors of modern medicine to treat its 1.3 billion population. Just 1.1 lakh out of them work in the public health sector, to whom India’s 900 million rural population turns for treatment [2].

The modern technology, IoT, used in health monitoring of a patient wirelessly is a major development in medical arena. Electrocardiogram (ECG) is a diagnostic tool, used to monitor the electrical activity of our heart. For detection of heart diseases remotely, we used IoT in ECG monitoring system. A person can regularly monitor their health using this system. Doctor, sitting at any part of the world, can check the monitored data and accordingly can provide quick services and necessary instructions to the patient. Hence, the time spend by people in travelling to hospitals and waiting in long queues at hospitals can be saved.

Mishra and Chakraborty proposed a smart healthcare application using IoT system based on AD8232 sensor interfaced with Arduino Uno and further connected to cloud using Esp8266 Wi-Fi module [3]. Singh and Jasuja proposed an IoT-based remote ECG monitoring system, where the ECG signal is collected by AD8232 sensor [4]. After the required processing by Arduino Uno and Raspberry Pi 2, the data is sent to the cloud IBM Bluemix for further analysis. Deshpande and Kulkarni proposed an implementation of ECG monitoring system based on Cypress Wireless Internet Connectivity for Embedded Devices (WICED) in IoT platform [5].

Our proposed IoT-based ECG monitoring system consists of the AD8232 ECG sensor module to capture the ECG signal from the body. This signal is first filtered by our designed notch filter for removal of power-line frequencies and then processed by the Arduino Uno. The measured real-time ECG data is displayed on both Arduino’s serial monitor and serial plotter. This signal is further filtered by Symlet wavelet transform in MATLAB environment for removal of baseline wander and uploaded to the cloud server via Wi-Fi. The data stored in the cloud can be then accessed from our designed external Website, for remote access. The main novelty of the system lies in the hardware design of notch filter and the use of Webhostapp Internet hosting service to create our own cloud server in healthcare application.

2 Methodology

Figure 1 shows the block representation of the proposed IoT-based ECG monitoring system. It consists of a sensing unit, a processing unit, and an ECG monitoring unit.

Fig. 1
figure 1

Block representation of our proposed ECG monitoring system

The sensing unit consists of the AD8232 sensor module [6]. It is an integrated signal conditioning block for ECG and other bio-potential measurement applications. The processing unit consists of

Hardware Component. Arduino Uno [7].

Software Component. MATLAB environment [8].

The patients can self-monitor their ECG image and communicate to a remote doctor via IoT platform.

The experimental set-up of our IoT-based real-time remote ECG monitoring system and the placement of the ECG electrodes on the body are shown in Fig. 2a, b, respectively.

Fig. 2
figure 2

a Experimental set-up of ECG monitoring system. b Placement of ECG electrodes on our body

The Arduino UNO is connected to the PC via an USB cable, and the power supply is switched on. When the red LED of the AD8232 ECG sensor module turns on, our system is in operation.

The noise (50 Hz frequency) from electric power system is a major source of noise during the recording of ECG. ECG signal has frequency range from 0.5 to 80 Hz, and power-line frequency of 50 Hz lies within that signal. This corrupts the ECG readings which affect the diagnosis of diseases. Hence, a notch filter is designed to eliminate the power-line frequencies [9, 10] as shown in Fig. 3.

Fig. 3
figure 3

Design of notch filter

The Arduino Uno receives powerline interference free signal, and processed ECG voltage is displayed on serial monitor at every instant of time. The real-time ECG signal, measured directly from the volunteer, is visible on Arduino serial plotter during the run-time [11].

The CoolTerm application [12], a freeware serial terminal software, is used to save the discrete data that appeared on the serial monitor of Arduino Uno in a text file, titled as “ecg.txt”. This “ecg.txt” file (containing ECG data) is used in MATLAB environment for further filtering to remove baseline wander (BLW) which is a major noise source in ECG signal. BLW is a low frequency noise (0.05–3 Hz), characterized by the varying electrical isoline of the ECG signal, arising mainly due to movement during breathing, patient movements, poor contact between electrode cables and ECG recording equipment, inadequate skin preparation where the electrode is placed, and dirty electrodes. BLW severely limits the usefulness of ECG records. Hence, the elimination of this kind of noise is necessary for a better clinical evaluation.

Symlet, a type of discrete wavelet transform (DWT), is used to remove BLW from ECG signal [13] as Symlet wavelets nearly resemble the ECG wave [14]. Figure 4a shows a Symlet6 wavelet, where 6 represent the order, while Fig. 4b shows a typical ECG signal. Figure 5a, b shows the BLW removal algorithm developed in MATLAB R2015a platform and the algorithm for uploading the ECG data to the cloud server, respectively.

Fig. 4
figure 4

a Scaling function of Symlet6 wavelet. b A typical ECG signal

Fig. 5
figure 5

Flowchart for a removal of baseline wander (BLW) from ECG signal in MATLAB. b Uploading ECG signal to cloud server

After removing BLW, the ECG signal is uploaded to the cloud server. Webhostapp [15], a free Internet hosting service, is thus used to create our cloud server https://rpe-iot-ecg.000webhostapp.com. The image file containing the ECG signal of a person is sent to this cloud server. We can observe the ECG signal on this Website, and the signal can be accessed by the respective doctor, in any part of the world.

3 Result and Discussion

An ECG signal (1 out of 50 data samples) obtained from the sensor directly has a lot of noise (Fig. 6a), and our designed notch filter eliminates such noises (Fig. 6b). Figure 7a, b show, respectively, the ECG signal obtained after BLW removal in MATLAB environment and the signal observed from the remote end on our developed Website https://iotlabecg.000webhostapp.com. Both the uploading site (https://rpe-iot-ecg.000webhostapp.com) and the display site (https://iotlabecg.000webhostapp.com) for the ECG data can be viewed by entering the required address in the address bar.

Fig. 6
figure 6

a Noisy ECG signal (without using notch filter). b ECG signal (using notch filter)

Fig. 7
figure 7

a ECG signal observed after baseline wander removal. b ECG signal observed from cloud server https://rpe-iot-ecg.000webhostapp.com

4 Conclusion

Our system is able to provide 24/7 ECG monitoring of patients, and hence, this will reduce the unnecessary hospital visits and transportation cost and consequently result in a reduction in treatment cost. Any patient can take medical advice from any corner of the world because physicians and patient are connected globally via Internet. The MBBS doctor to patient ratio in India is far below the WHO recognized standard till date. Under this circumstance, the proposed system will reduce the huge burden of patients at hospitals. Our system has further scope of improvement by including more physiological parameter measurement sensors like heart rate, SpO2, blood pressure, etc. These uploaded ECG data can be used to create a database for further research and analysis.