Haptic Knee Valgus Correction System

by Brent14 in Circuits > Arduino

63 Views, 1 Favorites, 0 Comments

Haptic Knee Valgus Correction System

f9e1f962-cfa3-4f62-aeb8-11014754c83e.jpg
Picture1.png
Picture3.png
Picture2.png

Dynamic Knee Valgus (DKV) is a common biomechanical issue where the knee collapses medially during dynamic activities like squats, lunges, or landings. DKV has been strongly associated with increased risk of anterior cruciate ligament (ACL) tears, patellofemoral pain syndrome, and prolonged rehabilitation timelines [1], [2]. In elite female athletes, poor hip abductor-to-adductor strength ratios, excessive trunk flexion, and delayed neuromuscular response times are frequently linked to DKV-related pathologies [2], [3].

Despite increasing recognition of DKV’s role in musculoskeletal injuries, most rehabilitation or athletic training occurs without real-time guidance. Patients often perform exercises unsupervised at home—without mirrors or therapists—which can lead to persistent compensatory patterns and ineffective movement retraining.

Previous studies on haptic rehabilitation systems for neurological conditions like Parkinson’s disease also support the benefit of real-time tactile cues during motor training [4]. Similarly, wearable systems have shown potential in rehabilitation scenarios, although most focus on upper-body applications [5]. Even visual real-time feedback has been shown to reduce joint loading during squats in patients with knee pain [6].

Current research on vibrotactile systems such as the PASSO harness demonstrates how haptic cues can guide posture correction [4]. However, no affordable, wearable prototype exists that focuses specifically on knee alignment during lower-limb exercises like squats [7]. Moreover, few systems combine real-time IMU-based feedback with haptics in a compact, wireless-ready form.

Our prototype addresses this gap by combining MPU6050 IMU sensors, DRV2605L haptic drivers, and Drake vibrotactile actuators, mounted with adjustable Velcro straps. It delivers proportional real-time feedback based on sensor fusion, allowing users to recognize and correct medial knee displacement. This closed-loop system guides users toward biomechanically safer squats and may be expanded for broader rehabilitation or sports applications.


Credits: This project was developed by Renzo Condstandt and Brent Stroeykens as part of the “Haptic Interfaces Experience” course at KU Leuven. Special thanks to the teaching staff for their guidance and feedback throughout the development process.

Supplies

The following components were used to build the haptic feedback prototype. All parts are available from mainstream electronics distributors or online retailers. The total material cost remains under €200.

Velcro self-adhesive (5 meters, hook & loop set)

  1. Used to attach and reposition components on the leg.
  2. Quantity: 1
  3. Unit Price: €15.00
  4. Total: €15.00
  5. Source: Bol.com

MPU6050 IMU sensors

  1. Used to measure leg orientation and angular movement.
  2. Quantity: 2
  3. Unit Price: €4.61
  4. Total: €9.22
  5. Source: Conrad

Drake haptic actuators

  1. Provide vibration feedback when incorrect posture is detected.
  2. Quantity: 2
  3. Unit Price: €45.00
  4. Total: €90.00
  5. Source: Titan Haptics (via Adafruit)

DRV2605L haptic driver boards

  1. Drive the haptic motors with custom waveforms.
  2. Quantity: 2
  3. Unit Price: €7.95
  4. Total: €15.90
  5. Source: Adafruit

Arduino Micro

  1. The central microcontroller to run the system logic.
  2. Quantity: 1
  3. Unit Price: €24.20
  4. Total: €24.20
  5. Source: Arduino.cc

Breadboard

  1. Used for fast prototyping and wiring.
  2. Quantity: 1
  3. Unit Price: €3.00
  4. Total: €3.00
  5. Source: Arduino.cc / Bol.com

TCA9548A I2C multiplexer

  1. Allows simultaneous use of multiple I2C devices.
  2. Quantity: 1
  3. Unit Price: €6.95
  4. Total: €6.95
  5. Source: Adafruit

