Inspiration

Industrial predictive maintenance typically relies heavily on cloud analytics. However, this introduces a 200ms to 2-second communication latency bottleneck. In heavy manufacturing, mechanical failures propagate in milliseconds; by the time a cloud-based server registers a fault and echoes a "stop" command, millions of dollars of capital equipment can be entirely destroyed.

We built NEURAL-SHIELD to challenge a fundamental assumption: that high-tier intelligence requires server-scale infrastructure. We wanted to prove that an uncompromised, zero-latency safety reflex could run locally on an ultra-low-power embedded processor.

How We Built It

The system operates on an optimized hybrid architecture that cleanly separates high-speed local control from cloud-based monitoring:

  1. The Edge Layer: We trained an unsupervised sequence-to-sequence forecasting model using the industry-standard Case Western Reserve University (CWRU) bearing dataset. The neural network architecture follows a layered structure: $$200 \rightarrow 1024 \rightarrow 512 \rightarrow 256 \rightarrow 10$$ The network ingests the last 200 vibration samples to predict the next 10.
  2. Arm-Optimized Quantization: To fit this 864,000-parameter network onto an embedded chip, we utilized a frontier 1.58-bit ternary quantization scheme. By constraining all model weights strictly to: $$W \in {-1, 0, +1}$$ we completely eliminated slow floating-point matrix multiplications. The runtime engine converts these operations into simple hardware additions, subtractions, or skips. This compressed the model to just 215 KB of SRAM.
  3. The Local Safety Gatekeeper: A 4-pillar statistical filter runs on-device. It auto-calibrates to a machine's unique healthy signature, calculates real-time Mean Squared Error (MSE), applies an Exponential Moving Average (EMA) to discard momentary structural noise, and enforces a strict 6-sigma persistence gate. If a critical anomaly persists for 5 consecutive calculation windows, an active GPIO hardware latch severs the motor power rail in under 4 milliseconds—entirely offline.
  4. The Cloud & Telemetry Pipeline: Observability is handled via the ESP Rainmaker SDK, providing free cloud telemetry, an auto-generated mobile HMI, and native Amazon Alexa / Google Home integration for secure, hands-free operational commands.

Challenges We Faced

  • Memory Constraints: Keeping an 864K-parameter time-series forecasting model from immediately crashing an embedded chip's heap space was incredibly difficult. Standard FP16 architectures required over 1.7 MB. Implementing bit-packing—compressing 4 ternary weights into a single byte of memory—was the breakthrough that achieved the 215 KB footprint.
  • Suppressing False Positives: Heavy factory floors are inherently noisy. Early prototypes false-alarmed when objects were dropped nearby. Engineering the 5-window persistence filter and utilizing the Exponential Moving Average filter ($\alpha = 0.15$) resolved this, ensuring a 99.999% certain statistical threshold before the hardware latch activates.

What We Learned

We proved that extreme quantization-aware training does not inherently destroy model quality. By shifting the workload from high-power server floating-point math to low-power integer arithmetic, ultra-low-latency physical AI can easily be democratized across old legacy factory floors for under $5 a node.

Built With

  • alexa-integration
  • arduino
  • c++
  • edge-ai
  • embedded-systems
  • esp-rainmaker
  • esp32-s3
  • predictive-maintenance
  • pytorch
  • quantization
  • time-series
Share this project:

Updates

Submission history