Throughout my journey in Fab Academy, I’ve always been fascinated by “things that move”—especially robots that combine bionic structures, mechanical behavior, and interactive capabilities. After completing the mechanical design assignment, I became even more determined to build a robot with “personality.”
So, my final project started with a simple idea:
“Can I build a robot that avoids humans—and looks like a mechanical spider?”
This MechaSpider project is my attempt to integrate all the skills I’ve learned over the past few months. It not only moves and senses human presence, but also expresses its state using RGB lighting. Its spider-like head was personally designed, modified, and 3D printed by me, giving it a sci-fi vibe and a touch of coolness.
At the beginning of the project, I set several clear functional goals for myself:
Structural Divisions:
I wanted this robot to not only move, but also to look special—not just with a biomimetic structure, but with a mechanical creature’s personality. Therefore, beyond its functional behavior, I spent considerable time refining its appearance and structural details.
The head design was based on a mechanical spider model I found in the Bambu Lab community. The original model already had a futuristic look, but in order to adapt it to my robotic platform, I made several functional modifications using Rhino:
I wanted this robot to not only move, but also to look special—not just with a biomimetic structure, but with a mechanical creature’s personality. Therefore, beyond its functional behavior, I spent considerable time refining its appearance and structural details.
The head design was based on a mechanical spider model I found in the Bambu Lab community. The original model already had a futuristic look, but in order to adapt it to my robotic platform, I made several functional modifications using Rhino:
Because the head structure was highly complex and rich in detail, I initially tried printing it with FDM (PLA material), but soon encountered several issues:
In the end, I chose to use the lab’s SLA printer (LCD type, resin material) for high-precision printing. The results were outstanding:
The main body structure of the robot—including the four legs, central chassis platform, electronics holder, and sensor mounts—was entirely modeled in SolidWorks.
To make the connections, debugging, and replacement of each part of my robot clearer and more manageable, I placed special emphasis on learning and practicing circuit design and modular wiring throughout the Fab Academy journey.
During Week 8's electronics design and production assignment, I designed and produced two PCBs, which laid the foundation for my final project.
This was my first attempt at designing a double-sided PCB. I used EasyEDA for the design and ordered the prototype from JLCPCB.
Board Features:
What I Learned:
In addition to industrial prototyping, I also tried making a PCB myself. In the lab, I used the CNC module of the Snapmaker to engrave a single-layer PCB on a copper-clad board.
The expansion board actually used in the MechaSpider project was precisely this hand-crafted and soldered board.
The MechaSpider program is written using the Arduino IDE and runs on the XIAO ESP32S3 microcontroller. The core goals of the software are:
Included Libraries:
#include <Adafruit_NeoPixel.h>
#include <Servo.h>
Module Initialization:
ESP32Servo.h
to define 8 servo instances;Adafruit_NeoPixel
to control the LED ring;digitalRead()
.Main Loop (loop()
):
┌────────────┐ │ Initialization │ └────┬───────┘ ↓ ┌──────────────────┐ │ Read Left/Right PIR │ └────┬─────┬───────┘ │ │ Left detected Right detected ↓ ↓ ┌─────────┐ ┌─────────┐ │ Move Right │ │ Move Left │ └────┬────┘ └────┬────┘ ↓ ↓ ┌──────────────┐ │ Red Flashing │ └──────────────┘ ↑ │ No detection (default) ↓ ┌────────────────────┐ │ Blue Breathing + Stand │ └────────────────────┘
Before I started writing code, I spent a significant amount of time understanding how my quadruped robot should move in a logical and efficient way.
Although the robot only uses 8 servo motors, each movement involves coordination between multiple servos. It’s not as simple as "just lifting one leg and walking."
Based on the actual hardware wiring, I assigned the servo numbers as follows:
Servo ID | Action | Position | Connected Pin |
---|---|---|---|
S1 / S3 / S5 / S7 | Leg Lifting (Up/Down) | Knee joints of the four legs | D0, D6, D5, D3 |
S2 / S4 / S6 / S8 | Leg Swinging (Forward/Backward) | Hip joints of the four legs | D8, D7, D4, D1 |
Each leg is controlled by a combination of one lifting servo and one swinging servo. I also marked down the angle range for each servo to prevent it from exceeding its limit and getting stuck.
To better understand the robot’s walking behavior, I created an Excel diagram that includes:
Each set of actions is organized into clear steps. For example:
delay
delay
delay
delay
delay
One complete “alternating leg pair forward gait” is achieved!
I experimented with different sequences and angles to find the most stable and jam-free gait combination.
Turning is relatively simpler. For example, the left-turn sequence is:
Repeating this sequence allows the robot to turn in place.
Avoidance Example: Person Approaching from Left → Move Right
Encapsulated Behavior Function:
void moveRight() {
servo_3.write(60); // Lift legs
servo_7.write(60);
delay(300);
servo_4.write(40); // Swing to the right
servo_8.write(60);
delay(300);
servo_3.write(120); // Lower legs
servo_7.write(120);
}
Controlled via the Adafruit_NeoPixel
library. The ring contains 8 LEDs. There are two main lighting modes:
void blueBreathing() {
for (int brightness = 0; brightness < 255; brightness++) {
setAllLEDs(0, 0, brightness);
delay(5);
}
for (int brightness = 255; brightness > 0; brightness--) {
setAllLEDs(0, 0, brightness);
delay(5);
}
}
void redFlash() {
for (int i = 0; i < 5; i++) {
setAllLEDs(255, 0, 0);
delay(100);
setAllLEDs(0, 0, 0);
delay(100);
}
}
After multiple iterations across mechanical design, PCB fabrication, software development, and debugging, my final project MechaSpider successfully achieved all of its originally defined functional goals. It not only forms a closed-loop system of perception → reaction → expression, but also reaches a relatively stable and expandable state in both structural and electronic integration.
digitalRead()
Test Results:
Observed Behavior:
millis()
used for synchronized controlObserved Performance:
Mechanical Performance:
Electrical Performance: