In the 12th week of Fab Academy’s “Mechanical Design” assignment, we were tasked with designing and building a machine that includes a mechanism, actuation, automation, and application. According to the assignment requirements, the first phase focuses on structural design and manual operation. Based on my interests and skills, I decided to design and fabricate a desktop quadruped robot.
Although I was unable to form a team with current Fab Academy classmates due to personal reasons, I took the initiative to invite my friend Harvey Pan to collaborate on this task. He is currently studying mechanical engineering and plans to join Fab Academy next year. In our collaboration, I was mainly responsible for design, modeling, 3D printing, and structural assembly, while he focused on motion mechanism design and mechanical calculations.
While determining the project topic, we referred to a variety of open-source robotics projects and industrial design cases, including Boston Dynamics’ Spot biomimetic robot, global Arduino Quadruped projects, and my personal preference for “biomechanical aesthetics.”
We chose a quadruped robot as our design goal for the following reasons:
Name | Academic Background | Main Responsibilities |
---|---|---|
Lynch Li (myself) | Industrial Product Design | Project topic proposal, early concept and sketches, structural design, 3D printing, assembly, spatial layout of electronics |
Harvey Pan | Mechanical Engineering | Kinematic analysis, servo arrangement logic, leg DOF design, SolidWorks modeling and technical evaluation |
We adopted a remote collaboration method: online sketching, voice discussions, file sharing, and local fabrication. We communicated via Tencent Meeting, WeChat, and shared documents, revising the leg joint layout four times before finalizing a 2 DOF per leg design.
✅ This Week (Phase 1: Mechanical Design):
🔁 Future Plans (Phase 2: Automation and Application):
We started by discussing multiple design options through hand-drawn sketches, focusing on the following questions:
We finally decided on a 2 DOF quadruped structure, with each leg driven by two SG90 servos—one controlling the hip joint (horizontal swing) and the other controlling the knee joint (vertical lift). Harvey took charge of translating these sketches into SolidWorks models, continuously checking with me on the manufacturability of the appearance and structure.
Servo ID | Position | Controlled Joint |
---|---|---|
S1 | Left front knee | Leg lift |
S2 | Left front hip | Horizontal swing |
S3 | Right front knee | Leg lift |
S4 | Right front hip | Horizontal swing |
S5 | Left rear knee | Leg lift |
S6 | Left rear hip | Horizontal swing |
S7 | Right rear knee | Leg lift |
S8 | Right rear hip | Horizontal swing |
I initially used the lab’s FDM 3D printer to print all parts, including:
However, during assembly testing, I encountered a serious issue: the dimensional tolerance of the FDM prints was too large, especially the servo mounting holes. The connection plates for the claws could either not fit at all or were too loose in the horizontal and vertical directions.
I tried the following adjustments:
Despite these attempts, the print precision still failed to meet the requirements of the mechanical structure.
Eventually, I switched all mechanical claw components—i.e., parts requiring high-precision fit with servos—to SLA resin printing. Details are as follows:
The results were very satisfying: extremely high print accuracy, perfect snap-fit, smooth surface with no layer lines, and tight, seamless assembly.
I completed the assembly of all parts and ensured the following:
After completing the structural assembly and standing stability test, I moved on to the second phase of the quadruped robot project: making the structure move and implementing basic motion logic through automated control.
For this phase, I chose the following setup:
Microbit_Motor1
control library support)Reasons for selection:
servo(Sn, angle)
command for servo control, making the logic easier to implement.The servo numbering scheme was defined during the structural design phase. The details are as follows (referencing the top-down structural diagram):
Servo ID | Controlled Part | Function |
---|---|---|
S1 | Left front knee | Leg lift |
S2 | Left front hip | Forward swing |
S3 | Right front knee | Leg lift |
S4 | Right front hip | Forward swing |
S5 | Left rear knee | Leg lift |
S6 | Left rear hip | Forward swing |
S7 | Right rear knee | Leg lift |
S8 | Right rear hip | Forward swing |
I adopted a layout in which even-numbered servos control knee joints (vertical lift) and odd-numbered servos control hip joints (horizontal swing). This mapping makes it easier to organize and program motion sequences.
I began by creating the following function structure:
DF_Initial_state()
: Set all servos to 90° neutral positionDF_Standing()
: Set legs into a crouched standing pose (preparation for gait)DF_Lying_down()
: Simulate a lying/squatting postureDF_Move_forward_action_X()
: Define four-frame forward walking sequence: A ~ DThese motion functions control each servo individually using esp.servo(Sn, angle)
.
Referring to diagonal gait patterns in real quadrupeds, I defined a full cycle as:
A → B → C → D → (loop)
Frame | Core Motion Description |
---|---|
A | Lift left front + right rear leg → swing |
B | Legs land and push forward |
C | Lift right front + left rear leg → swing |
D | Legs land and complete forward propulsion |
DF_Initial_state()
: Servo Initializationvoid DF_Initial_state() {
esp.servo(S1, 90); // Left front knee
esp.servo(S2, 90); // Left front hip
esp.servo(S3, 90); // Right front knee
esp.servo(S4, 90); // Right front hip
esp.servo(S5, 90); // Left rear knee
esp.servo(S6, 90); // Left rear hip
esp.servo(S7, 90); // Right rear knee
esp.servo(S8, 90); // Right rear hip
}
Used for zeroing servo positions after power-on to avoid erratic behavior or self-triggering.
DF_Standing()
: Ready Postureesp.servo(S1, 135);
esp.servo(S2, 135);
esp.servo(S3, 45);
esp.servo(S4, 45);
Forms a balanced, crouched stance for starting the next leg movement.
DF_Lying_down()
: Crouch Simulationesp.servo(S1, 90);
esp.servo(S2, 135);
Used to demonstrate controlled resting action and test servo angle limits.
[A] Lift left front + right rear → swing
esp.servo(S1, 105);
esp.servo(S2, 165);
esp.servo(S7, 15);
esp.servo(S8, 165);
[B] Legs land → push forward
esp.servo(S1, 135);
esp.servo(S2, 105);
esp.servo(S7, 45);
esp.servo(S8, 105);
[C] Lift right front + left rear → swing
esp.servo(S3, 15);
esp.servo(S4, 15);
esp.servo(S5, 105);
esp.servo(S6, 15);
[D] Legs land → push forward
esp.servo(S3, 45);
esp.servo(S4, 45);
esp.servo(S5, 135);
esp.servo(S6, 75);
void setup() {
DF_Initial_state();
delay(2000);
DF_Standing();
delay(300);
DF_Lying_down();
delay(300);
DF_Standing();
delay(300);
for (int index = 0; index < 5; index++) {
DF_Move_forward_action_A();
delay(300);
DF_Move_forward_action_B();
delay(300);
DF_Move_forward_action_C();
delay(300);
DF_Move_forward_action_D();
delay(300);
}
}
Execution logic:
Initialize → Stand → Lie down → Stand again → Perform 5 full gait cycles → Stop
This sequence demonstrates the robot's full functional flow from power-on to movement, useful for both testing and presentation.
After completing the program logic design and structural assembly, I conducted multiple rounds of debugging. The main goals were:
I recorded and resolved multiple real issues through a layered diagnosis approach:
Symptoms: S7 and S8 showed no movement during Action A.
Troubleshooting:
Solutions: Changed slot, reconnected firmly, labeled channels
Symptoms: Robot leaned forward and deviated to the left
Troubleshooting:
Solutions: Symmetrical angle table, replaced parts with SLA, reinforced servo mounting
Symptoms: S2/S8 heated up and buzzed after 2 minutes
Troubleshooting:
Solutions: Limit angles, add buffer frames, use MG90S in future, extend delay()
Symptoms: Frames switched before motion completion
Troubleshooting:
Solutions: Increased delay to 350ms, added intermediate angles, suggest using millis()
Symptoms: Random desynchronization or jitter, restored after reboot
Troubleshooting:
Solutions: Separate power supplies, added 1000uF capacitor, recommend independent DC supply
I developed a reliable debugging workflow:
Ultimately, I realized that a stable robotic motion system is built on precise mechanics, reliable power delivery, and synchronized timing—not just correct code.