Week 15: System Integration
Assignment: design and document the system integration for your final project.
Project update
This page shows my final project plan at the time of System Integration week: a gesture-controlled robotic manipulator arm. After this week, I narrowed the project down to the gripper alone. The current design is on the Final Project page and in weeks 17, 18 and 19.
Current system: the robotic gripper

The final project is now a single integrated gripper. It brings together several fabrication processes and one custom board:
| Subsystem | What it is | How it was made |
|---|---|---|
| Fingers and linkages | Two fingers, each driven by a pair of links | 3D printed, joined with socket-head screws |
| Gear train | A small pinion on the servo drives two larger gears, one for each finger, so both fingers move together | 3D printed |
| Casing | Holds the servo and the HC-SR04 sensor; the wiring and power cable leave through the bottom | 3D printed |
| Input | HC-SR04 ultrasonic distance sensor, facing out of the casing | Off-the-shelf module |
| Output | MG90S micro servo | Off-the-shelf |
| Control | My XIAO RP2040 board (Week 06, Week 08); sensor and servo connect to its pin headers | Designed in EasyEDA, milled on the SRM-20, hand-soldered |
| Power | 5 V over USB-C from a phone charger; no battery | — |
How it is used: a person brings their hand, holding an object, close to the sensor. When the distance drops below a set threshold, the board turns the servo, the gear train closes both fingers, and the gripper takes the object.
The integrated gripper working
In this test I bring a roll of tape between the open fingers. The fingers close on it and the gripper keeps holding the tape after my hand moves away. My XIAO RP2040 board sits inside the casing, with the wiring and the USB-C power cable leaving through the bottom.

