# gokul-mechaktroniker/washing-machine---data-pipeline---python---whz- architecture

> Architecture diagram of the GitHub repository gokul-mechaktroniker/washing-machine---data-pipeline---python---whz-, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-20). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/gokul-mechaktroniker/washing-machine---data-pipeline---python---whz-
- Repository: https://github.com/gokul-mechaktroniker/washing-machine---data-pipeline---python---whz-

## Overview

WashMate is an offline Python ML pipeline for detecting seven washing-machine phases from ADXL345 vibration data, with a Decision Tree selected for ESP32-S3 deployment. The main workflow runs from sensor recording and phase labeling through windowing, feature extraction, normalization, model comparison, and firmware export. The graph also preserves baseline analysis and visualization tools. Most links follow the README’s documented stages; sampled code confirms recording and annotation behavior, but unsampled modules’ internal wiring is not inferred.

Main entry points: [`Project_Files/collected_data`](https://github.com/gokul-mechaktroniker/washing-machine---data-pipeline---python---whz-/tree/master/Project_Files/collected_data) (Collected CSVs), [`Project_Files/dataset`](https://github.com/gokul-mechaktroniker/washing-machine---data-pipeline---python---whz-/tree/master/Project_Files/dataset) (Feature dataset), [`Project_Files/results`](https://github.com/gokul-mechaktroniker/washing-machine---data-pipeline---python---whz-/tree/master/Project_Files/results) (Model results), [`Project_Files/firmware`](https://github.com/gokul-mechaktroniker/washing-machine---data-pipeline---python---whz-/tree/master/Project_Files/firmware) (Firmware exports)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_collection["Collection and labeling"]
  node_recording["Raw recording"]
  node_rawdata["Collected CSVs"]
  node_annotation["Offline annotation"]
  node_labels["Phase labels"]
end

subgraph group_analysis["Signal analysis"]
  node_offsetcollector["Offset collection"]
  node_sideoffset["Side-panel offset"]
  node_offsetcalc["Offset calculation"]
  node_baselinefront["Front baseline"]
  node_baselineside["Side baseline"]
  node_visualfront["Front cycle plots"]
  node_visualside["Side cycle plots"]
end

subgraph group_dataset["Dataset preparation"]
  node_windowing["Windowing and features"]
  node_features[("Feature dataset")]
  node_normalization["Normalization and split"]
  node_normconstants["Normalization constants"]
end

subgraph group_models["Training and deployment"]
  node_decisiontree["Decision Tree<br/>[adxl345_ml_dt.py]"]
  node_randomforest["Random Forest"]
  node_xgboost["XGBoost"]
  node_cnn["1D CNN baseline"]
  node_results["Model results"]
  node_firmware["Firmware exports"]
  node_normgenerator["Constants generator"]
end

node_operator(("Lab operator"))
node_sensor["ESP32-S3 sensor"]

node_operator -->|"starts recording"| node_recording
node_sensor -->|"streams samples"| node_recording
node_recording -->|"saves CSV"| node_rawdata
node_operator -->|"labels phases"| node_annotation
node_rawdata -->|"reads cycles"| node_annotation
node_annotation -->|"writes labels"| node_labels
node_rawdata -->|"segments signals"| node_windowing
node_labels -->|"labels windows"| node_windowing
node_windowing -->|"extracts features"| node_features
node_features -->|"normalizes and splits"| node_normalization
node_normalization -->|"saves statistics"| node_normconstants
node_features -->|"trains on dataset"| node_decisiontree
node_features -->|"trains on dataset"| node_randomforest
node_features -->|"trains on dataset"| node_xgboost
node_features -->|"trains baseline"| node_cnn
node_decisiontree -->|"records evaluation"| node_results
node_randomforest -->|"records evaluation"| node_results
node_xgboost -->|"records evaluation"| node_results
node_cnn -->|"records evaluation"| node_results
node_decisiontree -->|"exports deployed model"| node_firmware
node_randomforest -->|"exports model"| node_firmware
node_xgboost -->|"exports model"| node_firmware
node_normalization -->|"generates header"| node_normgenerator
node_normgenerator -->|"writes constants"| node_firmware
node_rawdata -.->|"analyzes offsets"| node_offsetcollector
node_rawdata -.->|"analyzes offsets"| node_sideoffset
node_offsetcollector -.->|"supports calibration"| node_offsetcalc
node_rawdata -.->|"analyzes baseline"| node_baselinefront
node_rawdata -.->|"analyzes baseline"| node_baselineside
node_rawdata -.->|"plots cycle"| node_visualfront
node_rawdata -.->|"plots cycle"| node_visualside

click node_recording "https://github.com/gokul-mechaktroniker/washing-machine---data-pipeline---python---whz-/blob/master/Project_Files/adxl345_data_collection_raw_values.py"
click node_rawdata "https://github.com/gokul-mechaktroniker/washing-machine---data-pipeline---python---whz-/tree/master/Project_Files/collected_data"
click node_annotation "https://github.com/gokul-mechaktroniker/washing-machine---data-pipeline---python---whz-/blob/master/Project_Files/adxl345_offline_annotation.py"
click node_labels "https://github.com/gokul-mechaktroniker/washing-machine---data-pipeline---python---whz-/tree/master/Project_Files/collected_data"
click node_offsetcollector "https://github.com/gokul-mechaktroniker/washing-machine---data-pipeline---python---whz-/blob/master/Project_Files/adxl345_data_collector_offset_correction.py"
click node_sideoffset "https://github.com/gokul-mechaktroniker/washing-machine---data-pipeline---python---whz-/blob/master/Project_Files/adxl345_data_collector_offset_correction_side_panel.py"
click node_offsetcalc "https://github.com/gokul-mechaktroniker/washing-machine---data-pipeline---python---whz-/blob/master/Project_Files/adxl345_offset_calculation.py"
click node_baselinefront "https://github.com/gokul-mechaktroniker/washing-machine---data-pipeline---python---whz-/blob/master/Project_Files/adxl345_idle_baseline_front.py"
click node_baselineside "https://github.com/gokul-mechaktroniker/washing-machine---data-pipeline---python---whz-/blob/master/Project_Files/adxl345_idle_baseline.py"
click node_visualfront "https://github.com/gokul-mechaktroniker/washing-machine---data-pipeline---python---whz-/blob/master/Project_Files/adxl345_data_visualization_full_wash_cycle_zoomed.py"
click node_visualside "https://github.com/gokul-mechaktroniker/washing-machine---data-pipeline---python---whz-/blob/master/Project_Files/adxl345_data_visualization_full_wash_cycle_side_panel_zoomed.py"
click node_windowing "https://github.com/gokul-mechaktroniker/washing-machine---data-pipeline---python---whz-/blob/master/Project_Files/adxl345_windowing_and_dataset_preparation.py"
click node_features "https://github.com/gokul-mechaktroniker/washing-machine---data-pipeline---python---whz-/tree/master/Project_Files/dataset"
click node_normalization "https://github.com/gokul-mechaktroniker/washing-machine---data-pipeline---python---whz-/blob/master/Project_Files/adxl345_normalisation_train_val_test_split.py"
click node_normconstants "https://github.com/gokul-mechaktroniker/washing-machine---data-pipeline---python---whz-/blob/master/Project_Files/dataset/norm_constants.json"
click node_decisiontree "https://github.com/gokul-mechaktroniker/washing-machine---data-pipeline---python---whz-/blob/master/Project_Files/adxl345_ml_dt.py"
click node_randomforest "https://github.com/gokul-mechaktroniker/washing-machine---data-pipeline---python---whz-/blob/master/Project_Files/adxl345_ml_random_forest_classifier.py"
click node_xgboost "https://github.com/gokul-mechaktroniker/washing-machine---data-pipeline---python---whz-/blob/master/Project_Files/adxl345_ml_xgboost.py"
click node_cnn "https://github.com/gokul-mechaktroniker/washing-machine---data-pipeline---python---whz-/blob/master/Project_Files/adxl345_dl_1d_cnn.py"
click node_results "https://github.com/gokul-mechaktroniker/washing-machine---data-pipeline---python---whz-/tree/master/Project_Files/results"
click node_firmware "https://github.com/gokul-mechaktroniker/washing-machine---data-pipeline---python---whz-/tree/master/Project_Files/firmware"
click node_normgenerator "https://github.com/gokul-mechaktroniker/washing-machine---data-pipeline---python---whz-/blob/master/Project_Files/generate_norm_constants_h.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_recording,node_rawdata,node_annotation,node_labels toneBlue
class node_offsetcollector,node_sideoffset,node_offsetcalc,node_baselinefront,node_baselineside,node_visualfront,node_visualside toneAmber
class node_windowing,node_features,node_normalization,node_normconstants toneMint
class node_decisiontree,node_randomforest,node_xgboost,node_cnn,node_results,node_firmware,node_normgenerator toneRose
class node_operator,node_sensor toneIndigo
```

## Components

### Collection and labeling

- [Raw recording](https://github.com/gokul-mechaktroniker/washing-machine---data-pipeline---python---whz-/blob/master/Project_Files/adxl345_data_collection_raw_values.py): `Project_Files/adxl345_data_collection_raw_values.py`
- [Collected CSVs](https://github.com/gokul-mechaktroniker/washing-machine---data-pipeline---python---whz-/tree/master/Project_Files/collected_data): `Project_Files/collected_data`
- [Offline annotation](https://github.com/gokul-mechaktroniker/washing-machine---data-pipeline---python---whz-/blob/master/Project_Files/adxl345_offline_annotation.py): `Project_Files/adxl345_offline_annotation.py`
- [Phase labels](https://github.com/gokul-mechaktroniker/washing-machine---data-pipeline---python---whz-/tree/master/Project_Files/collected_data): `Project_Files/collected_data`

### Signal analysis

- [Offset collection](https://github.com/gokul-mechaktroniker/washing-machine---data-pipeline---python---whz-/blob/master/Project_Files/adxl345_data_collector_offset_correction.py): `Project_Files/adxl345_data_collector_offset_correction.py`
- [Side-panel offset](https://github.com/gokul-mechaktroniker/washing-machine---data-pipeline---python---whz-/blob/master/Project_Files/adxl345_data_collector_offset_correction_side_panel.py): `Project_Files/adxl345_data_collector_offset_correction_side_panel.py`
- [Offset calculation](https://github.com/gokul-mechaktroniker/washing-machine---data-pipeline---python---whz-/blob/master/Project_Files/adxl345_offset_calculation.py): `Project_Files/adxl345_offset_calculation.py`
- [Front baseline](https://github.com/gokul-mechaktroniker/washing-machine---data-pipeline---python---whz-/blob/master/Project_Files/adxl345_idle_baseline_front.py): `Project_Files/adxl345_idle_baseline_front.py`
- [Side baseline](https://github.com/gokul-mechaktroniker/washing-machine---data-pipeline---python---whz-/blob/master/Project_Files/adxl345_idle_baseline.py): `Project_Files/adxl345_idle_baseline.py`
- [Front cycle plots](https://github.com/gokul-mechaktroniker/washing-machine---data-pipeline---python---whz-/blob/master/Project_Files/adxl345_data_visualization_full_wash_cycle_zoomed.py): `Project_Files/adxl345_data_visualization_full_wash_cycle_zoomed.py`
- [Side cycle plots](https://github.com/gokul-mechaktroniker/washing-machine---data-pipeline---python---whz-/blob/master/Project_Files/adxl345_data_visualization_full_wash_cycle_side_panel_zoomed.py): `Project_Files/adxl345_data_visualization_full_wash_cycle_side_panel_zoomed.py`

### Dataset preparation

- [Windowing and features](https://github.com/gokul-mechaktroniker/washing-machine---data-pipeline---python---whz-/blob/master/Project_Files/adxl345_windowing_and_dataset_preparation.py): `Project_Files/adxl345_windowing_and_dataset_preparation.py`
- [Feature dataset](https://github.com/gokul-mechaktroniker/washing-machine---data-pipeline---python---whz-/tree/master/Project_Files/dataset): `Project_Files/dataset`
- [Normalization and split](https://github.com/gokul-mechaktroniker/washing-machine---data-pipeline---python---whz-/blob/master/Project_Files/adxl345_normalisation_train_val_test_split.py): `Project_Files/adxl345_normalisation_train_val_test_split.py`
- [Normalization constants](https://github.com/gokul-mechaktroniker/washing-machine---data-pipeline---python---whz-/blob/master/Project_Files/dataset/norm_constants.json): `Project_Files/dataset/norm_constants.json`

### Training and deployment

- [Decision Tree](https://github.com/gokul-mechaktroniker/washing-machine---data-pipeline---python---whz-/blob/master/Project_Files/adxl345_ml_dt.py): `Project_Files/adxl345_ml_dt.py`
- [Random Forest](https://github.com/gokul-mechaktroniker/washing-machine---data-pipeline---python---whz-/blob/master/Project_Files/adxl345_ml_random_forest_classifier.py): `Project_Files/adxl345_ml_random_forest_classifier.py`
- [XGBoost](https://github.com/gokul-mechaktroniker/washing-machine---data-pipeline---python---whz-/blob/master/Project_Files/adxl345_ml_xgboost.py): `Project_Files/adxl345_ml_xgboost.py`
- [1D CNN baseline](https://github.com/gokul-mechaktroniker/washing-machine---data-pipeline---python---whz-/blob/master/Project_Files/adxl345_dl_1d_cnn.py): `Project_Files/adxl345_dl_1d_cnn.py`
- [Model results](https://github.com/gokul-mechaktroniker/washing-machine---data-pipeline---python---whz-/tree/master/Project_Files/results): `Project_Files/results`
- [Firmware exports](https://github.com/gokul-mechaktroniker/washing-machine---data-pipeline---python---whz-/tree/master/Project_Files/firmware): `Project_Files/firmware`
- [Constants generator](https://github.com/gokul-mechaktroniker/washing-machine---data-pipeline---python---whz-/blob/master/Project_Files/generate_norm_constants_h.py): `Project_Files/generate_norm_constants_h.py`

### Other components

- **Lab operator**
- **ESP32-S3 sensor**

## Connections

- Lab operator → Raw recording: starts recording (evidence: `README.md`)
- ESP32-S3 sensor → Raw recording: streams samples (evidence: `README.md`)
- Raw recording → Collected CSVs: saves CSV (evidence: `README.md`)
- Lab operator → Offline annotation: labels phases (evidence: `README.md`)
- Collected CSVs → Offline annotation: reads cycles (evidence: `Project_Files/adxl345_offline_annotation.py`)
- Offline annotation → Phase labels: writes labels (evidence: `Project_Files/adxl345_offline_annotation.py`)
- Collected CSVs → Windowing and features: segments signals (evidence: `README.md`)
- Phase labels → Windowing and features: labels windows (evidence: `README.md`)
- Windowing and features → Feature dataset: extracts features (evidence: `README.md`)
- Feature dataset → Normalization and split: normalizes and splits (evidence: `README.md`)
- Normalization and split → Normalization constants: saves statistics (evidence: `README.md`)
- Feature dataset → Decision Tree: trains on dataset (evidence: `README.md`)
- Feature dataset → Random Forest: trains on dataset (evidence: `README.md`)
- Feature dataset → XGBoost: trains on dataset (evidence: `README.md`)
- Feature dataset → 1D CNN baseline: trains baseline (evidence: `README.md`)
- Decision Tree → Model results: records evaluation (evidence: `README.md`)
- Random Forest → Model results: records evaluation (evidence: `README.md`)
- XGBoost → Model results: records evaluation (evidence: `README.md`)
- 1D CNN baseline → Model results: records evaluation (evidence: `README.md`)
- Decision Tree → Firmware exports: exports deployed model (evidence: `README.md`)
- Random Forest → Firmware exports: exports model (evidence: `README.md`)
- XGBoost → Firmware exports: exports model (evidence: `README.md`)
- Normalization and split → Constants generator: generates header (evidence: `README.md`)
- Constants generator → Firmware exports: writes constants (evidence: `README.md`)
- Collected CSVs → Offset collection: analyzes offsets
- Collected CSVs → Side-panel offset: analyzes offsets
- Offset collection → Offset calculation: supports calibration
- Collected CSVs → Front baseline: analyzes baseline
- Collected CSVs → Side baseline: analyzes baseline
- Collected CSVs → Front cycle plots: plots cycle
- Collected CSVs → Side cycle plots: plots cycle
