1 Introduction

World Heart Federation report stated that every year, heart diseases and strokes claims 17.1 million lives globally and 82 % of which are in the developing world [1]. The situation is alarming especially in low and middle income countries as the mortality rate is very high. The majority of cardiac related deaths could be prevented by providing effective patient centric monitoring devices. Electrocardiogram (ECG) is one of the most important and widely used device for diagnosing the condition of cardiac patients. Normal single channel ECG of the patient which consists of P wave, QRS complex and T wave can be proved as the basic diagnostic tool for self-monitoring. Earlier ECG monitors were quite bulky and a mesh of wires limits the freedom of the patients whose bio potential is required to be measured. With the advancement of miniaturization in the wearable technology, new concept of wearable wireless devices in biomedical research provides high quality cardiac healthcare delivery.

Now days, smartphones have many advanced computing capabilities with more features of connectivity which represents the evolution of traditional desktop based healthcare devices towards wireless smartphone based configurations [2]. It ensures better quality of health care and user acceptability. IDC analyses that the worldwide share of android based smart mobile phones in 2019 is 87 % as compared to 85.1 % in 2018 [3]. According to the report by Park Associates more than 20 million people in the world use at least one wellness or fitness app on their mobile phone [4]. Smartphone based health apps combined with wireless sensors not only reduce the cost of high reach healthcare services but also results in improved efficiency at primary healthcare level especially in rural areas. Moreover, frequent visits to doctor’s clinic for collecting labour intensive manual healthcare parameters can be avoided. As a result, the number of hospitalizations and clinic visits would be reduced, which further assist in minimizing healthcare cost.

2 Related work

In recent years, body sensor network based ubiquitous devices are gaining popularity and are widely accepted worldwide for monitoring real time health of the patients [5, 6]. Many researchers have contributed in development of portable ECG healthcare monitoring systems for home monitoring, remote monitoring/diagnosis and intensive care units (ICU) using zigbee, RF transceiver, bluetooth, Wi-Fi, GSM/GPRS technologies [7, 8]. Mostly bluetooth is the preferred option because smartphones have an inbuilt support available in it and is resistant to narrowband interference.

Jie Wan et al. presented wearable IoT cloud based health monitoring system. In this researchers developed a wearable body area sensor network by embedding heartbeat, body temperature and blood pressure sensors [9]. The real time output of sensors is displayed on LCD and same information is displayed on cloud database server. If abnormality is detected, alerts send to the concerned person/doctor. Later the authors applied SVM and machine learning approaches to establish decision models. Gogate and Bakal developed architecture on 3 tier based cardiovascular disease monitoring system using wireless sensor network [10]. Authors attached available biosensors i.e. heart rate, body oxygen level and temperature. The output of all sensors is given to Arduino nano board which further communicate it to the server for further use in IoT application. Developed system shows accuracy of 95 % during validation with FitBit instruments. A new algorithm was introduced using hibert transform and detect R peaks to differ normal/abnormal heartbeats [11]. Researchers use MIT-BIH arrhythmia data to diagnose heart rate which is processed using windows based mobile phone. The Algorithm validated in terms of sensitivity and productivity which comes out to be 96.97 % and 95.63 % respectively. During validation on individuals ECG traces were contaminated with noise at output.

Ahammed et al. developed Wi-Fi based ECG acquisition module on concerto platform integrated with Cortex M3 [12]. It provides data between microcontroller and Wi-Fi module at 250 samples/sec. Here, authors used two separate hardware for both ECG acquisition module and control card in non-wearable prototype which increases the size of setup. The results were obtained on apple i-phone 4S and power consumption is reduced using CC3000 Wi-Fi module. Rachim et al. proposed armband technology embedded with capacitive coupled electrodes to acquire ECG signals for monitoring heart activity [13]. The armband has three electrodes sewn into it with contact area of 3 × 3 cm and hardware is stacked on two PCB’s having 48 mm diameters each. Authors validated the proposed system output by comparing the obtained output signal with the signal obtained using two wet electrode system. In results mismatch is observed between the ECG traces of proposed and standard instrument. Real time monitoring of ECG is achieved using Android application and it shows heart rate accuracy of 97.3 % while sitting.

Elispa et al. developed wearable zigbee based ECG monitoring prototype using integrated front end and off the shelf components [14].Wireless ECG sensor designed in belt shape to be wearable on chest having PCB dimensions 65 × 34 × 17mm. The ECG sensor is validated and it is observed that a baseline drift was present in the ECG waveform due to patient’s movements and respiration. Similarly there was data loss in the transmission at higher data rates. Power management was done by making zigbee module in sleep mode during ideal position.

