Skip to main content

Case 2: Bipedal Walking Robot

Case Introduction

Build a bipedal walking robot. Through a basic linkage mechanism, realize the simple walking movement of the bipedal robot.

Teaching Preparation

NameIllustration
Nezha Pro AI Mechanical Power Kit

Teaching Objectives

  1. Complete the assembly of the bipedal walking robot, master the assembly skills of the linkage mechanism for the bipedal legs, correctly connect and debug the motors, and realize the basic walking movement of the robot.
  2. Understand the balance principle of bipedal walking, recognize the role of the linkage mechanism in simulating human/animal leg movements, and distinguish the structural differences between bipedal and quadrupedal walking.
  3. During the process of debugging the robot's balance and walking rhythm, improve logical thinking ability and patience, and learn to solve the problem of unstable walking by adjusting motor speed and linkage angle.
  4. Perceive the technical difficulties of bipedal walking robots, and stimulate interest in exploring human movement mechanics and robot control technology.

Story Introduction

After repairing Tiedan, the group had just walked into the village square when they heard a loud "clang". Upright, the bipedal robot in charge of the flag-raising ceremony, was hitting the flagpole with its head, its two legs as stiff as wooden sticks. "It used to be able to walk like a human!" The robot baker ran over holding a burnt gear-shaped bread. "After the system failure yesterday, its knee joints got locked." Aji (the guide robot) projected a slow-motion video of human walking: "See that? When walking, one leg supports the body, and the other swings like a pendulum. You need to install flexible, rotatable knee joints for Upright."

Learning Exploration

  1. Why is a bipedal robot more prone to "falling over" than a quadrupedal robot? How to improve stability by adjusting the structure or motor parameters?
  2. What is the connection between the forward and reverse rotation of the motor and the "stepping" movement of the robot's legs? Try setting the time interval for the alternating rotation of the motors and observe whether the robot can achieve continuous walking.
  3. If the robot can only walk tilted to one side, what might be the causes? (e.g., inconsistent linkage lengths on both sides, different motor speeds)

Assembly Steps

Hardware Connection

Connect the two smart motors to the 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/_ffgi7UXiHEL8

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, the bipedal robot walks forward and automatically retreats when encountering obstacles.

Extended Knowledge

  1. Balance control of bipedal robots: Real-world bipedal robots (such as Honda ASIMO) use gyroscopes and accelerometers to detect body posture in real time, then adjust leg movements to maintain balance. This case simulates basic balance through a simplified linkage structure.
  2. Mechanical principles of human walking: When humans walk, the body's center of gravity moves slightly up and down with leg movements. Bipedal robots need to coordinate linkages and motors to minimize fluctuations in the center of gravity and avoid falling.
  3. Applications of bipedal robots: In the future, bipedal robots may be used for home services (e.g., companionship, cleaning) and operations in dangerous environments (e.g., post-disaster rescue). They can move flexibly in "biped-friendly" scenarios in human life (e.g., stairs, narrow passages).