A low-cost electro-cardiograph machine equipped with sensitivity and paper speed option

,


Introduction
ECG machines are standard equipment used to diagnose heart disease [1][2][3][4][5].ECG machines are needed in health facilities such as health centers, community health center and hospitals [6].Even it can be used for monitoring heart attack early detection at home.It is necessary for monitoring ECG machine or daily checks.The ECG machine's price on the market is quite high, so it is not accessible to the medium or small public clinics.If the device is damaged, it is very difficult to repair,and many electronic circuits are off-screen.Microcontroller technology studies for ECG machine design have been done by several researchers.
Genghuanget al. proposed an ECG recorder by using microcontroller MSP430 which is also used as intelligent processing.This project proposes talking about how to record the ECG signal by using thin wire electrodes.The electrodes are fixed in the lining of the clothes [7].The thin wires are attached between the front fabrics and the lining.The recorder can be put in the pocket of the clothes.There is an interface in the recorder for ECG signal input.
Tan-Hsu developed a portable Linux-based ECG measurement and monitoring system [8].However, the study is only talking about collecting the 12-lead ECG signal and store the data for future signal processing.A simple electrocardiograph machine was also studied by Jie Sun [9][10][11].In his paper, a low-cost,simple, intelligent electrocardiograph (ECG) which is easy to popularize.With AT89S52 single-chip as its core controller, and based on software system developed by RTX51, the ECG can achieve real-time display of heart waveform and heart rate on its LCD.However, in his study, he had not completed the machine with a sensitivity channel which very important to recognize the resolution of the ECG signal.Development of smart ECG machine using LabVIEW for biomedical engineering student by [12].
This project proposes to enable students and end-users to learn the ECG basics principle.The ECG with less complex circuits performing multiple data and will enable the signal  ISSN: 1693-6930 TELKOMNIKA Vol.17, No. 3, June 2019: 1275-1281 1276 processing analysis.Previous studies development of three lead ECG machine with each different advantage [13][14][15][16].The main advantage of constructing a three lead ECG machine is taking a measurement during transportation of the patient.The three lead ECG machine requires only patients' limbs to take readings not whole chest area like in 12-lead ECG machine.Although in three lead ECG machine we can observe only two sides of the human heart i.e., lateral side and inferior side of the heart.ECG De-noising using Hybrid Linearization Method [17].This project proposes a method called Hybrid Linearization Method which is a combination of Extended Kalman Filter along with Discrete Wavelet Transform (DWT) resulting in an improved de-noised signal.
Another related study was performed by Gargiulo which talk about Wilson Central Terminal.However, concerns have been raised by researchers about problems (biasing and misdiagnosis) associated with the ambiguous value and behavior of this reference voltage, which requires perfect and balanced contact of at least four electrodes to work properly [18].A study on heart rate monitoring and PQRST detection based on the graphical user interface with MATLAB was also studied by Jaber Al-Ziarjiwey [19].In the project, he designed an intelligent, simple ECG, which collects ECG signals of the human body, and display the real-time ECG waveforms and heart rates using the SCM (single-chip microcomputer) controlled LCD.The system is connected to the PC with serial communication interface and programs with high-level languages, thus achieving the waveform's display, analysis,and processing.Kao proposed a microcontroller-based data acquisition system for heart rate variability (HRV) measurement [20].In his study, he presented an inexpensive AVR microcontroller-based data acquisition system with a computer.The Peak of the PQRST and Trajectory Path of Each Cycle of the ECG 12-Lead Wave by Setiawidayat et al. [13].This project proposes to describe the record of the ECG 12-lead examination in order to obtain the peaks of the P, Q, R, S,and T from each cycle and also to present the Peak of the PQRST and the trajectory path of each cycle of the ECG 12-lead wave.
Adaptive Denoising of Impulse Noise with Enhanced Edge Preservation [21].The project discusses the noisy pixels that are detected by a Decision tree based impulse detector which is followed by an Edge-preserving image filter which reconstructs their intensity values.Impuls Noise Cancellation ECG signal using adaptive Filter and their comparison.This project proposes to apply in the corrupted ECG signal to remove the noise.The effectiveness of the proposed approach is verified for the ECG signal with impulsive noise as compared to the traditional approaches as well as previously proposed approaches.However, in the study, there is no option to change the sensitivity and paper speed.Previously, B.G. Irianto had developed an electrocardiograph machine based on Atmega microcontroller [22].However, the weaknesses of the previous researches are the recording speed that only applied one speed 25 mm/s and one sensitivity one mV.The fact showed that the speeds 25 mm/s and 50 mm/s and the sensitivity 0.5 mV, one mV, and 2mV are needed for a diagnostic purpose.
Therefore, in order to solve the problems found in previous studies, here in this study, we develop an ECG machines that can store more data and increase the number of leads to 12 channels equipped with paper speed (25 mm/s and 50 mm/s) and sensitivity selector (0,5 mV, 1 mV and 2 mV).In the diagnostic purposes, these selectionsare used in the normal and abnormal condition (such as tachycardia or bradycardia).The specific purposes of this study are: (1) to build a microcontroller circuit for data acquisition, (2) to control the motor speed (25 mm/sec and 50 mm/sec), (3) to select the sensitivity (0,5 mV, 1 mV, 2 mV), (4) to communicate with a Personal Computer (PC), (5) to design a software to measure the heart rate of the ECG signal.The contribution of this study is that we can provide a low-cost and standard ECG machine which the circuit can be built with the components from local markets.

