Next Article in Journal
Underwater Acoustic Communication for The Marine Environment’s Monitoring
Previous Article in Journal
Real-Time Motion Tracking for Humans and Robots in a Collaborative Assembly Task
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Proceeding Paper

Portable ECG System Design Using the AD8232 Microchip and Open-Source Platform †

by
Miguel Bravo-Zanoguera
*,
Daniel Cuevas-González
,
Juan P. García-Vázquez
,
Roberto L. Avitia
and
M. A. Reyna
Facultad de Ingeniería, Universidad Autónoma de Baja California, Blvd. Benito Juárez s/n, C.P., 1280 Mexicali, B.C., Mexico
*
Author to whom correspondence should be addressed.
Presented at the 6th International Electronic Conference on Sensors and Applications, 15–30 November 2019; Available online: https://ecsa-6.sciforum.net/.
Proceedings 2020, 42(1), 49; https://doi.org/10.3390/ecsa-6-06584
Published: 14 November 2019

Abstract

:
This paper presents the design of a portable electrocardiograph (ECG) device using the AD8232 microchip as the analog front-end (AFE). Starting with the manufacturer’s evaluation board of the AFE chip for testing circuit configurations, open-source hardware and software components were integrated into a breadboard prototype. Ultimately, a custom printed circuit board (PCB) was produced. The prototype required to accommodate the microchip on a SMD-to-DIP adapter for testing with the breadboard-friendly Arduino microcontroller alongside a data logger and a Bluetooth breakout board. The analog ECG signal from the AFE output was digitized using one channel of the 10-bit analog-to-digital Converter (ADC) of the ATmega328 microcontroller contained in the Arduino Nano board. The digitized ECG signal can be transmitted not only by serial cable using the Arduino functions, but also via Bluetooth to a PC or to an Android smartphone system when the HC-06 shield is used. The data logging shield provides gigabytes of storage, and the signal is recorded to a micro SD card adapter along with the date and time stamp data of the sample capture (real-time clock provided). In addition to hardware and software development, a simulation was used in the analog circuit design with SPICE Multisim software and the related macromodel library to assess system stability. Besides the analog filters in the AFE stage, digital filtering by means of simple difference equations was investigated. A menu was incorporated to choose from the several modes of operation of the device. The ECG test signals were obtained from a patient simulator (SimCube) and real patients. A portable ECG system for monitoring applications that complies with electrical safety regulations and medical equipment design was realized.

1. Introduction

The development of medical devices for health care is a research field with great relevance, as there is a continuous need to innovate and improve health care. In the last decades, there has been an alarming increase in cardiovascular disease, one of the main causes of death globally. Due to a lack of knowledge or identification, cardiovascular disease often results in death caused by heart attack or heart conditions [1]. The growing trend of medical devices for personal use, known as home health or mobile health devices, helps to address this problem with the use of technology, such as smartphones, monitoring sensors, and software applications that register, transmit, and store user data, which can be accessed at any time [2]. The mobile health wearables market is extremely fast- moving, and consumers demand more accurate battery-powered mobile devices.
The development of personal equipment is a complementary alternative to that used in the hospital sector. Personal medical devices can provide a long-term record of the user’s activity and vital signs while the user performs daily activities. These devices can capture events that occur infrequently or under specific circumstances and provide a more realistic perspective for diagnostics. For the successful application of personal monitoring devices, they must be small, have an appropriate signal quality, have low power requirements, be capable of long-term registration or real-time transmission, and be low-cost.
To meet these expectations, developers have had to wrestle with complex and costly multicomponent solutions that require higher power consumption, larger footprints, and longer development times. Reducing device design time is necessary to enter into new markets of personal health monitors [3,4], and the use of specialized AFEs and open-source components help to quickly design a prototype. A single AFE chip is a solution based on a highly integrated module required for faster designs. The objective of this project was to implement a single-lead electrocardiograph (Lead-I), which allows for long-term registration and transmission using the AD8232 chip, that is low-cost and portable. Standard open-source components, such as Arduino shields and popular breakout boards (Bboards) designed to use I2C or SPI communication protocols that use fewer pins, produced a modular prototype with simple connections (see Figure 1).