Jumper wires (male–male)

  1. Used to connect breadboard, sensors, and drivers.
  2. Quantity: 2
  3. Unit Price: €0.25
  4. Total: €0.50
  5. Source: Bol.com / lab stock

Stemma QT Cables – 400 mm (black signal wires)

  1. Used for flexible sensor and driver connections.
  2. Quantity: 5
  3. Unit Price: €0.75
  4. Total: €3.75
  5. Source: Adafruit

Heat-shrink tubing (400 mm)

  1. Used to insulate and protect soldered connections.
  2. Quantity: 1
  3. Unit Price: €2
  4. Total: €2
  5. Source: Electric-b2c.com

Total Cost: Approx. €171

All paid components were ordered from trusted electronics suppliers. Lab-provided parts were replaced in the cost estimate to ensure replicability by external users. This ensures that anyone with access to basic electronics tools can build and test the system independently.

System Assambly

all components layed out.jpg
arduino micro bread boardconnections.jpg
solderen.jpg
Band om knie.jpg
Multplexor.jpg

1. Preparing the QT-to-Breadboard Extension Cable

To ensure flexibility and freedom of movement while maintaining connection to the breadboard, one Stemma QT cable (400 mm) is modified:

  1. Cut one end of the cable to expose the four internal wires (SDA, SCL, 5V, GND).
  2. Solder each wire to a 1-meter black extension wire (4 wires in total).
  3. Cut two male–male jumper wires in half. Solder each male pin to the end of the extension wires.
  4. Use heat-shrink tubing on each solder joint for insulation and durability.
  5. Bundle the four wires together using tape to prevent tangling and keep the cable manageable.
  6. This extended cable now connects the multiplexer to the breadboard, where the male pins are inserted into:
  7. 5V
  8. GND
  9. SDA (to pin 2 on Arduino Micro)
  10. SCL (to pin 3 on Arduino Micro)

Shown in: soldering close-up, male header pin prep, and Arduino Micro breadboard connection photos.

2. Connecting Sensors and Actuators via QT Cables

The remaining four Stemma QT cables are used to create two feedback loops, each consisting of an IMU sensor and haptic actuator:

  1. Loop 1 (left leg):
  2. One QT cable from channel 3 of the I2C multiplexer to DRV2605L haptic driver
  3. One QT cable from that DRV2605L to an MPU6050 IMU
  4. Loop 2 (right leg):
  5. One QT cable from channel 0 of the multiplexer to the second haptic driver
  6. One QT cable from that driver to the second IMU

Each cable connects directly using JST-SH connectors (no soldering required for these).

Shown in: multiplexer close-up photo with left–right cable direction labels.

3. Mounting the Components

  1. IMU sensors are attached to the lower leg using Velcro self-adhesive strips.
  2. Ensure the Y-axis points downward (toward the floor) and the X-axis points backward (behind the leg). This orientation is essential for accurate posture detection based on gravitational acceleration and how it is implemented in the code (The rotation axis is defined in the code).
  3. Wrap an additional Velcro strap tightly over the IMU module to ensure more stable readings.
  4. Haptic actuators are mounted using separate Velcro straps on the upper calve, away from the IMUs to reduce vibration interference.
  5. The actuator is on the inside of the Velcro, while the DRV2605L driver board is visible on the outside.

Shown in: full wearable setup image and close-ups of Velcro-mounted IMU and haptic actuator.

4. Arduino Micro and Breadboard Setup

  1. Mount the Arduino Micro on the breadboard and connect the four male headers from the extended QT cable:
  2. First two pins to 5V and GND
  3. Last two pins to SDA (pin 2) and SCL (pin 3)
  4. If the system does not power up, try swapping the 5V and GND wires.
  5. If IMU data remains at zero and actuators do not respond, verify SDA and SCL are not swapped.

Shown in: Arduino Micro on breadboard image with labels.