Materials and Method
In this study, the ECG signal was collected from 10 healthy male subjects and a phantom for artificial ECG signal.The electrodes were placed on the 12-lead standard ECG measurement.A buffer amplifier was needed to prevent the ECG signal from the amplitude decrease and to maintain the shape of the ECG signal.An analog multiplexer 4051 was chosen to select the channel of the ECG signal.This multiplexer controlled by the microcontroller.A high CMRR pre-amplifier which built by an AD602 was used to reduce the common mode noise at the preamplifier input.ECG signal has a small amplitude; therefore, it was easily influenced by noises.In order to maintain the quality of the ECG signal, a bandpass filter was applied with a cutoff frequency of 0.05 and 100 Hz.Generally, an offset amplifier was needed to adjust the zero offset of the ECG signal before entering the power amplifier.A built-in of analog to digital converter from ATMEGA16 Microcontroller was used to convert from ECG analog to digital data.Serial communication RS232 was applied to send the ECG data to the computer unit.In this study, a high-level programming using Delphi 6.
This research applies quasi-experimental design namely time series design.The independent variable is the ECG phantom,and the dependent variable is ECG Machine.The research was performed at the Department of Electromedical Engineering Health Polytechnic of Surabaya, Indonesia,and the research duration is six months, starting from May to October 2017 [23].

Beat per Minute
The result of this research is the design of the ATMEGA microcontroller-based ECG machine shown in Figure 1.The results of the measurement of heart rate by using the standard ECG phantom (30 BPM, 60 BPM,and 120 BPM), Sensitivity (0,5 mV, 1 mV, and 2 mV) and measuring results R wave can be seen in Tables 1-5 and Figure 2. Table 1 shows the result of equipment test with standard ECG phantom (Fluke type MPS 450 Multiparameter Simulator Biomedical) as a comparison tool, for heart rate parameter with standard 30 BPM, the % Relative Error is 0.05556 and Uncertainty (Ua): 0.016801.Table 2 shows the result of equipment test with standard ECG phantom (Fluke type MPS 450 Multiparameter Simulator Biomedical) as a comparison tool, for heart rate parameter with standard 60 BPM, the % Relative error (% Error): 0.0556 and Uncertainty (Ua): 0.02356.Table 3 shows the result of equipment test with standard ECG phantom (Fluke type MPS 450 Multiparameter Simulator Biomedical) as a comparison tool, for heart rate parameter with standard 120 BPM, the % Relative error (% Error): 0.02778% and Uncertainty (Ua): 0.02356.

Sensitivity
The sensitivity was designed by using the three of the non-inverting amplifier with precision gain.In order to obtain high sensitivity, each gain of the amplifier was tuned using a multiturn potentiometer.The display of the ECG signal was also calibrated in the programming stage by using a constant calibration to obtain the best performance of the ECG reading.Table 4 shows the result of equipment test with standard ECG phantom (Fluke type MPS 450 Multiparameter Simulator Biomedical) as a comparison tool, for sensitivity parameter with standard output ECG (0,5 mV, 1 mV, and 2 mV), the % Relative error (% Error): 0, 0, and 1 and Uncertainty (Ua): 0,0, and 0.22.

Motor Speed
In a certain condition, the ECG machine can read a normal and abnormal heart rate of the ECG signal.This rate is related with the speed of the display of the ECG signal on the paper.In this case, the paper was replaced with the monitor display.In order to fulfill the requirement, the reading of the ECG signal was divided into two selection which are 25 and 50 mm/seconds.That speedwere obtained by using the two of the difference sampling rate.Table 5 shows the result of equipment test with standard ECG phantom (Fluke type MPS 450 Multiparameter Simulator Biomedical) as a comparison tool, for motor speed parameter with standard paper speed 25 mm/sec and 50 mm/sec is % Relative error (% Error): 0 and 0 and Uncertainty (Ua): 0 and 0.

R Wave Amplitude
Table 6 and Figure 2 shows the result of an equipment test with standard ECG phantom (Fluke type MPS 450 Multiparameter Simulator Biomedical) as a comparison tool, for heart signal parameter with standard ECG signal.The % Relative error (% Error): 0,0 and 1 and Uncertainty (Ua): 0, 0, 0.22.