2. Materials and Methods

2.1. Open-Source Hardware

The main board used for the development of the project was the Arduino Nano CH340, which uses the ATmega328 microcontroller with a 16 MHz oscillator. Other modules or open access breakout boards were used, such as the HC-06 Bluetooth module and a data logger shield. The HC-06 module allows wireless connectivity of the device with a maximum speed of 115,200 bauds and a friendly programming interface using AT modem commands (attention commands). The data logger shield incorporates a real-time clock for time and date registration and adds a micro SD card for physical storage of up to 32 gigabytes, allowing extended registration time. The hardware compatibility and functionality of these boards was evaluated for the acquisition, transmission, and recording of data for the development of a long-term monitoring portable ECG.
For the ECG signal conditioning step, the EVAL-AD8232 board from Analog Devices was used, which incorporates the AD8232 heart rate monitor front-end microchip conveniently mounted with test pins, switches, and jumpers to configure the circuit for initial application evaluations. Once a specific AD8232 circuit configuration was selected, the prototype breadboard of Figure 1 was implemented with the open-source hardware elements. Using the Arduino microcontroller (ATmega328) to digitize the analog ECG signal provided by the AD8232 chip, the ADC converter was configured for a resolution of 10 bits, being 5V/1024 = 0.00488V of LSB.

2.2. Open-Source Software

The open-source software used to develop the project’s program was the Arduino integrated development environment (IDE) with its add-ons, Serial Monitor, COM ports, and Serial Plotter. Libraries included in the Arduino IDE were used, such as the SD library for writing to a micro SD and Serial library to transmit to the PC using the UART port via USB cable (Rx and Tx pins). Other external libraries such as serial software were used to create or simulate a UART port for communication with the Bluetooth module (pins D8 and D9 were configured) without interfering with the UART port hardware used for USB serial communication. The Timer One library [5] was used for programming the interrupt rate to schedule ADC converter sampling. The RTClib library [6] was used to configure and manage the data of the real-time clock of the data logger shield. These libraries are available in the GitHub open-source repositories. Other open-source software, such as Theremino, a visualization software for ECG files on grid paper, and the Android Bluetooth Graphics App for real-time display of the ECG signal were also used.

2.3. AFE AD8232 and Adapter

The AD8232 microchip belongs to the family of AFE (analog front-end) highly integrated circuits for the acquisition and conditioning of biological signals, providing an analog ECG output. Some semiconductor manufacturers of AFEs, such as IMEC, Texas Instruments, and Analog Devices, offer this type of analog microchip to reduce space and energy consumption and miniaturize designs for portable applications. Prior to the prototype construction, Multisim SPICE was employed to simulate the circuit from a macromodel with the ECG generator tool from LabVIEW to create ECG signal data. With this simulation, the stability of the system was assessed by several methods: Monte Carlo, Fourier analysis, worst-case, and temperature variation to simulate the circuit under different critical operating conditions.
Literature related to the design of the ECG and the applications of the AD8232 chip [7,8,9] was reviewed. One option for implementing this microchip is to use an SMD-DIP adapter to assemble the breadboard prototype circuit and then devise a design on a custom PCB. An alternative for acquiring this type of adapter is the company Proto-Advantage, which offers SMD-DIP adapters for a wide variety of SMD components [10]. The design selected for the ECG circuit with the AD8232 AFE had a gain of 1100× and a bandwidth of 0.5–40 Hz.

2.4. Circuit Implementation and Testing