This completes the hardware assembly. Once powered and wired correctly, the prototype is ready for calibration and code upload using the Arduino IDE. Proceed to the next section for code setup and explanation.

Programming the Arduino

This Arduino script controls a haptic feedback prototype that helps correct Dynamic Knee Valgus (DKV) during squats. It uses two MPU6050 IMU sensors and two DRV2605L haptic drivers to detect medial knee movement and provide real-time vibrotactile feedback. A TCA9548A I2C multiplexer is used to manage communication with multiple identical I2C devices.

1. Global Data Structures

struct IMUData { ... }; // Stores raw + processed data from IMUs
struct IMUError { ... }; // Stores bias/error values after calibration

You’ll find two IMUData instances used to track each leg (Data0 for right leg, Data3 for left leg), and two IMUError instances for bias correction.

2. Setup Function

void setup() {
Serial.begin(115200);
Wire.begin();
pwm613configure(); // Setup PWM signal for vibration motors

TCA9548A(0); // Switch to channel 0 (right leg)
initializeDRV2605(); // Setup DRV2605L driver
pulse(0.1, 10); // Test vibration
initializeIMU(); // Activate IMU
imu0_error = calculate_IMU_error(0); // Calibrate

TCA9548A(3); // Switch to channel 3 (left leg)
initializeDRV2605();
pulse(0.1, 10);
initializeIMU();
imu3_error = calculate_IMU_error(3); // Calibrate
}

This block prepares both IMU channels and haptic actuators for use.

3. Main Loop

void loop() {
Data0 = processIMU(0, imu0_error, Data0);
Data3 = processIMU(3, imu3_error, Data3);

// Detect movement
bool motionDetected = detectMotion(0, 0.05, Data0, imu0_error) ||
detectMotion(3, 0.05, Data3, imu3_error);

if (motionDetected) {
lastMotionTime = millis(); // Reset inactivity timer
}

// Evaluate posture and provide feedback if knees collapse
TCA9548A(0);
checkAngleAndVibrate(-10, 10, Data0);
TCA9548A(3);
checkAngleAndVibrate(-10, 10, Data3);

// Automatic recalibration if user stands still for >5 seconds
if (millis() - lastMotionTime > motionTimeout) {
recalibrateIMUs(); // Full IMU reset and vibration cue
}
}

4. Key Functions (What They Do)

void checkAngleAndVibrate(...)
// Checks the roll angle of the knee. If it falls outside of the acceptable range, the vibration motor is activated.

IMUData processIMU(...)
// Collects and filters IMU data using a complementary filter and outputs roll, pitch, and yaw angles.

IMUError calculate_IMU_error(...)
// Reads the IMU multiple times to compute average offsets (biases) for accelerometer and gyroscope.

bool detectMotion(...)
// Computes the magnitude of acceleration and compares it to a known baseline to detect movement.

void vibrate(...)
// Controls the vibration intensity and frequency based on detected error.

void TCA9548A(uint8_t bus)
// Switches the active sensor channel via the I2C multiplexer (necessary because both IMUs have the same I2C address).

void pulse(...)
// A single burst of vibration used in calibration and click feedback.

void initializeIMU(), initializeDRV2605()
// IMU and haptic driver configuration respectively.

void pwm613configure()
// Low-level setup for PWM signals sent to the vibration motors.

5. Automatic Reset Logic

If the user stands still for more than 5 seconds (user defined in code), both IMUs are automatically recalibrated. This includes:

  1. Triple-click vibration as a reset cue
  2. 5-second delay for the user to hold a neutral stance
  3. Recalculation of biases and baseline posture

This ensures the system remains accurate even after prolonged use or sensor drift.


Download Arduino Code (.ino)

Click here to download the Arduino file

Testing and Calibration

2fe05f91-f994-4a3f-b9c8-ea39bbeb31ac.jpg
f741598f-4dc2-4264-b874-0f1efc263708.jpg

