
C3 GestureDriver
MengqiS21/TECHIN514_FinalProject
A wearable sensing tag for pets and a tabletop display that visualizes daily activity and proximity-based companionship.

Vehicle engine faults such as air leaks, ignition misfires, and abnormal idle behavior often produce characteristic acoustic signatures that trained mechanics can identify by ear.
C3 GestureDriver Screen is an open-source printed circuit board by MengqiS21, from the MengqiS21/TECHIN515_final_project-individual- repository on GitHub. It is a 2-layer board of 30 × 75 mm with 10 parts on 21 nets, routed with 47 tracks and 0 vias.
It is built around the MCP1700-3302E/TO and XIAO ESP32C3. Its parts include 3 capacitors, 3 ICs, 1 resistor, 1 diode and 1 connector. It belongs with the ESP32 and RISC-V boards of this library.
TECHIN515 Final Project — Individual XIAO ESP32S3 · Edge Impulse · SSD1306 OLED · Custom PCB
Vehicle engine faults such as air leaks, ignition misfires, and abnormal idle behavior often produce characteristic acoustic signatures that trained mechanics can identify by ear. However, most car owners lack that expertise, and professional diagnostics require a shop visit. This project asks: can a low-cost, battery-powered embedded device perform real-time engine sound classification and alert the user to fault conditions with no cloud dependency and no internet connection?
The challenge is not simply accuracy. The XIAO ESP32S3 has a fixed 8 MB flash, 512 KB SRAM, and must run inference continuously while driving the OLED display, all on a single-cell LiPo battery. Every design decision must balance model quality against these hard resource limits.
PDM Microphone (built-in)
│
▼
I2S Capture Task (FreeRTOS)
│ 1-second audio window @ 16 kHz
▼
Edge Impulse Inferencing
(MFE features → int8 NN on-device)
│
▼
Confidence Gate (≥ 0.75)
│
▼
SSD1306 OLED Display + LED AlertHardware:
| Component | Part |
|---|---|
| MCU | Seeed XIAO ESP32S3 Sense |
| Microphone | Built-in PDM mic (GPIO41/42) |
| Display | 0.96" SSD1306 OLED, I2C (SDA=GPIO5, SCL=GPIO6) |
| Fault LED | GPIO9 (D10) |
| Power | Custom PCB with MCP1700-3302E LDO + LiPo battery |
| PCB | KiCad design, 2-layer, manufactured via JLCPCB |
Training data sourced from the Car Engine Diagnostics dataset and augmented with self-recorded samples. Three target classes were selected based on real-world fault frequency and acoustic distinguishability:
| Class | Description | Training Samples |
|---|---|---|
engine_issue | Air leak, knock, misfiring | ~178 |
ignition_issue | Ignition system faults (cabin-recorded) | ~10 |
normal_engine_stratup | Healthy startup / idle | ~89 |
Audio is segmented into 1-second windows at 16 kHz (16,000 samples per inference).
Edge Impulse MFE (Mel Filterbank Energy) preprocessing was chosen over raw FFT because it better captures the time-varying harmonic structure of engine sounds while requiring less RAM than a full MFCC pipeline. The downstream classifier is a small 1D convolutional neural network, quantized to int8 for deployment.
| Metric | Value |
|---|---|
| Overall Accuracy | 74.7% |
| ROC AUC | 0.909 |
| Weighted F1-score | 0.707 |
| Weighted Precision | 0.796 |
| Weighted Recall | 0.747 |
Per-class breakdown:
| Class | Precision | Recall | F1 |
|---|---|---|---|
| air leak / engine_issue | 0.686 | 0.983 | 0.808 |
| ignition_issue | 1.000 | 1.000 | 1.000 |
| background noise / normal | 0.900 | 0.303 | 0.454 |
Observation: The model has high recall for fault classes (catches most real faults) at the cost of some false positives on normal audio. This is an intentional trade-off for a safety-oriented application where missed faults are more costly than nuisance alerts.
| Resource | Allocated | Used | Headroom |
|---|---|---|---|
| Flash | 8 MB | [TODO: check Edge Impulse deployment page] | |
| RAM (inference buffer) | 512 KB SRAM | [TODO] | |
| Inference time | [TODO: Serial log timing] ms |
How to find these numbers: In Edge Impulse Studio, go to Deployment → Arduino library and check the reported RAM/Flash usage before downloading.
This section justifies each design decision with measured data.
The model was trained in float32 and quantized to int8 for deployment. The trade-off:
| float32 | int8 | |
|---|---|---|
| Model size | ~4x larger | baseline |
| Inference speed | slower | faster (ESP32 int ops) |
| Accuracy loss | < 1% on this dataset |
int8 was chosen because the XIAO ESP32S3's Xtensa LX7 cores execute integer operations faster than float, and the accuracy loss was negligible given the dataset size. The ROC AUC of 0.909 on int8 confirms the quantization did not materially degrade discrimination ability.
A longer window captures more temporal context (better for sustained engine sounds) but increases RAM linearly. At 16 kHz, 1 second = 32,000 bytes of int16 audio buffer. A 2-second window would double this to 64,000 bytes, consuming ~12.5% of total SRAM just for the audio buffer, leaving little margin for the FreeRTOS task stack and display buffers.
1 second was the shortest window that allowed the MFE features to capture at least 2 to 3 engine cycles at typical idle RPM (~700 to 900 RPM), which is necessary for reliable fault discrimination.
The deployed model has no explicit background noise or silence class. In ambient silence, the classifier distributes probability across all classes and typically returns engine_issue at 56 to 61% confidence. Empirical measurement:
| Condition | Top class | Confidence |
|---|---|---|
| Silence (no audio) | engine_issue | ~58% |
| Normal engine audio | normal_engine_startup | ~80 to 90% |
| Fault audio | engine_issue | ~85 to 95% |
A threshold of 0.75 was chosen because:
This was validated empirically: with threshold = 0.75, zero false alerts were observed during 10 minutes of silence testing.
Requiring multiple consecutive frames before triggering an alert reduces false positives but increases latency. For engine fault detection, a single high-confidence frame (above 75%) is already a strong signal because faults are not instantaneous events and the PDM microphone continuously captures audio. Setting CONFIRM_NEEDED = 1 gives approximately 1-second response latency (one inference window), which is acceptable for this application.
The chosen configuration (int8, 1s window, 0.75 threshold, 1-frame confirm) sits at a deliberate point:
False Positives ──────────────────────────────────►
threshold=0.5 threshold=0.75 threshold=0.9
Missed Faults ◄ [high FP] ● ● [high FN]
▲ chosenFor a personal vehicle monitor, missing a real fault is more costly than a nuisance alert, so the operating point is biased toward high recall (catch faults) with the confidence threshold preventing silence from triggering false alarms.
No background noise class in training data. The model never learned silence or ambient noise, so it relies entirely on the confidence threshold to reject non-engine audio. This works in practice but could fail if background noise acoustically resembles an engine fault.
Microphone placement. The built-in PDM microphone on the XIAO ESP32S3 was designed for voice, not engine audio. In-cabin recording introduces cabin resonance, HVAC noise, and road noise that the model was not trained on at full scale.
RMS gating disabled. The RMS volume gate (RMS_THRESHOLD = 0.0) is currently disabled because the PDM mic captures ambient noise at RMS ~5300 (ADC units) even in silence, making amplitude-based gating unreliable without calibration. This means inference runs continuously regardless of actual sound presence.
Small dataset for ignition_issue. Only 10 validation samples for the ignition class. The 100% F1 score on this class may not generalize.
.
├── firmware/
│ └── engine_monitor/
│ └── engine_monitor.ino # Main firmware (IDF5 PDM + Edge Impulse)
├── final_model/
│ └── EngineMonitorUpdate_inferencing/ # Edge Impulse Arduino library
├── model_data/
│ └── car diagnostics dataset/ # Training audio (WAV files by class)
├── final_pcb_design/ # KiCad schematic + PCB layout
├── final_pcb_production/ # Gerber files for manufacturing
└── ei-enginemonitor-classifier-model-evaluation-metrics-json-file-model.3.json#define RMS_THRESHOLD 0.0f // volume gate (disabled; see Limitations)
#define CONF_THRESHOLD 0.75f // minimum confidence to accept a detection
#define CONFIRM_NEEDED 1 // consecutive frames required to trigger alertfinal_model/EngineMonitorUpdate_inferencing.zipAdafruit GFX, Adafruit SSD1306firmware/engine_monitor/engine_monitor.ino[TODO: Add photos of the assembled device, OLED display in action, and a short description of live testing results.]
| Qty | Value | Footprint | References |
|---|---|---|---|
| 2 | 10uF | Capacitor_SMD:C_0603_1608Metric | C2, C3 |
| 1 | 100nF | Capacitor_SMD:C_0603_1608Metric | C1 |
| 1 | 330Ω | Resistor_SMD:R_0603_1608Metric | R1 |
| 1 | BAT | Connector_JST:JST_PH_B2B-PH-K_1x02_P2.00mm_Vertical | J1 |
| 1 | LED | LED_SMD:LED_0603_1608Metric | D1 |
| 1 | MCP1700-3302E_TO | MCP1700-3302E_TO:TO127P254X495-3 | U2 |
| 1 | OLED_Screen | C3_Gesture_Screen:OLED_Screen_0.96 | U1 |
| 1 | SW_SPDT | C3_Gesture_Screen:SS-12D00-Gx | SW1 |
| 1 | XIAO_ESP32 | C3_Gesture_Screen:XIAO_ESP32 | U3 |

MengqiS21/TECHIN514_FinalProject
A wearable sensing tag for pets and a tabletop display that visualizes daily activity and proximity-based companionship.

timville85/4dapter
This project combines the NES, SNES, N64 and Genesis DaemonBite Retro Controllers projects together with a custom PCB to support 4 different controllers with a single socketed Arduino Pro Micro.




Jeffrey-McCormick/Project-Heartbeat
End-to-end embedded system project to accurately measure the heart rate of a person


It measures 30 × 75 mm and has 2 copper layers, 1.6 mm thick.
10 parts, built around the MCP1700-3302E/TO and XIAO ESP32C3. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.
From the MengqiS21/TECHIN515_final_project-individual- repository on GitHub, at the commit this page was made from: the board is final_pcb_design/C3_GestureDriver_Screen.kicad_pcb and its schematic final_pcb_design/C3_GestureDriver_Screen.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Its repository states no licence, so its author keeps all rights: ask MengqiS21 before reusing the design.