Krtrimahastah: AI-Powered Low-Cost Prosthetic Hand with intuitive multi-modal control and force feedback
Krtrimahastah (Sanskrit for Artificial Hand) is an open-source, affordable, and intelligent prosthetic arm designed to bridge the gap between expensive bionic limbs and passive cosmetic devices.
By leveraging 3D printing, the ESP32 microcontroller, AI integration, and affordable hobbyist components, this project delivers a fully functional, multi-modal assistive device for under $100 USD.
Watch the video on YouTube: https://youtu.be/Tq0eUJswGTI
Watch the demonstration video on YouTube: https://youtu.be/BNZyQIecj14
- Key Features
- Project Overview
- Hardware Architecture
- Pinout Reference
- System Architecture & Connection Flow
- 3D Model Components
- Wire Mapping
- Electrical Schematic
- Control Logic
- Software Setup
- Installation & Setup
- Usage Guide
- File Structure
- Learning Resources
- License
- Disclaimer & Safety Notice
- Contact & Support
- Voice Commands (Primary): Integrated with SinricPro IoT platform for voice control via Alexa/Google Assistant
- EMG Muscle Signals (Secondary): Backup EMG-based control for silent/offline operation with binary toggle (Open ↔ Close)
- Smart Home Integration: Connect to Amazon Alexa or Google Home for hands-free gesture commands
- Tendon-Driven Actuation: Bio-inspired mechanical design with 5 independent MG90s servos for anthropomorphic finger movement
- Haptic Feedback System: Force Sensitive Resistors (FSRs) in fingertips enable closed-loop grip control, preventing crushing of delicate objects
- Haptic Force Sensing: Real-time pressure monitoring (max grip force: 2000 units with safety cutoff)
- All-Day Portability: Power bank with optimized power splitting:
- High-Power Rail: 5V for servo actuation (high current spikes)
- Logic Rail: 3.3V via ESP32 regulator (low current, noise-isolated)
- Built entirely with off-the-shelf hobbyist components
- FDM 3D printing for structural parts (PLA material)
- Total BOM cost under $100 USD
- Open-source firmware for transparency and community contribution
- Pressure/tactile feedback prevents over-gripping
- Software watchdog timer (10-second timeout)
- EMG debounce protection (200ms)
- Safety state machine for graceful error handling
- Servo angle constraints to prevent mechanical damage
Prosthetic limbs remain inaccessible to the majority due to prohibitive costs ($3,000-$100,000+). This project demonstrates that functional bionic devices can be built affordably using modern open-source hardware and AI.
A modular, 3D-printed prosthetic hand that combines:
- Affordable actuation: MG90s servo motors instead of expensive linear actuators
- Intelligent control: AI-based language processing with offline fallback
- Biological feedback: FSR-based haptic sensing for dexterous manipulation
- Energy efficiency: Optimized power management for all-day wearability
| Component | Quantity | Function |
|---|---|---|
| ESP32 DevKit V1 | 1 | Main microcontroller (32-bit dual-core, Wi-Fi/BLE) |
| MG90s Servo Motor | 5 | Individual finger actuators (180° range, 1.5kg torque) |
| SinricPro Account | 1 | IoT cloud service for voice control integration |
| EMG Sensor Module V3.0 | 1 | Muscle signal acquisition (3-channel, 10-bit ADC) |
| FSR402 Pressure Sensor | 2 | Tactile feedback in thumb & index finger |
| 10K Ohm Resistors | 2 | Volatge Divider for FSR Sensor |
| 3D Printed Parts | — | PLA chassis (hand, phalanges, forearm cover) |
| Servo Horns & Hardware | — | Servo linkages & fasteners |
| USB-C Cable & Connectors | — | Power delivery & debugging |
| Breadboard & Jumper Wires | — | Prototyping & connections |
| Component | Signal Line | ESP32 GPIO | Pin Type | Notes |
|---|---|---|---|---|
| SERVO: Thumb | PWM Signal | GPIO 13 | OUTPUT | Channel 0, PWM (0-180°) |
| SERVO: Index | PWM Signal | GPIO 12 | OUTPUT | Channel 1, PWM (0-180°) |
| SERVO: Middle | PWM Signal | GPIO 14 | OUTPUT | Channel 2, PWM (0-180°) |
| SERVO: Ring | PWM Signal | GPIO 27 | OUTPUT | Channel 3, PWM (0-180°) |
| SERVO: Pinky | PWM Signal | GPIO 26 | OUTPUT | Channel 4, PWM (0-180°) |
| EMG Sensor | Analog Output | GPIO 34 | ADC1 INPUT | 0-4095 (3.5-18V) muscle signal |
| FSR: Thumb Tip | Analog Output | GPIO 36 | ADC1 INPUT | Pressure sensing (0-2000 units) |
| FSR: Index Tip | Analog Output | GPIO 39 | ADC1 INPUT | Pressure sensing (0-2000 units) |
| Finger | Min Angle (Open) | Max Angle (Closed) | Movement Range |
|---|---|---|---|
| Thumb | 0° | 120° | 120° |
| Index | 0° | 175° | 175° |
| Middle | 0° | 175° | 175° |
| Ring | 0° | 175° | 175° |
| Pinky | 0° | 175° | 175° |
graph TB
subgraph "Input Layer"
VOICE["Voice Input<br/>Alexa/Google Assistant"]
EMG["EMG Sensor<br/>Muscle Signals"]
FSR["FSR Sensors<br/>Tactile Feedback"]
end
subgraph "Processing Layer"
ESP32["ESP32 DevKit<br/>Main Microcontroller<br/>Dual-Core 240MHz"]
WIFI["Wi-Fi Module<br/>802.11 b/g/n"]
SINRIC["SinricPro<br/>IoT Cloud Service"]
end
subgraph "Control Logic"
FSM["State Machine<br/>5 Operating Modes"]
SERVO_CTRL["Servo Controller<br/>PWM Generator"]
SAFETY["Safety Module<br/>Watchdog & Limits"]
end
subgraph "Output Layer"
THUMB["Thumb Servo<br/>GPIO 13"]
INDEX["Index Servo<br/>GPIO 12"]
MIDDLE["Middle Servo<br/>GPIO 14"]
RING["Ring Servo<br/>GPIO 27"]
PINKY["Pinky Servo<br/>GPIO 26"]
end
subgraph "Power Distribution"
BATTERY["Power Bank"]
SERVO_RAIL["Servo Rail (5V)<br/>High Current"]
LOGIC_RAIL["Logic Rail (3.3V)<br/>Low Noise"]
end
VOICE --> SINRIC
EMG --> ESP32
FSR --> ESP32
ESP32 --> WIFI
WIFI --> SINRIC
SINRIC --> ESP32
ESP32 --> FSM
FSM --> SERVO_CTRL
FSR --> SAFETY
SERVO_CTRL --> SAFETY
SAFETY --> THUMB
SAFETY --> INDEX
SAFETY --> MIDDLE
SAFETY --> RING
SAFETY --> PINKY
BATTERY --> SERVO_RAIL
BATTERY --> LOGIC_RAIL
SERVO_RAIL --> THUMB
SERVO_RAIL --> INDEX
SERVO_RAIL --> MIDDLE
SERVO_RAIL --> RING
SERVO_RAIL --> PINKY
LOGIC_RAIL --> ESP32
LOGIC_RAIL --> FSR
SERVO_RAIL --> EMG
stateDiagram-v2
[*] --> IDLE
IDLE --> EMG_CONTROL: System Initialized
EMG_CONTROL --> GESTURE: Voice trigger + Valid command
EMG_CONTROL --> GESTURE: EMG muscle flex detected
GESTURE --> EMG_CONTROL: Gesture complete
EMG_CONTROL --> SAFETY_STOP: FSR limit exceeded<br/>OR EMG overload<br/>OR Watchdog timeout
SAFETY_STOP --> EMG_CONTROL: User releases grip<br/>Safety reset triggered
EMG_CONTROL --> [*]: Shutdown signal
sequenceDiagram
User->>Google Assistant: Speak voice command<br/>("Hey Google, turn on Prosthetic Hand")
Google Assistant->>SinricPro: Process & forward command
SinricPro->>ESP32: Send gesture command via WebSocket
ESP32->>ESP32: Parse mode command<br/>(e.g., "Prosthetic Hand", "peace", "point")
ESP32->>SERVO_CTRL: Calculate target angles
SERVO_CTRL->>THUMB: Write PWM signal (GPIO 13)
SERVO_CTRL->>INDEX: Write PWM signal (GPIO 12)
SERVO_CTRL->>MIDDLE: Write PWM signal (GPIO 14)
SERVO_CTRL->>RING: Write PWM signal (GPIO 27)
SERVO_CTRL->>PINKY: Write PWM signal (GPIO 26)
SERVO_CTRL->>FSR: Monitor pressure (GPIO 36, 39)
FSR->>SAFETY: Pressure threshold check
SAFETY->>User: Haptic feedback (grip achieved)
graph LR
BATTERY["<br/>Dual USB Output"]
USB1["USB Port 1<br/>5V Output"]
USB2["USB Port 2<br/>5V Output"]
SERVO_POWER["Servo Rail Breadboard<br/>5V Direct<br/>500mA+"]
LOGIC_POWER["Logic Rail Breadboard<br/>5V → ESP32 Regulator<br/>→ 3.3V<br/>100mA clean"]
SERVO_DRAWS["Servo Power Draws:<br/>• Idle: 5-10mA/servo + EMG<br/>• Active: 100-200mA/servo<br/>• Peak: 500mA (all 5)"]
LOGIC_DRAWS["Logic Power Draws:<br/>• ESP32: 80-160mA<br/>• FSR: 10-15mA<br/>• Total: ~140mA"]
BATTERY --> USB1
BATTERY --> USB2
USB1 --> SERVO_POWER
USB2 --> LOGIC_POWER
SERVO_POWER --> SERVO_DRAWS
LOGIC_POWER --> LOGIC_DRAWS
Hand Layout Reference (STL) Reference: Complete hand assembly layout showing all finger components and palm structure
The prosthetic hand consists of 8 3D-printed parts designed for FDM printing (PLA material):
| Component | File Name | Material |
|---|---|---|
| Palm/Metacarpal | Hand.stl |
PLA |
| Thumb Digit | Finger_Thumb.stl |
PLA |
| Index Finger | Finger_Index.stl |
PLA |
| Middle Finger | Finger_Middle.stl |
PLA |
| Ring Finger | Finger_Ring.stl |
PLA |
| Pinky Finger | Finger_Pinky.stl |
PLA |
| Arm Cover | Arm_Cover.stl |
PLA |
| Right Hand | Right_Hand.stl |
PLA |
Printer Settings:
├─ Nozzle Temperature: 210°C (PLA)
├─ Bed Temperature: 60°C
├─ Layer Height: 0.2mm (0.1mm for finger tips for detail)
├─ Infill: 40% (gyroid pattern for strength/weight ratio)
├─ Support: Yes (especially for finger undercuts)
├─ Print Speed: 50mm/s
├─ Total Print Time: ~40 hours
└─ Material Weight: ~250g PLA filament
- Print all components with support structures
- Remove supports carefully (palm/finger joints are delicate)
- Assemble fingers and attch to plam pivto points using 0.5mm fishing wire (for retarcking) and 2mm elastic string (for flexibility)
- Use super glue attach servos in palm housing
- Connect servo horns to finger linkages via fishing wire
- Mount arm cover shell with servo motor peeking through rear cavity
- Route wiring through forearm to the circuit
- Perform mechanical range-of-motion test before powering (zeroing all the motors while fingers are opened)
Detailed wiring documentation available in: Wire Mapping
┌─────────────────────────────────────────────┐
│ SERVO CONNECTIONS │
├──────────────┬──────────┬───────────────────┤
│ Servo Motor │ ESP32 │ Function │
├──────────────┼──────────┼───────────────────┤
│ Thumb │ GPIO 13 │ PWM Output │
│ Index │ GPIO 12 │ PWM Output │
│ Middle │ GPIO 14 │ PWM Output │
│ Ring │ GPIO 27 │ PWM Output │
│ Pinky │ GPIO 26 │ PWM Output │
│ GND (All) │ GND │ Common ground │
│ +5V (All) │ +5V Rail │ Servo power rail │
└──────────────┴──────────┴───────────────────┘
┌─────────────────────────────────────────────────────────────┐
│ SENSOR & INPUT CONNECTIONS │
├──────────────────┬──────────┬──────────┬────────────────────┤
│ Component │ Signal │ ESP32 │ Type │
├──────────────────┼──────────┼──────────┼────────────────────┤
│ EMG Sensor │ SIG │ GPIO 34 │ Analog Input (ADC) │
│ FSR Thumb │ SIG │ GPIO 36 │ Analog Input (ADC) │
│ FSR Index │ SIG │ GPIO 39 │ Analog Input (ADC) │
│ All Sensors │ GND │ GND │ Common ground │
│ EMG Sensors (+ve)│ +5V │ +5V Rail │ Servo power rail │
│ Both FSR Sensors │ +3.3V │ 3.3V │ Logic power │
└──────────────────┴──────────┴──────────┴────────────────────┘
Alexa/Google Assistant → SinricPro Cloud → WebSocket → ESP32
│
├─ Supported Gestures: 20+ hand poses
├─ Protocol: WebSocket (persistent connection)
├─ Commands: Natural language ("open hand", "make a fist", "point")
├─ Response Time: ~200-500ms (cloud processing)
└─ Offline Fallback: EMG sensor toggle control
┌──────────────────────────────────────────────────────────────────┐
│ POWER DISTRIBUTION SYSTEM │
├──────────────────────────────────────────────────────────────────┤
│ │
│ Power Bank (Dual Output) │
│ ├─ USB Port 1 (5V, 3A) ──► SERVO POWER RAIL (5V, 500mA+) │
│ │ ├─► MG90s Servo 1 (GPIO 13) │
│ │ ├─► MG90s Servo 2 (GPIO 12) │
│ │ ├─► MG90s Servo 3 (GPIO 14) │
│ │ ├─► MG90s Servo 4 (GPIO 27) │
│ │ ├─► MG90s Servo 5 (GPIO 26) │
│ │ └─► EMG Sensor V3.0 (GPIO 34) │
│ │ │
│ └─ USB Port 2 (3.3V, 1A) ──► LOGIC POWER RAIL (3.3V via ESP32) │
│ └─ ESP32 DevKit │
│ ├─ Wi-Fi Module (SinricPro) │
│ ├─ EMG Sensor V3.0 │
│ └─ FSR402 Sensors (GPIO 36, 39) │
│ │
└──────────────────────────────────────────────────────────────────┘
┌────────────────────────────────────────────────────────┐
│ POWER CONSUMPTION ANALYSIS │
├────────────────────────────────────────────────────────┤
│ │
│ SERVO RAIL (5V): │
│ • Idle (all open): 25-50mA (~250mW) │
│ • Single servo active: 100-150mA (~750mW) │
│ • All servos moving: 400-600mA (~3W) │
│ • Peak grip (all tight): 600-800mA (~4W) │
│ │
│ LOGIC RAIL (3.3V @ ESP32): │
│ • ESP32 idle: 80-100mA │
│ • Wi-Fi active: 150-200mA (peak) │
│ • EMG + FSR Sensors: 10-15mA │
│ • Total logic: 140-220mA │
│ │
│ BATTERY RUNTIME (Estimated): │
│ • Idle (servos open): ~100 hours │
│ • Mixed use (50% active): ~12-15 hours │
│ • Heavy use (all moving): ~5-7 hours │
│ │
└────────────────────────────────────────────────────────┘
- Activation: Muscle flex detected by EMG sensor
- Logic: Binary toggle (Open ↔ Close)
- Use Case: Rapid, frequent actions; no voice needed
- Reliability: High (no network dependency)
EMG Signal → Threshold Detection → Debounce (200ms)
→ State Toggle → Servo Movement → 2-3s Animation → Return to Idle
- Activation: Voice command via Alexa or Google Assistant
- Processing Pipeline:
- User speaks to Google Assistant: "Hey Google, turn on Prosthetic Hand" or "Hey Google, set prosthetic hand to Peace"
- SinricPro cloud processes command via WebSocket
- ESP32 receives gesture mode string (e.g., "fist", "peace", "point")
- Execute corresponding servo movement pattern
- Supported Commands: 20+ gestures including "Prosthetic Hand," "Point," "Peace," "Hook," "Thumbs Up," "OK," "Gun,"
- Purpose: Prevent over-gripping & crushing delicate objects
- Implementation:
- FSR sensors in fingertips detect force
- Once force exceeds threshold (2000 units), grip stops tightening
- Maintains constant pressure automatically
- Arduino IDE (Download)
- ESP32 Board Support installed via Board Manager
- SinricPro Account (Free) - Create at https://sinric.pro
- Amazon Alexa or Google Home device (or mobile app)
- Wi-Fi Network with 2.4GHz support (5GHz not recommended for ESP32)
Install via Arduino Library Manager (Sketch → Include Library → Manage Libraries):
| Library | Author | Purpose |
|---|---|---|
ESP32Servo |
Kevin Harrington | PWM servo control for MG90s motors |
SinricPro |
Boris Jaeger | IoT cloud integration for voice control |
WebSockets |
Markus Sattler | WebSocket communication with SinricPro |
ArduinoJson |
Benoit Blanchon | JSON parsing for SinricPro messages |
-
Create a free account at https://sinric.pro
-
Create a new Device Template → Select "Speaker" device type
-
Add two capabilities: "Power" & "Mode". Configure "Mode" Capability
-
Create a new Device → Select "Krtrimahastah_Template" device type
-
Note your credentials:
-
Link SinricPro to Amazon Alexa or Google Home:
- Open Alexa/Google Home app
- Search for "SinricPro" skill and enable
- Discover devices
-
Add credentials to firmware configuration
1. Assemble 3D-printed hand structure (see 3D Model Components)
2. Mount 5 MG90s servos inside palm housing
3. Attach servo horns to finger linkages
4. Solder power supply rails on breadboard (5V servo, 3.3V logic)
5. Wire all components according to Master Pinout (see Wire Mapping section)
6. Mount ESP32 DevKit inside arm cover
7. Connect power bank via USB cables
8. Perform visual inspection for short circuits# Clone the repository
git clone https://github.com/harshitt13/Krtrimahastah.git
cd Krtrimahastah
# Open Arduino IDE
1. File → Open → firmware/prosthetic_hand_improved.ino
2. Board: ESP32 Dev Module
3. Port: COM3 (or your ESP32 port)Edit main/main.ino and update:
#define WIFI_SSID "Your_Wi-Fi_SSID"
#define WIFI_PASS "Your_Wi-Fi_Password"
#define APP_KEY "YOUR_APP_KEY" // From SinricPro Dashboard
#define APP_SECRET "YOUR_APP_SECRET" // From SinricPro Dashboard
#define DEVICE_ID "YOUR_DEVICE_ID" // From your SinricPro device1. Verify code (Sketch → Verify)
2. Upload to ESP32 (Sketch → Upload)
3. Open Serial Monitor (Tools → Serial Monitor, 115200 baud)
4. Press Reset button on ESP32
5. Observe startup messages and Wi-Fi connection
6. Say "Hey Google, discover devices" to find your prosthetic hand
7. Test voice commands: "Hey Google, turn on Prosthetic Hand"
8. Test EMG mode by flexing muscles
9. Verify all 5 fingers move smoothly
EMG Sensor Tuning:
├─ Flex muscle & note ADC reading
└─ Set EMG_THReshold to ADC reading
FSR Sensor Tuning:
├─ Press fingertip & note ADC reading
├─ Set FSR_LIMIT to safe threshold (default 4000)
└─ Test grip on soft object to verify cutoff
Servo Angle Tuning:
├─ Adjust MAX_TP (thumb & pinky angle)
├─ Adjust MAX_OTHERS (index, middle, ring finger angle)
└─ Test all gestures for smooth motion1. Say "Hey Google, turn on Prosthetic Hand" or "Hey Google, set prosthetic hand to peace"
2. SinricPro processes command and sends to ESP32
3. Hand executes the gesture smoothly
4. Stays in gesture until new command or EMG override
Supported Hey Google Commands:
Functional Gestures:
├─ "Hey Google, turn on/off Prosthetic Hand" → ON/OFF Prosthetic Hand
├─ "Hey Google, set prosthetic hand to Hook" → Hook grip (all fingers curled except thumb)
└─ "Hey Google, set prosthetic hand to Grab" → Grab the object (All fingers closed)
Social Gestures:
├─ "Hey Google, set prosthetic hand to Open" → All fingers extended
├─ "Hey Google, set prosthetic hand to Point" → Index finger pointing
├─ "Hey Google, set prosthetic hand to Two" → Peace sign (index + middle)
├─ "Hey Google, set prosthetic hand to Three" → Three fingers up
├─ "Hey Google, set prosthetic hand to Four" → Four fingers up
├─ "Hey Google, set prosthetic hand to Thumbs Up" → Thumbs up gesture
├─ "Hey Google, set prosthetic hand to OK" → OK sign (thumb + index circle)
├─ "Hey Google, set prosthetic hand to Love" → there's no love, forget her bro
├─ "Hey Google, set prosthetic hand to Gun" → Finger gun
├─ "Hey Google, set prosthetic hand to Call" → Call me gesture
├─ "Hey Google, set prosthetic hand to Fuck Off" → no one have enemies
└─ "Hey Google, set prosthetic hand to Pinky" → Pinky promise
Control:
├─ "Hey Google, turn on Hand" → Enable EMG control
└─ "Hey Google, turn off Hand" → Disable EMG control
1. Ensure EMG sensor strap is worn around forearm
2. Relax arm at rest
3. Flex muscle briefly (1-2 second contraction)
4. Hand gesture toggles (Open ↔ Close)
5. No voice required; works offline
Gesture Sequence:
├─ Open → Flex → Close
├─ Close → Flex → Open
└─ Debounce: 200ms (ignores multiple quick flexes)
Safety is automatic via FSR sensors:
→ If FSR detects force > 4000 units, fingers stop automatically
→ Triggers SAFETY_STOP state
→ All fingers will stop at their current position and will only move if the sensor detects less force or either it's an opening command.
Manual Reset:
→ Send "Open" command via Hey Google
→ Or use EMG sensor to toggle open
Krtrimahastah/
├── .dist/ # Build output (if present)
├── README.md # Project documentation
├── LICENSE # MIT License
├── main/
│ └── main.ino # Main ESP32 firmware (682 lines)
├── public/ # Static assets (if present)
└── hardware/
├── 3d-models/
│ ├── Hand Layout.stl # Full assembly reference
│ ├── Hand.stl # Palm structure
│ ├── Finger_Thumb.stl # Thumb digit
│ ├── Finger_Index.stl # Index finger
│ ├── Finger_Middle.stl # Middle finger
│ ├── Finger_Ring.stl # Ring finger
│ ├── Finger_Pinky.stl # Pinky finger
│ ├── Arm_Cover.stl # Forearm enclosure
│ ├── Hand_print_layout.stl # Print nesting guide
│ └── Right_Hand.stl # Mirror version
├── schematics/
│ └── Prosthetci Hand Schematic.png # Circuit diagram
└── wiring/
└── Wire Mapping for the Development of a Low-Cost Prosthetic Hand.xlsx # Detailed pinout & connection matrix
- ESP32 Documentation: https://docs.espressif.com/projects/esp-idf/
- SinricPro Documentation: https://sinricpro.github.io/esp8266-esp32-sdk/
- Servo Motor Control: https://randomnerdtutorials.com/esp32-servo-motor/
- Myoware Muscle Sensor User-Manual https://robu.in/wp-content/uploads/2019/02/Muscle-Sensor-v3-Users-Manual.pdf/
This project is licensed under the MIT License - see the LICENSE file for details.
Permission is granted for personal, educational, and commercial use with proper attribution.
IMPORTANT: This is a research prototype and NOT a medically certified device.
⚠️ Not intended for medical/therapeutic use without proper regulatory approval⚠️ Strength and safety capabilities vary widely based on component quality and assembly accuracy⚠️ Do not use with high-pressure/high-risk gripping tasks⚠️ Servo motors can pinch fingers; always supervise use around children⚠️ Battery may overheat if damaged; inspect regularly for swelling⚠️ Wi-Fi connectivity may drop; EMG control serves as offline backup⚠️ Test all safety features before extended use
The author and contributors assume NO LIABILITY for injuries, property damage, or adverse outcomes resulting from the use or misuse of this device.
- GitHub Issues: Report bugs or request features
- Email: find.harshitkushwaha@gmail.com
Making prosthetics affordable, intelligent, and accessible to all. 🤖




