This thesis presents the development of a pulse-induction metal detector prototype based
on the ESP32-S3 platform and the use of machine learning for metal-type classification
from a time-domain response. The measurement system uses an external 12-bit ADS7883
analog-to-digital converter to capture an 800-sample damped response after a coil excitation
pulse. The acquired signals were used to build a dataset with 7,000 samples and 350
groups. The dataset contains five classes: Air, Al, Cu, Fe, and cumix (a copper alloy).
Several signal preprocessing variants and a one-dimensional convolutional neural network (1D-CNN) architecture, cnn_small, were evaluated. The best model on the stored
test set is the raw-input model, stored in the artifacts as cnn_small_raw_v1, which achieves a test accuracy of 0.7940 and a macro F1 score of 0.7971. The raw signal representation
preserves the absolute shape and amplitude of the response, but practical transfer to
ESP32-S3 acquisition must account for differences between the stored dataset and live
acquisition. Therefore, the practical embedded candidate is the two-channel normalization
and RMS model, stored as esp32_cnn_small_two_channel_norm_rms_v1_float32. It
reaches a test accuracy of 0.7570 with a macro F1 score of 0.7576.
The main finding is that the best model on the stored benchmark data is not necessarily
the best embedded candidate. Model selection for an embedded system must consider not
only test accuracy, but also preprocessing robustness, consistency between computer-based
training and embedded software implementation, and sensitivity to small signal timing
shifts.
|