Mechanical Design

Back to Home

Goals

group assignment

(part 1 of 2)

(part 2 of 2)

Individual Assignment

(part 1 of 2)

(part 2 of 2)

Group Assignment

Project Overview

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.

1. Project Inspiration and Background

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:

2. Team Background and Collaboration Method

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.

3. Design Goals and Function Plan

✅ This Week (Phase 1: Mechanical Design):

🔁 Future Plans (Phase 2: Automation and Application):


4. Design Process in Detail

1. Concept and Sketching Phase

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.


2. Servo Layout and Numbering Definition

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

4. Fabrication and Iteration of Mechanical Parts (Led by Me)

1. Initial Part Printing (FDM Printing)

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.

2. Precision Parts Switched to SLA Printing

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.


3. Central Structure and Leg Assembly

I completed the assembly of all parts and ensured the following:



Part 2: Automation and Application

1. Control System Architecture Selection

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.

1.1. Control Platform Selection and Rationale

For this phase, I chose the following setup:


Reasons for selection:


2. Servo Numbering and Body Mapping

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.


3. Motion Logic Design Process

1. Initial Program Structure

I began by creating the following function structure:

These motion functions control each servo individually using esp.servo(Sn, angle).

2. Basic Gait Unit Design

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

4. Code Implementation & Function Breakdown

1. DF_Initial_state(): Servo Initialization
void 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.

2. DF_Standing(): Ready Posture
esp.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.

3. DF_Lying_down(): Crouch Simulation
esp.servo(S1, 90);
        esp.servo(S2, 135);
        

Used to demonstrate controlled resting action and test servo angle limits.

4. Gait Core Motion Frames

[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);
        

5. Main Function Execution Flow

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.




6. Debugging and Troubleshooting

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:


1. Unresponsive Servos or Angle Errors

Symptoms: S7 and S8 showed no movement during Action A.

Troubleshooting:

Solutions: Changed slot, reconnected firmly, labeled channels


2. Unbalanced Movement, Tilting or Skewed Trajectory

Symptoms: Robot leaned forward and deviated to the left

Troubleshooting:

Solutions: Symmetrical angle table, replaced parts with SLA, reinforced servo mounting


3. Overheating and Buzzing Servos

Symptoms: S2/S8 heated up and buzzed after 2 minutes

Troubleshooting:

Solutions: Limit angles, add buffer frames, use MG90S in future, extend delay()


4. Jerky or Irregular Movements

Symptoms: Frames switched before motion completion

Troubleshooting:

Solutions: Increased delay to 350ms, added intermediate angles, suggest using millis()


5. Glitchy or Unstable Control Logic

Symptoms: Random desynchronization or jitter, restored after reboot

Troubleshooting:

Solutions: Separate power supplies, added 1000uF capacitor, recommend independent DC supply


Debugging Summary

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.


Quadruped_SG90_Robot_stl.rar