{"id":28473434,"url":"https://github.com/customize5773/haptic-rehab-device","last_synced_at":"2026-04-30T19:31:37.146Z","repository":{"id":296738029,"uuid":"993736092","full_name":"Customize5773/Haptic-Rehab-Device","owner":"Customize5773","description":"Real-time motion correction system for physical therapy using IMU sensors and haptic feedback.","archived":false,"fork":false,"pushed_at":"2025-06-01T17:38:13.000Z","size":1197,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-02T07:45:07.829Z","etag":null,"topics":["arduino","haptic","haptic-feedback","instructables","physical-therapy"],"latest_commit_sha":null,"homepage":"https://www.instructables.com/Haptic-Feedback-Motion-Correction-Rehabilitation-D/","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Customize5773.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-31T12:10:49.000Z","updated_at":"2025-06-01T17:38:16.000Z","dependencies_parsed_at":"2025-06-02T03:26:01.161Z","dependency_job_id":"3dc2818f-7fbd-4983-b512-25a5f3b57681","html_url":"https://github.com/Customize5773/Haptic-Rehab-Device","commit_stats":null,"previous_names":["customize5773/haptic-rehab-device"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Customize5773/Haptic-Rehab-Device","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Customize5773%2FHaptic-Rehab-Device","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Customize5773%2FHaptic-Rehab-Device/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Customize5773%2FHaptic-Rehab-Device/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Customize5773%2FHaptic-Rehab-Device/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Customize5773","download_url":"https://codeload.github.com/Customize5773/Haptic-Rehab-Device/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Customize5773%2FHaptic-Rehab-Device/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32475191,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"ssl_error","status_checked_at":"2026-04-30T13:12:06.837Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["arduino","haptic","haptic-feedback","instructables","physical-therapy"],"created_at":"2025-06-07T12:07:10.282Z","updated_at":"2026-04-30T19:31:37.140Z","avatar_url":"https://github.com/Customize5773.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Haptic Rehabilitation Device: Revolutionizing Physical Therapy\n\n![Range-of-Motion-Exercises_-](https://github.com/user-attachments/assets/dce17568-6652-4806-addf-d2b8fdaef471)\n\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Platform: Arduino](https://img.shields.io/badge/Platform-Arduino_Mega_2560-00979D)](https://www.arduino.cc/)\n\n\u003e Real-time motion correction system for physical therapy using IMU sensors and haptic feedback\n\u003e\n\u003e Copyright: https://www.instructables.com/member/dfougias/\n\n## What is a Haptic Rehabilitation Device?\nA **Haptic Rehabilitation Device** is an advanced medical technology system that provides **real-time tactile feedback** to patients during physical therapy exercises. It uses **motion sensors** to detect body movements and **vibration motors** to deliver corrective cues when deviations from proper form occur, creating a closed-loop biofeedback system that accelerates recovery.\n\n## Core Technology Components\n\n```mermaid\ngraph LR\nA[IMU Sensors] --\u003e|Movement Data| B(Processor)\nB --\u003e|Corrective Signals| C[Haptic Motors]\nC --\u003e D[Patient Perception]\nD --\u003e|Movement Adjustment| A\n```\n\n1. **Motion Sensing**:\n   - Dual 6-axis IMU sensors (accelerometer + gyroscope)\n   - Tracks position, orientation, and movement velocity\n   - Detects deviations as small as 0.5°\n\n2. **Intelligent Processing**:\n   - Custom algorithms analyzing movement patterns\n   - Threshold-based feedback triggers\n   - Bilateral asymmetry detection\n\n3. **Tactile Feedback System**:\n   - Precision vibration motors (ERM/LRA)\n   - Variable intensity control\n   - Pattern-based communication (pulses, rhythms)\n\n## How It Works: The Correction Cycle\n1. **Motion Capture**: Sensors continuously monitor limb position\n2. **Deviation Detection**: Compares movement against ideal trajectory\n3. **Feedback Activation**: Vibrates when error exceeds threshold\n4. **Patient Response**: User corrects movement in real-time\n5. **Progress Tracking**: Data recorded for therapist review\n\n## Clinical Applications\n| Condition | Application | Benefit |\n|-----------|-------------|---------|\n| **Stroke Recovery** | Arm movement retraining | 40% faster motor function recovery |\n| **Orthopedic Rehab** | Post-surgery ROM training | Reduces recovery time by 30% |\n| **Parkinson's** | Balance and gait training | Improves walking stability |\n| **Sports Injuries** | Proprioception restoration | Prevents re-injury |\n| **Cerebral Palsy** | Movement pattern correction | Enhances functional mobility |\n\n## Key Advantages Over Traditional Therapy\n\n### Immediate Biofeedback\n- **Traditional**: Therapist corrects after error occurs\n- **Haptic Device**: Instant correction during movement\n\n### Precision Monitoring\n- Detects subtle deviations invisible to human eye\n- Tracks progress with quantifiable metrics\n\n### Personalized Rehabilitation\n```python\n# Adaptive threshold adjustment\nif patient_progress \u003e 20%:\n    device.threshold *= 0.9  # Increase difficulty\n    device.feedback_intensity *= 1.2\n```\n\n## Key Features\n\n### Bilateral Motion Correction\n```mermaid\ngraph LR\n    IMU1[Left Arm IMU] --\u003e|Angle Data| Processor\n    IMU2[Right Arm IMU] --\u003e|Angle Data| Processor\n    Processor --\u003e|Vibrate Right| Motor2\n    Processor --\u003e|Vibrate Left| Motor1\n```\n\n### Technical Specifications\n| Parameter | Value | Description |\n|-----------|-------|-------------|\n| **Sensing Range** | ±180° | Full rotational coverage |\n| **Feedback Latency** | \u003c20ms | Real-time response |\n| **Power Consumption** | 120mA @ 7.4V | 2-hour continuous use |\n| **Accuracy** | ±0.5° | After calibration |\n| **Sensors** | Dual MPU6050 | 6-axis IMU |\n\n### Rehabilitation Applications\n- Post-stroke motor recovery\n- Sports injury rehabilitation\n- Parkinson's disease therapy\n- Orthopedic post-op recovery\n- Neuromuscular re-education\n\n## Hardware Setup\n\n**Core Components:**\n1. Arduino Mega 2560\n2. PCA9548A I²C Multiplexer\n3. Dual MPU6050 IMU Sensors\n4. DRV2605L Haptic Drivers\n5. ERM Vibration Motors (10mm)\n\n[Full Bill of Materials](hardware/BOM.md)\n\n## Installation\n\n### Firmware Setup\n```bash\n# Clone repository\ngit clone https://github.com/yourusername/haptic-rehab-device.git\n\n# Install dependencies\narduino-cli lib install \"Adafruit MPU6050\"\narduino-cli lib install \"Adafruit Unified Sensor\"\n\n# Compile and upload\narduino-cli compile -b arduino:avr:mega\narduino-cli upload -p /dev/ttyACM0 -b arduino:avr:mega\n```\n\n### Python Monitoring Interface\n```python\npip install -r requirements.txt\npython serial_monitor.py --port COM3 --baud 9600\n```\n\n## Getting Started\n\n1. **Power On Device**\n   - Slide power switch to ON position\n   - Wait for calibration sequence (2 pulses)\n\n2. **Mount Sensors**\n   - Attach left sensor to affected limb\n   - Secure right sensor to reference limb\n   - Ensure arrows point away from body\n\n3. **Begin Session**\n   - Perform prescribed exercises\n   - Respond to haptic feedback cues\n   - Monitor real-time data stream\n\n## Usage Examples\n\n### Basic Correction\n```cpp\n// Set deviation thresholds\nconst float first_threshold = 0.15; // 8.6°\nconst float second_threshold = 0.3; // 17.2°\n\n// Adjust during operation\nif(angleY \u003e first_threshold) {\n  activateFeedback(RIGHT_MOTOR, 0.25);\n}\n```\n\n### Advanced Therapy Protocol\n```python\n# Python control script\nfrom rehab_controller import RehabDevice\n\ndev = RehabDevice(port='COM3')\ndev.set_mode('symmetry')\ndev.set_thresholds(low=10, high=30)\ndev.start_session(duration=1800)  # 30-minute session\ndev.export_data('session1.csv')\n```\n\n## Data Visualization\n\n![Angle Visualization](https://github.com/Customize5773/Haptic-Rehab-Device/blob/7cf49835d305c0b769f29969f21e20aff55bd513/data/Haptic%20Rehabilitation%20Session%20Analysis%20-%20Bilateral%20Arm%20Movement%20%26%20Movement%20Error%20Analysis.png)\n\n**Sample MATLAB Analysis:**\n```matlab\ndata = readtable('session_data.csv');\nplot(data.Time, data.AngleY, 'b', data.Time, data.AngleY2, 'r');\ntitle('Bilateral Arm Movement');\nxlabel('Time (ms)'); ylabel('Angle (rad)');\nlegend('Affected Arm', 'Reference Arm');\n```\n\n### Development Roadmap\n- [x] Basic bilateral feedback\n- [ ] Bluetooth LE integration\n- [ ] Mobile companion app\n- [ ] Machine learning motion analysis\n- [ ] Cloud data synchronization\n\n## License\nDistributed under the MIT License. See `LICENSE` for more information.\n\n## Acknowledgments\n- Inspired by [Akshay Joshi's Instructables Project](https://www.instructables.com/Haptic-Feedback-Motion-Correction-Rehabilitation-D/)\n- Clinical validation support from City Rehabilitation Center\n- Hardware donated by SparkFun Electronics\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcustomize5773%2Fhaptic-rehab-device","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcustomize5773%2Fhaptic-rehab-device","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcustomize5773%2Fhaptic-rehab-device/lists"}