Real-time motion correction system for physical therapy using IMU sensors and haptic feedback
A 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.
graph LR
A[IMU Sensors] -->|Movement Data| B(Processor)
B -->|Corrective Signals| C[Haptic Motors]
C --> D[Patient Perception]
D -->|Movement Adjustment| A
-
Motion Sensing:
- Dual 6-axis IMU sensors (accelerometer + gyroscope)
- Tracks position, orientation, and movement velocity
- Detects deviations as small as 0.5°
-
Intelligent Processing:
- Custom algorithms analyzing movement patterns
- Threshold-based feedback triggers
- Bilateral asymmetry detection
-
Tactile Feedback System:
- Precision vibration motors (ERM/LRA)
- Variable intensity control
- Pattern-based communication (pulses, rhythms)
- Motion Capture: Sensors continuously monitor limb position
- Deviation Detection: Compares movement against ideal trajectory
- Feedback Activation: Vibrates when error exceeds threshold
- Patient Response: User corrects movement in real-time
- Progress Tracking: Data recorded for therapist review
Condition | Application | Benefit |
---|---|---|
Stroke Recovery | Arm movement retraining | 40% faster motor function recovery |
Orthopedic Rehab | Post-surgery ROM training | Reduces recovery time by 30% |
Parkinson's | Balance and gait training | Improves walking stability |
Sports Injuries | Proprioception restoration | Prevents re-injury |
Cerebral Palsy | Movement pattern correction | Enhances functional mobility |
- Traditional: Therapist corrects after error occurs
- Haptic Device: Instant correction during movement
- Detects subtle deviations invisible to human eye
- Tracks progress with quantifiable metrics
# Adaptive threshold adjustment
if patient_progress > 20%:
device.threshold *= 0.9 # Increase difficulty
device.feedback_intensity *= 1.2
graph LR
IMU1[Left Arm IMU] -->|Angle Data| Processor
IMU2[Right Arm IMU] -->|Angle Data| Processor
Processor -->|Vibrate Right| Motor2
Processor -->|Vibrate Left| Motor1
Parameter | Value | Description |
---|---|---|
Sensing Range | ±180° | Full rotational coverage |
Feedback Latency | <20ms | Real-time response |
Power Consumption | 120mA @ 7.4V | 2-hour continuous use |
Accuracy | ±0.5° | After calibration |
Sensors | Dual MPU6050 | 6-axis IMU |
- Post-stroke motor recovery
- Sports injury rehabilitation
- Parkinson's disease therapy
- Orthopedic post-op recovery
- Neuromuscular re-education
Core Components:
- Arduino Mega 2560
- PCA9548A I²C Multiplexer
- Dual MPU6050 IMU Sensors
- DRV2605L Haptic Drivers
- ERM Vibration Motors (10mm)
# Clone repository
git clone https://github.com/yourusername/haptic-rehab-device.git
# Install dependencies
arduino-cli lib install "Adafruit MPU6050"
arduino-cli lib install "Adafruit Unified Sensor"
# Compile and upload
arduino-cli compile -b arduino:avr:mega
arduino-cli upload -p /dev/ttyACM0 -b arduino:avr:mega
pip install -r requirements.txt
python serial_monitor.py --port COM3 --baud 9600
-
Power On Device
- Slide power switch to ON position
- Wait for calibration sequence (2 pulses)
-
Mount Sensors
- Attach left sensor to affected limb
- Secure right sensor to reference limb
- Ensure arrows point away from body
-
Begin Session
- Perform prescribed exercises
- Respond to haptic feedback cues
- Monitor real-time data stream
// Set deviation thresholds
const float first_threshold = 0.15; // 8.6°
const float second_threshold = 0.3; // 17.2°
// Adjust during operation
if(angleY > first_threshold) {
activateFeedback(RIGHT_MOTOR, 0.25);
}
# Python control script
from rehab_controller import RehabDevice
dev = RehabDevice(port='COM3')
dev.set_mode('symmetry')
dev.set_thresholds(low=10, high=30)
dev.start_session(duration=1800) # 30-minute session
dev.export_data('session1.csv')
Sample MATLAB Analysis:
data = readtable('session_data.csv');
plot(data.Time, data.AngleY, 'b', data.Time, data.AngleY2, 'r');
title('Bilateral Arm Movement');
xlabel('Time (ms)'); ylabel('Angle (rad)');
legend('Affected Arm', 'Reference Arm');
- Basic bilateral feedback
- Bluetooth LE integration
- Mobile companion app
- Machine learning motion analysis
- Cloud data synchronization
Distributed under the MIT License. See LICENSE
for more information.
- Inspired by Akshay Joshi's Instructables Project
- Clinical validation support from City Rehabilitation Center
- Hardware donated by SparkFun Electronics