This repository contains the firmware and Python tools for controlling the NML Hand Exoskeleton—a modular, open-source robotic hand exoskeleton platform for research and prototyping.
The NML Hand Exoskeleton includes:
- 🦾 Microcontroller firmware (Arduino/C++): real-time motor control and communication.
- 🐍 Python API: high-level interface for controlling the device.
- 🛠️ Demo scripts: examples of using the device with real-time EMG streaming and GUI control.
Code was tested on Windows 11, Python 3.10.
git clone https://github.com/Neuro-Mechatronics-Interfaces/NML_Hand_Exo.git
cd NML_Hand_Exo
Choose one of the following methods to create a virtual environment for this project:
- Using Anaconda :
conda create -n handexo conda activate handexo
- or using Python's virtualenv:
python3 -m venv .handexo source .handexo/bin/activate # On Linux/Mac call .handexo/Scripts/activate # On Windows
pip install -r requirements.txt
For local development, you can also install the python API as a package
pip install -e .
The exo device uses an openRB-150 microcontroller from ROBOTIS. The firmware is located in src/cpp/nml_hand_exo
and can be uploaded via the Arduino IDE.
The firmware includes a class NMLHandExo, which handles:
- Dynamixel initialization and setup
- Motor control by ID, name, or alias
- Joint limits and angle-to-position conversion
- Calibration and LED feedback
- Serial command parsing
To upload the firmware:
- Open
nml_hand_exo.ino
in the Arduino IDE. - Select the correct board and port under Tools.
- Upload the sketch.
An example of using the Python API for scripting and control:
from nml_hand_exo.hand_exo import HandExo
exo = HandExo('COM3', baudrate=57600)
exo.enable_motor(1)
exo.set_motor_angle(1, 45)
angle = exo.get_motor_angle(1)
print(f"Motor angle: {angle} degrees")
exo.disable_motor(1)
You can control the hand exoskeleton over USB or Bluetooth using simple, structured serial commands. For example:
-
set_angle:WRIST:30
— set wrist motor to 30 degrees. -
enable:1
— enable motor 1 torque. -
get_angle:1
— query relative angle.
Supported aliases are THUMB
, INDEX
, MIDDLE
, RING
, PINKY
, WRIST
For a complete list of commands, see the Usage Guide.
A demo script is included to showcase real-time plotting of EMG signals from a connected MindRove EMG band.
- Connect your MindRove EMG Band to the PC (using a Wifi dongle if you want to maintain internet connection on a separate wifi network)
- Run the demo script
python demo_mindrove_realtime.py
If you use this project in your research, please cite it as:
Jonathan Shulgach & Kriti Kacker. (2025). NML Hand Exoskeleton [Computer software]. https://github.com/yourusername/NML_Hand_Exo
BibTeX:
@misc{shulgach_kacker_2025_nmlhandexo,
author = {Jonathan Shulgach and Kriti Kacker},
title = {NML Hand Exoskeleton},
year = {2025},
publisher = {GitHub},
journal = {GitHub repository},
howpublished = {\url{https://github.com/yourusername/NML_Hand_Exo}}
}
## License
This project is licensed under the MIT License.