Precise sensor alignment is not strictly required. Due to natural human variability, perfect positioning is difficult to achieve consistently, especially when mounting on the body. Small offsets will always be present and are expected, both due to human anatomy and minor mounting shifts.

However, the system is designed to tolerate these deviations. The calibration step in the code automatically compensates for such static offsets using IMU error correction during initialization. As users move dynamically, the orientation may drift slightly over time. To address this, the code includes an automatic reset function that triggers after a period of inactivity. This ensures reliable operation throughout multiple repetitions without requiring manual recalibration each time.

This built-in robustness allows for practical, real-world use during squats and other lower-limb movements—even if sensor mounting is not flawless.

Discussion

The prototype consistently detected improper knee alignment and responded with proportional vibrotactile feedback. This immediate response allowed users to intuitively correct their posture without visual cues, such as mirrors or screens. The integration of two IMUs and two haptic actuators ensured that both legs could be monitored independently and simultaneously.

Velcro-based sensor mounting proved to be an effective and flexible solution. However, loose straps occasionally caused signal noise or shifting during movement, which in turn influenced the accuracy of the IMU readings. Ensuring tight placement and correct alignment—particularly with the Y-axis pointing downward and the X-axis backward—remains essential for consistent results.

Feedback from test users confirmed that different vibration intensities and frequencies helped communicate the severity of misalignment clearly. This aligns with findings from studies demonstrating that wearable haptic feedback can effectively improve posture awareness and correction during rehabilitation exercises [8].

A few limitations were identified. The prototype currently operates in a tethered state, relying on USB power and serial monitoring via a computer. This limits mobility and could interfere with natural squatting movements. Additionally, while the system automatically resets after five seconds of inactivity, occasional manual resets were still required using the Arduino’s hardware button—especially after accidental sensor bumps.

Despite these constraints, the system remains highly promising. With a compact form factor, full battery integration, and wireless data transmission, future versions can support more mobile and seamless rehabilitation and training use cases.

Conclusion and Future Work

We successfully developed a low-cost, wearable prototype that delivers real-time haptic feedback to support Dynamic Knee Valgus (DKV) correction during squats. By combining two MPU6050 inertial measurement units (IMUs), DRV2605L haptic driver boards, and Drake vibration actuators, the system guides users toward safer lower-limb movement patterns using intuitive vibrotactile feedback.

The final version of the prototype was validated during squat testing and proved relative good reliability in tracking sensor data and triggering appropriate haptic responses. The modular setup, built with Velcro-mounted components and QT cables, allowed easy donning and repositioning while maintaining signal integrity. The IMU calibration routine embedded in the code compensated for static offsets and occasional drift caused by human movement. Automatic recalibration after periods of inactivity further increased usability during longer sessions.

A major design update would be the replacement of direct USB connection with a battery power option, eliminating the need to remain tethered to a computer. This significantly improves freedom of movement and user comfort, especially for sports or at-home rehab applications. Future iterations should explore integrating Bluetooth Low Energy (BLE) for untethered sensor feedback and real-time monitoring, as BLE has been shown to be effective in wearable rehabilitation systems [9].

Future iterations should explore machine learning integration to adapt feedback thresholds dynamically based on user-specific movement profiles and progress. Machine learning algorithms have been successfully applied in wearable rehabilitation systems to assess and personalize exercise feedback [10]. For example, this could be useful to detect user-induced shaking or to dynamically determine the optimal calibration period.

Future Improvements

To improve usability and expand the system’s scope, future iterations should explore:

  1. Wireless communication: Integrating Bluetooth Low Energy (BLE) for untethered sensor feedback and real-time monitoring.
  2. Mobile app development: Providing live feedback and performance tracking through a smartphone interface.
  3. Machine learning integration: Adapting feedback thresholds dynamically based on user-specific movement profiles and progress.
  4. Custom PCB design: Reducing bulk and improving reliability by replacing the breadboard with a printed circuit board.
  5. Optimized haptic drivers: Using lighter or embedded solutions for haptic motor control to reduce weight and improve ergonomics.