Mahmud et al. developed a smart phone based prototype to measure the real time ECG and heart rate [15]. The system comprise of analog front end, microcontroller and bluetooth module for acquisition storage and visualization. Authors acquire the ECG signal from the thumbs and the pressure of fingertip affect the ECG signal. This results in presence of noise on ECG traces. Jeon et al. designed a wearable shirt with three electrodes embedded in it to capture ECG from chest [16]. Entire circuit works on three Panasonic CR123A batteries of 9 volt/1550mAh. The ECG waveform is displayed on Android 2.3 based Samsung Galaxy S2 mobile phone with presence of noise in graph. Since the device is battery powered and use of three batteries further increases its size.

During the initial research efforts, researchers demonstrated that high precision in ECG signal is required to reduce fatalities in healthcare and critical reliable patient diagnosis. Nowadays, wearable diagnostic devices are in demand. LifeSync, SMART, WISCARD, Nonin, AliveCor sensors are examples of commercial cardiac monitoring sensors. With all such developments, widespread use of these devices is distant goal in poor nations and under developed countries. The main reasons are mobility constraints, lack of autonomous diagnostics, high cost, high power consumption, larger size, inconvenient to wear, invasiveness, poor signal quality, low precision, short term monitoring, data security and flexibility. With all the available advanced technologies there are lot of significant challenges and constraints which need to be tackle while designing ECG devices to achieve high performance based comfortable systems.

This paper describes the development of portable, low cost patch type wearable ECG sensor with wireless capability for displaying real time ECG signals on the android device using bluetooth for personal home care. The outline of the rest of the paper is as follows: Sect. 3 describes the implementation of proposed system using complete ECG diagram and application development. Experimental results are validated and presented in Sect. 4 and the paper is concluded in Sect. 5.

3 System Description and Implementation of Proposed Model

The proposed system block diagram model is represented in instinctive way in Fig. 1. It shows the processing of ECG signal coming from the portable ECG device to display on android phone. Bluetooth is the communication protocol between the ECG device and android phone. In this configuration, no wires are used to acquire ECG signals; simply patch type wearable ECG device is connected directly to disposable electrodes that are attached to the chest of the patient.

Fig. 1
figure 1

Wireless ECG front end design block diagram

The system block diagram is explained in next two sub sections:

3.1 Hardware Design

The schematic of analog front-end of ECG circuit shown in Fig. 2 is designed using Texas instrumentation amplifier INA333 micro power CMOS operational amplifier. The versatile 3-opamp design of INA 333 offers excellent accuracy and its small size/low power features make it ideal for low power applications. Three disposable electrodes (Ag-AgCl) are used to acquire the ECG signal from the body in lead –I configuration and the traces of noise are present at the output of each LA-RA disposable chest electrodes (left/right side of chest). The gain of the INA333 is set at low level at initial stage to keep the amplitude of noise at minimum level by selecting appropriate resistor value. The differential output of INA333 is shown in Fig. 3a and it is noted that ECG signal is still highly superimposed by noise.

Fig. 2
figure 2

Analog circuit schematic diagram

In second stage, signal appeared at the output of instrumentation amplifier passed through active low-pass filter designed using OPA2333 having cut-off frequency of 40 Hz to remove baseline wander followed by 4th order RC coupled low pass filter. A high pass filter is assembled around OPA2333 to cut frequencies below 0.5 Hz and it also provides the ac coupling. OPA2333 offers excellent common mode rejection ratio with very low offset voltage. However, at output of 4th order LPF still additional 50 Hz noise and power line interference is present. To reduce this noise notch or band-reject filter were designed. Clean ECG obtained at the output of notch filter is shown in Fig. 3b. In the end, a buffer stage using unity gain amplifier is added to reduce the loading effect. The entire circuit operates on a single supply using 3.6 volt coin battery and is charged using IC LTC4065.

The analog ECG is digitized utilising the 8- bit inbuilt ADC of low power microcontroller (Atmega 128A) where it span between 0-3.3 volt. The firmware is designed in ‘embedded C’ language in AVR studio for digital representation. The microcontroller processes the data and transmits it serially using the Bluetooth module to the mobile phone. Bluetooth is a short range technology accepted universally that allows secure and robust communications as it is used by most mobile phones without adding any extra hardware to it. In this research work, Roving Networks (RN-42) bluetooth module is used. Figure 4 shows the top and bottom view of the assembled wearable ECG sensor without casing.