To produce a modular prototype with simple connections, popular Bboards were used. The compatibility of Arduino and its communication protocols, SPI, I2C, and UART, was considered to reduce the number of connections for a portable design. Initially, its operation, range, and connectivity were evaluated by building the circuit in Figure 1 and its code for serial transmission, microSD recording with time and date, and Bluetooth transmission; a menu was developed to select each mode of operation. Common to all modes of operation is the signal acquisition step, in which it was decided to use the interrupt technique to capture the ADC information because using the polling method to determine the ADC status generates delays and can waste important resources (memory and processing). By using interrupts, a more efficient program is achieved to perform additional functions such as digital filter application. To make the system robust, maximum sampling frequency validation tests were performed in each mode of operation to determine the frequency at which information loss or errors occur.
After the construction and testing of the prototype breadboard, a printed circuit (custom PCB) was manufactured with the simplified design of the Arduino Nano CH340 board. The basic components for its operation were selected: the ATmega328 microcontroller, the CH340 USB controller, a voltage regulator, a reset button, oscillators, and a mini-USB socket. The microcontroller was used with the factory-preloaded bootloader for the Arduino IDE and its USB connectivity, but the use of ICSP communication was precluded; therefore, although a program (sketch) can be modified or updated, it was not possible to modify the factory bootloader. The essential elements of the data logger module were used: the DS1307 RTC, a logic level regulator from 5V to 3.3V, a crystal, a coin battery socket, and a micro SD card reader. The HC-06 Bluetooth module was used without modifications as it includes the necessary elements for wireless transmission (antenna and RF transceivers). Precision components with 1% tolerance were used, which conform to the values established in the regulation standards of the IEC 6060-1-9, ANSI/AAMI/IEC 60601-2-47: 2012 [11,12]. The printed circuit uses components SMD 1205, SO4, SOT223, and SOT23. The final dimensions of the board are 9.6 × 5.6 cm, shown in Figure 2.
The necessary tests were performed for the evaluation of the hardware and software to ensure the functionality and robustness of the prototype. To check prototype stability, ECG signals from a simulator and real patients were acquired. Initially, the ECG signals were generated with the SimCube simulator and subsequently obtained from a healthy patient. Measurements of current consumption, maximum operating time, long-term SD storage, basic safety, and essential performance were recorded.

2.5. Data Output Modes

The data collected from the ECG signal can be used in four ways: (1) serial cable transmission, (2) micro SD memory recording, (3) Bluetooth transmission to a smartphone, and (4) Bluetooth transmission to a PC. Online display is realizable for operating modes 1, 3, and 4 and offline display for operating mode 2. In serial transmission (operating mode 1), data is sent in real-time for visualization in the Arduino IDE as well as in the LabVIEW environment. In the micro SD memory recording operation mode, data is stored for further processing or visualization in tabulated form, compatible with software such as Excel, MATLAB, and Theremino. In mode 3, the data format of the Bluetooth transmission to a smartphone is compatible with the Bluetooth Graphics application to display data on a smartphone or tablet with the Android system. In mode 4, the Bluetooth transmission to a PC is configured to display data in both the Arduino IDE software and the LabVIEW environment.

2.6. Buffer Overrun Problem

Using open-source codes facilitates function development, but there are some limitations. The design cannot be considered sufficiently robust for application in a real environment. The developer must validate, correct, and improve possible failures or limitations that may arise in open-source software. One problem faced was the loss of data samples in the micro SD recording mode. When recording for periods longer than one hour, about 20 run samples were lost randomly, and experiments were performed to determine the cause. The result revealed that the conventional Arduino libraries work with one buffer for writing to micro SD, and due to the writing latency, the buffer was overrun. To fix this problem, a secondary buffer was implemented using the microcontroller’s RAM to avoid saturation. Offline algorithms for the automatic analysis of the ECG signals were implemented, and it was verified that the flaw was corrected satisfactorily.

3. Results and Discussion