Potential Use Cases

Given its affordability, modularity, and intuitive feedback mechanism, the system holds promise in multiple domains:

  1. Home-based rehabilitation: For example, ACL injury recovery patients in need of biofeedback outside clinical environments [11].
  2. Athletic training: In sports like football, basketball, or dance, where dynamic valgus control is crucial to performance and injury prevention.
  3. Clinical education tools: For physiotherapists and biomechanics instructors to teach safe squatting mechanics through real-time biofeedback.

This proof-of-concept confirms the feasibility of wearable haptic systems for lower-limb alignment. With further refinement, the device can evolve into a powerful tool for clinical, athletic, and personal use.

References

[1] A. M. Alzahrani et al., “Is Hip Muscle Strength Associated with Dynamic Knee Valgus in a Healthy Adult Population? A Systematic Review,” Int. J. Environ. Res. Public Health, vol. 18, no. 14, p. 7669, 2021. DOI: 10.3390/ijerph18147669.

[2] T. J. Collings et al., “Strength and Biomechanical Risk Factors for Noncontact ACL Injury in Elite Female Footballers: A Prospective Study,” Med. Sci. Sports Exerc., vol. 54, no. 8, pp. 1242–1251, 2022. DOI: 10.1249/MSS.0000000000002908.

[3] W. S. Mohammad and W. M. Elsais, “Comparison of Hip Abductor and Adductor Muscle Performance Between Healthy and Osteitis Pubis Professional Footballers,” Irish J. Med. Sci., vol. 192, pp. 685–691, 2023. DOI: 10.1007/s11845-022-03010-0.

[4] S. Imbesi et al., “User-Centered Design Methodologies for the Prototype Development of a Smart Harness and Related System to Provide Haptic Cues to Persons with Parkinson’s Disease,” Sensors, vol. 22, no. 20, p. 8095, 2022. DOI: 10.3390/s22218095.

[5] Q. Wang et al., “Interactive wearable systems for upper body rehabilitation: a systematic review,” J. Neuroeng. Rehabil., vol. 14, no. 1, p. 20, 2017. DOI: 10.1186/s12984-017-0229-y.

[6] T. Kernozek et al., "Real-Time Visual Feedback Reduces Patellofemoral Joint Loading During Squatting in Persons With Patellofemoral Pain," Med. Sci. Sports Exerc., vol. 52, no. 6, pp. 1239–1247, 2020. DOI: 10.1249/MSS.0000000000002283.

[7] T. L. Claiborne et al., “Relationship Between Hip and Knee Strength and Knee Valgus During a Single-Leg Squat,” J. Appl. Biomech., vol. 22, no. 1, pp. 41–50, 2006. DOI: 10.1123/jab.22.1.41.

[8] A. P. Pereira, O. J. M. Neto, V. M. C. Elui, and M. G. C. Pimentel, "Wearable Smartphone-Based Multisensory Feedback System for Posture Monitoring and Correction in Poststroke Rehabilitation: Usability and Effectiveness Study," JMIR Aging, vol. 8, p. e55455, Jan. 2025, doi: 10.2196/55455.

[9] J. Xu et al., "Configurable, wearable sensing and vibrotactile feedback system for real-time postural balance and gait training: proof-of-concept," J. NeuroEng. Rehabil., vol. 14, no. 1, p. 102, Dec. 2017, doi: 10.1186/s12984-017-0313-3.

[10] Y. Liao, A. Vakanski, and M. Xian, "A Deep Learning Framework for Assessing Physical Rehabilitation Exercises," arXiv preprint arXiv:1901.10435, Jan. 2019.

[11] B. Lindsey, S. Bruce, O. Eddo, and N. Cortes, "Feasibility of Wearable Haptic Biofeedback Training for Reducing Knee Loading During Gait," Journal of Biomechanical Engineering, vol. 142, no. 8, p. 081002, Aug. 2020, doi: 10.1115/1.4046360.