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.
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.
- 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
The prototype includes:
- ESP32 Dev Board
- Bosch BME688 Gas Sensor
- Bluetooth Low Energy communication
- Portable power bank
- Disposable mouthpiece
- Custom 3D-printed enclosure (optional)
- Python 3
- PySide6
- PyQtGraph
- NumPy
- Pandas
- Scikit-learn
- ReportLab
- PySerial
- Bluetooth Serial Communication
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.
Human Breath
│
▼
BME688 Sensor
│
▼
ESP32
│ Bluetooth
▼
VOC Analyzer
│
├── Live Graph
├── Feature Extraction
├── AI Prediction
├── CSV Storage
└── PDF Report
Clone the repository:
git clone https://github.com/danka238/VOC_Analyzer.gitNavigate to the project directory:
cd VOC_AnalyzerInstall dependencies:
pip install -r requirements.txtRun the application:
python main.pyThe 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
- 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.
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
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.
- Breath Analysis
- Electronic Nose
- Artificial Intelligence
- Machine Learning
- Biomedical Engineering
- Biosensors
- Medical Electronics
- Digital Healthcare
This project is distributed under the MIT License. See the LICENSE file for details.
Perevalov Daniil
Scientific Research Project
Kazakhstan
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.



