electronics

Article Arm-ECG Wireless Sensor System for Wearable Long-Term Surveillance of Heart Arrhythmias

Angel Villegas 1 , David McEneaney 2 and Omar Escalona 3,*

1 Image Processing Centre, Universidad de Carabobo, Valencia, C.P. 2001, Venezuela; [email protected] 2 Cardiovascular Research Unit, Craigavon Area Hospital, SHSCT, Portadown BT63 5QQ, UK; [email protected] 3 School of Engineering, Ulster University, Newtownabbey BT37 0QB, UK * Correspondence: [email protected]; Tel.: +44-28-90366151

 Received: 10 October 2019; Accepted: 6 November 2019; Published: 7 November 2019 

Abstract: This article presents the devising, development, prototyping and assessment of a wearable arm-ECG sensor system (WAMECG1) for long-term non-invasive heart rhythm monitoring, and functionalities for acquiring, storing, visualizing and transmitting high-quality far-field electrocardiographic signals. The system integrates the main building blocks present in a typical ECG monitoring device such as the skin surface electrodes, front-end amplifiers, analog and digital signal conditioning filters, flash memory and wireless communication capability. These are integrated into a comfortable, easy to wear, and ergonomically designed arm-band ECG sensor system which can acquire a bipolar ECG signal from the upper arm of the user over a period of 72 h. The small-amplitude bipolar arm-ECG signal is sensed by a reusable, long-lasting, Ag–AgCl based dry electrode pair, then digitized using a programmable sampling rate in the range of 125 to 500 Hz and transmitted via Wi-Fi. The prototype comparative performance assessment results showed a cross-correlation value of 99.7% and an error of less than 0.75% when compared to a reference high-resolution medical-grade ECG system. Also, the quality of the recorded far-field bipolar arm-ECG signal was validated in a pilot trial with volunteer subjects from within the research team, by wearing the prototype device while: (a) resting in a chair; and (b) doing minor physical activities. The R-peak detection average sensibilities were 99.66% and 94.64%, while the positive predictive values achieved 99.1% and 92.68%, respectively. Without using any additional algorithm for signal enhancement, the average signal-to-noise ratio (SNR) values were 21.71 and 18.25 for physical activity conditions (a) and (b) respectively. Therefore, the performance assessment results suggest that the wearable arm-band prototype device is a suitable, self-contained, unobtrusive platform for comfortable cardiac electrical activity and heart rhythm logging and monitoring.

Keywords: bipolar cardiac electrograms; arm-ECG monitoring; wearable sensor systems; ECG dry electrodes; Wi-Fi connectivity; heart arrhythmic events detection

1. Introduction Despite the overall decrease in cardiovascular mortality in recent decades, sudden cardiac death, usually caused by lethal arrhythmias, accounts for 50% of heart disease-related deaths and occurs among patients never diagnosed or previously classified as at low cardiovascular risk [1]. Different paroxysmal arrhythmias only manifest sporadic symptoms requiring long-term cardiac monitoring for correct diagnosis [2]. In such cases, implantable loop recorders (ILRs) are currently becoming more common and are considered as an important tool by clinicians; however, their use requires costly surgical procedures and carries infection risks [3]. Holter monitors offer high-quality ECG signals for medical diagnosis, but they are typically limited to 24–48 h of continuous use since

Electronics 2019, 8, 1300; doi:10.3390/electronics8111300 www.mdpi.com/journal/electronics Electronics 2019, 8, 1300 2 of 26 they require wires that interfere with user’s daily activities and skin-adhesive-based electrodes, which may produce patient discomfort after a few days [4] and the adhesive regularly degrades causing electrodes to detach as a result of sweating. Cost-effective, non-invasive, long-term ECG monitoring alternatives for early detection of arrhythmias can have a positive impact on the effectiveness of heart disease treatment, therefore reducing mortality and improving patient’s prognosis, particularly in an ageing population [5]. In recent years, technological advances in electronics, wireless communications, sensor materials and physiological data-processing tools have made possible ubiquitous computing available for healthcare applications [6]. As a result, a variety of experimental wearable smart devices have been developed for ECG monitoring; they include T-shirts or vests [7,8], belts [9,10], adhesive patches [11,12] and armbands [13]. In addition, there are commercially available systems in the form of portable Holter monitors (e.g., NH-301 (Norav Medical GmhH, Wiesbaden, Germany)), adhesive patches (e.g., Zio (iRhythm San Francisco, CA, USA)) and smartwatches (e.g., Apple Watch 5 (Apple Inc., Cupertino, CA, USA)), targeting similar applications. Still, every technology has its advantages, limitations and drawbacks. Portable Holter devices and ECG patches are currently accepted as medical-grade devices; however, as stated above they use gelled electrodes and adhesive materials that produce skin irritation and are susceptible to detach due to sweat or moisture. ECG monitoring systems based on textile electrodes and ECG T-shirts, in particular, have been studied over the last decade [7]. They represent an interesting approach to unobtrusive cardiac activity measurement. Nevertheless, they require a stretch fit adapted to the user’s body for tribological noise reduction and they are not designed to be worn for long periods (>24 h). Other approaches, such as smartwatches or smartphone-based ECG recorders, interfere with users’ daily routines since they require touching specific metallic pads on the device for ECG measurement, e.g., KardiaMobile (AliveCor Inc., Mountain View, CA, USA). Therefore, they are only suitable for intermittent patient monitoring. Although ECG armband devices have been less explored than other options, they offer substantial advantages regarding user comfort and adaptability being, therefore, a convenient option for long-term continuous usage. Lynn et al. reported a feasibility study which provides sufficient evidence for the development of an ECG monitor worn at the left arm in [3], including the viability of using contactless dry electrode systems (EPIC™ Sensor (Plessey Semiconductors, Plymouth, UK)) [14]. Escalona et al. [5] reported preliminary studies which indicated the best possible electrode locations for ECG signal recordings along the left arm. Their results suggested different locations for accurate ECG signal reconstruction using far-field potentials, especially across the upper left arm. A posterior analysis using advanced denoising techniques was applied to 34 clinical cases showing three primary locations for this purpose [4]. More recently, Vizcaya et al. [15] used an arm-ECG database gathered from 153 subjects to develop a method based on artificial intelligence for estimation of standard ECG Lead I using a single bipolar upper-arm ECG signal. This paper presents the devising and development of a novel unobtrusive upper-arm wearable prototype system device for ECG monitoring and recording on the upper-left arm. The research team continue their 10-year contribution investigating the possibilities of extracting meaningful ECG information using far-field potentials in long-term cardiac rhythm monitoring. The raw bipolar electrograms, recorded using the proposed arm wearable band with reusable dry electrodes, are analyzed and compared to data acquired using wet gel electrodes in our previous studies.

2. Materials and Methods

2.1. Bipolar Arm-ECG Signals Previous studies have reported the feasibility and potential advantages of an arm-worn device for non-invasive cardiac rhythm monitoring, using dry electrodes located in a comfort zone for wearable devices recommended by Gemperle et al. [16]. The reported best amplitude range of recorded cardiac electrical signals, or ECGs, ranged from 12.67 to 225.5 uV (p-p), with signal-to-noise ratio (NSR) values Electronics 2019, 8, x FOR PEER REVIEW 3 of 26 Electronics 2019, 8, 1300 3 of 26 ratio (NSR) values from 1.27 to 197.5 [3]. Although the bipolar ECG signals from the upper arm were shownfrom 1.27 to have to 197.5 the [best3]. Although signal strength the bipolar characterist ECG signalsics for fromECG themonitoring upper arm purposes, were shown they toare have still theof lowbest amplitude signal strength and characteristicsare prone to power for ECG line monitoring and electromyographic purposes, they (EMG) are still interference, of low amplitude besides and the are additionalprone to power noise line artefacts and electromyographic resulting from electrode (EMG) interference, movement. besides Nevertheless, the additional effective noise denoising artefacts techniquesresulting from for arm-ECG electrode movement.are currently Nevertheless, available for etheffective treatment denoising of far-field techniques arm-ECG for arm-ECG signals. areIn previouscurrently availablestudies [4], for thebipolar treatment lead ofelectrodes far-field arm-ECGhave been signals. positioned In previous (transversally studies [4 ],and bipolar axially lead oriented)electrodes on have different been positioned anatomical (transversally locations alon andg axiallythe left oriented) upper-arm. on diThefferent study anatomical has suggested locations a transversally-orientedalong the left upper-arm. bipolar The lead study on has the suggested upper arm a transversally-oriented(see Lead-1 definition bipolarin Figure lead 1) as on one the of upper the mostarm (seesuitable Lead-1 localizations definition infor Figure ECG 1signal) as one recovery, of the most and suitablethat other localizations locations (Lead-4 for ECG and signal Lead-6) recovery, can alsoand thatprovide other meaningful locations (Lead-4 ECG andinformation. Lead-6) can However, also provide they meaningful are not useful ECG information. for constructing However, an arm-bandthey are not wearable useful device, for constructing which can an secure arm-band the dr wearabley ECG electrode device, system which canagainst secure the theskin dry surface ECG withoutelectrode the system need of against any adhesive the skin surfacesubstance. without the need of any adhesive substance.

Figure 1. Suggested electrode locations for electrocardiographic signals (ECG) recovery along the left Figure 1. Suggested electrode locations for electrocardiographic signals (ECG) recovery along the arm [4]. left arm [4]. 2.1.1. Dry ECG Electrode System 2.1.1. Dry ECG Electrode System The possible materials used for dry-electrode systems in wearable long-term ECG devices is still an openThe issue. possible Several materials studies haveused proposed for dry-electrode textile and systems flexible in electrodes wearable [7 long-term,17], non-contact ECG devices capacitive is stillelectrodes an open [13 issue.,14,18 Several,19] and studies traditional have bio-compatible proposed textile metallic and flexible disc electrodes electrodes [20 [7,17],]. In particular, non-contact the capacitiveworks of Chielectrodes et al. [8 ][13,14,18,19] and Meziane and et al.traditional [21] present bio-compatible extensive literature metallic reviews disc electrodes on dry-electrode [20]. In particular,technologies the for works ECG of recording Chi et al. applications. [8] and Meziane et al. [21] present extensive literature reviews on dry-electrodeECG acquisition technologies systems for ECG rely recording on the stability applications. of the skin–electrode interface impedance for properECG operation. acquisition In asystems previous rely study, on Bosnjakthe stability et al. [of22 ]the experimentally skin–electrode characterized interface impedance this parameter for properwith various operation. dry-electrode In a previous materials study, for wearable Bosnjak cardiac et al. rhythm[22] experimentally monitoring systems. characterized Silver–silver this parameterchloride (Ag–AgCl) with various dry dry-electrode electrodes showed materials the second-best for wearable results cardiac in therhythm frequency monitoring range fromsystems. 0.05 Silver–silverto 150 Hz. Also, chloride the study (Ag–AgCl) compared dry theelectrodes ECG signal showed waveforms the second-best recorded withresults standard in the frequency pre-gelled rangeAg–AgCl from electrodes 0.05 to 150 to the Hz. signal Also, quality the study obtained compared using athe range ECG of dry-electrodesignal waveforms materials. recorded The usewith of standarddry (non-gelled) pre-gelled Ag–AgCl Ag–AgCl electrodes electrodes showed to the sign betteral quality results inobtained comparison using toa range other of materials, dry-electrode hence materials.supporting The the use decision of dry of (non-gelled) using them inAg–AgCl the arm-ECG electrodes recording showed device better [5]. results in comparison to other Morematerials, specifically, hence supporting we decided the todecision use 10-mm of using sintered them in silver–silver the arm-ECG chloride recording electrode device [5]. disks (FigureMore2a), specifically, which proved we todecided be more to use electrically 10-mm stablesintered for silver–silver long-term operationchloride electrode than Ag /disksAgCl (Figureelectrodes 2a), manufactured which proved with to abe galvanization more electrical processly stable [23, 24for], olong-termffering advantages operation of than relatively Ag/AgCl low electrodesimpedance, manufactured being re-usable with (in onea galvanization subject) and long-lasting.process [23,24], They offering also have advantages a non-polarizable of relatively behavior low impedance,and highermechanical being re-usable stability (in than one regular subject) silver–silver and long-lasting. chloride electrodesThey also [25 have]. Furthermore, a non-polarizable sintered behavior and higher mechanical stability than regular silver–silver chloride electrodes [25].

Electronics 2019, 8, 1300 4 of 26 Electronics 2019, 8, x FOR PEER REVIEW 4 of 26

Ag–AgClFurthermore, electrodes sintered are increasinglyAg–AgCl electrodes being used are for incr measurementseasingly being of veryused low for amplitudemeasurements biopotential of very signalslow amplitude [25]. Nevertheless, biopotential due signals to the rigid[25]. natureNevertheless, of the electrode–skin due to the rigid interface nature in of dry the electrodes, electrode–skin they areinterface more prone in dry to presentelectrodes, motion they artefact are more and ECG pron baselinee to present instability motion problems. artefact To and mitigate ECG the baseline latter issue,instability it is helpful problems. to restrict To mitigate the bandwidth the latter of issue, the ECG it is signal helpful monitoring to restrict to the between bandwidth 0.5 and of 40the Hz ECG at thesignal front-end monitoring stage asto described between in0.5 the and following 40 Hz at section. the front-end stage as described in the following section.

(a) (b)

FigureFigure 2. 2.Arm-ECG Arm-ECG sensor: sensor: (a ()a top) top and and bottom bottom views views of of the the sintered sintered Ag–AgCl Ag–AgCl electrodes electrodes disks disks used used in thein system;the system; (b) electrode(b) electrode positions positions on the on leftthe upper-arm.left upper-arm.

TheThe position position of theof the electrodes electrodes was selectedwas selected considering considering the results the weresults reported we reported from our previousfrom our worksprevious [4,5]. works According [4,5]. to According these studies, to these the most studies, convenient the most anatomical convenient location anatomical for a bipolar location arm-ECG for a recordingbipolar arm-ECG lead is using recording a transversally lead is using disposed a transversa electrodelly pair disposed at the upperelectrode arm, pair as shownat the upper in Figure arm,2b. as Inshown this way, in Figure the arm-ECG 2b. In this signal way, can the be arm-ECG recorded signal with sucanffi cientbe recorded amplitude with and sufficient tolerable amplitude noise levels and fortolerable reliable noise QRS complexlevels for detection reliable andQRS waveform complex detection features extraction, and waveform as well features as heart extraction, rate and possible as well standardas heart ECGrate Leadand possible I estimation standard and reconstruction ECG Lead I fromestimation the bipolar and arm-ECGreconstruction lead [from15]. the bipolar arm-ECG lead [15]. 2.1.2. Front-End ECG Amplifier Configuration 2.1.2.A Front-End typical ECG ECG signal Amplifier acquisition Configuration system contains several chained stages of amplification and filteringA blockstypical (see ECG Figure signal3). acquisition First, an instrumentation system contains amplifier several (INA) chained receives stages the of di amplificationfferential signals and capturedfiltering byblocks the sensing (see Figure electrodes, 3). First, through an instrumentation a patient-protection amplifier circuit block.(INA) This receives stage oftenthe differential provides lowsignals amplification captured (G1)by the and sensing it is followed electrodes, by a high-passthrough a filtering patient-protection amplifier block circuit (HPF) block. and This a second stage amplifieroften provides stage (G2). low Finally,amplification a low-pass (G1) filterand it (LPF) is followed reduces by the asignal high-pass bandwidth filtering according amplifier to block the ECG(HPF) frequency and a second range before amplifier going stage into an(G2). analog-to-digital Finally, a low-pass converter filter (ADC) (LPF) subsystem reduces connectedthe signal orbandwidth embedded according in a to the ECG (MCU).frequency In manyrange applications,before going into a right an leganalog-to-digital drive (RLD) amplifierconverter circuit(ADC) is subsystem used to reduce connected the common-mode or embedded in interference, a microcontroller in order (MCU). to enhance In many the applications, overall front-end a right systemleg drive performance. (RLD) amplifier In a classical circuit scheme is used of ECGto reduce acquisition, the common-mode each block is implemented interference, using in order several to discreteenhance components. the overall front-end system performance. In a classical scheme of ECG acquisition, each blockCurrently, is implemented ECG acquisition using several systems discrete are components. developed using specialized analog front-end (AFE) circuits, which combine the functionality of multiple signal processing blocks into a single integrated circuit. Table1 summarizes the main specifications for various commercially available integrated circuits for developing ECG acquisition systems.

Electronics 2019, 8, x FOR PEER REVIEW 4 of 26

Furthermore, sintered Ag–AgCl electrodes are increasingly being used for measurements of very low amplitude biopotential signals [25]. Nevertheless, due to the rigid nature of the electrode–skin interface in dry electrodes, they are more prone to present motion artefact and ECG baseline instability problems. To mitigate the latter issue, it is helpful to restrict the bandwidth of the ECG signal monitoring to between 0.5 and 40 Hz at the front-end stage as described in the following section.

(a) (b)

Figure 2. Arm-ECG sensor: (a) top and bottom views of the sintered Ag–AgCl electrodes disks used in the system; (b) electrode positions on the left upper-arm.

The position of the electrodes was selected considering the results we reported from our previous works [4,5]. According to these studies, the most convenient anatomical location for a bipolar arm-ECG recording lead is using a transversally disposed electrode pair at the upper arm, as shown in Figure 2b. In this way, the arm-ECG signal can be recorded with sufficient amplitude and tolerable noise levels for reliable QRS complex detection and waveform features extraction, as well as heart rate and possible standard ECG Lead I estimation and reconstruction from the bipolar arm-ECG lead [15].

2.1.2. Front-End ECG Amplifier Configuration A typical ECG signal acquisition system contains several chained stages of amplification and filtering blocks (see Figure 3). First, an instrumentation amplifier (INA) receives the differential signals captured by the sensing electrodes, through a patient-protection circuit block. This stage often provides low amplification (G1) and it is followed by a high-pass filtering amplifier block (HPF) and a second amplifier stage (G2). Finally, a low-pass filter (LPF) reduces the signal bandwidth according to the ECG frequency range before going into an analog-to-digital converter (ADC) subsystem connected or embedded in a microcontroller (MCU). In many applications, a right leg drive (RLD) amplifier circuit is used to reduce the common-mode interference, in order to enhance the overall front-end system performance. In a classical scheme of ECG acquisition, each Electronicsblock is2019 implemented, 8, 1300 using several discrete components. 5 of 26

Figure 3. Typical ECG data acquisition block diagram using discrete components.

Table 1. Commercially available ECG front-end circuits.

Characteristic ADS129X ADS119X ADAS1000-3 AD8233 AD8232 MAX30001 Input channels 2,4,6,8 4,6,8 3 1 1 1 Noise level (uVpp) 4–8 12 14 8.5 12 6.6 Single supply Yes Yes No Yes Yes No ADC bits 24 16 24 N/AN/A 18 Adjustable filters No No Yes Yes Yes Yes Gain range 1 to 12 1 to 12 1.4 to 4.2 min 100 min 100 20 to 160 Typical package 28/64 TQFP 64 TQFP 64 LQFP 20 WLCSP 20 LFCSP 30 WLCSP Hand soldering Yes Yes Yes No Yes No Referential cost (£) 10.11–31.28 14.24–22.85 17.37 3.68 3.0 9.13

Some AFE solutions like ADS129X and ADS119X family chips (Texas Instruments Inc., Dallas, TX, USA) or ADAS1000-3 (Analog Devices, Inc., Norwood, MA, USA) offer high integration opportunities, but their use requires higher post-processing, imposing a heavier computational load over the microcontroller. According to the results of previous studies, the upper-arm ECG signal is expected to be noisy and presents a low-amplitude signal level [3], therefore a high total analog gain and high DC blocking capacity are required. Additionally, the above-mentioned circuits have a multiple ECG inputs channel, which is not necessary for our design purpose. In devising the targeted arm-ECG sensor system, we considered the AD8232 and AD8233 (Analog Devices, Inc., Norwood, MA, USA) as the most convenient options. The AD8232 analog front-end can be manually fixed, hence more convenient for rapid prototyping; also, its use has been reported to achieve satisfactory performance [10,11,26]. The AD8232 contains a high-quality instrumentation amplifier with a fixed gain of 100 V/V, capable to amplify very small signals and provide electrode offset rejection up to 300 mV. ± The filtering topologies, cut-off frequencies and gain can be adjusted by changing a few passive components. In our sensor, the AD8232 was configured to implement a two-pole high-pass filter followed by a two-pole low-pass filter, with cutoff frequencies of 0.5 and 40 Hz, respectively. Using this setup is expected to reduce motion artifacts, ECG signal baseline wandering and higher-frequency EMG (electromyogram) components to tolerable levels, avoiding amplifier saturation. However, it is contemplated that significant EMG noise will appear in the arm-ECG signals depending on the user’s physical activity. From the schematic depicted in Figure4, the filters’ cut-o ff frequencies were calculated using the expressions in Equation (1).

10 fhp = 2π √R1R2C1C2 1 (1) flp = 2π √R4R5C3C4 Electronics 2019, 8, x FOR PEER REVIEW 5 of 26

Figure 3. Typical ECG data acquisition block diagram using discrete components.

Currently, ECG acquisition systems are developed using specialized analog front-end (AFE) circuits, which combine the functionality of multiple signal processing blocks into a single integrated circuit. Table 1 summarizes the main specifications for various commercially available integrated circuits for developing ECG acquisition systems.

Table 1. Commercially available ECG front-end circuits.

Characteristic ADS129X ADS119X ADAS1000-3 AD8233 AD8232 MAX30001 Input channels 2,4,6,8 4,6,8 3 1 1 1 Noise level (uVpp) 4–8 12 14 8.5 12 6.6 Single supply Yes Yes No Yes Yes No ADC bits 24 16 24 N/A N/A 18 Adjustable filters No No Yes Yes Yes Yes Gain range 1 to 12 1 to 12 1.4 to 4.2 min 100 min 100 20 to 160 Typical package 28/64 TQFP 64 TQFP 64 LQFP 20 WLCSP 20 LFCSP 30 WLCSP Hand soldering Yes Yes Yes No Yes No Referential cost (£) 10.11–31.28 14.24–22.85 17.37 3.68 3.0 9.13

Some AFE solutions like ADS129X and ADS119X family chips (Texas Instruments Inc., Dallas, TX, USA) or ADAS1000-3 (Analog Devices, Inc., Norwood, MA, USA) offer high integration opportunities, but their use requires higher post-processing, imposing a heavier computational load over the microcontroller. According to the results of previous studies, the upper-arm ECG signal is expected to be noisy and presents a low-amplitude signal level [3], therefore a high total analog gain and high DC blocking capacity are required. Additionally, the above-mentioned circuits have a multiple ECG inputs channel, which is not necessary for our design purpose. In devising the targeted arm-ECG sensor system, we considered the AD8232 and AD8233 (Analog Devices, Inc., Norwood, MA, USA) as the most convenient options. The AD8232 analog front-end can be manually fixed, hence more convenient for rapid prototyping; also, its use has been reported to achieve satisfactory performance [10,11,26]. The AD8232 contains a high-quality instrumentation amplifier with a fixed gain of 100 V/V, capable to amplify very small signals and provide electrode offset rejection up to ±300 mV. The filtering topologies, cut-off frequencies and gain can be adjusted by changing a few passive components. In our sensor, the AD8232 was configured to implement a two-pole high-pass filter followed by a two-pole low-pass filter, with cutoff frequencies of 0.5 and 40 Hz, respectively. Using this setup is expected to reduce motion artifacts, ECG signal baseline wandering and Electronics 2019, 8, x FOR PEER REVIEW 6 of 26 higher-frequency EMG (electromyogram) components to tolerable levels, avoiding amplifier Electronicssaturation.2019 ,However,8, 1300 it is contemplated that significant EMG noise will appear in the arm-ECG6 of 26 From the schematic depicted in Figure 4, the filters’ cut-off frequencies were calculated using signals depending on the user's physical activity. the expressions in Equation (1). 10 𝑓 2𝜋𝑅𝑅𝐶𝐶 (1) 1 𝑓 2𝜋𝑅𝑅𝐶𝐶 The additional gain in the low-pass filter stage is given by Equation (2). The values of the resistors were chosen to set a system total gain of 1100 V/V, resulting in a differential input range of ±1.5 mV. The system resolution using a 10-bit analog-to-digital converter is 2.93 uV.

𝐴 1𝑅⁄𝑅 (2) FigureFigure 4.4. SimplifiedSimplified schematicschematic ofof filtersfilters topologytopology usingusing thethe AD8232AD8232 configuration.configuration. A step-down resistor network with an additional one-pole RC anti-aliasing filter was used to interfaceThe additionalthe AD8232 gain to inthe the microcontroller. low-pass filter stageThus, is the given circuit by Equation design matches (2). The the values microcontroller’s of the resistors wereallowed chosen input to signal set a system amplitude total gainrange, of while 1100 V avoi/V, resultingding unwanted in a diff erentialhigh-frequency input range noise of from1.5 mV.the ± digitalThe system peripheral resolution devices using affecting a 10-bit the analog-to-digital digitization process. converter is 2.93 uV.

2.2. Overall System Architecture Alp = 1 + R6/R7 (2) The developed system consists of an arm-wearable sensor band, named WAMECG1, with a A step-down resistor network with an additional one-pole RC anti-aliasing filter was used to configured analog front-end amplifier for signal conditioning, an embedded processor with local interface the AD8232 to the microcontroller. Thus, the circuit design matches the microcontroller’s storage and wireless communication capability, and the software (ECGView) required for its allowed input signal amplitude range, while avoiding unwanted high-frequency noise from the digital configuration and operation. The general architecture, shown in Figure 5, indicates the system peripheral devices affecting the digitization process. operates in infrastructure network mode, requiring the existence of an access point (Wi-Fi router), the2.2. wearable Overall System arm sensor Architecture and a , or smartphone. The WAMECG1 prototype device, based on the ESP8266 system on a , is configured as a standardThe Wi-Fi developed station. system It implements consists ofan anHTTP arm-wearable server, which sensor is available band, named to other WAMECG1, devices within with the a sameconfigured WLAN analog network, front-end allowing amplifier the sensor for signal to conditioning,be easily configured an embedded and monitored. processor withOnly local one storage HTTP clientand wireless (computer communication or smartphone) capability, can be and served the software(connected (ECGView) to the sensor) required at a for time. its configurationOnce the system and hasoperation. been configured The general and architecture, the ECG shownacquisition in Figure starte5,d, indicates it is able the of system recording operates the inarm-ECG infrastructure signal continuouslynetwork mode, up requiring to 72 hours the (limited existence by of battery an access size point and (Wi-Fipower router),consumption). the wearable Afterwards, arm sensor the Wi-Fi and a connectionpersonal computer, is no longer laptop required or smartphone. until the data are going to be downloaded for further analysis.

Figure 5. Functional diagram of the developed arm-ECG wireless sensor system (WAMECG1).

