GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - samim-robotix/NEURO-MOTION: An end-to-end TinyML and Robotics platform deploying 8-bit quantized neural networks on ESP32 & MPU6050/9250 for sub-15ms on-device motion classification, Firebase IoT telemetry, and Computer Vision cross-referencing.

BranchesTags
Open more actions menu

Latest commit

 

History

1 Commit
1 Commit

Folders and files

NameName
Last commit message
Last commit date
BCRoyEnggColl
BCRoyEnggColl
 
 
assets
assets
 
 
edge AI/daq_sam_py
edge AI/daq_sam_py
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
daq.py
daq.py
 
 
daqFinal.py
daqFinal.py
 
 
daq_mpu.ino
daq_mpu.ino
 
 
edge AI.rar
edge AI.rar
 
 
fwbw.001.csv
fwbw.001.csv
 
 
fwbw.002.csv
fwbw.002.csv
 
 
fwbw.003.csv
fwbw.003.csv
 
 
fwbw.004.csv
fwbw.004.csv
 
 
requirements.txt
requirements.txt
 
 

Repository files navigation

NEURO-MOTION: Real-Time Edge AI Inertial Intelligence & Spatial Telemetry Platform

NEURO-MOTION Project Banner

ESP32 Edge Impulse C++ Python Vision Firebase License


Executive Narrative & Technological Mission

Modern robotics, spatial computing, and cyber-physical systems demand split-second decision-making. Conventional robotic perception architectures offload heavy sensor data to remote cloud servers, incurring latency bottlenecks (100–300 ms), bandwidth saturation, and critical vulnerabilities during network blackouts.

NEURO-MOTION breaks this paradigm. Designed and developed as a collaborative initiative between advanced applied robotics researchers and Dr. B.C. Roy Engineering College (Durgapur), this repository presents a production-grade, micro-watt TinyML / Edge AI & Spatial Telemetry framework.

By pairing high-precision 6-DoF/9-DoF Inertial Measurement Units (InvenSense MPU6050 / MPU9250) with the dual-core Tensilica Xtensa ESP32, NEURO-MOTION executes 8-bit quantized Deep Neural Networks (Int8 DNNs) directly on silicon. Operating with sub-15ms inference latency and zero cloud dependencies at runtime, NEURO-MOTION serves as the foundational intelligence layer for:

  • Wearable Exoskeletons & Bionic Prosthetics: Instantaneous kinetic intention decoding without latency or connectivity loss.
  • Industrial Predictive Maintenance: High-frequency multi-axis rotational anomaly detection and vibration pattern recognition.
  • Aerial Drones & Humanoid Robotics: Dead-reckoning stabilization and spatial hand-gesture telemanipulation.
  • High-Rate Edge-to-Cloud Telemetry: Asynchronous cloud state synchronization using Google Firebase Realtime Database and FreeRTOS non-blocking task scheduling.

System Architecture & End-to-End Pipeline

The platform establishes an end-to-end data flow: high-rate hardware transducer polling, digital signal processing (DSP), on-device quantized neural inference, host-side computer vision telemetry validation, and cloud-synchronized teleoperation.

+---------------------------------------------------------------------------------------------------+
|                                  NEURO-MOTION SYSTEM ARCHITECTURE                                 |
+---------------------------------------------------------------------------------------------------+

 [ HARDWARE / TRANSDUCERS ]
   +------------------------+      I2C Bus (Fast Mode 400kHz)
   | InvenSense MPU6050/9250| ==================================+
   | (Acc: +/-8g, Gyro: 500dps) |                               |
   +------------------------+                                   |
   +------------------------+      Hardware Tactile Interrupt   |
   | Trigger Button (GPIO15)| ----------------------------+     |
   +------------------------+                             |     |
                                                          v     v
 [ EMBEDDED REAL-TIME ENGINE: ESP32 DUAL-CORE LX6 @ 240MHz ]
   +-----------------------------------------------------------------------+
   | Core 1: Deterministic DSP & Edge AI Neural Processing Engine         |
   |  * 100 Hz (10ms) High-Precision Sampling Interrupt Loop              |
   |  * Low-Pass Butterworth Filter (44Hz Bandwidth cut-off)               |
   |  * 200-sample Sliding Buffer (1200 Raw Kinematic Spectral Features)   |
   |  * Quantized Int8 Edge Impulse Neural Network (CMSIS-NN / ESP-NN)     |
   |  * Multi-Class Confidence Vector & Anomaly Detection Score            |
   +-----------------------------------------------------------------------+
   | Core 0: Asynchronous Telemetry & Network Communications (FreeRTOS)   |
   |  * Wi-Fi 802.11 b/g/n Station Management                              |
   |  * RESTful HTTP Client / Firebase Realtime Database Engine           |
   |  * Non-blocking millis() Multi-tasking Peripherals (LED / Buzzer)    |
   +-----------------------------------------------------------------------+
                                   |                       |
            High-Speed USB-UART    |                       | 2.4GHz Wi-Fi (HTTP/REST)
            115200 Baud Full-Duplex|                       | Low-Latency JSON
                                   v                       v
 [ HOST WORKSTATION PIPELINE ]               [ IOT CLOUD TELEOPERATION ]
   +------------------------------------+      +-----------------------------+
   | Python DAQ & Validation Daemon     |      | Google Firebase RTDB        |
   |  * Automated Port Auto-Negotiation |      |  * `/logs.json`             |
   |  * Timestamp Synchronized Logging  |      |  * `/hallSensor/value.json` |
   |  * Multi-Trial CSV Structuring     |      +-----------------------------+
   +------------------------------------+                     |
   | Computer Vision Fusion Module      |                     v
   |  * OpenCV Telemetry Visualization  |      [ ACTUATION & REMOTE NODES ]
   |  * MediaPipe Spatial Pose Cross-   |      +-----------------------------+
   |    Referencing & Validation        | ---> | Secondary ESP32 Actuators   |
   +------------------------------------+      | Haptic / Relay Triggers     |
                                               +-----------------------------+

