element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products & Partners
    Products & Partners
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
    About the element14 Community
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      •  Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Smart Home & Healthcare Challenge
  • Challenges & Projects
  • Design Challenges
  • Smart Home & Healthcare Challenge
  • More
  • Cancel
Smart Home & Healthcare Challenge
Forum HealthGuard #5 - Interfacing with the LabVIEW
  • News
  • Projects
  • Forum
  • Details
  • Leaderboard
  • Files
  • Members
  • DC
  • More
  • Cancel
  • New
Join Smart Home & Healthcare Challenge to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 0 replies
  • Subscribers 18 subscribers
  • Views 18 views
  • Users 1 member is here
  • design challenge
  • e14-smart home & healthcare
  • spo2
  • analog devices
  • labview
  • ecg
  • esp32 cyd module
  • heart rate
  • smart home & healthcare
Related

HealthGuard #5 - Interfacing with the LabVIEW

taifur
taifur 2 hours ago

LabVIEW interfacing is an important part of my HealthGuard project because it allows me to visualize and monitor the collected health data in real time on a computer. The system receives data from the ESP32, including body temperature, heart rate, and SpO₂, ECG and displays the values through a user-friendly graphical interface. LabVIEW also allows me to plot real-time graphs, observe changes in vital signs, and set up alarms to notify users when the measured values exceed predefined limits. This graphical interface makes it easier to understand the collected data, identify unusual changes, and demonstrate the system's functionality. By integrating LabVIEW with the ESP32-based monitoring device, I can create a more interactive and informative monitoring system for educational and prototype applications, while recognizing that clinical use requires appropriate medical validation.

To interface the ESP32 with LabVIEW, I used the VISA (Virtual Instrument Software Architecture) protocol to establish serial communication between the hardware and the graphical user interface. The ESP32 transmits the collected health data to LabVIEW through a serial connection at a baud rate of 9600 bps. LabVIEW receives and processes the incoming data, separates the individual values (using Scan from String block), and displays them through a user-friendly monitoring interface. Body temperature, heart rate, and SpO₂ levels are presented using both numerical indicators and meter indicators, allowing users to read the exact measurements and quickly understand the current status of each parameter. In addition, the ECG data is plotted on a real-time chart, making it possible to observe changes in the electrical activity of the heart as the data arrives from the ESP32.

The complete LabVIEW interfacing and visualization setup is shown in the screenshot below. I did not use LabView before, so it took too much time for me to make it working. The LabView official documentation was very helpful and I also watched some YouTube tutorials on it. My overall experience with LabVIEW is really good. 

image

The block for my primary LabVIEW interface is shown below.

image

But this is a draft interface; I am going to make it complete and show the full interface in my final project documentation. Without the actual sensor, I just generate random data from the ESP32, convert the data to a string, and send it to the Computer using the Serial.print() function.

ESP32 Demo Code is given below:

#include <math.h>

// Put these global variables OUTSIDE setup() and loop()
float ecgPhase = 0.0;
float phaseStep = 0.005;
float baselineDrift = 0.0;
float noiseState = 0.0;

float generateECG() {
  // Approximately 1-second heartbeat cycle
  ecgPhase += phaseStep;
  if (ecgPhase >= 1.0) {
    ecgPhase -= 1.0;

    // Slight beat-to-beat variation
    phaseStep = 0.005 + random(-3, 4) * 0.00001;
  }

  float t = ecgPhase;

  // P wave
  float p = 18.0 * exp(-pow((t - 0.17) / 0.035, 2));

  // QRS complex with slightly distorted peaks
  float q = -28.0 * exp(-pow((t - 0.385) / 0.014, 2));
  float r = random(165, 221) *
            exp(-pow((t - 0.405) / 0.012, 2));
  float s = -65.0 * exp(-pow((t - 0.435) / 0.022, 2));

  // T wave
  float tw = 48.0 * exp(-pow((t - 0.68) / 0.075, 2));

  // Slow baseline movement
  baselineDrift = 12.0 * sin(2.0 * PI * t * 1.2)
                + 5.0 * sin(2.0 * PI * t * 0.4);

  // Random high-frequency noise
  float muscleNoise = random(-9, 10);

  // Mild 50 Hz mains interference (simulated)
  static int noiseSample = 0;
  float mainsNoise = 3.0 * sin(noiseSample * 1.5708);
  noiseSample++;

  // Occasional small electrode/contact disturbance
  float contactNoise = 0;
  if (random(0, 100) < 3) {
    contactNoise = random(-18, 19);
  }

  float ecg = 512.0 + p + q + r + s + tw
            + baselineDrift + muscleNoise
            + mainsNoise + contactNoise;

  return constrain((int)ecg, 0, 1023);
}

void setup() {
  // put your setup code here, to run once:
Serial.begin(9600);


}

void loop() {
// One simulated heartbeat, sampled over time
  
float temperature = random(3600, 3789) / 100.0;  // 20.00–40.00
int value2 = random(70, 80);                    // 50–100
int value3 = random(96, 99);                     // 30–80

int ecgValue = generateECG();

String dataString = String(temperature, 2) + "," +
                    String(value2) + "," +
                    String(value3) + "," +
                    String(ecgValue);

Serial.println(dataString);

delay(10);

}

I also recorded my screen while LabVIEW was receiving data from ESP32 board. 

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

 

  • Sign in to reply
  • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2026 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube