Skip to content

Repository files navigation

VOC Analyzer

Python PySide6 ESP32 BME688 License

Eco-Diagnostics of Cancer Through the Analysis of Volatile Organic Compounds A portable AI-powered breath analysis system for detecting volatile organic compounds (VOCs) associated with lung diseases using the BME688 gas sensor and machine learning.

📖 Overview

VOC Analyzer is a scientific research project focused on breath analysis using artificial intelligence and volatile organic compound (VOC) detection. The system analyzes exhaled human breath to detect changes in volatile organic compounds (VOCs). These compounds may serve as potential biomarkers of respiratory diseases, including lung cancer. The project combines embedded electronics, wireless communication, signal processing, feature extraction, and machine learning into a portable diagnostic platform. The primary objective is to demonstrate the feasibility of a fast, non-invasive, and low-cost screening tool based on breath analysis.

✨ Features

  • Real-time VOC measurements using the Bosch BME688
  • Bluetooth communication with ESP32
  • Live visualization of sensor data
  • Automatic experiment recording
  • Feature extraction from breathing curves
  • Random Forest-based classification
  • AI confidence estimation
  • CSV data export
  • PDF report generation
  • Experiment history
  • Portable battery-powered operation

🏗 Hardware

The prototype includes:

  • ESP32 Dev Board
  • Bosch BME688 Gas Sensor
  • Bluetooth Low Energy communication
  • Portable power bank
  • Disposable mouthpiece
  • Custom 3D-printed enclosure (optional)

💻 Software

  • Python 3
  • PySide6
  • PyQtGraph
  • NumPy
  • Pandas
  • Scikit-learn
  • ReportLab
  • PySerial
  • Bluetooth Serial Communication

🧠 Artificial Intelligence

The project applies machine learning for breath classification. Current model:

Random Forest Classifier

The model is trained using extracted signal features including:

  • Maximum
  • Minimum
  • Mean
  • Median
  • Standard deviation
  • Area Under Curve (AUC)
  • RMS
  • Signal Energy
  • Rise Time
  • Recovery Time
  • Derivatives
  • Skewness
  • Kurtosis
  • Environmental parameters
  • Gas resistance ratios

The software automatically extracts these features before performing prediction.

📊 Workflow

Human Breath
      │
      ▼
BME688 Sensor
      │
      ▼
ESP32
      │ Bluetooth
      ▼
VOC Analyzer
      │
      ├── Live Graph
      ├── Feature Extraction
      ├── AI Prediction
      ├── CSV Storage
      └── PDF Report

🚀 Installation

Clone the repository:

git clone https://github.com/danka238/VOC_Analyzer.git

Navigate to the project directory:

cd VOC_Analyzer

Install dependencies:

pip install -r requirements.txt

Run the application:

python main.py

📈 Application Functions

The application allows users to:

  • Connect to ESP32
  • Receive real-time sensor data
  • Record breathing experiments
  • Visualize breathing curves
  • Save experiments
  • Analyze extracted features
  • Predict sample category
  • Generate PDF reports
  • Export datasets for further research

Dataset

  • The training dataset is not included in this public repository.
  • The application can be executed normally using the pre-trained machine learning model included in the project.
  • The dataset remains private because it was collected for scientific research purposes.

🔧 Firmware

The firmware for the ESP32 microcontroller is located in the firmware/ directory.

It is responsible for:

  • Reading BME688 sensor data
  • Detecting breathing events
  • Sending measurements via Bluetooth
  • Preparing data for the desktop application

🎯 Scientific Goal

The project investigates whether volatile organic compounds present in exhaled breath can be used as biomarkers for rapid screening of respiratory diseases through machine learning. The system is intended as a research platform and is not a medical diagnostic device.

🔬 Research Areas

  • Breath Analysis
  • Electronic Nose
  • Artificial Intelligence
  • Machine Learning
  • Biomedical Engineering
  • Biosensors
  • Medical Electronics
  • Digital Healthcare

📸 Screenshots

Prototype

Prototype

Main Window

Main Window

Breath Analysis

Breath Analysis

PDF Report

PDF Report

📄 License

This project is distributed under the MIT License. See the LICENSE file for details.

👨‍💻 Author

Perevalov Daniil

Scientific Research Project

Kazakhstan

⭐ Citation

If you use this project in your research, please cite:

Perevalov D. VOC Analyzer: Eco-Diagnostics of Cancer Through the Analysis of Volatile Organic Compounds

Disclaimer

This project is intended solely for scientific research and educational purposes. It is not a certified medical device and must not be used for clinical diagnosis or medical decision-making.

About

Portable AI-powered breath analysis system for volatile organic compound (VOC) detection.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages