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 VitalSense – Part 13 : Dual-Port Biomedical Telemetry Dashboard - Integrating STM32 (MAXREFDES117) and MAX30208EVSYS in C++ and Qt
  • 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 1 reply
  • Subscribers 18 subscribers
  • Views 65 views
  • Users 0 members are here
Related

VitalSense – Part 13 : Dual-Port Biomedical Telemetry Dashboard - Integrating STM32 (MAXREFDES117) and MAX30208EVSYS in C++ and Qt

jelektro
jelektro 2 days ago

Table of Contents
Part 1: System Concept and Architecture
Part 2 : Sponsored Kit Overview
Part 3 : Alternatives for Heart Rate, SpO₂, and Temperature Sensing
Part 4 : MAX30208EVSYS Evaluation System – Technical Overview & Operation
Part 5 : Reverse-Engineering the MAX30208EVSYS Communication Protocol
Part 6 : Communicating with the MAX30208EVSYS in LabVIEW
Part 7 : Building a Cross-Platform Qt6 Desktop Application for the MAX30208EVSYS Temperature Sensor
Part 8 : STM32 Pulse Oximeter & Heart Rate Monitor (MAXREFDES117 + USB CDC)
Part 9 : MAXREFDES117 – JSON Data Acquisition via USB-CDC in LabVIEW
Part 10 : Building a Real-Time Sensor Data Visualizer for MAXREFDES117 / USB CDC
Part 11 : Research Workstation System Architecture
Part 12 : Combined Pulse Oximeter & Temperature Monitoring System in LabVIEW
Part 13 : Dual-Port Biomedical Telemetry Dashboard - Integrating STM32 (MAXREFDES117) and MAX30208EVSYS in C++ and Qt

In this comprehensive blog post, we will explore how to design and implement a robust, multi-threaded cross-platform desktop application using C++ and Qt 6. This application manages two independent serial ports simultaneously, parses real-time JSON payloads, implements the authentic MAX30208 command-line protocol, and renders responsive, live multi-parameter charts.

image

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

A prime example of this engineering feat is a robust, cross-platform desktop application developed in C++ and Qt 6 designed to simultaneously monitor, parse, and visualize telemetry data from two independent hardware sensor modules over separate serial ports.

At the core of this system lies a sophisticated Dual-Port Asynchronous Architecture. The STM32 / MAXREFDES117 stream operates asynchronously on the main GUI thread via QSerialPort::readyRead, continuously capturing and parsing high-frequency JSON packets containing Heart Rate (bpm), Blood Oxygen (spo2), and Filtered Infrared (filtered_ir) signals. In parallel, the MAX30208EVSYS protocol link is managed inside a dedicated background QThread using a thread-safe SerialWorker class. This module communicates via a command-based protocol (s, t, r, w) to fetch precise thermal metrics via a non-blocking QTimer, effectively isolating blocking operations and maintaining optimal UI frame rates.

Beyond backend communication, the application excels in Real-Time Multi-Parameter Visualization powered by Qt Charts. It features four independent live charts tracking BPM, SpO2, Filtered IR, and Temperature, all equipped with a sliding-window buffer that automatically shifts the X-axis after a set threshold of samples. To augment the graphical representation, a vertical thermometer progress bar provides operators with instant visual feedback on thermal variations. Furthermore, Dynamic UI Layout Customization empowers users to switch the dashboard layout at runtime between a Vertically Stacked arrangement and a 2x2 Side-by-Side Grid layout using an intuitive dropdown control.

Usability and data management are further elevated through thoughtful software design patterns. The application incorporates Bilingual Localization (PL / EN), implementing seamless runtime language switching between Polish and English via a dynamic retranslation mechanism (retranslateUi). This instantly updates all interface elements, tooltips, buttons, and chart titles. Concurrently, automated data persistence is handled by CsvLogger, which automatically initiates a timestamped CSV session upon successful device connection, logging elapsed time, device indices, temperatures, and hardware status flags for subsequent post-processing analysis.