Core Engineering Features

  • Micro-Watt Int8 Edge Inference: Quantized neural network classifier compiled down to ultra-compact C++ kernels running on ESP32 Core 1 in under 12.8 ms per window.
  • Deterministic 100 Hz Sensor Fusion: I2C hardware polling clock synchronized to 10 ms cycles across 6 DoF (ax, ay, az, gx, gy, gz) with configurable digital low-pass filtering (DLPF @ 44 Hz).
  • Synchronized Serial Handshake Protocol: Custom frame start (START) and termination (STOP) tokens facilitating zero-packet-loss logging to host Python daemons.
  • FreeRTOS Non-Blocking Concurrent Architecture: Elimination of thread-blocking delay() calls across peripheral management, enabling simultaneous Wi-Fi dispatch, sensor polling, and audio-visual alert states.
  • Dual-Modality Spatial Validation (Edge + CV): Interoperability with host-side OpenCV and MediaPipe pipelines to correlate physical inertial data against optical ground truth.
  • Cloud-Connected Bidirectional Telemetry: Integrated HTTP PUT/POST hooks into Google Firebase Realtime DB for distributed robotic teleoperation and live state streaming.
  • Comprehensive Educational Progression: Complete 14-module curriculum framework from low-level GPIO register control to full TinyML deployment.

Bill of Materials (BOM) & Pinout Specifications

Hardware Components

Component Specification Function Quantity
ESP32 DevKit V1 Tensilica Dual-Core 32-bit LX6, 240MHz, 520KB SRAM, 4MB Flash, Wi-Fi/BLE Edge Compute & Telemetry Node 1
InvenSense MPU6050 6-Axis MotionTracking (3-Axis Accel + 3-Axis Gyro), I2C, 16-bit ADC Primary Kinematic Transducer 1
InvenSense MPU9250 (Optional) 9-Axis MotionTracking (+ AK8963 3-Axis Magnetometer) Enhanced 9-DoF Orientation Sensor 1
Tactile Push Button Momentary SPST switch with internal/external pull-down resistor Deterministic Recording Trigger 1
Diagnostic LED 5mm Blue/Green Diffused LED (with 220Ω current-limiting resistor) State Indication & Inference Alert 1
Piezo Buzzer 5V Active Piezoelectric Buzzer Acoustic Event Notification 1
Solderless Breadboard 830-point breadboard with dual power rails Hardware Prototyping 1
Jumper Wires Premium Dupont M-M / M-F jumper cables Interconnect Wiring 1 Set
Micro-USB Cable Shielded USB 2.0 A to Micro-B data cable Power, Flashing, UART Stream 1

GPIO Wiring Matrix

Sensor / Peripheral Pin ESP32 GPIO Pin Electrical Level Function / Protocol
MPU6050 VCC 3V3 3.3V DC (Do NOT use 5V) Regulated Power Rail
MPU6050 GND GND 0V Common Ground
MPU6050 SCL GPIO 22 3.3V Logic I2C Hardware Clock Bus
MPU6050 SDA GPIO 21 3.3V Logic I2C Hardware Data Bus
MPU6050 AD0 GND 0V Sets I2C Address to 0x68 (0x69 if 3V3)
Trigger Button GPIO 15 3.3V Logic Pull-Down / Input Trigger
Status Indicator LED GPIO 2 3.3V Logic (Active HIGH) On-Board / External Status LED
Audio Alert Buzzer GPIO 25 3.3V PWM / Digital HIGH Diagnostic Acoustic Output

Kinematic Dataset Specifications

The project includes pre-curated multi-class kinematic training datasets captured across hundreds of physical trials at 100 Hz:

├── Datasets Summary
│   ├── fwbw (Forward-Backward) : 50+ trials x 200 samples = ~10,000 data frames
│   ├── ud   (Up-Down)          : 16+ trials  x 200 samples = ~3,200 data frames
│   ├── wave (Lateral Wave)     : 50+ trials  x 200 samples = ~10,000 data frames
│   └── idle (Static Baseline)  : 100+ trials x 200 samples = ~20,000 data frames

CSV Schema (7 Columns @ 100Hz)

timestamp,ax,ay,az,gx,gy,gz
0,-1.56,-4.38,8.98,0.04,-0.01,-0.65
10,-0.73,-1.14,10.24,0.05,0.13,-0.80
20,-0.96,0.64,11.69,0.08,-0.03,-0.85
...
  • timestamp: Elapsed time in milliseconds since window trigger ($t_0$).
  • ax, ay, az: Linear acceleration in $\text{m/s}^2$ ($g \approx 9.81$).
  • gx, gy, gz: Rotational angular velocity in $\text{rad/s}$ (or $\text{deg/s}$).

Installation & Deployment Guide

Phase 1: Embedded Toolchain & Firmware Setup

1. Arduino IDE / PlatformIO Configuration

  • Install the Arduino IDE 2.x or VS Code with PlatformIO.
  • Add the ESP32 board repository URL to Board Manager:
    https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
    
  • Install the following libraries via Library Manager:
    • Adafruit MPU6050
    • Adafruit Unified Sensor
    • MPU9250 by hideakitai (if using MPU9250)
    • WiFi & HTTPClient (Built into ESP32 core)

2. Installing the Trained Edge Impulse Int8 Library

  • Locate the exported library zip: BCRoyEnggColl/ei-bcr-mot-arduino-1.0.1-impulse-#1.zip.
  • In Arduino IDE: Navigate to Sketch ➡️ Include Library ➡️ Add .ZIP Library... and select the zip file.
  • Verify that #include <bcr-mot_inferencing.h> or #include <mot-recg-ai_inferencing.h> compiles smoothly.

3. Flashing Target Firmware

  • Data Acquisition Firmware: Flash daq_mpu.ino (or new_daq/new_daq.ino) to stream 100Hz labeled frames over UART.
  • Autonomous Inference Firmware: Flash BCRoyEnggColl/bcr-edge-iot-main/bcr-edge-iot-main/new_infer/new_infer.ino for live, on-device gesture classification.
Target Board  : ESP32 Dev Module
Upload Speed  : 921600
CPU Frequency : 240 MHz (WiFi/BT)
Flash Speed   : 80 MHz
Partition     : Default 4MB with spiffs (1.2MB APP / 1.5MB SPIFFS)

Phase 2: Host PC Computer Vision & Telemetry Environment

Set up an isolated Python environment for high-rate data capture and computer vision integration:

# Clone the repository
git clone https://github.com/your-username/NEURO-MOTION.git
cd NEURO-MOTION

# Create and activate isolated environment
python -m venv venv
# On Windows:
.\venv\Scripts\activate
# On Linux/macOS:
source venv/bin/activate

# Install required dependencies
pip install --upgrade pip
pip install -r requirements.txt

Running the High-Rate Data Acquisition Daemon

# Launch the listener (auto-detects COM port, streams labeled CSV samples)
python daq.py
  1. Input your target motion label (e.g., fwbw, wave, punch, idle).
  2. Press the hardware trigger button on ESP32 pin 15 (or onboard Reset).
  3. The script synchronizes on the START token, records 200 samples at 100 Hz, and flushes to <label>.00x.csv upon receiving STOP.

Live Edge AI Inference & Teleoperation

When running the compiled neural model on ESP32 (new_infer.ino), open the Serial Monitor at 115200 baud:

======================================================
 Edge Impulse Real-Time Motion Classifier (MPU6050)
======================================================
Sampling 200 samples across 6 axes (100 Hz)...
Running inference on Tensilica Xtensa Core 1...

Predictions (DSP: 2 ms, Classification: 9 ms, Anomaly: 0 ms):
  fwbw: 0.98438  [==============================]
  ud  : 0.01562  [ ]
Anomaly score: 0.000

Status: MATCH -> Forward-Backward Motion Confirmed.
Teleoperation Dispatch: [HTTP 200] -> Firebase Synchronized.

Media Showcases

High-Resolution Hardware Architecture

Place high-resolution photos of your circuit breadboard, custom 3D printed housings, and robotic arm mounts in assets/photos/.

Breadboard Prototyping Enclosed Sensor Node Microcontroller Pinout
Hardware Setup 1 Enclosure Pinout Reference

Tip: Add your custom bench test photos to assets/photos/ and commit them.

Live Video Demonstrations

