05.5 - Implementation
Mechanical Fabrication & Assembly
Once we completed our linkage design and simulated our desired motion profiles for both mechanisms, we began fabricating each subassembly. All parts were manufactured using resources from Texas Inventionworks.
The first subassembly we manufactured was the electronics/mechanisms box. This was made by laser cutting plywood at TIW using a finger joint technique & wood glue in order to maintain structural integrity in long-term use.
The current box design features an acrylic topper, in order for the electronics and mechanisms to be visible for our demonstration, but it could be remade with a wood top to hide the “under-the-hood” mechanisms and electronics which power it, if it were to be manufactured directly as a go-to-market game.
The second subassembly we worked on was the dodging Reuleaux. There was a lot of trial and error with tolerancing and ensuring that parts were in alignment, such that they would match our simulated behavior. The linkages were made out of laser cut acrylic and connected using press-fit bearings and steel dowel pins. The Reuleaux triangle cam was 3D printed, and we adjusted the model slightly until we got a smooth output motion, as cam mechanisms require delicate manufacturing that we could not achieve consistently with TIW’s 3D printers. The base of the fighting robots were also made out of laser cut acrylic and were attached to the output of the mechanism. Some play and locking of the mechanism occurred during first prototypes, but after increasing the size of the acrylic links, we saw better consistency between parts, as there was less stress directly on points of connection in our device. We also fastened the Reuleaux mechanism using some standoffs and heat-set inserts, as our original box was very thin, and using conventional bolting methods was unfeasible directly onto the platform.
Finally, we worked on the punching mechanism, our six-bar slider crank. For this subassembly, we focused on 3D printed parts, as this was something we had used before for our build 1 assignment, so we were familiar with the problems we may run into during manufacturing. Our linkages, slider, and base were all 3D printed and fastened using M3 screws acting as pins with lock nuts.
Electronic Integration & Software
Once we completed our mechanism design, we wanted to add a control element for players to be able to interact with the game. We quickly designed some ergonomic controllers and borrowed the joysticks we used in build 2, as inspiration for the current control system. Both the Reuleaux Triangle, and the six-bar punching mechanism were powered by small DC hobby motors, so using some motor controllers and an Arduino, we mapped the controller input to a limited PWM motor output, so as to not overdrive the machine and break the physical components. The Arduino code which powered our mechanism can be seen below.
Arduino Code
// === Pin Assignments ===
// Joysticks
#define JOY_PUNCH A0
#define JOY_ROTATE A1
// Motor 1 (Punch mechanism)
#define M1_IN1 3
#define M1_IN2 4
#define M1_PWM 9 // ENA (PWM)
// Motor 2 (Rotation mechanism)
#define M2_IN1 6
#define M2_IN2 5
#define M2_PWM 11 // ENB (PWM)
// === Settings ===
int deadzone = 100; // joystick center dead zone
void setup() {
pinMode(M1_IN1, OUTPUT);
pinMode(M1_IN2, OUTPUT);
pinMode(M2_IN1, OUTPUT);
pinMode(M2_IN2, OUTPUT);
Serial.begin(9600);
}
void loop() {
// ---- Read Joysticks ----
int punchVal = analogRead(JOY_PUNCH);
int rotateVal = analogRead(JOY_ROTATE);
// ---- Motor 1: Punching Mechanism ----
controlMotor(punchVal, M1_IN1, M1_IN2, M1_PWM);
// ---- Motor 2: Rotation Mechanism ----
controlMotor(rotateVal, M2_IN1, M2_IN2, M2_PWM);
delay(10);
}
// ===== Motor Control Function =====
// val = joystick reading (0–1023)
// IN1, IN2 = direction pins
// pwmPin = PWM pin for speed
void controlMotor(int val, int IN1, int IN2, int pwmPin) {
int center = 512;
int diff = val - center;
// Dead zone
if (abs(diff) < deadzone) {
digitalWrite(IN1, LOW);
digitalWrite(IN2, LOW);
analogWrite(pwmPin, 0);
return;
}
// Map joystick distance to speed
int speed = map(abs(diff), deadzone, 512, 0, 255);
speed = constrain(speed, 0, 150); //can change the constraint up to 255
if (diff > 0) {
// Joystick pushed right/up → forward
digitalWrite(IN1, HIGH);
digitalWrite(IN2, LOW);
} else {
// Joystick pushed left/down → backward
digitalWrite(IN1, LOW);
digitalWrite(IN2, HIGH);
}
analogWrite(pwmPin, speed);
}