Skip to main content

Case 10: Gesture-Controlled Robotic Arm

Case Introduction

Build a gesture-controlled robotic arm and control the robotic arm's movements through gestures.

Teaching Preparation

NameIllustration
Nezha Pro AI Mechanical Power Kit

Teaching Objectives

  1. Complete the assembly of the gesture-controlled robotic arm, master the assembly and connection methods of the robotic arm's joints (including servos), gripping components, and gesture recognition sensor, and realize the control of the robotic arm's joint rotation and gripping actions through gestures.
  2. Understand the "multi-joint collaboration" feature of the robotic arm, recognize the correspondence between gesture recognition and joint movements, and learn to program to set the rotation angles of different joints.
  3. During the process of debugging joint rotation ranges and gripping component tightness, cultivate hands-on ability, spatial logical thinking, and problem-solving ability, and learn to solve problems such as unstable gripping of the robotic arm and joint jamming.
  4. Stimulate interest in robotics technology, perceive the possibility of "robotic arms replacing human hands", and establish the cognition that "technology extends human capabilities".

Story Introduction

After cleaning up the gravel, everyone went to the damaged warehouse. Parts on the shelves were scattered all over the floor, and Qiaoshou (Skillful Hand), the robotic arm in charge of organizing, was standing with its arms hanging down, in a daze. "It was supposed to grab different parts according to gestures!" The warehouse manager sighed while holding a screw. "Now it can't even hold the lightest nut." Aji manipulated the joints of the robotic arm: "Look at these 3-degree-of-freedom joints—they’re just like the human shoulder, elbow, and wrist. You need to make it re-understand the gesture codes for 'grab' and 'release'."

Learning Exploration

  1. How many movable joints does the robotic arm have? Which component (e.g., servo) controls each joint? Try using different gestures (e.g., waving the left hand = controlling the upper arm, waving the right hand = controlling the forearm) to control different joints respectively. How to ensure no conflicting movements?
  2. What determines the gripping force of the robotic arm? (e.g., servo torque, material of the gripping component) If the gripping force is too strong, will it damage the "gripped object" (e.g., foam block)? How to adjust this through programming?
  3. If a certain joint of the robotic arm fails to reach the preset angle, what might be the causes? (e.g., insufficient servo power, jammed joint components)
  4. Compare the structures of the human arm and the robotic arm. Which parts of the human arm do the robotic arm's joints simulate (e.g., shoulder, elbow, wrist)? What are the differences in flexibility between the two?

Assembly Steps

Hardware Connection

Connect the gesture recognition sensor to the IIC interface of the Nezha Pro Expansion Board, and connect the three smart motors to the M1, M2, and M3 interfaces of the Nezha Pro Expansion Board respectively.

Code Programming

Go to "makecode.microbit.org" and click New Project.

Enter the project name in the pop-up window and click Create.

Click Extensions in the code drawer.

In the pop-up interface, enter nezha pro and click the search icon. After the nezha pro software library appears, click it. Load the PlanetX software library in the same way.

Sample Program

Program link: https://makecode.microbit.org/_XVCJ9rAWb2ex

You can also download the program directly through the following webpage.

Program Download

Use a USB cable to connect the PC and micro:bit V2.

After successful connection, a drive named MICROBIT will be recognized on the computer.

Click the icon at the bottom left and select Connect Device.

Click .

Click .

In the pop-up window, select BBC micro:bit CMSIS-DAP, then select Connect. Now, the micro:bit has been successfully connected.

Click Download Program

Case Demonstration

After turning on the power, control the robotic arm's movements through gestures.

Extended Knowledge

  1. Applications of industrial robotic arms: Industrial robotic arms are widely used in automotive manufacturing (e.g., welding, assembly), electronic production (e.g., chip handling), and food processing (e.g., packaging). They can perform high-precision and repetitive tasks, improving production efficiency.
  2. Control technologies for robotic arms: In addition to gesture control, industrial robotic arms also operate through programming control (preset movements), visual control (locating objects via cameras), and force feedback control (sensing gripping force). The gesture control in this case is a simplified form of "human-computer interaction control".
  3. Flexible robotic arms: To avoid damaging fragile objects (e.g., fruits, glass), scientists have developed flexible robotic arms (made of soft materials). Combined with gesture control, they can be used in fields such as medicine (e.g., minimally invasive surgery) and agriculture (e.g., fruit picking), reflecting the "humanized" trend in mechanical design.