🤖 Edge AI Flow — Nano 33 BLE Sense Rev2
🤖 Edge AI Data Flow — TinyML Pipeline on Arduino Nano 33 BLE Sense Rev2 ① Sensors ② Filtering ③ Feature Extraction ④a Training Path (PC / Cloud / Edge Impulse) ④b Inference Path (on nRF52840 + TFLM) 🔄 9-axis IMU BMI270+BMM150 · SPI 🎤 PDM Microphone MP34DT06JTR · 16 kHz 🌡️ Env. Sensors HS3003 · BMP390 · I²C 👁️ Light / Color / Gesture APDS-9960 · I²C 🔧 Low-pass / HPF LPF / HPF · Kalman ⚖️ Normalization min-max · z-score 🪟 Windowing 1s @ 100 Hz = 100 smp ⏱️ Time-domain Feats mean · RMS · ZCR · peak 🎵 Frequency Features FFT bins · MFCC (40×49) 📊 Statistical / Spatial magnitude · variance · grad 🔀 Split 🗄️ Logged Dataset CSV · Edge Impulse 🧠 Model Training TF · Keras · Edge Impulse ✅ Validation confusion · F1 · ROC 📦 Quantize → INT8 TFLite PTQ converter 💾 C-array Export xxd -i → model.h ⚙️ TFLite-Micro Runtime nRF52840 · CMSIS-NN 🏷️ Classification softmax · argmax 🧩 Decision Logic class + confidence 🔔 Output / Actuation RGB LED · BLE · Serial capture (cloud) live (on-MCU) 💾 flash model.h (Arduino IDE / OTA-DFU) 📡 Serial/BLE → CSV capture ⚡ TinyML Scenarios 🤚 S1 — Gesture Recognition (IMU) IMU @ 100 Hz → 1 s windows → mean / RMS / FFT per axis → small CNN ("punch" / "flex" / "idle") → INT8 → flash → BLE notify. ~20–40 KB Flash · <30 ms · 🛠 Arduino_BMI270_BMM150 + Arduino_TensorFlowLite 🎤 S2 — Keyword Spotting (PDM mic) 16 kHz audio → 1 s window → MFCC (40 × 49 frames) → tiny CNN ("yes" / "no" / "noise") → quantize → 🟢 RGB LED. ~100 KB Flash · ~200 ms · 🛠 PDM + Arduino_TensorFlowLite ⚡ S3 — Vibration Anomaly Detection (IMU on a motor) IMU → LPF → 256-sample windows → FFT → autoencoder (healthy data only) → reconstruction error on edge → if > threshold → 🔴 LED + alert. Unsupervised · only normal data needed · great for predictive maintenance 🌿 S4 — Environmental / HVAC Classification HS3003 + BMP390 + APDS-9960 → 10-sample window of T/H/P + light → stats features → ("normal" / "open window" / "occupied") → 📱 BLE. Sub-10 KB Flash · BLE · 🛠 Arduino_HS300x + Arduino_APDS9960 + ArduinoBLE 🔌 Sensor 🔧 DSP / Feature 🔀 Split 🧠 Training (cloud) ⚙️ Inference (on-MCU) data flow flash / capture nRF52840: 1MB Flash · 256KB RAM · Cortex-M4F @ 64 MHz · model budget: 20–200 KB (INT8)