Robotic Hand
Last updated
Was this helpful?
Last updated
Was this helpful?
In this project, we integrate multiple servo motors with a microcontroller to replicate human hand movements. The primary goal is to control a 3D-printed robotic hand using intuitive hand gestures. These gestures are captured, processed, and translated by the microcontroller into precise commands for the servo motors, enabling them to mimic the natural motion of human hand joints. The system demonstrates the seamless interaction between gesture recognition and robotic actuation, paving the way for innovative applications in robotics and human-machine interaction.
The following components will be prepared in the kit for this project:
A breadboard
A STEPico microcontroller
Multiple jumper wires
5 SG90 servos
A USB cable
3d printed hand model kit (optional)
In this project, we will further adjust serial communication to enable it to transmit more data in addition to character and binary representation. At the same time, a new type of hardware, servo, will be added to the system. The servo is also controlled by a microcontroller, which outputs hand-related information through the computer. The microcontroller sends a signal to make the servo operate to a specified angle, thereby simulating the movement of the hand joints.
In this project, we will control five servos to simulate hand gestures, so we need to map the servo signal lines to the corresponding GPIO ports one by one. Here, we choose to use GP16 to GP20 in order from thumb to little finger.
To facilitate the reception of serial communication data and streamline upcoming calculations, we import the following modules:
The PWM (Pulse Width Modulation) module in MicroPython is an integral part of its control functions, providing users with the ability to manage devices and signals with precision. The importance of this module lies in its comprehensive capabilities, enabling various applications such as motor control, LED brightness adjustments, and more. By incorporating PWM, there is no need for the installation of additional modules, streamlining the development process and optimizing resource utilization.
To ensure proper coordination between finger joints and servos, we will assign each GPIO port to a specific finger.
Define a PWM variable for each servo as follows: servo_pwm5 = PWM(servo_pinky)
through servo_pwm1 = PWM(servo_thumb)
. The PWM()
function creates a PWM object, enabling PWM signal generation on microcontroller pins.
The hand model contains six parts: five fingers and one palm with servo connectors on it.
This is a left-handed model, where the index finger and the ring finger shares the same 3d model.
To assembly the hand, first connect the finger base and the servo arm with screws, the screws could be found in servo's component beg
After connecting the finger and the servo arm, connect the servo arm to the servo.
After connecting all the servo arms and servos, place them onto the connectors on the palm. Be sure to arrange the signal and power wires properly.
The first function, finger_angle
, calculates the bending angle of a finger based on its metacarpophalangeal (MCP), proximal interphalangeal (PIP), and distal interphalangeal (DIP) joints. It computes the angle by evaluating the positions of the corresponding landmarks and returns it as a numerical value, providing a precise measure of finger flexion.
The second function, count_fingers_states
, calculates and stores the bending angles of all five fingers, from the thumb to the pinky, by analyzing the handβs landmarks. It calls finger_angle
for each finger, determining the angles of the relevant joints. The result is a list of five floating-point numbers, each representing the current bending angle of one finger joint. This list can be used to track finger states in real-time, enabling more advanced gesture recognition and interaction.
These functions allow for real-time tracking of finger joint angles, which is useful for gesture recognition and other interactive applications.
After you complete the project, the result looks like the following:
The Artificial Intelligence Learning (AI) + Machine Learning Kit
Instruction and resources
3D Printable Model