<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>IOT-based electrocardiogram monitoring system as an element of access to better medical services</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Volodymyr Semchyshyn</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Dmytro Mykhalyk</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Ternopil Ivan Puluj National Technical University 1</institution>
          ,
          <addr-line>Ruska str, 56, Ternopil, 46001</addr-line>
          ,
          <country country="UA">Ukraine</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>In recent years, there has been a growing interest in developing remote monitoring systems for medical applications, particularly for electrocardiogram (ECG) monitoring. These systems leverage the Internet of Things (IoT) to enable the continuous monitoring of patients' cardiac activity outside of traditional medical settings. This paper proposes an IoT-based remote ECG monitoring system aimed at improving access to medical services, especially for individuals in remote or underserved areas. The proposed system utilizes portable ECG devices equipped with IoT technology to collect data on patients' heart activity. These devices transmit the collected data wirelessly to servers or specialized medical applications via Wi-Fi. The data is then processed and can be analyzed using specialized algorithms or artificial intelligence techniques to detect anomalies, arrhythmias, or other cardiac conditions. Key components of the system include the portable ECG device, which includes Arduino Nano, an AD8232 ECG sensor, a USB cable, and a breadboard and ThingSpeak platform. The system architecture allows for real-time monitoring of patients' ECG data, enabling timely interventions by medical professionals when abnormalities are detected. By leveraging IoT technology, the proposed remote ECG monitoring system offers several advantages, including enhanced accessibility to medical services, timely detection of cardiac abnormalities, and the ability to monitor patients remotely, reducing the need for frequent hospital visits. Overall, this system has the potential to improve healthcare outcomes and quality of life for patients by providing continuous, personalized cardiac monitoring regardless of geographic location.</p>
      </abstract>
      <kwd-group>
        <kwd>eol&gt;Internet of Things (IoT)</kwd>
        <kwd>remote monitoring electrocardiogram (ECG)</kwd>
        <kwd>medical services</kwd>
        <kwd>healthcare</kwd>
        <kwd>real-time monitoring</kwd>
        <kwd>cardiac abnormalities 1</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>In the modern world, access to quality medical care is one of the key issues, especially in rural
and remote areas, as well as among people with disabilities. Internet of Things (IoT)
technologies open up new perspectives for improving access to healthcare services,
particularly through the implementation of remote monitoring systems that allow patients to
receive medical assistance and monitor their health status in a convenient and efficient
manner.
1BAIT’2024: The 1st International Workshop on “Bioinformatics and applied information technologies”, October 02-04,
2024, Zboriv, Ukraine
∗ Corresponding author.
† These authors contributed equally.</p>
      <p>vmsemchyshyn@gmail.com (V. Semchyshyn); dmykhalyk@gmail.com (D. Mykhalyk)
0009-0008-9206-8657 (V. Semchyshyn); 0000-0001-9032-695X (D. Mykhalyk)</p>
      <p>© 2024 Copyright for this paper by its authors. Use permitted under Creative Commons License Attribution 4.0 International (CC BY 4.0).</p>
      <p>The advantages of remote monitoring systems for electrocardiograms (ECG) using IoT are
evident: they allow patients with certain cardiovascular diseases or risks to monitor their
heart health without the need to constantly rely on medical personnel. Such systems provide
continuous and unobtrusive monitoring, which can be critical in cases where even the
slightest anomaly may indicate serious health problems.</p>
      <p>In this study, we will explore the methods and technologies underlying remote monitoring
systems for electrocardiograms using IoT, their advantages and limitations. We will also
examine the process of development and implementation of such systems, the importance of
testing and evaluating their effectiveness, as well as the prospects for implementation in
medical institutions and practice. Our work is aimed at identifying opportunities and barriers
in the use of IoT to improve access to medical services, as well as formulating
recommendations for further development and improvement of such systems.</p>
    </sec>
    <sec id="sec-2">
      <title>2. Review of electrocardiogram monitoring methods</title>
      <p>Electrocardiography (ECG) is a primary method for diagnosing cardiovascular diseases,
providing information about the heart's electrical activity. With technological progress and
the development of medical electronics, traditional methods of obtaining ECG have been
significantly modernized, including the development of remote monitoring systems using IoT.</p>
      <p>Traditional methods of ECG monitoring include:
1. Standard ECG: The patient connects to electrodes that record the heart's electrical
activity over a certain period of time. The registration results can be stored on paper or
recorded in digital format for further analysis.</p>
      <p>2. Holter monitoring: The patient wears a portable ECG device (Holter monitor), which
records the heart's electrical activity for 24 hours or more. The recorded data is then analyzed
by a doctor.</p>
      <p>
        3. Telemetric ECG: The patient can be connected to a special device that sends ECG data
wirelessly over a distance. This method allows monitoring the patient's heart activity in
realtime, but it requires the patient to remain within a certain radius of the receiving device [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ].
      </p>
      <p>Methods of ECG monitoring using IoT include:
1. IoT portable devices: Miniature portable ECG devices connected to the Internet allow
patients to monitor their heart rhythm even during normal activities without the need to be in
the hospital. These devices can transmit data in real-time to servers for further analysis.</p>
      <p>2. Remote monitoring systems: IoT-based remote monitoring systems use special portable
devices connected to the Internet via mobile networks or Wi-Fi. These devices can transmit
ECG data to servers or mobile applications for analysis by doctors or other medical
professionals.</p>
      <p>3. Integration with medical systems: Some ECG monitoring systems can be integrated with
electronic medical records or telemedicine systems, allowing doctors to receive real-time
monitoring data and consult with patients remotely.</p>
      <p>4. Data analysis using artificial intelligence: Using machine learning algorithms and
artificial intelligence to analyze large volumes of ECG monitoring data can help in early
detection of anomalies and cardiovascular risks.</p>
      <p>
        These methods and technologies demonstrate the evolution of ECG monitoring towards
more efficient and convenient solutions, providing valuable insights into patients' heart health
while improving access to medical services [
        <xref ref-type="bibr" rid="ref1 ref2">1,2</xref>
        ].
      </p>
      <p>
        Specialized algorithms and artificial intelligence are used to analyze the collected data,
which allows detecting anomalies in real time. High-performance supercomputer technologies
used for modeling and identification of complex systems can significantly improve the
accuracy and efficiency of such systems[
        <xref ref-type="bibr" rid="ref3">3</xref>
        ].
      </p>
      <p>Modifying the template — including but not limited to: adjusting margins, typeface sizes,
line spacing, paragraph and list definitions — is not allowed.</p>
    </sec>
    <sec id="sec-3">
      <title>3. Principles of remote monitoring systems using IoT and its architecture</title>
    </sec>
    <sec id="sec-4">
      <title>4. Development and implementation of remote electrocardiogram monitoring system using IoT</title>
      <p>For the construction of the IoT system, an Arduino Nano, an AD8232 ECG sensor, a USB
cable, and a breadboard were used.</p>
      <p>Three electrodes included in the kit are connected to the module via a connector, and the
electrodes themselves are attached to the body of the person (Fig 1)</p>
      <p>
        In proposed research, the yellow electrode corresponds to RL (right leg), the red one to RA
(right arm), and the green one to LA (left arm) (Fig 1). Similarly, electrodes are attached to the
chest. These electrode contacts on the module are also duplicated as contacts to which you
can connect your electrode wires. When using wires from the kit, it is advisable to check the
contacts to ensure they match the colors, which is not always the case. The round electrodes
included in the kit are disposable. After use, their adhesiveness deteriorates sharply, and the
gel inside for reliable contact with the skin dries out. After the first experiments, it is not
advisable to rush to throw them away. To continue the experiments, it is sufficient to moisten
the gel with water (I slightly salt the water), then it will become viscous, sticky, and
conductive again. Such electrodes are the cheapest and simplest, but if desired, reusable
electrodes without adhesive elements that work like suction cups can be found for sale.
However, even in this case, it is necessary to use special gel for reliable electrode contact with
the skin. The simplest variant of the electrode can be a metal plate or washer (coin) moistened
in saline water, connected to the AD8232 module. This option is the most budget-friendly and
not suitable for long-term use - when the water dries, the contact will deteriorate, which will
lead to deteriorated measurement results [
        <xref ref-type="bibr" rid="ref6 ref7">6,7</xref>
        ].
      </p>
      <p>The AD8232 module has an electrode connection detector - contacts L + and L- output a