Architectural Overview: Two Independent Data Streams

To ensure low latency, thread safety, and freedom from data blockages, the application architecture splits telemetry handling into two distinct pathways:

  1. The Sensor Stream (STM32 / MAXREFDES117): Configured via standard USB CDC (115200 baud) nad operates asynchronously on the main GUI thread via QSerialPort::readyRead, continuously capturing and parsing high-frequency JSON packets containing Heart Rate (bpm), Blood Oxygen (spo2), and Filtered Infrared (filtered_ir) signals.

  2. The Temperature Protocol Link (MAX30208EVSYS): Based on the evaluation kit's firmware protocol (operating at 115200 baud, 8 data bits, no parity, 1 stop bit). Managed inside a dedicated background QThread using a thread-safe SerialWorker class. It communicates via a command-based protocol (s, t, r, w) to fetch precise thermal metrics via a non-blocking QTimer

Technical Implementation

1. Robust Serial Port Management and Enumeration

The application leverages hardware identification filters to locate devices accurately. For the MAX30208 evaluation kit, the serial layer looks up specific vendor and product IDs (VID_0B6A and PID_0042) using Windows Management Instrumentation (WMI) queries, ensuring reliable plug-and-play identification.

2. Implementing the MAX30208 Evaluation Kit Protocol

Derived directly from the evaluation kit's firmware communication structure, the custom OT07Serial class maps all core hardware interaction commands:

  • s (Search Command): Scans the I²C bus for connected sensors, returning the device count, I²C addresses, and unique 64-bit ROM codes formatted inside bracketed strings (e.g., [Index] [Address] [RomCode]).

  • t (Temperature Read): Requests active temperature conversions for individual or ranged device indices, parsing floating-point Celsius values and status flags.

  • Register Control (r, w, g): Provides low-level read, write, and bulk configuration dumps across the 24-register memory map of the MAX30208 sensor.

3. Real-Time Multi-Chart Visualization (Qt Charts)

Plotting high-frequency physiological signals alongside low-frequency thermal data on a single axis causes scaling distortion. To solve this, the application provisions three independent chart panels:

  • Rolling Window Buffer: A sample counter tracks incoming frames. Once limits exceed 100 samples, the X-axis dynamically shifts (axisX->setRange(...)), creating a clean, sliding oscilloscope effect.

  • Layout Adaptability: Users can instantly switch between a vertical stacked layout and a side-by-side horizontal arrangement via an intuitive dropdown menu.

  • Features four independent live charts (BPM, SpO2, Filtered IR, and Temperature) equipped with a sliding-window buffer that automatically shifts the X-axis after a set threshold of samples.

  • Includes a vertical thermometer progress bar providing instant visual feedback on thermal variations.

4. Dynamic UI Layout Customization

  • Users can switch the dashboard layout at runtime between a Vertically Stacked arrangement and a 2x2 Side-by-Side Grid layout using an intuitive dropdown control.

image

image

5. Bilingual Localization (PL / EN)

  • Implements seamless runtime language switching between Polish and English using a dynamic retranslation mechanism (retranslateUi), instantly updating all interface elements, tooltips, buttons, and chart titles.

6. Automated Data Logging (CsvLogger)

  • Automatically initiates a timestamped CSV session upon successful device connection, logging elapsed time, device indices, temperatures, and hardware status flags for post-processing analysis.

 Conclusion

Integrating disparate hardware protocols into a single, cohesive desktop environment highlights the flexibility of modern C++ and Qt. By separating asynchronous JSON data acquisition from polled command-line protocols, developers can scale telemetry systems easily—transforming raw microcontroller evaluation kits into professional-grade diagnostic dashboards.

  • Sign in to reply
  • Cancel
  • Qbit
    Qbit 2 days ago

    Nice to see you using Qt for the interface!

    • Cancel
    • Vote Up 0 Vote Down
    • 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