Selected Work
RoboticsMachine LearningEmbedded

sEMG Gesture Classification & Prosthetic Arm

TinyML gesture recognition at 82% accuracy deployed on ESP32 for robotic arm control

FreeRTOSESP-IDFTensorFlowscikit-learnCPythonHDF5ESP32EMG muscle sensorsCustom 7-DOF 3D-printed armServo motors
sEMG Gesture Classification & Prosthetic Arm
Role
signal pipeline · model training · on-device inference · hardware
Timeline
Dec 2025 - Present
Context
Personal project
Stack
FreeRTOS · ESP-IDF · TensorFlow · scikit-learn

Overview

An EMG-controlled prosthetic arm that classifies hand gestures in real time using TinyML models deployed on an ESP32. The full pipeline spans signal acquisition, dataset labeling, model training, and on-device inference, driving a custom 7-DOF 3D-printed arm.

The Problem

Reading intent from muscle activity is noisy and time-sensitive: the surface EMG signal is a faint, drifting waveform, and any usable control has to sample it cleanly, decide which gesture is happening, and actuate, all fast enough to feel responsive. Rather than stream raw signals to a laptop for inference, I built the whole loop, from sampling to classification, to run offline on the ESP32.

What I Did

Signal acquisition pipeline

DMA-driven non-blocking ADC sampling at 1 kHz runs alongside an asynchronous USB transfer task. Muscle-onset detection labels the signals, and datasets are stored in HDF5 for training.

TinyML gesture classification

Trained LDA and MLP models on EMG signal features with scikit-learn and TensorFlow, reaching 82% accuracy across 5 hand gestures. Both models are quantized and run offline on-device.

Custom 7-DOF arm

Built a 7-DOF arm with custom 3D-printed CAD shims to reduce servo stress, driving each joint from the classified gesture.

Modified servo feedback

Modified a bicep servo for continuous rotation by repurposing its internal potentiometer as an elbow-angle feedback sensor, enabling screw-driven actuation.

Demo

The complete loop: live sEMG classification driving the arm's actuation in real time.

Proportional control: bicep activation level drives the joint continuously, rather than switching between discrete classified gestures.

Walkthrough of the GUI for signal acquisition, gesture labeling, and model training.

The model classifying hand gestures live from the sEMG signal.

Range-of-motion test with the joints driven by manual button presses, not EMG yet.

Gallery

The full 7-DOF 3D-printed arm.
The full 7-DOF 3D-printed arm.
Inside the arm: servos with pulleys that pull string 'tendons' to actuate the joints.
Inside the arm: servos with pulleys that pull string 'tendons' to actuate the joints.
Me with the EMG muscle sensors attached to my arm.
Me with the EMG muscle sensors attached to my arm.

Results

  • 82% accuracy across 5 hand gestures, with quantized models running fully offline on the ESP32.
  • A complete pipeline from 1 kHz DMA signal acquisition through on-device TinyML inference to a custom 7-DOF actuated arm.
  • Honest limitation: accuracy holds for the trained gesture set and sensor placement; electrode drift and new users still require recalibration.