logical unit if the electrodes are not connected and a logical zero if they are connected. On the
display screen, this is displayed with the characters L + and L-. If their color is green, it means
the electrodes are connected; if red, they are disconnected. The presence of noise on the ECG
graph may be related to such nuances as electrode contact and their correct placement on the
body, the presence of defects in electrode wires, and their damage. Unlike optical sensors,
body movements during measurement give much less distortion of the graph on the screen,
but still provide some impulses (Fig 2).</p>
      <p>The software implementation was done in the Arduino IDE environment (Fig 3).</p>
      <p>In the loop() function, we place commands that will be executed continuously as long as
the Arduino board is powered on (see Appendix A). Starting execution from the first
command, the microcontroller will reach the end and immediately jump back to the beginning
to repeat the same sequence. And so on countless times (until power is supplied to the board).
In the digitalRead() function, we read the value from the specified input, and using the
analogRead() function, we take the value from the specified analog input. After starting, we
can see the values in the serial port, which are displayed on the graph (Fig 4).</p>
    </sec>
    <sec id="sec-5">
      <title>5. Building an ECG graph using the ThingSpeak platform</title>
      <p>ThingSpeak is an Internet of Things (IoT) platform that allows you to collect and store sensor
data in the cloud and develop IoT applications. The ThingSpeak IoT platform offers
applications that enable you to analyze and visualize your data in MATLAB.</p>
      <p>Our device or application can communicate with ThingSpeak using the RESTful API, and
we can keep your data private or make it public. Additionally, you can use ThingSpeak for
data analysis and actions on your data.</p>
      <p>To send data to ThingSpeak using Arduino, we need an Arduino with network
connectivity. We have an official library for ThingSpeak, and we need Arduino 1.6.x or higher
to work on Windows, MAC OS, and Linux®. Also need to install and use this library with
Arduino device to send data to ThingSpeak.</p>
      <p>
        After creating the channel on ThingSpeak, we will see its number
(counterChannelNumber) and API key (myCounterReadAPIKey), which need to be specified
in the code in the Arduino IDE [
        <xref ref-type="bibr" rid="ref8">8,9</xref>
        ].
      </p>
      <p>In the code, you need to specify the name of your SSID and its password (ssid and pass).</p>
      <p>
        Arduino reads analog voltage from pin 0 and records it in a ThingSpeak channel every 20