Fig. 3
figure 3

Analog circuit output at different stages a Output of INA333 opamp b ECG appeared at output of Notch filter

Fig. 4
figure 4

Wireless ECG assembled PCB a Top view b Bottom view

3.2 Application Program Design and Functionality

Figure 5 shows the icon of developed “WirelessECG” application. The developed “WirelessECG” application is tested on android based smartphone. Figure 6 shows the flow chart of the developed application

Fig. 5
figure 5

User interface of Wireless ECG application

Fig. 6
figure 6

Flowchart of android application

The very first step in “WirelessECG” mobile application functionality is to determine whether the adapter of bluetooth is available or not, if yes; then whether it permits exchange of data or not in mobile phone. If the mobile phone does not support the bluetooth, the application will terminate and exit. If mobile phone supports bluetooth, and is not running, a request is generated which implies the user to turn ON the bluetooth. Figure 7a shows the screenshot asking to turn ON bluetooth and enabling BluetoothAdapter() function. With all the above process, Bluetooth will start-up and BluetoothAdapter’s getBondedDevices( ) function will be started, to display all the currently paired bluetooth devices when “Scan Bluetooth Devices” button is pressed. In this case: null, silver1 and MECG2 bluetooth devices are discovered and are shown in Fig. 7b.

Fig. 7
figure 7

Developed application screen shot a to turn ON bluetooth b Scanned Bluetooth devices

The next step is to form the connection and a separate thread class is created for this. Here, MECG2 device is selected and then “Connect ECG Device” button make connection between ECG and mobile’s bluetooth. The exchange of data and information between the app and the device is handled by BlouetoothSocket. This is achieved by pressing “Receive ECG samples” button. The most important task is to plot real time waveform from the set of values or samples coming from the ECG device. This responsibility is taken in account using “achartengine” charting library for chart applications. Line graph method is chosen to plot the graph of incoming ECG signal from the device. This can be done by pressing the “Plot ECG graph” button in the app layout.

In order to prevent the ECG signal received by false users, the bluetooth module is authenticated by entering the passkey on both sides of Bluetooth connection and transmitted samples are encrypted with ‘E’ and ‘G’ keywords in a frame format to maintain the privacy of ECG data. In this case, “1234” pass key is used and bluetooth module has 128 bits inbuilt encryption algorithm for secure communications.

4 Experimental Result and Clinical Validation

The experiments were performed to validate the results of the developed prototype. As per industry standard one method is to inject the known signal into under test developed prototype so that it can face the signals which it supposed to face in real world. This method is called validation by ECG simulator. Other method involved qualitative evaluation in which the output signal of developed prototype is compared with the industry standard commercial instruments by connecting on actual human body known as clinical validation. Based on the results obtained, the evaluation/validation of developed wireless ECG prototype is categorized into two scenarios and is detailed below:

4.1 ECG Simulator Evaluation

As per American Heart Association (AHA) thorough testing and calibration can be done by applying known test signal to developed ECG system. In this research, ECG simulator (make: Dale Technology Corporation) is taken as a standard instrument. It is used as a development tool or service tool by ECG manufacturers to test their ECG machines. ECG simulators generate electrical wave similar to human heart signal. For testing purpose ECG simulator is set at 30, 60, 120 and 240 beats per minute and can generate left arm (LA), Right Arm (RA) and Left Leg (LL) signal virtually as generated by human heart. For evaluation purposes, developed “WirelessECG.apk” Android app installed on mobile phone and raw ECG data is collected and injected into developed prototype ECG sensor from ECG simulator. The baud rate for serial communication between the mobile phone and the bluetooth module was set at 9600 baud. The device data rate was sampled at 470 samples/second. A FIFO buffer was created in microcontroller to store the ECG samples. The transmission retrieval algorithm programmed in microcontroller retrieves the ECG samples from FIFO buffer and transmit these samples using bluetooth device to the mobile phone. The samples are again reassembled in mobile phone in buffer of size 1024 bytes and displayed in the form of ECG graph on mobile phone using the “WirelessECG” app. Figure 8 shows the snap shot of the single channel real time ECG signal obtained on smartphone with sampling frequency of 470 Hz. The output ECG signal obtained using simulator shown in Fig. 8 is clear and of high quality with no visible noise superimposed on the ECG signal and can be seen by automatic zoom feature added to the app graph.

Fig. 8
figure 8

Plotted ECG graph and QRS detected on mobile phone using standard ECG simulator at 120 bpm