Discussion
The result of this research is a low-cost ECG machine equipped with sensitivity and paper speed adjustment.The ECG machine worked as follows: Input ECG signal from phantom or human will be recorded by using disposable electrodes (Ag/AgCl).The output of the leads will be entered into a series of passive low pass filter (10l2.6Hz) by entering a 10K ohm resistance value,and the value of the capacitor 10pF then cut off frequency of the low pass filter circuit shown in Figure 3 is 312 KHz.The output of the low pass filter will enter the buffer circuit, in order to buffer the amplitude of the ECG signal.
The buffer amplifier consists of 12 buffers mounted on each lead.The output of the buffer circuit will be entered into a multiplexer circuit.The multiplexer circuit functions as a  ISSN: 1693-6930 TELKOMNIKA Vol.17, No. 3, June 2019: 1275-1281 1280 switch option, where from 12 leads will come out as signal output in accordance withaselector switch selection, while the output of the multiplexer will enter Bioamplifier circuit will go into the ATMEGA microcontroller to be processed,and the results are displayed on a computer.ATMEGA Microcontroller will be processed by the application program Delphi.High filter passive circuit will produce a cut-off frequency of 0.0498Hz.The output of the filter circuit will be forwarded to the non-inverting amplifier shown in Figure 4.The gain of 1002 times then the signal will be filtered by low pass filter having a cut-off frequency of 312KHz forwarded by non-inverting amplifier circuit with a gain of 1002 times.Figure 4.The non-inverting amplifier [24] The output of the non-inverting amplifier will be filtered by low pass active filter -40 dB.Cut off frequency of low pass active filter circuit is -40 dB is 102.6 Hz.The output of the ECG amplifier is connected to the other circuit which is an ATMEGA Microcontroller.In ATMEGA Microcontroller, it will be processed by the Delphi program application.Delphi program application is a programming language that uses the same visualization, i.e., Visual Basic (VB) programming languages.However, Delphi uses similar language to Pascal (often called pascal object) that makes it easier to use programming languages.Delphi programming language is developed by Code Gear as a software development division belonging to Embarcadero.The division originally belongs to Borland, so that this language has a version of Borland Delphi.The data that will be analyzed are shown in Table 1 to Table 4, i.e. to analyze whether the Heart Rate resulted from the design of the ECG module is fit for use or not.Then the researchers compare the results of measurements with manual calculations of the distance between wave R1 to R2 to note that the speed of 50 mm / min or phantom, the formula: The result of the measurement data and phantom by using statistical calculations are: The % error and uncertainty of 30 BPM are 0.243 % and 0.032, respectively.The % error and uncertainty of 60 BPM are 0.056 % and 0.024, respectively.The % error and uncertainty of 120 BPM are 0.243 % and 0.032, respectively.The % error of sensitivity for 0.5, 1, and 2 mV are: 0.000 %, 0.000 % and 1.000%, respectively and the uncertainty (Ua) are: 0.0, 0.0, and 0.22, respectively.The % error of paper speed 25 mm/sec and 50 mm/sec are: 0.000% and 0.000% and the uncertainty (Ua) are 0.000 and 0.000.The % error of R wave for all lead (lead I, II, III, AVR, AVF, AVL, V1, V2, V3, V4, and V5) is 0.000% and Ua: 0.000, and V6 has % Error of 8 % and Ua: 0,134.The % error and uncertainty shows that it still below than 10%, therefore the development of this study is feasible to use.In this study, we are a focus on to develop a low-cost ECG machine using analog filters.Nevertheless, in the next work, a standard digital filter (FIR and IIR) [25] and also Kalman filter [26] could be used to improve the ECG signal.

Conclusion
In this study, a low-cost ECG machine had been built with high performance in reading of the ECG signal.The main contributions of this study were that the ECG machine was completed with sensitivity and paper speed option to cover on bradycardia or tachycardia TELKOMNIKA ISSN: 1693-6930  condition.The ECG machine was calibrated using a standard ECG phantom.The results showed that the performance of the ECG machine in the reading of the ECG signal from phantom and human was feasible to be used in diagnostic purposes.In the future, an automatic diagnostic tool can be proposed in order to classify the normality or abnormality of the ECG signal such as bradycardia and tachycardia.

Figure 1 .
Figure 1.The diagram block of ECG machine

Table 1 .
Results of Measurement of Heart Rate (BPM) with a Standard Phantom 30 BPM

Table 2 .
Results of Measurement of Heart Rate (BPM) with a Standard Phantom 60 BPM

Table 5 .
Measurement Paper Speed ECG with Speed of 25 mm/sec and 50 mm/sec

Table 6 .
The R Wave Amplitude Measurement on an ECG Module