Digital Twin — CNC Acoustic Emission Monitoring
Edge-deployed machine learning system for real-time ductile vs. brittle classification on a HAAS CNC mill using acoustic emission sensors and TinyML.
The Problem
Computer Numerical Control (CNC) machining operations rely on operator experience and scheduled tool changes to manage tool wear — a reactive approach that leads to scrapped parts, unplanned downtime, and wasted tooling budget. Acoustic Emission (AE) sensors can detect the subtle ultrasonic signatures of cutting mode transitions in real time, but processing that data typically requires expensive proprietary Data Acquisition (DAQ) systems like MISTRAS or AEwin costing $4,700–$7,500. For a university research lab running a HAAS VF-2YT mill, that budget doesn't exist.
The research question: can a low-cost edge computing stack — microcontrollers, open-source Machine Learning (ML), and off-the-shelf sensors — classify ductile vs. brittle machining modes in real time, enabling closed-loop feedback control without cloud dependency or proprietary hardware?
What I Built
This is an academic research project at Texas State University under Dr. Sachin Shendokar (Manufacturing Engineering), inspired by Lee et al.'s 97.37% accuracy on ductile-brittle classification using Acoustic Emission + Convolutional Neural Networks (CNN). The project has two phases: a completed wireless proof of concept, and an ongoing production deployment targeting the HAAS VF-2YT.
Proof of Concept: Musical Notes Classifier
Before investing in AE sensors, I validated the entire edge-inference pipeline using audio data. A 12-class musical note CNN was trained in Python using TensorFlow, quantized to INT8 (176 KB), and deployed on an Arduino Nano 33 Bluetooth Low Energy (BLE) Rev2 with a MAX9814 external microphone. The Nano captures audio, runs a Fast Fourier Transform (FFT) on-device, feeds frequency features into the CNN, and transmits predictions over BLE to an ESP32-WROOM-32 WiFi bridge. The ESP32 pushes results to any browser on the local network via WebSocket. This three-hop architecture — Nano → BLE → ESP32 → WiFi → Browser — validated that real-time edge ML classification over a wireless link is feasible on $30 worth of hardware.
Production Target: Ductile vs. Brittle Classification
The production system replaces the Nano with an STM32F746 Discovery board ($55) — its 2.4 MSPS Analog-to-Digital Converter (ADC) can sample up to 1.2 MHz Nyquist, which is essential for capturing AE signals in the 100–500 kHz band that characterize aluminum machining. A KRN KRNBB-PCP broadband AE sensor (with built-in preamplifier) mounts directly on the HAAS VF-2YT, feeding conditioned signal through a voltage divider into the STM32's ADC. The CNN will be retrained on real machining data across four classes: ductile (continuous chip formation), brittle (chip fragmentation), transition/chatter (unstable cutting), and idle.
Data collection follows Lee et al.'s methodology: sweeps across 5 spindle speeds (12,000–18,000 RPM), 5 feed rates (5–35 micrometers per second), and 3 tool diameters (0.5–1.0 mm) on Al 6061 aluminum — 56 parameter combinations targeting 200+ labeled samples.
Budget Impact
The hardware pivot from commercial DAQ to microcontrollers saved 54–72% of the original budget:
- AE Sensor + Preamp: $1,500–$3,000 → $300–$700
- DAQ Hardware: $1,000–$1,500 → $65 (STM32F746 + ESP32-S3)
- DAQ Software: $1,000–$1,500 → $0 (open source)
- Total: $4,700–$7,500 → $1,498–$2,148
Known Issues
There's a confidence calibration bug in the wireless pipeline — values occasionally exceed 1000% on the browser dashboard, likely caused by incorrect INT8 dequantization in the BLE or WiFi bridge firmware. This is the top priority fix before production data collection begins.
Tech Stack
STM32F746 Discovery (production), Arduino Nano 33 BLE Rev2 (Proof of Concept (POC)), ESP32-WROOM-32 (WiFi bridge), KRN KRNBB-PCP AE sensor, TensorFlow 2.16 + TFLite Micro, Python ML pipeline (FFT, mel-spectrogram, training, INT8 quantization), C++ Arduino/STM32 firmware, WebSocket browser dashboard. Academic research under Dr. Sachin Shendokar at Texas State University, Ingram School of Engineering.
Development Timeline
Jan 2026
Literature Review
14,500-word review covering 34 sources in IEEE format. Established theoretical foundation for AE-based ductile-brittle classification with TinyML.
Feb 2026
Hardware Analysis
Documented Nano 33 BLE limitations (100 kHz Nyquist — insufficient for AE). Built sensor-board compatibility matrix. Recommended STM32F746 as production platform.
Mar 6, 2026
Notes CNN Deployed
12-class musical note classifier trained, INT8 quantized (176 KB), and running real-time inference on Nano 33 BLE with external mic. Validated that edge ML pipeline works.
Mar 9, 2026
Wireless POC Validated
Full pipeline working end-to-end: Nano (mic→FFT→CNN→BLE) → ESP32 (WiFi AP) → Browser dashboard. Proved wireless architecture is viable for production.
Mar 14, 2026
Hardware Procurement
STM32F746, ESP32-S3, piezo test kit, and cables ordered. AE sensor quotes pending from KRN and Vallen.
Mar 21, 2026
Signal Chain Validation
Mount sensor on HAAS VF-2YT. Validate signal conditioning circuit and ADC capture quality at 2.4 MSPS.
Apr 6, 2026
Dataset Complete
200+ labeled samples across ductile, brittle, transition, and idle classes. 56 parameter combinations of speed, feed rate, and tool diameter on Al 6061.
Apr 14, 2026
Production Model Deployed
Multi-class CNN trained on real AE data, INT8 quantized, deployed on STM32F746 with live classification.
May 1, 2026
Physical Module
3D-printed enclosure housing STM32F746 + ESP32-S3 + signal conditioning. Mounted on HAAS VF-2YT for permanent monitoring.
May 8, 2026
Presentation
Live demo at Texas State Makerspace for faculty and industry panel. Working prototype classifying machining modes in real time.
May 31, 2026
Publication
Submit review paper and journal article documenting methodology, experimental results, and comparison to Lee et al.'s 97.37% benchmark.