An sEMG-based adaptive rehabilitation hand that combines deep learning gesture classification with intensity prediction to drive impedance-based, power-adaptive actuation. This work is the implementation of the paper: FlexoGrip:sEMG Adaptive Rehabilitation Hand Exoskeleton
- Deep learning classification of hand gestures plus continuous intensity prediction (0.0 to 1.0).
- Adaptive impedance control that modulates target motion based on detected contraction and predicted intensity.
- Sliding-window filtering (majority vote + median) to stabilize predictions.
- Exportable Arduino-ready model header (
dual_model.h) for embedded inference. - Test data generation and replay using fixed sEMG windows for validation.
- Cardboard Exoskeleton
- 28BYJ-48 Stepper motor
- Pulley and fishing strings
- ULN2003 motor driver
- Motor supply (5V)
- ESP32 S3 Microcontroller
- Segmented structure to mimic finger joints
- Fishing strings mimic tendons
- Strings converge at the wrist mimicking hand anatomy
- Data pipeline: Extract 15 handcrafted features (MAV, WL, RMS, ZC, SSC across 3 channels) from 375-sample windows.
- Training: Train a classifier for gesture labels and a regressor for contraction intensity.
- Export: Emit a compact C++ header (
dual_model.h) and scaler stats for embedded use. - Firmware: Run inference on-window, filter predictions, then drive impedance control to adjust cable displacement.
- EMG_Modified/test_emg_data.h: Test windows and labels used by embedded code.
- EMG_Modified/dual_model.h: Exported classifier + regressor weights and inference functions.
- src/FlexoGrip.ino: ESP32-S3 firmware with inference, filtering, and impedance control.
- notebook/Rehab_Final_Project_Team_4_EMG_Hand_Movement_Classifcation.ipynb: Training and export workflow.
- Classifier train accuracy: 86.01%
- Classifier test accuracy: 85.57%
- Intensity regressor MAE: 0.0632
- Open the notebook and run the training + export sections to generate
dual_model.hand scaler stats. - Generate test windows (or update existing test data) and place them in
EMG_Modified/test_emg_data.h. - Ensure
dual_model.handtest_emg_data.hare in the include path for the firmware. - Build and upload src/FlexoGrip.ino to the ESP32-S3.
- Gesture decision: 3-window majority vote to reduce misclassification.
- Intensity: 3-window median for stable intensity control.
- Adaptive power control: Target displacement is computed from predicted intensity and used by the impedance controller.