The prototype developed is a single-lead electrocardiograph with a bandwidth of 0.5–40 Hz and gain of 1100×. It can sample up to 2000 Hz (samples/s) without the loss of data in serial cable transmission, and provides a record of the ECG signal for up to 24 h at the sampling rate of 360 Hz. The prototype has a CMRR of 88.78 dB and a patient leakage current of 1–2 µA. It works in an electrode operating range of 1–3 mV and has a current consumption of 27–68 mAh during micro SD card recording. The operation options include serial communication, SD card recording, and Bluetooth transmission (smartphone and PC). The amplitude and duration of the waves and segments of the ECG signal obtained were measured to corroborate with the ECG standard.
The competence of this Arduino platform for the application of digital filters was also evaluated, and it was determined that it has sufficient memory and runtime to apply simple digital filters. This platform was tested with the difference equation y [n] = x [n] + x [n − 3], which achieves the rejection of the 60 Hz frequency and its harmonic components at a sampling frequency of 360 Hz. To demonstrate the implementation of the prototype breadboard circuit, signals were acquired to evaluate its operation in three modes: serial transmission, micro SD recording, and Bluetooth transmission (Figure 3A,C,E). Similarly, to demonstrate the implementation of the custom PCB (see Figure 2), new ECG signals were acquired with this printed circuit, and an improvement in the signal quality was noted (see Figure 3B,D,F).
Among the limitations of the prototype is that its maximum sampling rate decreased for wireless transmission to 906 samples, although this speed is sufficient for ECG applications.

4. Conclusions

The results indicate that the AD8232 microchip is suitable for the AFE function, as it delivered a useful signal for a long-term single-lead ECG monitoring application. The ATmega328 microcontroller on the Arduino open-source platform also provided satisfactory results. With its various communication protocols, the microcontroller kept the fabrication cost low, maintained portability, and reduced the number of components and the design time of the prototype. The total cost of the prototype components was 20 USD; this renders a personal monitoring ECG system with prolonged recording time accessible to a larger sector of the population. This design does not seek to replace hospital equipment but can support the diagnosis, prevention, and management of cardiovascular disease.

Author Contributions

Conceptualization and methodology, M.B.-Z. and R.L.A.; hardware, software, and validation, D.C.-G. and M.B.-Z.; writing—original draft preparation, writing—review and editing, J.P.G.-V., D.C.-G. and M.B.-Z.; and final paper review, M.A.R. and R.L.A.

Funding

This research was funded by CONACyT CVU: 763230.

Acknowledgments

We thank CONACyT for the scholar’s fellowship of the author D.C.-G.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Kay, M.; Santos, J.; Takane, M. World Health Organization, mHealth: New Horizons for Health through Mobile Technologies. Available online: https://www.who.int/goe/publications/goe_mhealth_web.pdf (accessed on 5 October 2019).
  2. Electronic Design Announces 2012 Best Electronic Design Award Winners, Electronic Design. Available online: http://electronicdesign.com/content/electronic-design-announces-2012-best-electronic-design-award-winners (accessed on 5 October 2019).
  3. Pickering, P.; Reducing Wearable Health and Fitness Device Design Time. Digi-Key. 2017. Available online: https://www.digikey.com.mx/en/articles/techzone/2017/apr/reducing-wearable-health-fitness-device-design-time (accessed on 5 October 2019).
  4. Evanczuk, S. Use a PPG/ECG Combo Wearable Biosensor Module for FDA-Certifiable Cardio Measurements. Digi-Key. 2019. Available online: https://www.digikey.com.mx/en/articles/techzone/2019/mar/use-a-ppg-ecg-combo-wearable-biosensor-modulek (accessed on 5 October 2019).
  5. Stoffregen, P. TimerOne Library. Available online: https://github.com/PaulStoffregen/TimerOne (accessed on 5 October 2019).
  6. JeeLab’s, RTClib Library. Available online: https://github.com/adafruit/RTClib/blob/master/RTClib.h (accessed on 5 October 2019).
  7. Sobrinho, A. Formal modeling of biomedical signal acquisition systems: source of evidence for certification. Softw. Syst. Model 2017, 18, 1467–1485. [Google Scholar] [CrossRef]
  8. Xu, L. Wireless Hybrid Bio-Sensing with Mobile Monitoring System. Master’s Thesis, School of Information and Communication Technology Kungliga Tekniska Högskolan, Stockholm, Sweden, 2013. [Google Scholar]
  9. Briginets, S.; Volkov, A.; Martinov, G.; Veselkov, A. Development of a mobile heart monitor based on the ECG module AD8232. In Proceedings of the AIP Converence Proceedings (2018), Ekaterinburg, Russia, 14–18 May 2018. [Google Scholar]
  10. Proto-Advantage. Available online: http://www.proto-advantage.com/store/product_info.php?products_id=3150092 (accessed on 5 October 2019).
  11. IEC 60601-1; Medical Electrical Equipment General Requirements for Basic Safety and Essential Performance. International Electrotechnical Commission: Geneva, Switzerland, 2005.
  12. ANSI/AAMI/IEC 60601-2-47; Particular Requirements for the Basic Safety and Essential Performance of Ambulatory Electrocardiographic Systems International Standard. American National Standards Institute, Inc.: Washington, DC, USA, 2012.
