Gesture-controlled robotic hand
When I curl a finger in front of my webcam, the same finger curls on the robotic hand I designed.


Try it
Choose Use sliders, then Fist. Move one finger slider to see which finger opens.

A model of my robotic hand. Your webcam drives it the way mine drives the real one.
Photo-based model with estimated dimensions and joint motion. No hardware is connected.
- Role
- Personal projectMechanicalElectricalSoftware
- Timeline
- Apr 2026
- Tools
- OpenCV, MediaPipe, Python, Arduino Uno
- Actuators
- Five finger servos, one wrist servo and a PCA9685 servo driver
- Status
- I can curl each finger independently and turn the wrist by moving my hand sideways.
How it's built
I designed the printed hand, wired its servos and mapped webcam gestures to joint commands in Python.
A fist only needs one command if every finger closes together. Pointing takes more control. The index finger has to stay open while the others curl, and the thumb moves across the palm. I gave each digit its own command and used a sixth command for the wrist. In the interactive model you can start with a fist, release the index finger and leave the other fingers where they are.
Tendon-driven fingers
Strings curl the PLA fingers. Each servo draws in its string to bend a finger. When the servo releases tension, elastic straightens the finger again. That return path lets one actuator close and open a digit. The side view of a bent finger is where both parts of the mechanism can be seen together.
Four MG996R servos pull the fingers, an SG90 moves the thumb and a fifth MG996R turns the wrist. The forearm photo shows where the servo frame sits relative to the palm. The wrist motor turns the assembly while the other five channels retain their finger positions, so turning the hand and opening it are independent commands.
Servo power and pulse limits
An XL4015 buck converter supplies the servos with 6 V from a 3S LiPo. On the signal side, the Arduino Uno receives six target angles over serial at 9600 baud and tells the PCA9685 which pulses to generate. The laptop can work in angles while the Arduino handles the pulse range for each actuator.
Each servo channel has its own pulse limits, with a narrower range for the thumb. A completely closed thumb and a completely closed index finger therefore have the same meaning to the tracking software but use different limits at the driver.
From webcam landmarks to a grasp
OpenCV captures a frame and MediaPipe marks my wrist, knuckles and fingertips. My Python code compares the distance from wrist to fingertip with the distance from wrist to knuckle. Both distances grow when I bring my hand closer to the lens. Their ratio gives the controller a curl measurement that depends less on the size of my hand in the image.
For the thumb I check whether the tip has crossed the knuckle line. I use horizontal movement of my hand in the frame to command the wrist. Before sending the six angles to the Uno, the software limits each smoothing step to 12 degrees and snaps commands near the ends of travel. If the camera loses sight of my hand, it holds the last pose for 15 frames, then eases the fingers open and centres the wrist.
Testing
A separate test script cycles the servos without webcam input. Manual mode lets me move one servo at a time. Moving one channel makes it possible to follow a single command from the serial link to the corresponding digit. With the camera connected, I can curl each finger independently and turn the wrist by moving my hand sideways.
| Channel | Manual | Webcam |
|---|---|---|
| Thumb | Pending | Pending |
| Index | Pending | Pending |
| Middle | Pending | Pending |
| Ring | Pending | Pending |
| Little | Pending | Pending |
| Wrist | Pending | Pending |
Links
Source codeCode on GitHub
Interactive demoTry the demo
Project6-DOF robotic arm