Electronics 2019, 8, 1300 7 of 26

The WAMECG1 prototype device, based on the ESP8266 , is configured as a standard Wi-Fi station. It implements an HTTP server, which is available to other devices within the same WLAN network, allowing the sensor to be easily configured and monitored. Only one HTTP client (computer or smartphone) can be served (connected to the sensor) at a time. Once the system has been configured and the ECG acquisition started, it is able of recording the arm-ECG signal continuously up to 72 h (limited by battery size and power consumption). Afterwards, the Wi-Fi connection is no longer required until the data are going to be downloaded for further analysis.

2.2.1. Main Operational Features The system supports two modes of operation:

Real-Time (monitor function): In this operation mode, the arm-ECG signal is acquired but not • stored in the internal memory. Instead, it is sent to a connected client (computer or smartphone) for visualization. The main purpose of this operation mode is to initially ensure there is a good quality signal and correct skin–electrode contact before starting a longer-time recording. File (Holter function): The sensor acquires and stores the left-arm ECG signal in its internal memory. • Later, the data can be downloaded to a personal computer or smartphone using a standard Web browser and the developed ECGView application. This is the default operation mode.

2.2.2. Data Storage Protocol Binary encoded files have been the predominant method for ECG data storage [27]. The main advantage of this approach is the reduced storage space required for its implementation, having significant value in resource-constrained embedded applications. The European Data File format (EDF) is a simple binary format for storage and exchange of biological signals [28]. This format was chosen due to its simplicity to implement using an embedded platform. Once created, only one field of the record header in the EDF file has to be updated when appending a new data record. Moreover, the original file format and its subsequent version have been widely accepted as industry standards, with plenty of existing software tools available to manage this type of files.

2.2.3. Wireless Communication Technology In recent years, Bluetooth, ZigBee, radio frequency identification (RFID) and Wi-Fi have been used for wireless communications in healthcare monitoring applications [6]. Table2 summarizes recent works in wireless ECG monitoring systems. We discarded using ZigBee and similar ISM proprietary band transceivers (based on IEEE 802.15.4 standard) since these devices offer low data transfer rates and they are not factory available in smartphones and personal or laptop computers. Furthermore, they require the installation of additional hardware, thus increasing costs and limiting the portability of the design.

Table 2. Wireless technologies used in ECG monitoring systems.

Author Wireless Technology Power Consumption System Data Rate Nemati et al. [19] ISM 2.4 GHz (ANT) 25 mA 38.4 kbps Gaxiola-Sosa et al. [29] ISM 2.45 GHz 33–40 mA 500 kbps Lee et al. [30] ZigBee 17.4–18.8 mA 250 kbps Aleksandrowicz and Leonhardt [18] ZigBee 15 mA 250 kbps Rachim and Chung [13] Bluetooth 19.6–24 mA ND ElSaadany et al. [31] Bluetooth 3–30 mA 300 kbps Touati et al. [32] Bluetooth 27 mA 1 Mbps Pineda-López et al. [33] Bluetooth 59.58–110 mA 8.192 kbps Ahammed and Pillai [34] Wi-Fi 260–275 mA 24 Mbps Khalaf and Abdoola [35] Wi-Fi 309 mA 1 Mbps Electronics 2019, 8, 1300 8 of 26

Bluetooth transceivers surpass Wi-Fi radios in terms of power consumption, making Bluetooth-based wireless solutions more efficient in battery usage. On these systems, both devices Electronics(ECG 2019 sensor, 8, x FOR and PEER the baseREVIEW station) have to be paired before start exchanging data, and typically,8 of 26 they must remain connected while in operation. In this scenario, the wearable sensor is dependent on the communication infrastructure, not being able to operate as a stand-alone device. On the other hand, communication infrastructure, not being able to operate as a stand-alone device. On the other hand, while the communication data rate in commercial off-the-shelf Bluetooth modules is usually under 1 while the communication data rate in commercial off-the-shelf Bluetooth modules is usually under Mbps, Wi-Fi radios have higher data rate and transmission range making them a better choice for 1 Mbps, Wi-Fi radios have higher data rate and transmission range making them a better choice for transmitting large volumes of data, as was required for our design. transmitting large volumes of data, as was required for our design.

2.3. 2.3.Hardware Hardware Design Design The Thearm-ECG arm-ECG wireless wireless sensor sensor system system shown inin Figure Figure6 includes 6 includes three three main main blocks blocks of hardware: of hardware:(a) the power(a) the supply power and supply battery and management; battery ma (b)nagement; the ECG sensors(b) the and ECG analog sensors acquisition and analog front-end, acquisitionas described front-end, above; as and described (c) the digitalabove; processorand (c) the and digital wireless processor communication and wireless block. communication block.

FigureFigure 6. Architecture 6. Architecture block block diagram diagram of the of devised the devised arm-ECG arm-ECG wireless wireless sensor sensor system system (WAMECG1). (WAMECG1). 2.3.1. Power Supply and Battery Management 2.3.1. Power Supply and Battery Management The system is powered from a single 2300 mAh, 3.7 V LiPo battery and includes a battery charger The system is powered from a single 2300 mAh, 3.7 V LiPo battery and includes a battery with a low-dropout regulator to provide a clean power supply for the components. The battery charger charger with a low-dropout regulator to provide a clean power supply for the components. The was implemented using the MCP73831 charge management controller circuit (Microchip Technology battery charger was implemented using the MCP73831 charge management controller circuit Inc., Chandler, AZ, USA), which offers three charging modes: pre-conditioning or trickle charge, (Microchip Technology Inc., Chandler, AZ, USA), which offers three charging modes: constant-current and constant-voltage. During the charging process the battery can reach up to 4.232 V; pre-conditioning or trickle charge, constant-current and constant-voltage. During the charging ECG amplifying circuitry and microcontroller unit used in this design operate at 3.3 V, therefore the use process the battery can reach up to 4.232 V; ECG amplifying circuitry and microcontroller unit used of an efficient, low-dropout and low-noise 3.3 V regulator was required. For this purpose, we selected in this design operate at 3.3 V, therefore the use of an efficient, low-dropout and low-noise 3.3 V the LP2989 integrated circuit (Texas Instruments Inc., Dallas, TX, USA). This component requires regulator was required. For this purpose, we selected the LP2989 integrated circuit (Texas only four external passive components to operate, supplies a maximum current of 500 mA (typical Instruments Inc., Dallas, TX, USA). This component requires only four external passive components dropout of 310 mV) with a load regulation of 0.4% and a voltage accuracy of 0.75%, meeting the power to operate, supplies a maximum current of 500 mA (typical dropout of 310 mV) with a load requirements of our sensor system. regulation of 0.4% and a voltage accuracy of 0.75%, meeting the power requirements of our sensor system.2.3.2. Digital Processor and Wireless Communication Management

2.3.2. DigitalThe systemProcessor proposed and Wireless was developed Communication using the Management ESP8266EX (Espressif Systems, Shanghai, China) as a digital processor. The ESP8266 is a low-cost system on a chip (SoC), including a high performance The system proposed was developed using the ESP8266EX (Espressif Systems, Shanghai, 32-bit RISC processor and 802.11/b/g/n radio transceiver. It has been widely used for the rapid China) as a digital processor. The ESP8266 is a low-cost system on a chip (SoC), including a high development of smart sensors applications and IoT solutions. The module can perform as a slave performance 32-bit RISC processor and 802.11/b/g/n radio transceiver. It has been widely used for with another host microcontroller or a standalone system inasmuch as the Wi-Fi stack leaves up to the rapid development of smart sensors applications and IoT solutions. The module can perform as a slave with another host microcontroller or a standalone system inasmuch as the Wi-Fi stack leaves up to 80% of the processing capabilities available for user application. The microcontroller core includes a Tensilica LX106 ultra-low-power 32-bit processor capable to operate up to 160 MHz with support for floating-point unit, digital signal processing, and 64 KB + 96 KB RAM memory. Its technical specifications, performance and low-cost have made the device competitive to other

Electronics 2019, 8, 1300 9 of 26

