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
1. Introduction and Architectural Overview
When developing embedded systems, Internet of Things (IoT) devices, or biomedical monitoring tools (such as pulse oximeters using the MAXREFDES117 optical sensor), developers frequently encounter a common bottleneck: visualizing telemetry data streaming from a microcontroller. Relying solely on serial console logs or terminal windows is insufficient for diagnostic evaluation, signal processing validation, or user-interface prototyping.
To bridge this gap, a cross-platform desktop application was engineered using C++ and the Qt Framework. The architecture is structured around a decoupled event-driven model that handles serial communication asynchronously, parses lightweight JSON payloads, manages dynamic data buffers, and renders real-time graphical representations using Qt Charts.
Rather than dumping raw text to the screen, the application offers an interactive dashboard featuring live numerical readouts, independent multi-parameter rolling-window charts, layout adaptability, and fault-tolerant parsing mechanisms.

2. Core Modules and Component Breakdown
The codebase is modularized cleanly into configuration files, header definitions, and implementation logic:
-
MaxRefdesReader.pro(The Build Specification): Configured viaqmake, the project links against essential Qt modules—specificallycore,gui,widgets,serialport, andcharts. It mandates modern C++17 standards to ensure safe memory handling, efficient STL utilization, and clean syntax. -
MainWindowClass (mainwindow.h/mainwindow.cpp): Acting as the central controller, this class inherits fromQMainWindowand orchestrates lifecycle management, user interface layout switching, hardware connectivity states, and serial stream processing.
3. Key Technical Features & Implementation Details
A. Asynchronous Serial Port Management & Robust Framing
Communication with the target microcontroller occurs over a virtual COM port established via USB CDC (Communications Device Class).
-
Port Discovery: Upon startup, the application queries
QSerialPortInfo::availablePorts()to dynamically populate a dropdown menu with all active hardware and virtual serial interfaces available on the host operating system. -
Stream Handling & Buffer Accumulation: Serial data does not always arrive in neat, atomic packages; packets can be fragmented or batched together. To prevent data corruption or missing frames, the application implements a line-buffered parsing algorithm. Incoming byte arrays are appended to a persistent
QByteArraybuffer (buffer). The application scans this buffer for a newline delimiter (\n), extracts complete lines individually, and strips them from the buffer, ensuring uninterrupted telemetry streams.
B. JSON Deserialization and Data Extraction
The microcontroller transmits sensor data packets formatted as JSON strings (e.g., {"bpm": 72, "spo2": 98, "filtered_ir": 1621.45}).
-
Once a full line is isolated from the serial buffer, it is passed through
QJsonDocument::fromJson(). -
The parser validates whether the document successfully evaluates to a JSON object containing the required keys (
bpm,spo2, andfiltered_ir). -
Validated parameters are extracted as double-precision floating-point numbers, instantly driving both the text label updates and the graphic plotting pipelines.
C. Multi-Chart Architecture with Rolling Windows
To prevent visual clutter, the system avoids plotting conflicting scales on a single chart (since raw/filtered infrared signals span thousands of units, whereas heart rate and blood oxygen operate in much tighter numerical ranges). Instead, it implements three independent charts:
-
Heart Rate (BPM): Tailored for standard physiological ranges.
-
Blood Oxygen (SpO2): Constrained to monitor oxygen saturation shifts.
-
Filtered IR Signal: Configured with a wider dynamic range to capture raw photoplethysmogram (PPG) waveforms.
-
Rolling Window Buffer Mechanism: To prevent memory bloat and application slowdowns over long monitoring sessions, a
pointCountertracks total incoming samples. Once the sample count exceeds 100, the X-axis range dynamically shifts usingaxisX->setRange(pointCounter - 100, pointCounter), creating a real-time sliding-window oscilloscope effect.
D. Dynamic Layout Switching (User Adaptability)
Flexibility in workspace organization is achieved through a dynamic layout manager. Users can toggle a dropdown menu to instantly rearrange the visual presentation:
-
Vertical Layout (Stacked): Positions the three chart views neatly on top of one another, which is ideal for widescreen monitors or detailed waveform inspection.
-
Horizontal Layout (Side by Side): Arranges charts horizontally, maximizing horizontal space resolution.
-
The Underlying Mechanism: When a layout switch is triggered, the application safely detaches the
QChartViewinstances from the active layout container, destroys the old layout manager, instantiates the alternative layout manager, re-inserts the chart widgets, and forces a UI refresh (show()) without losing existing serial connections or historical plot data.

4. Summary of Benefits & Extensibility
By leveraging Qt's mature graphics rendering pipeline and robust hardware abstraction layers (QSerialPort), this application transforms a basic microcontroller sensor setup into a professional-grade telemetry suite.
The architecture is deliberately built for extension. Future enhancements can easily integrate features such as:
-
Data Logging: Exporting buffered stream arrays directly into CSV files for post-processing in Python or MATLAB.
-
Threshold Alerts: Triggering visual or auditory alarms if
bpmorspo2breach critical safety margins. -
Automatic Y-Axis Scaling: Implementing dynamic auto-scaling algorithms for adaptive signal tracking.