# josephulrich/emg-myoelectric-prosthetic-hand architecture

> Architecture diagram of the GitHub repository josephulrich/emg-myoelectric-prosthetic-hand, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-14). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/josephulrich/emg-myoelectric-prosthetic-hand
- Repository: https://github.com/josephulrich/emg-myoelectric-prosthetic-hand

## Overview

This repository documents an EMG-controlled, 3D-printed prosthetic hand. The principal workflow runs from forearm muscle activity through MyoWare sensing and integrated ESP32 firmware to servo-driven finger motion, with pressure sensing and haptic, visual, and audio feedback. CAD and printable parts represent the mechanical design and fabrication branch. The source excerpts were unavailable, so relationships below are limited to those explicitly described in the README; standalone subsystem sketches are not treated as part of the integrated runtime.

Main entry points: [`firmware/firmware.ino`](https://github.com/josephulrich/emg-myoelectric-prosthetic-hand/blob/main/firmware/firmware.ino) (Decision logic), [`Prosthetic Arm Files/STL Files for 3D Printed Arm/Printable Files 4.0`](https://github.com/josephulrich/emg-myoelectric-prosthetic-hand/tree/main/Prosthetic%20Arm%20Files/STL%20Files%20for%203D%20Printed%20Arm/Printable%20Files%204.0) (Printed hand), [`Prosthetic Arm Files/Prosthetic Arm Updated CAD Model - SolidWorks 2019/Full Assembly.SLDASM`](https://github.com/josephulrich/emg-myoelectric-prosthetic-hand/blob/main/Prosthetic%20Arm%20Files/Prosthetic%20Arm%20Updated%20CAD%20Model%20-%20SolidWorks%202019/Full%20Assembly.SLDASM) (Hand CAD)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_sensing["Sensing"]
  node_myoware["MyoWare EMG"]
  node_fsr["FSR pressure sensor"]
  node_bmp["BMP280 sensor"]
  node_pot["Potentiometer"]
end

subgraph group_firmware["Embedded control"]
  node_acquisition["Signal acquisition<br/>[firmware.ino]"]
  node_decision["Decision logic<br/>[firmware.ino]"]
  node_pca["PCA9685 driver<br/>[firmware.ino]"]
end

subgraph group_mechanics["Mechanical system"]
  node_servos["Finger servos"]
  node_hand["Printed hand"]
  node_cad["Hand CAD"]
end

subgraph group_feedback["User feedback"]
  node_vibration["Vibration motor"]
  node_buzzer["Passive buzzer"]
  node_led["WS2812B LED strip"]
end

node_muscle(("Forearm muscle"))

node_muscle -->|"generates activity"| node_myoware
node_myoware -->|"analog signal"| node_acquisition
node_fsr -->|"ADC reading"| node_acquisition
node_bmp -->|"I2C reading"| node_acquisition
node_pot -->|"ADC reading"| node_acquisition
node_acquisition -->|"provides EMG level"| node_decision
node_decision -->|"sends servo commands"| node_pca
node_pca -->|"PWM control"| node_servos
node_servos -->|"pull tendons"| node_hand
node_cad -->|"defines geometry"| node_hand
node_decision -->|"drives feedback"| node_vibration
node_decision -->|"drives feedback"| node_buzzer
node_decision -->|"drives feedback"| node_led
node_fsr -.->|"contact can trigger"| node_vibration

click node_acquisition "https://github.com/josephulrich/emg-myoelectric-prosthetic-hand/blob/main/firmware/firmware.ino"
click node_decision "https://github.com/josephulrich/emg-myoelectric-prosthetic-hand/blob/main/firmware/firmware.ino"
click node_pca "https://github.com/josephulrich/emg-myoelectric-prosthetic-hand/blob/main/firmware/firmware.ino"
click node_hand "https://github.com/josephulrich/emg-myoelectric-prosthetic-hand/tree/main/Prosthetic%20Arm%20Files/STL%20Files%20for%203D%20Printed%20Arm/Printable%20Files%204.0"
click node_cad "https://github.com/josephulrich/emg-myoelectric-prosthetic-hand/blob/main/Prosthetic%20Arm%20Files/Prosthetic%20Arm%20Updated%20CAD%20Model%20-%20SolidWorks%202019/Full%20Assembly.SLDASM"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_myoware,node_fsr,node_bmp,node_pot toneBlue
class node_acquisition,node_decision,node_pca toneAmber
class node_servos,node_hand,node_cad toneMint
class node_vibration,node_buzzer,node_led toneRose
class node_muscle toneIndigo
```

## Components

### Sensing

- **MyoWare EMG**
- **FSR pressure sensor**
- **BMP280 sensor**
- **Potentiometer**

### Embedded control

- [Signal acquisition](https://github.com/josephulrich/emg-myoelectric-prosthetic-hand/blob/main/firmware/firmware.ino): `firmware/firmware.ino`
- [Decision logic](https://github.com/josephulrich/emg-myoelectric-prosthetic-hand/blob/main/firmware/firmware.ino): `firmware/firmware.ino`
- [PCA9685 driver](https://github.com/josephulrich/emg-myoelectric-prosthetic-hand/blob/main/firmware/firmware.ino): `firmware/firmware.ino`

### Mechanical system

- **Finger servos**
- [Printed hand](https://github.com/josephulrich/emg-myoelectric-prosthetic-hand/tree/main/Prosthetic%20Arm%20Files/STL%20Files%20for%203D%20Printed%20Arm/Printable%20Files%204.0): `Prosthetic Arm Files/STL Files for 3D Printed Arm/Printable Files 4.0`
- [Hand CAD](https://github.com/josephulrich/emg-myoelectric-prosthetic-hand/blob/main/Prosthetic%20Arm%20Files/Prosthetic%20Arm%20Updated%20CAD%20Model%20-%20SolidWorks%202019/Full%20Assembly.SLDASM): `Prosthetic Arm Files/Prosthetic Arm Updated CAD Model - SolidWorks 2019/Full Assembly.SLDASM`

### User feedback

- **Vibration motor**
- **Passive buzzer**
- **WS2812B LED strip**

### Other components

- **Forearm muscle**

## Connections

- Forearm muscle → MyoWare EMG: generates activity (evidence: `README.md`)
- MyoWare EMG → Signal acquisition: analog signal (evidence: `README.md`)
- FSR pressure sensor → Signal acquisition: ADC reading (evidence: `README.md`)
- BMP280 sensor → Signal acquisition: I2C reading (evidence: `README.md`)
- Potentiometer → Signal acquisition: ADC reading (evidence: `README.md`)
- Signal acquisition → Decision logic: provides EMG level (evidence: `README.md`)
- Decision logic → PCA9685 driver: sends servo commands (evidence: `README.md`)
- PCA9685 driver → Finger servos: PWM control (evidence: `README.md`)
- Finger servos → Printed hand: pull tendons (evidence: `README.md`)
- Hand CAD → Printed hand: defines geometry (evidence: `README.md`)
- Decision logic → Vibration motor: drives feedback (evidence: `README.md`)
- Decision logic → Passive buzzer: drives feedback (evidence: `README.md`)
- Decision logic → WS2812B LED strip: drives feedback (evidence: `README.md`)
- FSR pressure sensor → Vibration motor: contact can trigger (evidence: `README.md`)