Video files, animated demonstration GIFs, and spatial tracking footage can be placed in assets/videos/.

Real-Time Gesture Inference CV + IMU Dual-Modality Fusion Cloud Teleoperation Stream
Inference Demo CV Fusion Cloud IoT

Repository Directory Structure

NEURO-MOTION/
├── assets/
│   ├── banner.png                              # Project presentation banner
│   ├── photos/                                 # Hardware bench test images (.gitkeep)
│   └── videos/                                 # Video demonstrations and demo clips (.gitkeep)
├── BCRoyEnggColl/
│   ├── bcr-edge-iot-main/bcr-edge-iot-main/
│   │   ├── 92_daq/                             # MPU9250 9-DoF Data Acquisition sketch
│   │   ├── 92_infer/                           # MPU9250 On-Device Edge AI inference firmware
│   │   ├── daq_fb/                             # Firebase IoT real-time cloud data logging
│   │   ├── embd_codes/                         # Educational embedded curriculum (Modules 1 - 14)
│   │   │   ├── d1/d1.ino                       # Modules 1–8: GPIO, Serial, PWM, I2C registers
│   │   │   └── d2/d2.ino                       # Modules 9–14: millis() multi-tasking, sensors
│   │   ├── mpu_plotter/                        # Live visual 6-DoF/9-DoF serial plotter firmware
│   │   ├── new_daq/                            # Countdown-based MPU6050 DAQ firmware & dataset
│   │   ├── new_infer/                          # Production 6-axis Edge Impulse inference sketch
│   │   ├── rcvr/                               # Secondary IoT receiver node with Firebase control
│   │   ├── sender/                             # ESP32 internal Hall-effect sensor IoT transmitter
│   │   └── IoT_Motion_Sensing_Presentation.pptx# Engineering college workshop master presentation
│   ├── bcr-edge-iot-main.zip                   # Archived codebase snapshot
│   └── ei-bcr-mot-arduino-1.0.1-impulse-#1.zip # Edge Impulse Int8 compiled Arduino library
├── edge AI/
│   └── daq_sam_py/
│       ├── daq.py                             # Automated multi-trial serial data acquisition daemon
│       ├── daq_mpu/                            # Interrupt button-triggered DAQ firmware
│       ├── inference-mocr2/                    # Extended multi-gesture inference sketch
│       ├── fwbw.001.csv - fwbw.050.csv         # Forward-Backward kinematic dataset (50 trials)
│       ├── idle.001.csv - idle.100.csv         # Static baseline resting dataset (100 trials)
│       └── wave.001.csv - wave.050.csv         # Lateral wave gesture dataset (50 trials)
├── .gitignore                                  # Git exclusion configuration for TinyML & C++
├── daq.py                                      # Root serial data acquisition daemon
├── daqFinal.py                                 # Enhanced serial listener with auto-reconnect
├── daq_mpu.ino                                 # Root hardware button-triggered DAQ sketch
├── requirements.txt                            # Host Python & Computer Vision dependencies
├── LICENSE                                     # MIT License
└── README.md                                   # Comprehensive engineering documentation

Academic & Institutional Acknowledgments

  • Dr. B.C. Roy Engineering College (Durgapur): For institutional support, laboratory facilities, and student cohort participation during the IoT, Embedded Systems & Edge AI Workshop.
  • Edge Impulse: For the embedded TinyML development platform, spectral DSP pipeline, and INT8 model quantization engines.
  • Espressif Systems: For the robust ESP32 SoC architecture and FreeRTOS platform support.
  • InvenSense / TDK: For the MPU6050 / MPU9250 MEMS inertial sensors.

Contributing & Development

Contributions to expand neural models, integrate ROS/ROS2 nodes, or enhance Computer Vision spatial bridges are warmly welcomed:

  1. Fork the Project (https://github.com/your-username/NEURO-MOTION/fork)
  2. Create your Feature Branch (git checkout -b feature/NewGestureModel)
  3. Commit your Changes (git commit -m 'Add support for 3D gesture trajectory prediction')
  4. Push to the Branch (git push origin feature/NewGestureModel)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE for complete terms and permissions.

About

An end-to-end TinyML and Robotics platform deploying 8-bit quantized neural networks on ESP32 & MPU6050/9250 for sub-15ms on-device motion classification, Firebase IoT telemetry, and Computer Vision cross-referencing.

Topics

edge-aiedge-impulseedge-impulse-data-collection-trainingedge-impulse-firmwareembedded-systemsembedded-systems-and-iotembedded-systems-autonomous-systemsembedded-systems-hardwareembedded-systems-programmingembedded-systems-real-timeesp32mpu6050-live-plotmpu6050-sensor-integrationmpu9250roboticsrobotics-competitionrobotics-controlrobotics-educationrobotics-programmingtinyml

Resources

Readme
MIT license
Activity

Stars

1 star

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.