80% of the processing capabilities available for user application. The microcontroller core includes aElectronics Tensilica 2019 LX106, 8, x FOR ultra-low-power PEER REVIEW 32-bit processor capable to operate up to 160 MHz with support9 of 26 for floating-point unit, digital signal processing, and 64 KB + 96 KB RAM memory. Its technical specifications,architectures, especially performance in the and IoT low-cost market. have The made ESP8266 the devicecan be competitiveprogrammed to in other several architectures, platforms especiallyand programming in the IoT market.languages The ESP8266including, can C/C++, be programmed MicroPython in several and platformsLUA, among and programming others. The languagesoperation including,of the arm-ECG C/C++ wireless, MicroPython sensor andalso LUA,required among additional others. hardware The operation peripherals of the arm-ECG such as a wirelessreal-time sensor clock also(RTC) required with independent additional hardware battery back peripheralsup, allowing such the as asystem real-time to store clock a (RTC) timestamp with independentfor the ECG battery data, and backup, a micro allowing SD thememory system card to store to store a timestamp all the arm-recorded for the ECG data, ECG and data. a micro The SDmaximum memory allowable card to store storage all the capacity arm-recorded is 32 GB. ECG data. The maximum allowable storage capacity is 32 GB. 2.3.3. Printed Circuit Board Design and Fabrication 2.3.3. Printed Circuit Board Design and Fabrication The electronic schematic and printed circuit boards were created using the open-source design suiteThe KiCad electronic EDA (http://kicad-pcb.org/). schematic and printed The circuit double-layer boards were board created was usingmanufactured the open-source in standard design 1.6 suitemm FR4 KiCad laminate EDA (http:with //1kicad-pcb.org oz copper weight./). The The double-layer board has boarda total wasdimension manufactured of 40 mm in standard× 53 mm, 1.6 mm FR4 laminate with 1 oz copper weight. The board has a total dimension of 40 mm 53 mm, being small enough to fit alongside the rechargeable Li-Po battery, connectors and other components× beingin a commercially small enough available to fit alongside PVC theergonomic rechargeable wearable Li-Po enclosure, battery, connectors as shown and in otherFigure components 7a. Figure in7b ashows commercially the top available and bottom PVC ergonomicviews of the wearable assembled enclosure, prototype as shown and in the Figure final7a. placement Figure7b shows of the theelectrodes. top and bottom views of the assembled prototype and the final placement of the electrodes.

(a) (b)

FigureFigure 7.7.Arm-ECG Arm-ECG sensorsensor systemsystem WAMECG1:WAMECG1: ((aa)) prototypeprototype assembly;assembly; ((bb)) toptop andand bottombottom viewsviews of of thethe system. system. 2.4. Firmware Architecture 2.4. Firmware Architecture A three-layer structure approach containing the Hardware, Domain and Application layers was adoptedA three-layer for the firmware structure architecture approach containing (see Figure the8). Hardware, The Hardware Domain layer and includes Application all interfaceslayers was andadopted low-level for the drivers firmware required architecture to handle (see the Figure different 8). hardwareThe Hardware elements layer including includes analog-to-digitalall interfaces and converter,low-level digitaldrivers inputs required/outputs, to handle Wi-Fi radio, the different real-time hardware clock and microelements SD memory including card. analog-to-digital The Hardware layerconverter, communicates digital inputs/outputs, only with the Wi-Fi Domain radio, layer. real-time The Domain clock and layer micro was SD implemented memory card. using The a blackboardHardware designlayer communicates pattern, with aonly shared with storage the Doma memoryin layer. space The where Domain the ECG layer acquisition was implemented and local processingusing a blackboard sub-layers design perform pattern, read with or write a shared operations. storage memory Shared memory space where accesses the ECG and operationsacquisition withinand local this layerprocessing are controlled sub-layers and perform timed by read a Control or write module. operations. Finally, Shared the Application memory layeraccesses controls and operations within this layer are controlled and timed by a Control module. Finally, the Application the overall firmware behavior. layer controls the overall firmware behavior. 2.4.1. Firmware Algorithm The ESP8266 firmware was implemented using the Core for ESP8266. This platform allows directly programming the ESP8266 using most of the standard Arduino libraries, accelerating the time required for prototyping. It also contains specific software libraries for configuring and controlling

Electronics 2019, 8, x FOR PEER REVIEW 10 of 26

Electronics 2019, 8, 1300 10 of 26 the Wi-Fi setup and data transmission protocols. Figure9 presents a flowchart diagram describing the firmware algorithm for the system. On power-up, or after a reset, the microcontroller checks the reset cause and validates the existing ECG data file. Subsequently, RTC and microSD memory card are initialized, and the recording configuration is recovered from the internal non-volatile RAM of the ESP8266. If this setting is valid, and there was a recording in progress, the system evaluates the starting time and fills the resulting recording with zeros, if necessary. This was implemented to allow the system to recover after an unexpected reset or power loss without losing all the data previously stored. InFigure such a8. case, Three-layer a segment firmware filled architecture with zeros for will the appear arm-ECG in thesensor final system data, (WAMECG1). corresponding to the reset or shutdown time, but most of the ECG data will be available. Afterwards, the Wi-Fi connection is initialized2.4.1. Firmware and the Algorithm WebServer configured to handle the requests from the client application. The main loop of the microcontroller’s program is used for (a) handling the web client requests; (b) periodically verifyingThe theESP8266 Wi-Fi firmware connection was status implemented and re-connecting using th ife possible; Arduino (c) Core storing for theESP8266. arm-ECG This data platform in the SDallows memory; directly and programming (d) handling the the ESP8266 status indicator using most LED. of the standard Arduino libraries, accelerating Electronicsthe time 2019required, 8, x FOR for PEER prototyping. REVIEW It also contains specific software libraries for configuring10 ofand 26 controlling the Wi-Fi setup and data transmission protocols. Figure 9 presents a flowchart diagram describing the firmware algorithm for the system. On power-up, or after a reset, the microcontroller checks the reset cause and validates the existing ECG data file. Subsequently, RTC and microSD memory card are initialized, and the recording configuration is recovered from the internal non-volatile RAM of the ESP8266. If this setting is valid, and there was a recording in progress, the system evaluates the starting time and fills the resulting recording with zeros, if necessary. This was implemented to allow the system to recover after an unexpected reset or power loss without losing all the data previously stored. In such a case, a segment filled with zeros will appear in the final data, corresponding to the reset or shutdown time, but most of the ECG data will be available. Afterwards, the Wi-Fi connection is initialized and the WebServer configured to handle the requests from the client application. The main loop of the microcontroller’s program is used for (a) handling the web client requests; (b) periodically verifying the Wi-Fi connection status and re-connecting if possible; (c)Figure storing 8. Three-layerThree-layer the arm-ECG firmware firmware data architecture in the SD memory; for the arm-ECG and (d) sensor handling system the (WAMECG1). status indicator LED.

2.4.1. Firmware Algorithm The ESP8266 firmware was implemented using the Arduino Core for ESP8266. This platform allows directly programming the ESP8266 using most of the standard Arduino libraries, accelerating the time required for prototyping. It also contains specific software libraries for configuring and controlling the Wi-Fi setup and data transmission protocols. Figure 9 presents a flowchart diagram describing the firmware algorithm for the system. On power-up, or after a reset, the microcontroller checks the reset cause and validates the existing ECG data file. Subsequently, RTC and microSD memory card are initialized, and the recording configuration is recovered from the internal non-volatile RAM of the ESP8266. If this setting is valid, and there was a recording in progress, the system evaluates the starting time and fills the resulting recording with zeros, if necessary. This was implemented to allow the system to recover after an unexpected reset or power loss without losing all the data previously stored. In such a case, a segment filled with zeros will appear in the final data, corresponding to the reset or shutdown time, but most of the ECG data will be available. Afterwards, the Wi-Fi connection is initialized and the WebServer configured to handle the requests from the client application. The main loop of the microcontroller’s program is used for (a) handling the web client requests; (b) periodically verifying the Wi-Fi connection status and re-connecting if possible; (c) storing the arm-ECG data in the SD memory; and (d) handling the status indicator LED.

Figure 9. Firmware flow-chart: (a) start-up or setup sequence; (b) main program loop; (c) interrupt service routine (ISR).

Electronics 2019, 8, x FOR PEER REVIEW 11 of 26

ElectronicsFigure2019 9., 8Firmware, 1300 flow-chart: (a) start-up or setup sequence; (b) main program loop; (c) interrupt11 of 26 service routine (ISR).

AllAll the the data data acquisition acquisition is is interrupt-driven interrupt-driven following following Figure Figure 9c,9c, with a selectable sample rate of 125,125, 250 250 or or 500 500 samples samples per per second. second. Each Each ECG ECG sample sample is is acquired, acquired, filtered filtered (i (iff configured) configured) and and stored stored inin a a temporal temporal RAM RAM buffer buffer which which holds holds one one second second of of data. data. Every Every second, second, this this acquisition acquisition buffer buffer is is copiedcopied to to a a secondary secondary storage storage buffer buffer capable capable of of holding holding 5 5 to 10 seconds of information. When When the the storagestorage buffer buffer is is full, full, a a flag flag is is activated, activated, meaning meaning that that the the data data in in the the buffer buffer can can be be written written to to the the microSDmicroSD memory memory and the systemsystem checkschecks ifif the the recording recording has has reached reached its its expected expected duration duration to stopto stop the theacquisition acquisition process. process. With With the adoptionthe adoption of this of this dual dual buff erbuffer scheme, scheme, we aim we toaim reduce to reduce the accesses the accesses made madeto the to microSD the microSD card. Writing card. Writing to the microSD to the cardmicroS isD the card second is the most second power-consuming most power-consuming operation in operationthe system in (only the system surpassed (only by surpassed Wi-Fi transmission). by Wi-Fi tr Theansmission). action is alsoThe time-consumingaction is also time-consuming and cannot be andcompleted cannot inbe a completed time smaller in thana time the smaller sampling than period the sampling of the ECG period signal, of hence the ECG the needsignal, for hence buffering. the needWith for the buffering. above described With the firmware above described implementation, firmware the implementation, storage buffer could the bestorage easily buffer expanded, could thus be easilyfurther expanded, reducing thethus accesses further toreducing the SD card,the accesses which could to the lead SD card, to better which power could consumption. lead to better However, power consumption.this would reduce However, the amount this ofwould RAM reduce available the for amount the future of incorporation RAM available of complex, for the real-time future incorporationprocessing algorithms of complex, asis real-time intended processing for this device. algorithms as is intended for this device.

2.4.2.2.4.2. Real-Time Real-Time Visualization Visualization and and Control Control Sub-System Sub-System “ECGView”“ECGView” isis aa basic basic Web Web application application developed developed as the as data the visualization data visualization tool for thetool arm-ECG for the arm-ECGsensor system sensor (WAMECG1). system (WAMECG1). Created using Created HTML, using CCS HTML, and JavaScriptCCS and JavaScript programming programming languages, languages,it can run onit can personal run on computers, personal computers, and laptops Android and tablets Android or smartphones. tablets or smartphones. The application The applicationwas designed was using designed the three-layerusing the three-layer architecture architecture approach approach shown in shown Figure in 10 Figurea. The 10a. Data The layer Data is layerrepresented is represented by both by an both ECG an data ECG file data stored file instored the computer in the computer or mobile, or mobile, and the and Wi-Fi the data Wi-Fi link data for linkreal-time for real-time operation. operation. It has the It objectshas the and objects functions and functions to read/receive to read/receive raw data and raw deliver data and them deliver to the themApplication to the Domain.Application This Domain. layer processes This layer the ECGprocesses data andthe preparesECG data them and for prepares the Presentation them for layer, the Presentationwhich displays layer, the which information displays on the the information user interface on the running user interface over a web running browser over and a web handles browser the andinteraction handles with the interaction the user controls. with the The user simplified controls state. The diagramsimplified depicted state diag in Figureram depicted 10b describes in Figure the 10bdesired describes application the desired behavior. application behavior.

(a) (b)

Figure 10. ECGView application approach: (a) three-layer architecture structure; (b) state diagram. Figure 10. ECGView application approach: (a) three-layer architecture structure; (B) state diagram. The main screen of the graphical user interface is divided into two parts: the ECG graph area The main screen of the graphical user interface is divided into two parts: the ECG graph area on on the left side of the screen and the configuration area on the right, as shown in Figure 11. The user the left side of the screen and the configuration area on the right, as shown in Figure 11. The user can can interact with the ECG graph area using a mouse or a touch controller, being able to manually interact with the ECG graph area using a mouse or a touch controller, being able to manually adjust adjust the Y-axis maximum/minimum values, zoom, pan or scroll the ECG trace for visual inspection, the Y-axis maximum/minimum values, zoom, pan or scroll the ECG trace for visual inspection, along with other user-friendly interactive functions. The configuration area allows the user to adjust along with other user-friendly interactive functions. The configuration area allows the user to adjust different options including (a) select the system operation mode (real-time or file-based); (b) configure

Electronics 2019, 8, x FOR PEER REVIEW 12 of 26 Electronics 2019, 8, 1300 12 of 26 different options including (a) select the system operation mode (real-time or file-based); (b) configure and clear the ECG graph; (c) define ECG acquisition parameters and update recording andinformation; clear the ECG(d) set graph; system’s (c) define real-time ECG acquisition clock; and parameters (e) start, andstop update or retrieve recording the information;arm-ECG data (d) setrecording. system’s real-time clock; and (e) start, stop or retrieve the arm-ECG data recording.

Figure 11. ECGView application main screen. Figure 11. ECGView application main screen. 2.5. Device System Testing and Performance Assessment Methods 2.5. Device System Testing and Performance Assessment Methods The performance validation of the sensor system was carried out in several steps. Firstly, a syntheticThe performance ECG signal was validation used to testof the the sensor behavior system of the was electronic carried components, out in several ensuring steps. theFirstly, signal a wassynthetic not distortedECG signal by was the used acquisition to test the process. behavior Amplitude of the electronic and off components,set calibration ensuring was carried the signal out usingwas not a high-resolutiondistorted by the ECGacquisition acquisition process. system Amplitude as reference. and offset The calibration second set was of tests carried characterized out using severala high-resolution system performance ECG acquisition parameters system such as asreferenc noise levels,e. The common-modesecond set of tests rejection characterized ratio, power-line several interferencesystem performance rejection andparameters average powersuch as consumption. noise levels, Then, common-mode in-vivo measurements rejection ratio, were power-line conducted withinterference a few subjects rejection (members and average within the power research cons team)umption. wearing Then, the arm-ECG in-vivo sensormeasurements prototype whilewere restingconducted and with performing a few low-levelsubjects (members physical activities. within the The research recorded team) signals wearing were visually the arm-ECG inspected sensor and quantitativelyprototype while analyzed resting to and evaluate performing system low-level performance. physical The following activities. section The recorded describes signals the methods were usedvisually to carryinspected out these and tests. quantitatively analyzed to evaluate system performance. The following section describes the methods used to carry out these tests. 2.5.1. System Calibration and ECG Waveform Analysis 2.5.1. System Calibration and ECG Waveform Analysis A synthetic normal sinus rhythm (NSR) signal, generated by using the Samaritan AED Simulator (HeartsineA synthetic Technologies, normal San sinus Clemente, rhythm CA, (NSR) USA), sign wasal, simultaneously generated by applied using tothe the Samaritan arm-ECG sensorAED amplifierSimulator (WAMECG1(Heartsine Technologi prototype)es, and San to Clemente, a high-resolution CA, USA), medical-grade was simultaneously ECG acquisition applied systemto the ECG-1200HRarm-ECG sensor (Norav amplifier Medical (WAMEC GmhH, Wiesbaden,G1 prototype) Germany), and to asa high-resolution shown in Figure medical-grade12. Insomuch asECG the ECG-1200HRacquisition system resolution ECG-1200HR is 0.305 uV (Norav and our Medical system Gm resolutionhH, Wiesbaden, is 2.93 uV, Germany), the high-resolution as shown in unit Figure can be12. usedInsomuch as a reference as the ECG-1200HR to calibrate our resolution system output.is 0.305 TheuV and procedure our system used resolution for amplitude is 2.93 calibration uV, the washigh-resolution as follows: unit can be used as a reference to calibrate our system output. The procedure used for amplitude calibration was as follows: The ECG signal is recorded on both devices for 60 seconds using a 250 Hz sampling rate. • The ECG signal is recorded on both devices for 60 seconds using a 250 Hz sampling rate. Resulting files are imported into Matlab software (MathWorks, Natick, MA, USA). • Resulting files are imported into Matlab software (MathWorks, Natick, MA, USA). Calculated mean value of the signals is used for offset correction. • Calculated mean value of the signals is used for offset correction.  Signals are digitally filteredfiltered usingusing aa 5050 HzHz notchnotch filterfilter withwith 2.52.5 HzHz bandwidth.bandwidth. •  Signals are aligned using thethe normalizednormalized maximalmaximal cross-correlationcross-correlation betweenbetween them.them. •  DiDifferencefference in amplitudeamplitude values of thethe R-peaksR-peaks andand S-peaksS-peaks (maximal QRS complex signal • amplitude span) of the aligned ECG signals is us useded to calculate required scaling factor factor value. value. For this calculation a 1-second signalsignal windowwindow waswas used.used.

Electronics 2019, 8, x FOR PEER REVIEW 13 of 26

 The root-mean-square error (RMSE), mean absolute error (MAE) and cross-correlation coefficient (CC) are used as parameters to compare the similarity between signals after Electronicscalibration.2019, 8, 1300 13 of 26 Electronics 2019, 8, x FOR PEER REVIEW 13 of 26

 The root-mean-square error (RMSE), mean absolute error (MAE) and cross-correlation The root-mean-square error (RMSE), mean absolute error (MAE) and cross-correlation coefficient • coefficient (CC) are used as parameters to compare the similarity between signals after (CC) are used as parameters to compare the similarity between signals after calibration. calibration.

Figure 12. Amplitude calibration setup.

2.5.2. Amplifier Noise and CMRR Performance Assessment The circuit block diagram presented in Figure 13a was used for CMRR calculation. A TG1010A direct digital synthesis functionFigureFigure generator 12.12. AmplitudeAmplitude (Aim-TTi, calibrationcalibration Cambridgeshire, setup.setup. UK) provided a clean sine waveform input for the arm-ECG amplifier. Amplitudes were set to 12 and 200 mV (p-p) for the 2.5.2.2.5.2.differential AmplifierAmplifier and NoiseNoise common andand CMRRCMRR mode PerformancePerformancegain measurements AssessmentAssessment, respectively. System response was measured andTheThe recorded circuitcircuit blockforblock 20 diagram diagramseconds presented presentedat 0.1, 0.25, inin Figure0.5Figure and 13 13a 1a Hz waswas and usedused then forfor CMRRinCMRR intervals calculation.calculation. from 5 AAto TG1010A TG1010A100 Hz. A directdirectresistive digitaldigital network synthesissynthesis limited functionfunction the maxi generatorgeneratormum differential (Aim-TTi,(Aim-TTi, Cambridgeshire,signalCambridgeshire, amplitude UK)UK)to 1.20 providedprovided mV avoiding aa cleanclean system sinesine waveformwaveformsaturation inputinput while forfor measuring thethe arm-ECGarm-ECG the differential amplifier.amplifier. gain AmplitudesAmplitudes (considering were an setset estimated toto 1212 andand gain 200200 design mVmV (p-p)(p-p) of 1100 forfor V/V).thethe didifferentialfferentialTo measure and and common common the input-referred mode mode gain gain measurements, noise, measurements the circuit respectively., blockrespectively. diagram System System depicted response response in Figure was was measured 13b measured was andused. recordedandBoth recorded amplifier for 20 for seconds inputs20 seconds at were 0.1, at 0.25,shorted 0.1, 0.5 0.25, and to 0.5 1ground, Hzand and 1 Hzand then and the in intervalsthen output in intervals fromwas 5recorded to from 100 Hz.5 withto A100 resistiveour Hz. ECG A networkresistivevisualization limitednetwork application the limited maximum the for maxi dia ff1-minuteerentialmum differential signalduration. amplitude signalThis circuit amplitu to 1.20 was mVde toalso avoiding 1.20 used mV systemto avoiding measure saturation system system whilesaturationoffset. measuring while themeasuring differential the gaindifferential (considering gain (considering an estimated an gain estimated design gain of 1100 design V/V). of 1100 V/V). To measure the input-referred noise, the circuit block diagram depicted in Figure 13b was used. Both amplifier inputs were shorted to ground, and the output was recorded with our ECG visualization application for a 1-minute duration. This circuit was also used to measure system offset.

(a) (b)

Figure 13. Common mode rejection ratio (CMRR) and noise experimental determination: (a) circuits Figure 13. Common mode rejection ratio (CMRR) and noise experimental determination: (a) circuits for differential and common mode gain measurement; (b) measurement of input noise. for differential and common mode gain measurement; (b) measurement of input noise. To measure the input-referred(a noise,) the circuit block diagram depicted in Figure(b )13 b was used. 2.5.3. R-peaks Detection Capacity from the Arm-ECG Signal Both amplifier inputs were shorted to ground, and the output was recorded with our ECG visualization applicationFigureThe ECG for13. Common a R-peaks 1-minute mode are duration. one rejection of the This ratio most circuit (CMRR) prominent was and also noise features used experimental to of measure the ECG determination: system waveform, offset. (a )therefore circuits they are forwidely differential used and in common heartbeat mode segmentation gain measurement; algorithms (b) measurement required of inputfor automaticnoise. arrhythmias 2.5.3.classification R-peaks Detection [36]. The Capacity interval frombetween the Arm-ECGconsecutive Signal R-peaks (called the R-R interval) allows the 2.5.3.determinationThe R-peaks ECG R-peaksDetection of the are Capacityheartbeat one of the from rate, most the prominentand Arm-ECG it is featuresespecially Signal of theimportant ECG waveform, for monitoring therefore heart they arerate widelyvariabilityThe used ECG in (HRV); heartbeatR-peaks thus are segmentation theone R-peakof the algorithmsmost correct prominent pres requiredervation features for automaticwas of theone ECG arrhythmiasof thewaveform, principal classification therefore goals of [they36 our]. Thearearm-ECG intervalwidely sensor betweenused system.in consecutiveheartbeat R-peakssegmentation (called algorithms the R-R interval) required allows for theautomatic determination arrhythmias of the heartbeatclassificationComputational rate, [36]. and The it istechniques interval especially between for important R-peak consecutive detection for monitoring R-peakshave been heart (called a ratewell-studied the variability R-R interval) area (HRV); in the allows thus last thethreethe R-peakdeterminationdecades correct [36]. preservation Inof thisthe work,heartbeat was the onesingle rate, of thefiducialand principal it ispo intespecially goals (SPF) of detection ourimportant arm-ECG technique for sensor monitoring was system. adopted heart [37] rate and variabilitycomplementedComputational (HRV); with thus techniques the the rejection R-peak for of R-peak correctpossible detection pres closelyervation have adjacent beenwas R-peaks, aone well-studied of asthe described principal area in in thegoals the last difference of three our decadesarm-ECGoperator [36 sensor method]. In this system. proposed work, the by single Yeh and fiducial Wang point [38]. (SPF) detection technique was adopted [37] and complementedComputational with thetechniques rejection for of R-peak possible detection closely adjacent have been R-peaks, a well-studied as described area in in the the di lastfference three operatordecades method[36]. In this proposed work, bythe Yeh single and fiducial Wang [ 38po].int (SPF) detection technique was adopted [37] and complemented with the rejection of possible closely adjacent R-peaks, as described in the difference operator method proposed by Yeh and Wang [38].

Electronics 2019, 8, 1300 14 of 26

Electronics 2019, 8, x FOR PEER REVIEW 14 of 26 The accuracy of R-peaks identification from the bipolar lead signal gathered from the arm-ECG The accuracy of R-peaks identification from the bipolar lead signal gathered from the arm-ECG sensor was assessed using conventional criteria: sensitivity (Se), positive predictive value (PPV) and sensor was assessed using conventional criteria: sensitivity (Se), positive predictive value (PPV) and their combination in the F1-score. These were calculated using the expressions in Equation (3), their combination in the F1-score. These were calculated using the expressions in Equation (3), 𝑇𝑃 TP 𝑇𝑃TP PPV𝑃𝑃𝑉Se ∗𝑆𝑒 𝑆𝑒Se = 𝑃𝑃𝑉PPV = F𝐹11score =22 ∗ , , (3) (3) 𝑇𝑃TP + 𝐹𝑁 FN 𝑇𝑃TP + FP 𝐹𝑃 PPV𝑃𝑃𝑉+ Se 𝑆𝑒 wherewhere TPTP isis the the number number ofof truetrue R-peaks R-peaks present, present,FP FPdenotes denotes the the number number of incorrectly of incorrectly labeled labeled R-peaks R-peaksand FN andis theFN numberis the number of R-peaks of R-peaks not detected. not detected.

2.5.4.2.5.4. SNR SNR Estimation Estimation on onRecorded Recorded Signals Signals TheThe signal-to-noise signal-to-noise ratio ratio (SNR) (SNR) was was selected selected as asthe the comparison comparison metric metric for for evaluating evaluating arm-ECG arm-ECG signalsignal quality quality obtained obtained in inthis this work. work. Lin Lin et al. et al.[3] [previously3] previously described described the the general general method method used used for for SNRSNR estimation. estimation. The The procedure procedure identifies identifies two two distin distinctivective time time areas areas of ofthe the ECG ECG waveform. waveform. The The first first oneone is a is 120 a 120 ms ms window, window, centered centered at at the the R-peak R-peak of of the the QRS QRS complex complex waveform, waveform, which which is is considered as as thethe mainmain signalsignal component.component. TheThe secondsecond areaarea isis aa windowwindow 40 40 ms ms wide, wide, located located in in the the iso-electric iso-electric T-P T-Psegment segment of of the the ECG, ECG, considered considered as containingas containi theng purethe pure background background noise noise component component in the in ECG. the As ECG.commented As commented by Escalona by Escalona et al. [4 et], ital. is [4], not it alwaysis not always possible possible to detect to thedetect T or the P wavesT or P waves on the recordedon the recordedECG signal ECG fromsignal the from left the upper left arm,upper therefore, arm, ther theefore, reported the reported approach approach there is there by using is by a fixedusing timea fixedreference time reference of 250 ms of before250 ms the before R-peak the R-peak to locate to the locate 40 msthe noise 40 ms estimation noise estimation window. window. Then, theThen, SNR theis SNR calculated is calculated as the as standard the standa deviationrd deviation of the of signal the signal area dividedarea divided by the by standardthe standard deviation deviation of the of noisethe noise window window [4], or [4], alternatively, or alternatively, as the ratio as ofthe the ratio maximum of the peak-to-peakmaximum peak-to-peak voltages measured voltages in the measuredcorresponding in the corresponding ECG activity estimation ECG activity windows estimation [5]. windows [5].

3. Results3. Results 3.1. Initial Offset Adjustment and System Adquisition Tests 3.1. Initial Offset Adjustment and System Adquisition Tests Figure 14 shows the signal recorded when the system inputs were tied to ground. The observed Figure 14 shows the signal recorded when the system inputs were tied to ground. The observed mean offset was 92.98 uV; we used this value as an initial calibration point. The calculated error mean offset was 92.98 uV; we used this value as an initial calibration point. The calculated error was was 6.91 uVrms, while the peak-to-peak maximal error was 29.33 uV (p-p). The overall functioning 6.91 uVrms, while the peak-to-peak maximal error was 29.33 uV (p-p). The overall functioning of the of the arm-ECG amplifier was tested at different sampling rates using a synthetic NSR waveform arm-ECG amplifier was tested at different sampling rates using a synthetic NSR waveform (see (see Figure 15). The system was capable of acquiring, storing and recovering the model ECG signal Figure 15). The system was capable of acquiring, storing and recovering the model ECG signal satisfactorily. Further analysis of the acquired signals included signal-to-noise ratio estimation, which satisfactorily. Further analysis of the acquired signals included signal-to-noise ratio estimation, was used as a validation metric for the ECG amplifying circuitry. Table3 shows the average SNR which was used as a validation metric for the ECG amplifying circuitry. Table 3 shows the average achieved using raw data and data smoothed by a fourth-order moving average filter. SNR achieved using raw data and data smoothed by a fourth-order moving average filter.

FigureFigure 14. 14.SystemSystem output output signals signals presented presented (electronic (electronic background background noise) noise) recorded recorded when when the the system system inputsinputs were were grounded grounded for for estimating estimating error error and and offset offset correction correction figures. figures.

Electronics 2019, 8, 1300 15 of 26 Electronics 2019, 8, x FOR PEER REVIEW 15 of 26

Figure 15. Synthetic data acquired from a patient simulator at different sampling rates. Figure 15. Synthetic data acquired from a patient simulator at different sampling rates. Table 3. SNR (signal-to-noise ratio) measurement in the synthetic data. Table 3. SNR (signal-to-noise ratio) measurement in the synthetic data. Sps SNR (Raw Data) 1 SNR (Smoothed Data) 1 SNR (Raw Data) 2 SNR (Smoothed Data) 2 1 1 2 2 Sps SNR125 (Raw Data)103.31 SNR (Smoothed 103.47 Data) SNR (Raw Data) 77.03 SNR (Smoothed91.20 Data) 125 250 103.31 86.37 103.47 118.85 77.03 78.71 91.20112.59 250 500 86.37 82.13 118.85 113.88 78.71 85.40 112.59116.05 500 82.13 113.881 Calculated as in [5]. 2 Calculated 85.40 as in [4]. 116.05 1 Calculated as in [5]. 2 Calculated as in [4].

3.2. 3.2.System System Calibration Calibration and andFunctional Functional Validation Validation TheThe developed developed arm-ECG arm-ECG sensor sensor system system (WAMEC (WAMECG1)G1) was was calibrated usingusing aa high-resolutionhigh-resolution ECG ECGclinical clinical system system ECG-1200HR ECG-1200HR as reference.as reference. All recordingsAll recordings were were carried carried out in out a regular in a regular laboratory laboratoryambient ambient setting withsetting no noisewith no mitigation noise mitigati measureson inmeasures place. Figurein place. 16 presents Figure 16 the presents resulting the traces resultingthrough traces the dithroughfferent stepsthe different in the calibration steps in procedure;the calibration from procedure; the original from raw datathe original to the final raw calibration data to thestep, final the calibration signals obtained step, the with signals both obtained systems wi wereth both highly systems similar, were as canhighly be seensimilar, on as the can resulting be seenover-imposed on the resulting aligned over-imposed traces. The measuredaligned trac offsetes. wasThe 17.23 measured uV, and offset an amplitude-scaling was 17.23 uV, and factor an used amplitude-scalingto match the span factor of theused signals to match was 1.0137.the span After of the calibration, signals was the adjusted1.0137. After sensor calibration, signal showed the a adjustedcross-correlation sensor signal coe showedfficient ofa cross-correlation 0.983 with the reference coefficient signal. of 0.983 The MAEwith the was reference calculated signal. and obtained The MAEas was 18.19 calculated uV, while and the obtained RMSE was as 18.19 22.13 uV, uV; while these the values RMSE represent was 22.13 the uV; 0.6% these and values 0.74% represent of the sensor the input0.6% rangeand 0.74% (fs), respectively.of the sensor For input additional range verification,(fs), respectively. we applied For additional a typical ECGverification, pre-processing we appliedfilter a (second-order, typical ECG pre-processing zero-phase 0.5 filter to 40 Hz(secon band-passd-order, filter) zero-phase on both 0.5 input to 40 signals Hz band-pass to the WAMECG1 filter) on bothsensor input and signals the reference to the WAMECG1 ECG-1200HR sensor system, and finding the reference them visually ECG-1200HR indistinguishable. system, finding Table them4 shows visuallythe resulting indistinguishable. improvement Table in all 4 the shows comparison the resulting parameters improvement after additional in all filtering. the comparison parametersThe after real-time additional visualization filtering. tool was tested in three hardware setups and using Google Chrome and Mozilla Firefox Web browsers to ensure the system is functional on different platforms, which are specified in Table5. The software was able to communicate e ffectively with the arm-ECG sensor in each case, as illustrated in Figure 17, showing no dependence on the architecture and operative system used.

Electronics 2019, 8, 1300 16 of 26 Electronics 2019, 8, x FOR PEER REVIEW 16 of 26

Figure 16. CalibrationCalibration of of the the arm-ECG arm-ECG sensor sensor against against a commercial high-resolut high-resolutionion reference device.

Table 4. Calibration metrics. Table 4. Calibration metrics.

ParameterParameter After After Calibration Calibration Calibration+ +Filtering Filtering MAEMAE 18.19 18.19 uV uV (0.61% (0.61% of of fs) fs) 7.25 7.25 uV (0.24%(0.24% of of fs) fs) RMSERMSE 22.13uV 22.13uV (0.74% (0.74% of of fs) fs) 11.08 11.08 uVuV (0.34%(0.34% of of fs) fs) CC 0.983 0.997 CC 0.983 0.997

The real-time visualization tool was tested in three hardware setups and using Google Chrome Table 5. Setup for clients running ECGView application. and Mozilla Firefox Web browsers to ensure the system is functional on different platforms, which are specified in Table 5. The softwareOperative was System able to communicate Basic Description effectively with the Web arm-ECG Browser sensor in each case, as illustrated in FigureWindows 17, showin 10 g no dependenceIntel Core on i7 the architectureGoogle Chrome and operative (v76) Personal Computer (PC) system used. 64 bits 8 GB RAM Mozilla Firefox (v59) Window 7 Intel Pentium P6100 Google Chrome (v76) Laptop Computer Table 5. Setup64 for bits clients running ECGView4 GB RAM application. Mozilla Firefox (v) Snapdragon Mobile Android 5.1.1 Google Chrome (v46) Operative 210 1 GB RAM Basic Description Web Browser System Personal Intel Core i7 Google Chrome (v76) Computer (PC) 64 bits 8 GB RAM Mozilla Firefox (v59) Laptop Window 7 Intel Pentium P6100 Google Chrome (v76) Computer 64 bits 4 GB RAM Mozilla Firefox (v) Android 210 Mobile Google Chrome (v46) 5.1.1 1 GB RAM

Electronics 2019, 8, 1300 17 of 26 Electronics 2019, 8, x FOR PEER REVIEW 17 of 26 Electronics 2019, 8, x FOR PEER REVIEW 17 of 26

(a) (b) (a) (b)

(c) (d) (c) (d) Figure 17. ECGView application running in different setups: (a) Chrome (PC, Win 10); (b) Firefox FigureFigure 17. 17.ECGView ECGView application application running running in in di ffdifferenterent setups: setups: (a) Chrome(a) Chrome (PC, (PC, Win Win 10); (10);b) Firefox (b) Firefox (PC, (PC, Win 10); (c) Chrome (Laptop, Win 7); (d) Android mobile. Win(PC, 10); Win (c )10); Chrome (c) Chrome (Laptop, (Laptop, Win 7); Win (d) 7); Android (d) Android mobile. mobile. 3.3.3.3. Front-End Front-End Amplifier Amplifier Noise Noise and and CMRR CMRR Performance Performance Assessment Assessment 3.3. Front-End Amplifier Noise and CMRR Performance Assessment FigureFigure 18 summarizes assessmentassessment results results for for the the di differentialfferential gain gain (in (in dB), dB), CMRR CMRR vs. vs. frequency, frequency, and Figure 18 summarizes assessment results for the differential gain (in dB), CMRR vs. frequency, andnoise noise spectrum spectrum plots plots of the of system the system from 0.1 from to 100 0.1 Hz. to The100 systemHz. The gain system was normalized gain was normalized considering and noise spectrum plots of the system from 0.1 to 100 Hz. The system gain was normalized consideringthe theoretical the gain theoretical given by gain design given (1100 by design V/V). (1100 V/V). considering the theoretical gain given by design (1100 V/V).

(a) (b) (c) (a) (b) (c) Figure 18. ECG amplifier characterization: (a) measured system gain in dB; (b) estimated CMMR vs. Figure 18. ECG amplifier characterization: (a) measured system gain in dB; (b) estimated CMMR vs. frequency;Figure 18. (c)ECGnoise amplifier amplitude characterization: spectrum. (a) measured system gain in dB; (b) estimated CMMR vs. frequency; (c) noise amplitude spectrum. frequency; (c) noise amplitude spectrum. This experiment was not intended to comply with any regulatory standard like IEC-60601-2-27, This experiment was not intended to comply with any regulatory standard like IEC-60601-2-27, but toThis serve experiment as a mere was estimation not intended of the to amplifier comply with gain any in theregulatory frequency standard band like of interest IEC-60601-2-27, and the butverification to serve ofas thea mere CMRR estimation value given of the by theamplifie AFEr used gain in in the the design frequency of the band arm-ECG of interest sensor and system. the verificationbut to serve of asthe a CMRR mere estimationvalue given of by the the amplifie AFE usedr gain in thein thedesign frequency of the arm-ECG band of interestsensor system. and the Theverification measured of average the CMRR CMRR value in thegiven band by 0.5the to AFE 60 Hzused was in 83.11the design dB which of the is consistentarm-ECG withsensor the system. range The measured average CMRR in the band 0.5 to 60 Hz was 83.11 dB which is consistent with the specifiedThe measured by the manufactureraverage CMRR (80 in to the 86 dB).band This 0.5 meansto 60 Hz that was the passive83.11 dB components which is consistent used in the with circuit the range specified by the manufacturer (80 to 86 dB). This means that the passive components used in andrange the specified layout of by the the printed manufacturer circuit board (80 to are 86 suitable dB). This for means the application. that the passive components used in the circuit and the layout of the printed circuit board are suitable for the application. the circuit and the layout of the printed circuit board are suitable for the application.

Electronics 2019, 8, 1300 18 of 26 Electronics 2019, 8, x FOR PEER REVIEW 18 of 26

3.4.3.4. Power-LineElectronics 2019 Noise, 8, x FOR Mitigation PEER REVIEW 18 of 26

3.4.Power-linePower-line Power-Line noisenoise Noise interference interferenceMitigation signals signals (50 (50 or 60or Hz)60 Hz) are coupledare coupled into theinto system the system in common in common mode. For this work, we incorporated two noise mitigation strategies typically found in ECG acquisition mode. ForPower-line this work, noise we interference incorporated signals two (50 noise or 60 mitigationHz) are coupled strategies into thetypically system foundin common in ECG systems: (a) the use of right-leg drive circuit; and (b) noise removal by a digital notch filter. A two-pole acquisitionmode. For systems: this work, (a) the we use incorporated of right-leg two drive noise circuit; mitigation and (b)strategies noise removaltypically byfound a digital in ECG notch digital infinite impulse response (IIR) filter was implemented in the acquisition firmware of the filter.acquisition A two-pole systems: digital (a) infinite the use impulseof right-leg response drive circuit; (IIR) filterand (b) was noise implemented removal by ina digital the acquisition notch microcontrollerfirmwarefilter. Aof two-pole the using microcontroller digital a Direct infinite Form using impulse II structure a Directresponse (Figure Form (IIR) 19 IIfilter), structure which was isimplemented easy(Figure to implement 19), in thewhich acquisition for is real-time easy to embeddedimplementfirmware applications for of real-time the microcontroller due embedded to its low usingapp computationallications a Direct due Form cost, to its allowingII lowstructure comput filtering (Figureational the 19), datacost, which samples allowing is easy as filtering soon to as theythe dataimplement are acquired.samples for asreal-time The soon effectiveness as embedded they are of appacquired. thelications results Th achievedduee effectiveness to its low using comput these of theational power results cost, line achieved al denoisinglowing usingfiltering strategies these forpower thethe case linedata of denoisingsamples 50 Hz isas illustratedstrategiessoon as they for in are Figurethe acquired. case 20 .of For Th50 eache Hz effectiveness is case, illustrated the SNRof the in was results Figure used achieved 20. as theFor indicator usingeach thesecase, of the improvementSNRpower was used line in denoisingas noise the indicator rejection. strategies of thfore improvementthe case of 50 Hzin noiseis illustrated rejection. in Figure 20. For each case, the SNR was used as the indicator of the improvement in noise rejection.

FigureFigure 19.19. 19. Direct Direct Form Form II II topology topology usedused for for notch notch filter filterfilter implementation. implementation.implementation.

(a) (b)

(a) (b)

(c) (d)

FigureFigure 20. The20. 50The Hz 50 power-line Hz power-line noise mitigationnoise mitigation strategies strategies results: results: (a) raw (a signal) raw (nosignal noise (no mitigation); noise (b) usemitigation); of RLD circuit(b)( cuse) for of common-modeRLD circuit for common-mode noise reduction; noise (c) reduction; power-line (c removal) power-line(d) using removal IIR notch using filter; (d) combinationIIR notch filter; of ( bothd) combination strategies of (final both result). strategies (final result). Figure 20. The 50 Hz power-line noise mitigation strategies results: (a) raw signal (no noise mitigation); (b) use of RLD circuit for common-mode noise reduction; (c) power-line removal using IIR notch filter; (d) combination of both strategies (final result).

Electronics 2019, 8, 1300 19 of 26

3.5. Power Consumption, Authonomy and Other Specifications The final experiments carried out were addressed to measure the average power consumption and wireless data transfer rate. The average power consumption of the system was measured in different operational conditions, as summarized in Table6.

Table 6. Measurement of current drawn by the arm-ECG sensor system (WAMECG1).

Operating Condition Average Current (mA) Estimated Autonomy (hours) Holter mode (recording) 18.0 127 Holter mode (not recording) 27.8 82 Real-time mode 35.3 65 File transmission 100 mA N/A

Measurements of the data transfer rate were estimated using recordings of 5, 30, 60 and 360 min long (see Table7). Each file was downloaded ten times from the arm-ECG sensor to a laptop computer for average transfer time calculation. For this assessment test, a Cisco-Linksys WAP54G device (Linksys, Irvine, CA, USA) was used as a Wi-Fi access point. The achieved average transfer rate was 2.5 Mbps. Finally, Table8 summarizes the achieved specifications for the devised arm-ECG wireless sensor system final WAMECG1 prototype.

Table 7. Data transfer rate measurement estimations.

ECG Recording Length (min) File Size (KB) Download time (s) 1 Transfer Rate (Mbps) 5 142 0.581 2.03 30 875 2.699 2.66 60 1754 5.85 2.46 360 10543 30.42 2.86 1 Average value based on ten repetitions and measured with Google Chrome Web browser.

Table 8. Arm-ECG sensor system final prototype main performance specifications achieved.

Item Value Data channels 1 Sampling rate 125, 250, 500 Hz Electrode type Sintered Ag/AgCl Wireless Communication Wi-Fi Average data transfer rate 2.5 Mbps Storage media MicroSD Card (up to 32 GB capacity) Battery used 3.7 VDC @ 2300 mAh Rechargeable LiPo Battery charge current ~425 mA Operation time Up to 72 h External power input 5 to 7.5 V DC 18 mA (normal operation) Average power consumption 36 mA (real-time mode) ~100 mA (Wi-Fi file transmission)

3.6. In-Vivo Arm-ECG Recordings Assessment Results Once the initial bench assessments using the synthetic signal were finalized, some validation test arm-ECG recordings from volunteers, within the research team, were conducted. These recordings were aimed to test the following performance aspects: (a) the ability for recording a visually distinguishable arm-ECG signal; (b) the capacity to detect ECG R-peaks required for measuring R-R intervals in dynamic heartbeat rate calculations; (c) the user wearing comfort opinion; and (d) performance achieved while the subject is resting and while under low-level physical activities (e.g., doing some office work in Electronics 2019, 8, x FOR PEER REVIEW 20 of 26

Battery charge current ~425 mA Operation time Up to 72 hours Electronics 2019, 8, 1300 20 of 26 External power input 5 to 7.5 V DC 18 mA (normal operation) a laboratory,Average or moderate power consumption walking). All subjects were recruited36 mA (real-time from within mode) the research team and were agreeable to participate in the arm-ECG recording~100 tests,mA (Wi-Fi and in file accordance transmission) with the Declaration of Helsinki, with ethical approval HSC REC B (Health and Social Care, Research Ethical Committee, reference:3.6.1. Arm-ECG 16/NI /Signals0158), and while IRAS Resting (Integrated Research Application System, project ID: 203125).

3.6.1.Ten Arm-ECG male volunteers Signals while (average Resting age 39.1 years old, standard deviation of 15.11) wore the WAMECG1 arm-ECG sensor band on their left arm, as shown in Figure 21. They were asked to sit in a chairTen for male a 50-second volunteers recording; (average ageletting 39.1 their years arms old, rest standard naturally deviation in a comfortable of 15.11) wore position, the WAMECG1 without arm-ECGmaking abrupt sensor movements. band on their Figure left 22 arm, shows as shown sample in strips Figure of 21 recorded. They were bipolar asked arm-ECG to sit in lead a chair signals for afor 50-s each recording; of the 10 letting subjects. their In arms all of rest them, naturally it was in possible a comfortable to visually position, identify without the R-peak making and abrupt the movements.structure of the Figure QRS 22 complex. shows sample The T stripswave ofwas recorded identifiable bipolar in arm-ECG40% of the lead cases signals (4/10), for while each ofthe the P 10wave subjects. was not In all observed of them, itin was any possible user. The to visually R-peak identify detection the R-peak(visual andand theautomated) structure ofand the SNR QRS complex.calculation The results T wave are was present identifiableed in inTable 40% of9. theThe cases total (4 /10),number while of the detected P wave wasR-peaks not observed in the inexperimental any user. The data R-peak was 617, detection representing (visual an and error automated) of +0.65% and of the SNR manually calculation counted results value are presented(613). in TableThere9. Thewere total substantial number ofdifferences detected R-peaks in the inarm-ECG the experimental signal amplitudes data was 617,among representing the subjects, an errorranging of +from0.65% 80of uV the to manually400 uV (p-p). counted value (613).

Figure 21. PhotosPhotos of of the the devised devised arm-ECG arm-ECG sensor prototype (WAMECG1) being worn by volunteers.

Table 9. R-peak detection and SNR calculations for users resting.

ManualManual R-peaksR-peaks PPV F1-Score UserUser SeSe (%) (%) PPV (%) F1-Score (%)SNR SNR [5] [5 ] SNR SNR [4 ][4] CountCount DetectedDetected (%) (%) S1AS1A 64 64 64 64 100 100 100 100 100 100 23.60 23.60 20.17 20.17 S2AS2A 58 58 58 58 100 100 100 100 100 100 20.87 20.87 17.20 17.20 S3A 73 73 100 100 100 39.88 33.84 S3AS4A 73 58 73 57 98.28100 100 100 100 99.13 39.88 37.56 25.82 33.84 S4AS5A 58 43 57 43 98.28 100 100 100 99.13 100 37.56 16.30 15.01 25.82 S5AS6A 43 59 43 60 100 100 100 98.33 100 99.16 16.30 11.92 11.39 15.01 S6AS7A 59 62 60 62 100 100 98.33 100 99.16 100 11.92 22.62 19.21 11.39 S8A 66 66 100 100 100 11.67 10.27 S7A 62 62 100 100 100 22.62 19.21 S9A 59 60 98.31 96.67 96.67 13.09 11.55 S8AS10A 66 71 66 74 100 100 100 95.95 100 97.93 11.67 22.68 17.30 10.27 S9A 59 60 98.31 96.67 96.67 13.09 11.55 S10A 71 74 100 95.95 97.93 22.68 17.30

Electronics 2019, 8, 1300 21 of 26 Electronics 2019, 8, x FOR PEER REVIEW 21 of 26

FigureFigure 22. 22. RawRaw arm-ECG arm-ECG signals signals recorded recorded from from users users resting.

3.6.2.There Arm-ECG were Signals substantial during diff erencesLow-Level in the Physical arm-ECG Activity signal amplitudes among the subjects, ranging from 80 uV to 400 uV (p-p). As a final validation test, five subjects wore the arm-ECG sensor system during a longer recording3.6.2. Arm-ECG time of Signals one to duringtwo hours Low-Level while doing Physical thei Activityr regular work at the laboratory facilities. They were asked to do their regular activities (mainly sitting in front of a computer or doing experiments As a final validation test, five subjects wore the arm-ECG sensor system during a longer recording with laboratory instruments) as usual, only trying not to jog or run while wearing the sensor. This time of one to two hours while doing their regular work at the laboratory facilities. They were asked to test was aimed to assess the functionality of the system in a real-life scenario rather than do their regular activities (mainly sitting in front of a computer or doing experiments with laboratory systematically conducting pre-defined physical activities. After using the device, all volunteers instruments) as usual, only trying not to jog or run while wearing the sensor. This test was aimed agreed the device was comfortable to wear, even though their arms were different in size and to assess the functionality of the system in a real-life scenario rather than systematically conducting thickness. Only one of them reported some minor discomfort, manifesting a low itching sensation pre-defined physical activities. After using the device, all volunteers agreed the device was comfortable caused by the elastic band of the sensor. Three users said they “had forgotten” about the fact of to wear, even though their arms were different in size and thickness. Only one of them reported some wearing the device after a few minutes. Figure 23 show segments of the arm-ECG signals recorded minor discomfort, manifesting a low itching sensation caused by the elastic band of the sensor. Three from these subjects. Depending on the particular subject’s activity level, it was possible to observe users said they “had forgotten” about the fact of wearing the device after a few minutes. Figure 23 the presence of muscular and movement artefacts. Finally, a 10-minute-long data segment of each show segments of the arm-ECG signals recorded from these subjects. Depending on the particular valid recording was selected for performance evaluation of the R-peak detection capacity and SNR subject’s activity level, it was possible to observe the presence of muscular and movement artefacts. calculations; the results are summarized in Table 10. The total number of manually counted R-peaks Finally, a 10-minute-long data segment of each valid recording was selected for performance evaluation was 3104, while the system detected 3163 (a false R-peak detection error of +1.90%). of the R-peak detection capacity and SNR calculations; the results are summarized in Table 10. The total number of manually counted R-peaks was 3104, while the system detected 3163 (a false R-peak Table 10. R-peak detection and SNR calculation only for four of the subjects who restricted their detection error of +1.90%). physical activity to a low level, as requested (TP is the number of true R-peaks detected).

Manual R-Peaks Se PPV F1-Score SNR SNR Recording User TP Count Detected (%) (%) (%) [5] [4] Time (seconds) S1B 873 878 838 95.99 95.44 95.72 19.29 14.79 7190 S2B 722 751 709 98.20 94.41 96.27 18.59 18.86 3590 S3B 745 744 688 92.72 92.47 92.60 24.16 19.98 3590 S4B 764 790 693 91.30 87.83 89.53 10.95 10.89 3590

Electronics 2019, 8, 1300 22 of 26 Electronics 2019, 8, x FOR PEER REVIEW 22 of 26

Figure 23. Arm-ECG signalssignals fromfrom usersusers working working in in the the laboratory. laboratory. The The signal signal recorded recorded from from User User No. No.5 was 5 was strongly strongly contaminated contaminated by muscular by muscular artifacts artifacts making making it unusable it unusable for the for restthe ofrest the of test.the test. Table 10. R-peak detection and SNR calculation only for four of the subjects who restricted their 4. Discussionphysical activity and Conclusions to a low level, as requested (TP is the number of true R-peaks detected). In this work, we have presented a wireless sensor system capable of acquiring, storing and Recording Manual R-Peaks visualizingUser ECG signals recordedTP from Se (%) bipolar PPV lead (%)s on F1-Score the left (%) upper-arm. SNR [5] The SNR final [4] wearableTime Count Detected sensor band prototype (WAMECG1) has a flexible adjustable belt strap, making it easy to adjust(seconds) and providingS1B a 873comfortable 878 feeling 838 for the 95.99 user, according 95.44 to the 95.72opinion reported 19.29 by 14.79the subjects7190 in the particularS2B test 722 results 751(80% experienced 709 98.20 comfortable 94.41 feeling). We 96.27 consider 18.59 this an important 18.86 aspect3590 of our S3Bdesign, 745given that 744 it is aimed 688 to be 92.72 worn continuously 92.47 over 92.60 long periods. 24.16 19.98 3590 S4B 764 790 693 91.30 87.83 89.53 10.95 10.89 3590 A series of functional tests were completed to evaluate the behavior of the components in the system. These included simple calibration and verification experiments required to analyze and 4. Discussion and Conclusions optimize the system implementation, in comparison to the targeted design specifications. Overall, the resultsIn this evidenced work, we an have adequate presented performance a wireless of al sensorl the integral system parts capable of the of system, acquiring, however, storing some and keyvisualizing points ECGwere signals identified recorded for future from bipolar improvement leads on theupgrades left upper-arm. in both Thehardware final wearable and software sensor components.band prototype (WAMECG1) has a flexible adjustable belt strap, making it easy to adjust and providing a comfortableAfter calibration, feeling forit was the found user, according that an ECG to the sign opinional recorded reported with by our the system subjects prototype in the particular showed notest appreciable results (80% distortion experienced when comfortable compared feeling). to the ou Wetput consider of a reference this an important medical-grade aspect ECG of our recorder. design, Agiven cross-correlation that it is aimed value to be of worn 0.997 continuously and a maximum over longsystem periods. error less than 0.75% of the input range confirmedA series the ofvisual functional observations. tests were The completed use of a simp to evaluatele fourth-order the behavior moving of average the components filter yielded in thean averagesystem. increment These included up to simple32.44% calibration in the signal-t ando-noise verification ratio experiments when recording required the tosynthetic analyze ECG and calibrationoptimize the signal. system This implementation, result proved in the comparison convenie tonce the of targeted incorporating design specifications.this filter as Overall,part of the acquisitionresults evidenced chain. an adequate performance of all the integral parts of the system, however, some key pointsCompared were identified with similar for future devices improvement presented upgrades in the literature, in both hardware our protot andype software has a lower components. power consumptionAfter calibration, than other it wasWi-Fi found based that systems an ECG [34,35 signal] which recorded is similar with our to systemresults achieved prototype by showed other systemsno appreciable using Bluetooth distortion [13,31–33] when compared and ISM to wireless the output communication of a reference [19,29]. medical-grade ECG recorder. The portable low-power ECG/EMG sensor described in [39] has a convenient small size factor and can be worn on the chest (for ECG measurement) or in the arm (for EMG). However, the device

Electronics 2019, 8, 1300 23 of 26

A cross-correlation value of 0.997 and a maximum system error less than 0.75% of the input range confirmed the visual observations. The use of a simple fourth-order moving average filter yielded an average increment up to 32.44% in the signal-to-noise ratio when recording the synthetic ECG calibration signal. This result proved the convenience of incorporating this filter as part of the acquisition chain. Compared with similar devices presented in the literature, our prototype has a lower power consumption than other Wi-Fi based systems [34,35] which is similar to results achieved by other systems using Bluetooth [13,31–33] and ISM wireless communication [19,29]. The portable low-power ECG/EMG sensor described in [39] has a convenient small size factor and can be worn on the chest (for ECG measurement) or in the arm (for EMG). However, the device did not provide any digitization, data storage, or wireless communication capabilities. The power consumption of this sensor was estimated as 350 uA, higher than the 300 uA drawn by the analog front-end used in our system (including external passive components). The wearable device presented by Celik et al. [40] uses graphene-coated electrodes attached behind the ear, upper neck, and left arm. The electrodes are wired to a measurement module placed on the arm. Compared with this device, our system is smaller and more convenient to use, requiring no extra wires or additional modules attached to the user’s body. Our device has more autonomy due to the use of a higher capacity battery since the estimated power consumptions are similar. The system proposed in [41] has the advantage of acquiring photoplethysmographic (PPG) and ECG signals simultaneously but is less portable, harder to set up, and does not offer wireless communication, keeping the user connected to a computer via USB port. It is worthwhile to note that none of the last-mentioned systems is capable of stand-alone operation, requiring a computer [41] or mobile phone [40] continuously connected for ECG data storing or monitoring, while stand-alone operation is an advantage found in our design. We analyzed the ability of the system to recover a visually recognizable ECG trace in two different scenarios according to the user’s physical activity level. For the first scenario, the subjects were resting while sitting. The qualitative visual inspection of the arm-ECG waveforms under this condition showed clear and appreciable ECG traces, with eventual moving artefacts and low to moderate high-frequency noise. Despite there being significant differences in the arm-ECG signal amplitudes for all the users, the visual identification of the QRS complexes was successful in all cases. The automated R-peak detection algorithm achieved an average sensitivity of 99.66% with a positive predictive value (PPV) of 99.1%. These values point out that the recorded signal indeed can be used, with minimal post-processing, for heartbeat rate calculation and therefore for arrhythmia detection since the vast majority of the heartbeats were correctly located. We found that the digitized experimental in-vivo recorded signals exhibited a higher SNR than most of the average values reported (after applying advanced denoising technics) in [4,42] (See Table9). This suggests that the signals acquired with the WAMECG1 prototype are better in quality (less noisy) than the signals used by the previous studies. It is expected that the future inclusion of some of the reported advanced denoising methods in the microcontroller firmware can greatly improve this parameter. In the second testing scenario, five users were instructed to do their regular activities inside a research laboratory under ambient conditions while trying not to make sudden movements or strong muscular contractions on their left arm. Four of them (80%) followed the instructions for the required time, while one did more physical activity than expected, including going up and down stairs and rapidly walking across the laboratory facilities. The data from this last subject were not presented in Table 10, due to the presence of continuous muscular artefacts affecting the signal. In the recordings from the rest of the users, we observed the presence of multiple artefacts and noisy episodes as well. Nevertheless, the bipolar arm-ECG signal integrity was well-enough preserved for visual analysis. In this second testing scenario, the R-peak detection showed a sensitivity of 94.64% and a precision of 92.68%, with an increase of 1.25% in the detection error, evidencing a minor effectivity when comparing to the resting data. The maximum difference between the automatically detected R-peaks and the Electronics 2019, 8, 1300 24 of 26 manual count was less than 2%, thus indicating that using the proper post-processing is possible to locate this feature from the recorded arm-ECG signal effectively. The results indicate that the presence of muscular and electrode movement artefacts still represents a big issue for the developed prototype, as they are capable of contaminating the recorded signal at intolerable levels. We anticipate that the future implementation of more advanced denoising technics, as well the incorporation of sensors for motion and muscular activity measurements, will lead to better noise mitigation when the user is performing physical activities such as moderate walking. The inclusion of these additional real-time processing capabilities is possible since the current implementation has used less than 40% of the total program memory and 30% of the RAM available in the microcontroller. We have successfully tested the functionality of the WAMECG1 sensor system in a small group of subjects. The results suggest that the bipolar far-field ECG bio-potentials, sensed by our prototype using transversally located electrodes on the left upper-arm, can be used for automatic heartbeat extraction as required in long-term arrhythmia monitoring. Nevertheless, we will require collecting additional experimental data from more, healthy and non-healthy subjects, performing different physical activities in future development stages for reliable heart rhythm analysis algorithms based on machine learning techniques. For the latter purpose (recognition of normal and abnormal ECG rhythms), the system will also require further optimization in physical size, power consumption and embedded implementation of additional signal enhancement techniques. The major drawback of Wi-Fi-based healthcare monitoring systems, as in the WAMECG1 prototype, is power consumption. However, the average current drawn by the system (18 mA) is comparable to current approaches based on other high-performance and wireless communication technologies, as shown in Table2. This value showed to be low enough to achieve the desired autonomy, fulfilling our initial requirements. We have used the less aggressive power reduction strategy available in the ESP8266 SoC, which only switches off the Wi-Fi radio momentarily, leaving the core-processing unit running at full speed. This allows our prototype to have a trade-off compromise between autonomy and performance, keeping the Web interface responsive in the monitoring mode while consuming less than 36 mA. For further power optimization, the ESP8266 implements another two low-power operation modes that switch the Wi-Fi radio off completely and stop the processor for long times. Although we found them not applicable to our development at this moment (because they would interfere with the data acquisition routines), their existence opens the possibility of using an additional ultra-low-power microcontroller as an auxiliary processor only for data acquisition. This would allow developing a solution capable of monitoring/recording a bipolar arm-ECG lead signal for several weeks.

Author Contributions: Initial conceptualization, O.E. and D.M.; electronics and programming, A.V.; writing—original draft preparation: A.V.; writing—review and final editing, O.E.; ethical procedures and clinical protocol design, D.M. All authors contributed equally to data analysis and interpretation of results. Funding: This research was supported by funding from the European Union (EU): H2020-MSCA-RISE Programme (WASTCArD Project, Grant #645759). Professor Omar Escalona’s dedication to this study was supported by philanthropic funds; equally from the Ulster Garden Villages Ltd. and the McGrath Trust (UK). Conflicts of Interest: The authors declare no conflict of interest.

References

1. Katritsis, D.G.; Gersh, B.J.; Camm, A.J. A Clinical Perspective on Sudden Cardiac Death. Arrhythm. Electrophysiol. Rev. 2016, 5, 177–182. [CrossRef] 2. Krahn, A.D.; Klein, G.J.; Skanes, A.C.; Yee, R. Insertable Loop Recorder Use for Detection of Intermittent Arrhythmias. Pacing Clin. Electrophysiol. 2004, 27, 657–664. [CrossRef] 3. Lynn, W.D.; Escalona, O.J.; McEneaney, D.J. Arm and wrist surface potential mapping for wearable ECG rhythm recording devices: A pilot clinical study. J. Phys. Conf. Ser. 2013, 450, 3–8. [CrossRef] Electronics 2019, 8, 1300 25 of 26

4. Escalona, O.J.; Lynn, W.D.; Perpiñan, G.; McFrederick, L.; McEneaney, D.J. Data-Driven ECG Denoising Techniques for Characterising Bipolar Lead Sets along the Left Arm in Wearable Long-Term Heart Rhythm Monitoring. Electronics 2017, 6, 84. [CrossRef] 5. Escalona, O.; Mcfrederick, L.; Borges, M.; Linares Herrera, P.; Villegas, R.; Perpiñan, G.; McLaughlin, J.; Mceneaney, D. Wrist and Arm Body Surface Bipolar ECG Leads Signal and Sensor Study for Long-term Rhythm Monitoring. In Proceedings of the Computing in Cardiology (CinC), Rennes, France, 24–27 September 2017. 6. Dey, N.; Ashour, A.S.; Shi, F.; Fong, S.; Sherratt, R. Developing Residential Wireless Sensor Networks for ECG Healthcare Monitoring. IEEE Trans. Consum. Electron. 2017, 63, 442–449. [CrossRef] 7. Boehm, A.; Yu, X.; Neu, W.; Leonhardt, S.; Teichmann, D. A Novel 12-Lead ECG T-Shirt with Active Electrodes. Electronics 2016, 5, 75. [CrossRef] 8. Chi, Y.M.; Jung, T.; Cauwenberghs, G. Dry-Contact and Noncontact Biopotential Electrodes: Methodological Review. IEEE Rev. Biomed. Eng. 2010, 3, 106–119. [CrossRef] 9. Chowdhury, M.E.H.; Alzoubi, K.; Khandakar, A.; Khallifa, R.; Abouhasera, R.; Koubaa, S.; Ahmed, R.A.; Hasan, A. Wearable Real-Time Heart Attack Detection and Warning System to Reduce Road Accidents. Sensors 2019, 19, 2780. [CrossRef] 10. Massot, B.; Hutu, F.; Gehin, C.; Noury, N. Design and Optimization of an Autonomous, Ambulatory Cardiac Event Monitor. In Proceedings of the IEEE 20th International Conference on e-Health Networking, Applications and Services (Healthcom), Ostrava, Czech Republic, 17–20 September 2018. 11. Liu, S.; Cai, G.; Huang, Y.; Chen, Y.A wearable ECG apperatus for ubiquitous health care. In Proceedings of the IEEE International Conference on Systems, Man, and Cybernetics (SMC), Budapest, Hungary, 9–12 October 2016; pp. 4471–4476. 12. Preejith, S.P.; Dhinesh, R.; Joseph, J.; Sivaprakasam, M. Wearable ECG platform for continuous cardiac monitoring. In Proceedings of the 38th Annual International Conference of the IEEE Engineering in Medicine and Biology Society (EMBC), Orlando, FL, USA, 16–20 August 2016; pp. 623–626. 13. Rachim, V.P.; Chung, W. Wearable Noncontact Armband for Mobile ECG Monitoring System. IEEE Trans. Biomed. Circuits Syst. 2016, 10, 1112–1118. [CrossRef] 14. Lynn, W.; Escalona, O.; McEneaney, D. A Low Latency Electrocardiographic QRS Activity Recovery Technique for Use on the Upper Left Arm. Electronics 2014, 3, 409–418. [CrossRef] 15. Vizcaya, P.R.; Perpiñan, G.I.; McEneaney, D.J.; Escalona, O.J. Standard ECG lead I prospective estimation study from far-field bipolar leads on the left upper arm: A neural network approach. Biomed. Signal Process. Control 2019, 51, 171–180. [CrossRef] 16. Gemperle, F.; Kasabach, C.; Stivoric, J.; Bauer, M.; Martin, R. Design for Wearability. In Proceedings of the ISWC Second International Symposium on Wearable Computers (ISWC’98), Pittsburgh, PA, USA, 19–20 October 1998; p. 116. 17. Chen, C.-Y.; Chang, C.-L.; Chang, C.-W.; Lai, S.-C.; Chien, T.-F.; Huang, H.-Y.; Chiou, J.-C.; Luo, C.-H. A Low-Power Bio-Potential Acquisition System with Flexible PDMS Dry Electrodes for Portable Ubiquitous Healthcare Applications. Sensors 2013, 13, 3077–3091. [CrossRef] 18. Aleksandrowicz, A.; Leonhardt, S. Wireless and Non-contact ECG Measurement System—The “Aachen SmartChair”. Acta Polytech. 2007, 47, 68–71. 19. Nemati, E.; Deen, M.J.; Mondal, M. A Wireless Wearable ECG Sensor for Long-Term Applications. IEEE Commun. Mag. 2012, 50, 36–43. [CrossRef] 20. Saponara, S.; Donati, M.; Fanucci, L.; Celli, A. An Embedded Sensing and Communication Platform, and a Healthcare Model for Remote Monitoring of Chronic Diseases. Electronics 2016, 5, 47. [CrossRef] 21. Meziane, N.; Webster, J.G.; Attari, M.; Nimunkar, A.J. Dry electrodes for electrocardiography. Physiol. Meas. 2013, 34, 47–69. [CrossRef] 22. Bosnjak, A.; Kennedy, A.; Linares, P.; Borges, M.; McLaughlin, J.; Escalona, O.J. Performance assessment of dry electrodes for wearable long term cardiac rhythm monitoring: Skin-electrode impedance spectroscopy. In Proceedings of the 39th Annual International Conference of the IEEE Engineering in Medicine and Biology Society (EMBC), Seogwipo, Korea, 11–15 July 2017; pp. 1861–1864. 23. Hoffmann, K.; Ruff, R.; Poppendieck, W. Long-Term Characterization of Electrode Materials for Surface Electrodes in Biopotential Recording. In Proceedings of the International Conference of the IEEE Engineering in Medicine and Biology Society, New York, NY, USA, 30 August–3 September 2006; pp. 2239–2242. Electronics 2019, 8, 1300 26 of 26

24. Tallgren, P.; Vanhatalo, S.; Kaila, K.; Voipio, J. Evaluation of commercially available electrodes and gels for recording of slow EEG potentials. Clin. Neurophysiol. 2005, 16, 799–806. [CrossRef] 25. Neuman, M.R. Biopotential Electrodes. In Medical Instrumentation: Application and Design; Webster, J.G., Ed.; John Wiley & Sons: Hoboken, NJ, USA, 2010; pp. 189–241. 26. Gifari, M.W.; Zakaria, H.; Richard, M. Design of ECG Homecare: 12-lead ECG acquisition using single channel ECG device developed on AD8232 analog front end. In Proceedings of the International Conference on Electrical Engineering and Informatics (ICEEI), Denpasar, Indonesia, 10–11 August 2015; pp. 371–376. 27. Bond, R.R.; Finlay, D.D.; Nugent, C.D.; Moore, G. A review of ECG storage formats. Int. J. Med Inform. 2011, 80, 681–697. [CrossRef] 28. Kemp, B.; Värri, A.; Rosa, A.C.; Nielsen, K.D.; Gade, J. A simple format for exchange of digitized polygraphic recordings. Electroencephalogr. Clin. Neurophysiol. 1992, 82, 391–393. [CrossRef] 29. Gaxiola-Sosa, J.E.; Nasreen Mohsin, A.J.; Palliyali, R.T.; Kamran, E. A PorTable 12-Lead ECG Wireless Medical System for Continuous Cardiac-Activity Monitoring. In Proceedings of the IEEE Middle East Conference on Biomedical Engineering (MECBME), Doha, Qatar, 17–20 February 2014; pp. 123–126. 30. Lee, S.H.; Jung, S.M.; Lee, C.K.; Jeong, K.S.; Cho, G.; Yoo, S.K. Wearable ECG Monitoring System Using Conductive Fabrics and Active Electrodes. In International Conference on Human-Computer Interaction; Springer: Berlin/Heidelberg, Germany, 2009; pp. 778–783. 31. ElSaadany, Y.; Majumder, A.J.A.; Ucci, D.R. A Wireless Early Prediction System of Cardiac Arrest through IoT. In Proceedings of the IEEE 41st Annual Computer Software and Applications Conference, Turin, Italy, 4–8 July 2017. 32. Touati, F.; Tabish, R.; Mnaouer, A.B. A Real-Time BLE enabled ECG System for Remote Monitoring. APCBEE Procedia 2013, 7, 124–131. [CrossRef] 33. Pineda-López, F.; Martínez-Fernández, A.; Rojo-Álvarez, J.L.; García-Alberola, A.; Blanco-Velasco, M. A Flexible 12-Lead/Holter Device with Compression Capabilities for Low-Bandwidth Mobile-ECG Telemedicine Applications. Sensors 2018, 18, 3773. [CrossRef][PubMed] 34. Ahammed, S.S.; Pillai, B.C. Design of Wi-Fi Based Mobile Electrocardiogram Monitoring System on Concerto Platform. Procedia Eng. 2013, 64, 65–73. [CrossRef] 35. Khalaf, A.; Abdoola, R. Wireless Body Sensor Network and ECG Android Application for eHealth. In Proceedings of the Fourth International Conference on Advances in Biomedical Engineering (ICABME), Beirut, Lebanon, 19–21 October 2017. 36. Luz, E.J.D.S.; Schwartz, W.R.; Cámara-Chávez, G.; Menotti, D. ECG-based heartbeat classification for arrhythmia detection: A survey. Comput. Methods Programs Biomed. 2016, 127, 144–164. [CrossRef][PubMed] 37. Escalona, O.J.; Mitchell, R.H.; Balderson, D.E.; Harron, D.W. Fast and reliable QRS alignment technique for high-frequency analysis of signal-averaged ECG. Med. Biol. Eng. Comput. 1993, 31, 137–146. [CrossRef] 38. Yeh, Y.C.; Wang, W.J. QRS complexes detection for ECG signal: The Difference Operation Method. Comput. Methods Programs Biomed. 2008, 91, 245–254. [CrossRef] 39. Jani, A.B.; Bagree, R.; Roy, A.K. Design of a low-power, low-cost ECG & EMG sensor for wearable biometric and medical application. In Proceedings of the IEEE SENSORS, Glasgow, UK, 29 October–1 November 2017; pp. 1–3. [CrossRef] 40. Celik, N.B.W.; Manivannan, N.; Winter, E.; Schnalzer, B.; Burgsteiner, H. Wearable mobile ear-based ECG monitoring device using graphene-coated sensors. In Proceedings of the IEEE SENSORS, Glasgow, UK, 29 October–1 November 2017. 41. Vinciguerra, V.A.E.; Maddiona, L.; Romeo, M.; Mazzillo, M. PPG/ECG Multisite Combo System Based on SiPM Technology. In Convegno Nazionale Sensori; Springer: Cham, Switzerland, 2018. 42. Lynn, W.D.; Escalona, O.J.; Vizcaya, P.R.; McEneaney, D.J. Arm-ECG bipolar leads signal recovery methods for wearable long-term heart rate and rhythm monitoring. In Proceedings of the Computing in Cardiology (CinC), Rennes, France, 24–27 September 2017.

© 2019 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).