example
README.md

🫁 Capnograph Prototype – Real-Time EtCO₂ Monitoring

This project is a prototype implementation of a capnograph module I developed as part of a biomedical device when I was working on Gätsimed. It demonstrates how data from a capnograph sensor is received, processed, and visualized in real time using C++ and QML (Qt). This version was created before integrating the functionality into the production environment.


🔍 What is a Capnograph?

A capnograph measures the concentration of CO₂ in exhaled air over time — a critical parameter in patient monitoring. It outputs both a waveform (capnogram) and key respiratory values such as:

  • EtCO₂ (End-tidal CO₂)
  • Respiratory Rate
  • Inhaled/Exhaled CO₂ Concentration

⚙️ How It Works

📤 Serial Communication (C++)

  • Connects to the capnograph sensor via a serial port.
  • Listens for incoming data packets.
  • Identifies and parses two packet types:
    • Gas concentration data for waveform plotting.
    • Calculated values like EtCO₂ and respiration rate.
  • Validates packet integrity (start/stop bytes, checksums).
  • Interpolates data to ensure smooth waveform display.
  • Emits Qt signals with parsed values to update the UI in real time.

💻 User Interface (QML)

  • Displays the capnogram curve dynamically.
  • Shows live values for EtCO₂ and respiratory rate.
  • Built using QML for a responsive and clean UI.