How edwinsotoshz/intelligent-imu-wireless-nodes-esp32-for-posture-reeducation-and-strengthening works
1. Overall purpose
- This repository is an end-to-end prototype for an “Intelligent IMU Wireless Nodes” system: wearable/embedded sensor nodes collect motion and biosignal data, send it wirelessly, and the cloud/local stack stores, processes, and visualizes it.
2. Hardware/device layer
- The embedded side is Arduino/ESP32-centric. The main device folders under Project/Pre-releases/IoT/ contain:
- master_node: central coordinator
- gateway: radio/network gateway
- node_arm: arm node with IMU plus ECG sensor support
- node_forearm: forearm node with IMU support
- Sensor headers such as sensor_MPU9250.h and sensor_AD8232.h show that the system combines inertial sensing with ECG/biomedical acquisition.
3. Wireless/data transport boundary
- The architecture separates sensor nodes from a transport/aggregation layer.
- Multiple communication paths were explored in Project/Tests/Communication-Unused/, including:
- MQTT over Wi‑Fi
- LoRa SX1278
- SIM800L cellular/SMS
- older Liligo/LoRa variants
- The presence of these testbeds indicates the repo has experimented with several transport strategies, but MQTT appears to be the primary integration path in the documented stack.
4. Local data-processing and orchestration
- The core runtime stack in the README is Docker-based and centers on:
- Node-RED for MQTT ingestion and flow-based processing
- WebServices as the frontend/backend web layer
- InfluxDB as time-series storage
- Grafana for operational dashboards
- This forms the main software pipeline: device telemetry enters through MQTT/Node-RED, is stored in InfluxDB, and is visualized in Grafana and web UIs.
5. Web services layer
- Project/Pre-releases/webservices/ contains a small Node.js service (server/server.js) plus static client applications.
- The service is packaged with a Dockerfile and serves multiple browser-based visualizations:
- MediaPipe/ for camera-based pose/hand/face landmark processing
- Threejs/ for 3D arm visualization
- This is the main browser-facing boundary, separate from the embedded and data-storage layers.
6. Browser-based pose/arm visualization
- The MediaPipe assets include WASM binaries and task models for face, hand, and pose landmark detection.
- That suggests a client-side computer-vision workflow: webcam input → MediaPipe inference in the browser → computed angles/landmarks → display or comparison with sensor data.
- The Threejs folder provides a 3D arm scene and rendering script, likely used to visualize arm motion or kinematics derived from IMU data.
7. Dashboarding and analytics
- Project/Pre-releases/Dashboard/ contains Grafana and InfluxDB dashboard JSON exports.
- These are the persistent visualization artifacts for the telemetry pipeline, and they connect directly to the time-series database rather than to the devices.
- In practice, this is the “operations/monitoring” view of the system.
8. Node-RED as the integration hub
- The Project/Tests/node-red/ example flows show integration points for:
- MQTT ingestion
- web sockets
- gauges and tension/angle visualization
- MediaPipe and Three.js examples
- This indicates Node-RED is used as the glue between telemetry sources, message transport, and dashboard/web outputs.
9. Simulation and mocking boundary
- Project/Pre-releases/mocks/ contains simulated nodes and MQTT test tooling.
- These mocks let the team validate message formats and transport behavior without physical hardware.
- The MQTT test scripts and JSON template show a deliberate separation between real sensors and protocol-level validation.
10. Testing and validation assets
- Project/Tests/ contains focused validation programs for:
- IMU calibration and 3D testing
- ECG testing
- MediaPipe UI experiments
- Three.js flows
- deprecated hardware prototypes
- This repo is therefore not a single product app; it is a collection of hardware prototypes, comms tests, and UI proofs-of-concept around the same telemetry pipeline.
11. Physical enclosure and mechanical design
- 3D-Model/ contains Fusion 360 source files and STL exports for multiple case variants:
- standard case
- Liligo variant
- LoRa variant
- These models belong to the hardware subsystem and indicate the devices are intended to be packaged as wearable or deployable enclosures, with different versions matching different electronics stacks.
12. Release and deployment structure
- The Releases/ folder contains deployment artifacts, including docker-compose.yml and a Node-RED Dockerfile.
- The README documents persistent volumes and full backup/restore of InfluxDB, Grafana, and Node-RED data, which makes the Docker stack the operational deployment boundary for the software side.
13. Main end-to-end data flow
- The clearest system flow is:
- sensors on ESP32-based nodes collect motion/biometric data
- the master/gateway layer forwards data over MQTT or another wireless link
- Node-RED ingests and routes messages
- InfluxDB stores historical time-series
- Grafana and the webservices app render dashboards and interactive visualizations
- MediaPipe and Three.js appear as alternate or complementary frontends for motion interpretation and visualization.
14. Important architecture boundaries to draw
- Hardware vs. software: embedded .ino firmware and 3D enclosures are distinct from the Dockerized backend.
- Transport vs. storage: MQTT/communications are separate from InfluxDB persistence.
- Processing vs. visualization: Node-RED handles flow logic, while Grafana/WebServices are presentation layers.
- Production vs. experiments: Pre-releases/ and Tests/ contain prototypes and validation assets, while Releases/ contains the deployable container setup.
Main entry points: node_arm.ino Arm node · gateway.ino Gateway · Dockerfile Node-RED · server.js Web services
Components 20
Hardware nodes
ESP32-based embedded firmware and sensor payloads.
- Master node · Central coordinator firmware for the wearable network.
Project/Pre-releases/IoT/master_node/master_node.ino - Gateway · Radio/network bridge between nodes and the upstream stack.
Project/Pre-releases/IoT/gateway/gateway.ino - Arm node · Wearable arm node combining IMU and ECG sensing.
Project/Pre-releases/IoT/node_arm/node_arm.ino - Forearm node · Wearable forearm node focused on inertial sensing.
Project/Pre-releases/IoT/node_forearm/node_forearm.ino - MPU9250 · Representative IMU sensor driver used by the wearable nodes.
Project/Pre-releases/IoT/node_arm/sensor_MPU9250.h - AD8232 · ECG/front-end sensor support used on the arm node.
Project/Pre-releases/IoT/node_arm/sensor_AD8232.h
Wireless transport
Message delivery and alternate comms experiments.
- MQTT · Primary integration path for telemetry into the local software stack.
Project/Pre-releases/mocks/mqtt/msg-template.json - LoRa tests · Explored SX1278 and Liligo LoRa communication variants.
Project/Tests/Communication-Unused/LoRa_SX1278_Ra-02/LoRa_SX1278_Sender/LoRa_SX1278_Sender.ino - Cellular tests · SIM800L SMS and cellular communication experiments.
Project/Tests/Communication-Unused/SIM800L/SIM800L-Test/SIM800L-Test.ino
Local stack
Dockerized ingestion, storage, and visualization services.
- Node-RED · Flow-based MQTT ingestion, routing, and glue logic.
Releases/nodered/Dockerfile - InfluxDB · Persistent storage for telemetry and historical measurements.
Project/Pre-releases/Dashboard/Dashboard_InfluxDB.json - Grafana · Operational dashboards built on top of the time-series store.
Project/Pre-releases/Dashboard/Dashboard_Grafana.json
Web UI
Browser-facing visualization and motion analysis apps.
- Web services · Browser-facing service that serves visualization pages and assets.
Project/Pre-releases/webservices/server/server.js - MediaPipe UI · Client-side pose, hand, and face landmark processing and comparison.
Project/Pre-releases/webservices/MediaPipe/front-view.html - Three.js UI · 3D arm visualization for motion and kinematics display.
Project/Pre-releases/webservices/Threejs/arm.html
Validation & prototypes
Mocks, tests, and experimental flows used to verify the system.
- Dashboards · Saved Grafana and InfluxDB dashboard definitions.
Project/Pre-releases/Dashboard/Dashboard.json - MQTT mocks · Mock nodes and protocol validation scripts for telemetry payloads.
Project/Pre-releases/mocks/mqtt/test_mqtt.py - Flow tests · Node-RED example flows for MQTT, websocket, gauges, MediaPipe, and Three.js.
Project/Tests/node-red/example_mqtt.json - MediaPipe tests · Standalone experiments for camera input, angle extraction, and visualization.
Project/Tests/test-mediapipe/script.js - Three.js tests · Standalone experiments for arm rendering and scene behavior.
Project/Tests/test-threejs/flow-threejs.json
Connections 22
- MPU9250 → Arm node: feeds IMU · The IMU driver supplies motion measurements to the arm node.
- AD8232 → Arm node: feeds ECG · The ECG front end supplies biosignal measurements to the arm node.
- MPU9250 → Forearm node: feeds IMU · The IMU driver supplies motion measurements to the forearm node.
- Arm node → Master node: telemetry · Wearable data is coordinated through the master node.
- Forearm node → Master node: telemetry · Forearm telemetry is coordinated through the master node.
- Master node → Gateway: uplink · The coordinator forwards data toward the transport boundary.
- Gateway → MQTT: primary path · MQTT is the documented main integration path into software services.
- Gateway → LoRa tests: alt path · LoRa experiments represent an alternate wireless transport.
- Gateway → Cellular tests: alt path · Cellular/SMS experiments represent another alternate transport.
- MQTT → Node-RED: ingest · Node-RED consumes MQTT telemetry and routes it through flows.
- Node-RED → InfluxDB: store · Processed telemetry is written to the time-series database.
- InfluxDB → Grafana: visualize · Grafana reads from InfluxDB for operational dashboards.
- Node-RED → Web services: serve data · Node-RED acts as the integration layer for web-facing outputs.
- Web services → MediaPipe UI: browser UI · The web service serves the MediaPipe-based client application.
- Web services → Three.js UI: browser UI · The web service serves the Three.js visualization.
- MediaPipe UI → Arm node: compare motion · Browser-based landmarks and angles complement wearable arm sensing.
- Three.js UI → Arm node: render motion · The 3D scene represents arm movement derived from telemetry.
- Dashboards → Grafana: dashboard defs · Saved dashboard JSON targets Grafana and related visualization setup.
- MQTT mocks → MQTT: validate · Mock tooling checks message formats and MQTT behavior.
- Flow tests → Node-RED: exercise flows · Example flows demonstrate ingestion, websocket, and visualization paths.
- MediaPipe tests → MediaPipe UI: prototype · Standalone MediaPipe experiments inform the browser UI.
- Three.js tests → Three.js UI: prototype · Standalone Three.js experiments inform the browser UI.