Figure 1. Sections of the portable ECG prototype. Circles on the person’s body represent one of the possible positions of the electrodes. The two main components of the prototype are the analog front-end AD8232 and the Arduino modules (an Arduino Nano board complemented with Data Loggger and Bluetooth HC-06 Bboards). The Vs power supply terminal in the AFE 8232 section is driven by the 3.3V output of the Arduino Nano. External power is provided by a LiPo battery.
Figure 1. Sections of the portable ECG prototype. Circles on the person’s body represent one of the possible positions of the electrodes. The two main components of the prototype are the analog front-end AD8232 and the Arduino modules (an Arduino Nano board complemented with Data Loggger and Bluetooth HC-06 Bboards). The Vs power supply terminal in the AFE 8232 section is driven by the 3.3V output of the Arduino Nano. External power is provided by a LiPo battery.
Proceedings 42 00049 g001
Figure 2. (A) Printed circuit board (custom PCB) top view and (B) bottom view.
Figure 2. (A) Printed circuit board (custom PCB) top view and (B) bottom view.
Proceedings 42 00049 g002
Figure 3. Snapshots of different operation modes. (A) ECG signal transmitted by serial cable (breadboard prototype), (B) ECG signal transmitted by serial cable (custom PCB), (C) ECG recorded to a micro SD card (breadboard prototype), (D) ECG recorded to a micro SD card (custom PCB), (E) ECG signal transmitted by Bluetooth via smartphone (breadboard prototype), (F) ECG signal transmitted by Bluetooth via smartphone (custom PCB). The sampling frequency in all signals was 360 Hz.
Figure 3. Snapshots of different operation modes. (A) ECG signal transmitted by serial cable (breadboard prototype), (B) ECG signal transmitted by serial cable (custom PCB), (C) ECG recorded to a micro SD card (breadboard prototype), (D) ECG recorded to a micro SD card (custom PCB), (E) ECG signal transmitted by Bluetooth via smartphone (breadboard prototype), (F) ECG signal transmitted by Bluetooth via smartphone (custom PCB). The sampling frequency in all signals was 360 Hz.
Proceedings 42 00049 g003
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Bravo-Zanoguera, M.; Cuevas-González, D.; García-Vázquez, J.P.; Avitia, R.L.; Reyna, M.A. Portable ECG System Design Using the AD8232 Microchip and Open-Source Platform. Proceedings 2020, 42, 49. https://doi.org/10.3390/ecsa-6-06584

AMA Style

Bravo-Zanoguera M, Cuevas-González D, García-Vázquez JP, Avitia RL, Reyna MA. Portable ECG System Design Using the AD8232 Microchip and Open-Source Platform. Proceedings. 2020; 42(1):49. https://doi.org/10.3390/ecsa-6-06584

Chicago/Turabian Style

Bravo-Zanoguera, Miguel, Daniel Cuevas-González, Juan P. García-Vázquez, Roberto L. Avitia, and M. A. Reyna. 2020. "Portable ECG System Design Using the AD8232 Microchip and Open-Source Platform" Proceedings 42, no. 1: 49. https://doi.org/10.3390/ecsa-6-06584

Article Metrics

Back to TopTop