Further, percentage error at specific heart rate and R-R interval obtained from ECG waveform is calculated and listed in Table 1.

Table 1 Result of heart rate and R-R interval percentage error at specific heart rates generated by using ECG simulator

The developed ECG sensor was also validated according to the American Health Association (AHA) standards and performance summary of developed sensor is shown in Table 2.

Table 2 Performance summary of developed ECG sensor w.r.t AHA specifications

4.2 Clinical Validation

The clinical validation of wireless ECG was carried out by comparing the detected QRS complex of developed ECG with standard device on human body. In this case RMS (Vesta 301 i model) multilead commercial ECG machine is taken as standard instrument for evaluation at different body locations. The experiment is conducted using three disposable electrodes for testing developed prototype with standard instrument. Figure 9a, b shows the user voluntarily wearing developed wireless ECG sensor on chest (with lead I configuration) and forearm while displaying ECG graph on mobile phone. The prototype is fabricated using acrylic sheet and is pasted to the body using three disposable electrodes without wires. Figure 9c shows the output of ECG obtained using Recorders and Medicare Systems (RMS-Model: VESTA 301 i) ECG standard machine by setting at following parameters: LPF = 0.05 Hz, HPF = 40 Hz, Notch 50 Hz which closely matches with developed prototype. Comparing the results obtained on Android phone it is clear that the ECG signal obtained from actual body of the subject using developed wireless ECG sensor are of good quality and reliable which is very close to that obtained from ECG VESTA 301 i. Detected human body QRS signal events can be related with the abnormalities in the heart.

Table 3 gives the difference between the developed wearable ECG prototype and the available ECG devices developed by various researchers. The comparison of the proposed system with related work shown in Table 3 indicates that device operates at 3.6 volt/330 mA coin cell battery with current consumption of 40 mA and can operate for approximately eight hours continuously with Bluetooth ON. Overall cost of developed sensor is less than 100$ which is half the price of available commercial devices [18,19,20]. Moreover this sensor is using a single battery to operate the complete circuit whereas mostly two batteries are used by the researchers to design positive and negative power supplies for ECG circuits, which increases the size and weight of the device

Fig. 9
figure 9

Real time ECG monitoring using proposed and standard instrument a By placing electrodes on chest. b By placing prototype on forearm c Measurement results of ECG on actual human body using standard instrument

Table 3 Performance comparison with state of art

Researchers in [24, 25] proposed System on Chip (SoC) based ECG monitoring systems which consume less power and are small as compared to developed prototype. But their initial cost of design and development is very high and if number of SoCs required is very small then the production cost per piece will also become high and it becomes beyond the reach of common man. Even a small damage in transistor/component will lead to change complete board which proves to be very costly from service point of view. Mostly large amount of noise is present and detected at the output of SoCs which is not suitable for diagnosing the patients and such systems still need improvements for biosignals acquisition.

5 Conclusion and Future Scope

This paper has presented single channel patch type wearable data acquisition hardware based on mobile application designed using android platform to display real time ECG. This device is directly pasted on disposable electrodes that are attached to the chest of the patient without wires and the PCB is uniquely designed in dumbbell shape to make it wearable with 4.8 cm diameter. Such platforms allow users to perform assistive diagnosis solutions and further utilize the system to monitor on their own the effect of lifestyle changes on their health. The end outcome of this work shows that our bluetooth based ECG sensor provides a low cost, low power, light weight solution for transmitting the ECG samples wirelessly and it turns out to be a very convenient method for patient monitoring in home and hospital care. Moreover, the developed application can be installed on wide range of android phones starting from version 2.2 (Froyo) to 8.0 (Oreo). The bluetooth range of the device was tested up to 10 meters satisfactorily. To evaluate the accuracy of the device, raw ECG signal of specific heart rate is applied and the percentage error for heart rate and R-R interval is calculated. The results observed the reduction in percentage error of heart rate from 0.5 % [17] to 0.2 % at 120 beats per minute whereas for R-R interval accuracy of 98.00 % and 96.048 % is achieved at 120 and 240 bpm respectively. Also, clinical validation shows that received ECG graph is of high quality with no visible noise superimposed on it.

With modifications in the app developed, calculation of heart rate variability and real time ECG analysis can also be done. This sensor can further be extended in order to find out innovative abilities in developing smartphone based internet of things (IoT) applications by sending data on cloud. Authors are currently working on increasing the number of wireless body parameter monitoring devices and designing of sophisticated diagnosing algorithms for integrating these devices that make them suitable for wireless body area network (WBAN) applications.