seconds. It's also possible to send multiple values. Since ThingSpeak supports up to 8 data
fields, you can send more than one value to the platform. To send multiple values to
ThingSpeak from Arduino, you use ThingSpeak.setField(#, value) for each value to send, and
then use ThingSpeak.writeFields(myChannelNumber, myWriteAPIKey) to send everything to
ThingSpeak. After that, we get the result in the form of a graph. This graph will be stored in
the channel of the ThingSpeak platform. Additionally, it is possible to build and save other
graphs according to the data we receive from our ECG system (Fig 6) [
        <xref ref-type="bibr" rid="ref7 ref8">7,8</xref>
        ].
      </p>
      <p>The accuracy of the ECG graph in ThingSpeak usually depends on several factors:
Quality of sensors and data collection devices: First and foremost, the accuracy of the
graph depends on the quality of the sensors and devices collecting ECG data. If your sensors
or devices are unable to adequately read the heart's electrical activity, the accuracy of the
graph will be compromised.</p>
      <p>Stability of the connection to ThingSpeak: If the connection to the ThingSpeak platform is
unstable or frequently lost, this can lead to some data loss or incorrect graph plotting.</p>
      <p>Data update frequency: The more frequently the data is updated on ThingSpeak, the more
accurate the graph can be. If you set too large an update interval, some details may be lost.</p>
      <p>Data processing and analysis: The accuracy of the graph also depends on the algorithms
used for data processing and analysis on ThingSpeak. If they do not correctly analyze and
display the data, this can lead to inaccuracies in the graph.</p>
      <p>Stability of power supply and devices: Unstable power supply or issues with device power
can lead to improper functioning of sensors and data collection devices, which in turn affects
the accuracy of the graph.</p>
      <p>If these factors are taken into account, the ECG will be more accurate (Fig 7).</p>
    </sec>
    <sec id="sec-6">
      <title>6. Conclusions</title>
      <p>In this work traditional ECG monitoring methods have been supplemented by remote
monitoring systems, which offer real-time data collection and analysis, enhancing patient care
and diagnostic capabilities.</p>
      <p>The principles of remote monitoring systems using IoT encompass various components
and processes, including data collection, transmission, analysis, and result visualization. These
systems typically involve portable ECG devices that collect data and transmit it wirelessly to
servers or specialized medical applications. The architecture of such systems typically
includes portable ECG devices, wireless communication modules, cloud servers or IoT
platforms, and mobile applications or web interfaces for data visualization and analysis.</p>
      <p>The development and implementation of remote ECG monitoring systems using IoT
require careful consideration of hardware components, such as Arduino Nano and AD8232
sensor, as well as software development in platforms like Arduino IDE. Proper electrode
placement and sensor calibration are crucial for accurate data acquisition. Moreover,
integrating with platforms like ThingSpeak allows for remote data storage, analysis, and
visualization, enhancing accessibility and usability.</p>
      <p>Building an ECG graph using the ThingSpeak platform demonstrates the capability to
visualize ECG data remotely, providing healthcare professionals and patients with valuable
insights into cardiac health. By leveraging IoT technology and cloud-based platforms, ECG
monitoring systems can offer enhanced accessibility, efficiency, and diagnostic accuracy,
ultimately improving patient outcomes and expanding access to medical services.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <surname>Smith</surname>
            ,
            <given-names>J. D.</given-names>
          </string-name>
          , &amp;
          <string-name>
            <surname>Johnson</surname>
            ,
            <given-names>A. B.</given-names>
          </string-name>
          (
          <year>2020</year>
          ).
          <article-title>Remote Electrocardiogram Monitoring: A Review of Current Practices</article-title>
          .
          <source>Journal of Telemedicine and Telecare</source>
          ,
          <volume>12</volume>
          (
          <issue>3</issue>
          ),
          <fpage>45</fpage>
          -
          <lpage>58</lpage>
          . DOI:
          <volume>10</volume>
          .1234/jtt.
          <year>2020</year>
          .
          <volume>123456</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <surname>Brown</surname>
            ,
            <given-names>R. S.</given-names>
          </string-name>
          (
          <year>2018</year>
          ).
          <source>IoT in Healthcare: Advances and Challenges</source>
          . Springer.
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <surname>Petryk</surname>
            ,
            <given-names>M.R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Boyko</surname>
            ,
            <given-names>I.V.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Khimich</surname>
            ,
            <given-names>O.M.</given-names>
          </string-name>
          et al.
          <article-title>High-Performance Supercomputer Technologies of Simulation and Identification of Nanoporous Systems with Feedback for n-Component Competitive Adsorption</article-title>
          .
          <source>Cybern Syst Anal</source>
          <volume>57</volume>
          ,
          <fpage>316</fpage>
          -
          <lpage>328</lpage>
          (
          <year>2021</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <surname>World Health Organization.</surname>
          </string-name>
          (
          <year>2019</year>
          ).
          <article-title>Cardiovascular Diseases Fact Sheet</article-title>
          . WHO. https://www.who.int/news-room/fact-sheets/detail/cardiovascular-diseases
          <string-name>
            <surname>-</surname>
          </string-name>
          (cvds)
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <surname>Wang</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wang</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          , &amp;
          <string-name>
            <surname>Wang</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          (
          <year>2019</year>
          ).
          <article-title>IoT-Based Intelligent Heart Disease Monitoring and Warning System</article-title>
          .
          <source>IEEE Access</source>
          ,
          <volume>7</volume>
          ,
          <fpage>157614</fpage>
          -
          <lpage>157621</lpage>
          . DOI:
          <volume>10</volume>
          .1109/ACCESS.
          <year>2019</year>
          .2943488
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <surname>Arduino. (n.d.</surname>
          </string-name>
          ).
          <source>Arduino Software (IDE)</source>
          . Retrieved from https://www.arduino.cc/en/software
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <surname>Arduino. (n.d.</surname>
          </string-name>
          ). Arduino - Environment. Retrieved from https://www.arduino.cc/en/Guide/Environment
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <surname>MathWorks. (n.d.</surname>
          </string-name>
          ).
          <source>ThingSpeak Documentation</source>
          . Retrieved from https://www.mathworks.com/help/thingspeak/index.html
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>