The code running on the gripper
| Part | XIAO RP2040 pin |
|---|---|
| HC-SR04 TRIG | D2 |
| HC-SR04 ECHO | D3 |
| MG90S signal | D4 |
Known issue: ECHO has no voltage divider. In the gripper, the HC-SR04's ECHO goes straight to D3. The sensor runs on 5 V, so its echo pulse is 5 V, but the RP2040's pins are rated for 3.3 V. It works in my tests, but over time it can damage the pin. In my bench tests (Week 9) I used a 1 kΩ / 2 kΩ divider on ECHO (5 V × 2/3 ≈ 3.3 V). The next version of the gripper wiring should add the same two resistors before D3.
How it works:
- About 10 times a second, the board sends a 10 µs pulse on TRIG and times the echo. The distance is the echo time × 0.0343 cm/µs ÷ 2, because the sound goes out and back. If no echo comes back within 30 ms, the reading is ignored.
- If an object is 15 cm or closer and the gripper is open, the servo turns from 20° (open) to 100° (closed).
- The gripper only opens again when the distance goes past 18 cm. The gap between 15 cm and 18 cm stops the gripper from flickering open and shut when the reading wobbles around one threshold. It is also why the gripper keeps holding the tape after my hand leaves: the tape sits in the jaws right in front of the sensor, so the reading stays well below 18 cm.
- The servo moves 1° every 20 ms instead of jumping straight to the angle, so it takes about 1.6 s to close. This makes the fingers close gently and puts less sudden load on the 3D-printed gears.
- Readings with no echo don't change anything, so a missed echo can't drop the object.
The open and closed angles (20° and 100°) were set by testing on the assembled mechanism.
Code: robotic_gripper.ino (Arduino IDE, board "Seeed XIAO RP2040"; on my computer the sketch is saved as xiao_pca9685_mg90s.ino)
#include <Servo.h>
#define TRIG_PIN D2
#define ECHO_PIN D3
#define SERVO_PIN D4
Servo gripperServo;
// Adjust these after testing your mechanism
const int OPEN_ANGLE = 20;
const int CLOSED_ANGLE = 100;
// Distance thresholds in centimetres
const float CLOSE_DISTANCE = 15.0;
const float RELEASE_DISTANCE = 18.0;
bool gripperClosed = false;
int currentAngle = OPEN_ANGLE;
float getDistance() {
digitalWrite(TRIG_PIN, LOW);
delayMicroseconds(3);
digitalWrite(TRIG_PIN, HIGH);
delayMicroseconds(10);
digitalWrite(TRIG_PIN, LOW);
unsigned long duration = pulseIn(ECHO_PIN, HIGH, 30000);
if (duration == 0) {
return -1; // No valid echo
}
return duration * 0.0343 / 2.0;
}
void moveGripper(int targetAngle) {
if (targetAngle > currentAngle) {
for (int angle = currentAngle; angle <= targetAngle; angle++) {
gripperServo.write(angle);
delay(20);
}
}
else {
for (int angle = currentAngle; angle >= targetAngle; angle--) {
gripperServo.write(angle);
delay(20);
}
}
currentAngle = targetAngle;
}
void setup() {
Serial.begin(115200);
pinMode(TRIG_PIN, OUTPUT);
pinMode(ECHO_PIN, INPUT);
gripperServo.attach(SERVO_PIN);
gripperServo.write(OPEN_ANGLE);
currentAngle = OPEN_ANGLE;
Serial.println("Robotic Gripper Started");
}
void loop() {
float distance = getDistance();
if (distance > 0) {
Serial.print("Distance: ");
Serial.print(distance);
Serial.println(" cm");
// Object detected within 15 cm
if (distance <= CLOSE_DISTANCE && !gripperClosed) {
Serial.println("Object detected - Closing gripper");
moveGripper(CLOSED_ANGLE);
gripperClosed = true;
}
// Object moved beyond 18 cm
else if (distance >= RELEASE_DISTANCE && gripperClosed) {
Serial.println("Object moved away - Opening gripper");
moveGripper(OPEN_ANGLE);
gripperClosed = false;
}
}
// Invalid readings do not change the current grip state.
delay(100);
}
AI assistance: I used Claude (Anthropic's AI assistant) to help write this code. I set the pins, tuned the open/closed angles and the distance thresholds on the real gripper, and tested it with the tape roll.
The board inside the casing

Looking into the open casing from below: my milled board sits across the casing, seen almost edge-on, with the XIAO RP2040's USB-C port (and its B/R buttons on either side) facing the opening, so the power cable can be plugged in from the bottom. The sensor wires (yellow and blue) run up to the HC-SR04 at the front, and the servo cable (brown/red/orange) runs along the back wall to the MG90S.
Earlier plan (kept for reference)
Concept: robotic manipulator arm
The final project focuses on developing a robotic manipulator arm capable of articulated movement, actuator-assisted extension, and gesture-based control through a wearable glove interface. The inspiration for the project originated from cinematic robotic systems and industrial manipulators that combine exposed mechanical structures, layered actuators, responsive movement, and human-machine interaction. Instead of creating a fully autonomous robotic system, the project explores how human hand movement can directly control a fabricated robotic arm through embedded electronics, mechanical systems, and real-time actuator response.
The robotic arm is designed as a gesture-controlled manipulation system where the user wears a glove integrated with flex sensors. As the user bends their fingers or changes hand position, the flex sensors detect variations in resistance values. These signals are processed by a microcontroller and translated into servo motor movement, allowing the robotic arm to mimic the movement of the user’s hand and arm gestures in real time. The project therefore focuses on creating a physical interaction loop between human motion and robotic articulation.
Mechanical system
The entire robotic arm is divided into four major sections: the gripper section, wrist and forearm section, upper arm section, and rotating base section. Each section is designed to perform a specific movement while maintaining structural rigidity and manageable weight distribution.
Gripper
The gripper section uses a two-side parallel jaw mechanism inspired by industrial robotic manipulators instead of humanoid robotic fingers. This approach was chosen to simplify the mechanics while improving gripping reliability and structural stability. The jaws are fabricated using 3D printed components connected through pivot joints and linkage systems. Silicone molded grip pads are attached to the inner jaw surfaces to improve friction and grip performance while handling objects. A compact servo motor mounted inside the wrist assembly controls the opening and closing of the gripper.
Wrist and forearm
The wrist and forearm section supports the gripper assembly and provides orientation control through wrist tilt movement. This section also contains part of the actuator-assisted extension mechanism which increases the reach capability of the robotic arm. Structural reinforcement plates are integrated along both sides of the forearm to reduce flexing during movement. Internal routing channels are incorporated within the structure to organize sensor wires and servo cables while maintaining a cleaner assembly.
Upper arm
The upper arm section contains the major load-bearing joints of the system including the shoulder and elbow mechanisms. High torque servos are integrated into these sections to generate sufficient lifting force while maintaining controlled articulation. The elbow and shoulder joints use double-supported bearing structures to reduce wobbling and prevent excessive load concentration on the servo shafts. The arm proportions were intentionally kept compact to reduce torque requirements and improve movement stability during operation.
Rotating base
The rotating base section acts as the primary support structure for the entire robotic arm. The base houses the main electronics system, power distribution system, custom PCB, and rotational mechanism. A large bearing is integrated into the rotating platform to support the arm weight and allow smoother horizontal rotation. The base dimensions are intentionally wider to improve overall stability and reduce tipping during extended arm movement.
Electronics
The electronics architecture is centered around the Seeed Studio XIAO RP2040 which acts as the primary controller for the robotic arm system. The XIAO RP2040 is integrated into a custom PCB designed specifically for the project to create a compact and organized electronics assembly. The PCB handles signal routing, servo communication, sensor connections, and power distribution while minimizing loose wiring within the system.
Input: gesture-control glove
The gesture-control glove acts as the main input interface for the robotic arm. Multiple flex sensors are integrated into the fingers of the glove to detect bending motion. As the user bends specific fingers, the corresponding movement is mapped to different robotic arm functions such as gripper actuation or arm articulation. Additional movement control may also be integrated through joystick modules or potentiometers depending on the final control strategy.
Power and servo control
A PCA9685 servo driver module is integrated into the system to generate stable PWM signals for multiple servo motors simultaneously. High current servo operation is powered through an external regulated 5V power supply to avoid voltage instability and servo jitter. Capacitors are integrated into the power distribution system to smooth sudden current fluctuations generated during rapid arm movement.
Fabrication
The fabrication process combines multiple digital fabrication workflows. Structural arm sections, servo mounts, linkage systems, and electronic housings are designed using Autodesk Fusion and fabricated using 3D printing with PLA material. Structural reinforcement plates and support panels are fabricated through laser cutting using acrylic or MDF sheets. Silicone molding and casting processes are used to fabricate the soft gripping pads integrated into the gripper jaws.
Expected outcome
The final robotic arm is expected to demonstrate gesture-controlled articulated movement, stable gripping, actuator-assisted extension, custom PCB integration, and multi-process fabrication workflows within a compact robotic manipulator platform. Beyond functioning as a robotic arm, the project explores the relationship between human motion, embedded electronics, mechanical systems, and digitally fabricated interaction devices.