Keep Truckin'
Narrative Description
A long wood box has a truck in the middle and alphabet blocks nearby. When blocks are put onto the truck and a button on the side of the box is pressed, the truck drives forward or backward based on how heavy the blocks are.
Process Documentation
Fabricating Axels
The axels were the hardest and most central part of this project. They determined the entire movement of the device and I had a lot of trouble making them. I had a problem where the bar that fit inside of the two axels (top-most parts on the higher image) was a different diameter than the connector bar on the rotary encoder and motor. The top image has a coupler (largest piece with the spiral) I found and used for a while before deciding to make custom couplers (bottom image) which were ill-advised but made me feel cool in the moment.
I ended up not needing a coupler because I didn't use a rotary encoder and using the large pre-made coupler because of the spring in the final. According to Zach it allowed for the bar to wiggle a little without breaking. He was right.
Process Documentation
Making moves
Putting this project together almost broke me. It was a one shot one kill type situation because I didn't have enough time to cut a prototype out of cardboard. I got a 4'x4' sheet of plywood cut into 2'x4' sheets and then laser cut them in Techspark. Then I spent the next three days putting them together.
It was only at this point that I began to realize some physical limitations of my design. The stands that I made initially for the axels had holes that I cut by hand for them (oversight on my part). They were much too tight fit, and on top of that they were too short for the rest of the box. I ended up having to re-cut the stands so that the hole for the axel was large enough to allow for flex in the axel, as well as so that they were tall enough to hold up the box and provide structural support. This was also when I decided to ditch the rotary encoder. I found that it was too jank to work with and the axel had too much variability horizontally to work well. Additionally, given the diameter of the axel bits, it would require an uncomfortably amount of force to actually pull the truck back and forth. I took that as a sign to change my project bounds to accomodate.
Process Documentation
Fabricating Blocks
The blocks were an integral part of this process and I had designed them really early in the process. I ended up laser etching these 1/2" thick pieces of plywood and having my awesome patient amazing partner cut them down in the TechSpark wood shop because I don't have access.
Had to make an executive decision in fabrication to only complete a handful of blocks, because gluing and trimming each one down beyond the cuts my partner made would've taken me another few days. We live and we learn.
Process Documentation
I GOT THE TRUCK
Process Reflection
Hubris kills all
This project almost broke me and might actually fuck me over for the rest of my life, since it coincides with both a very large project in my studio course and a very important interview timeline. It was a big lesson on hubris because I heavily underestimated how much work it would take to create a reliable mechanical device and overestimated my time and emotional bandwidth. But here we are. The device works reliably as of the day of presentation, with only a loose power cord that I need to fix before moving to next steps. I'll break down this project into a few parts: Design, making, and emotional turmoil.
The design of this project was probably the only part that didn't make me want to die. I made some super fun concept sketches at the beginning of this project that I intend on executing on for the final part of this project. But moreover, the general idea of mapping my mental load and calculating how each thing I need to do affects me mentally was incredibly fun before I had to actually make it.
The making part was the part I hated the most and suffered the most in. I'm not an engineer and while I think I have a good sense of craft and general making of things, I didn't have the time or patience that this project required. Ran into a lot of road blocks through just scheduling times to be in the wood shop, getting parts like load cells, and finding parts to connect my axel bits together. But the bigger problem was the amount of things I needed for this project. I needed one thing that was dependent on another thing and dependent on another, and that made planning super hard for me mentally. I couldn't fully test the belt until it was in the platform but in order to get the platform built I needed to cut the pieces but in order to cut the pieces Zach needs to let me into the woodshop and by the time I'd finally gotten Zach to let me into the woodshop it was Friday before the project was due. It's just hard to balance. I think I need to be more sure of myself and advocate earlier to get critical pieces in and ready, rather than kind of waiting because I feel like "final fabrication" should be done as close to the deadline as possible.
I guess the biggest thing was just that I didn't build a lot of tolerances into my schedule. Every problem I ran into added hours onto the long queue of tasks that I had to do each day, and also in turn added to my stress. I guess this project became a representation of the madness that its own creation caused. So it is. Things I've learned/would do differently: Make a solid plan to get parts together early. Test and link together early. Build modularly. Don't do mechanical shit ever again.
Code Documentation
Keep-Truckin.ide
//Keep Truckin'
//Made by Caleb Sun
//This program takes weight information from a load cell
to drive a stepper motor to certain positions
#include <AccelStepper.h>
#include "HX711.h"
//pin mapping
//motor
const int dirPin = 12;
const int stepPin = 13;
//button
#define butt 10
int readButt = 0;
//scale
#define LOADCELL_DOUT_PIN 3
#define LOADCELL_SCK_PIN 2
//util
#define motorInterfaceType 1
AccelStepper myStepper(motorInterfaceType, stepPin, dirPin);
int moveweight = 0;
int done = 1;
int inbound = 0;
int outbound = 0;
HX711 scale;
float calibration_factor = -7500;
int weight = 0;
void setup() {
//motor setup
myStepper.setMaxSpeed(1000);
myStepper.setAcceleration(50);
myStepper.setSpeed(200);
//scale setup
Serial.begin(9600);
Serial.println("HX711 scale demo");
scale.begin(LOADCELL_DOUT_PIN, LOADCELL_SCK_PIN);
scale.set_scale(calibration_factor); //This value is obtained by using the SparkFun_HX711_Calibration sketch
scale.tare(); //Assuming there is no weight on the scale at start up, reset the scale to 0
//button setup
pinMode(butt,INPUT);
}
void loop() {
readButt=digitalRead(butt);
//if button is pressed, read scale and map weight to position
if (readButt == 1){
weight = scale.get_units();
moveweight = map(weight, -14 , 0, 2000, -2000);
if(moveweight >2000){
moveweight=2000;
}
if(moveweight<-2000){
moveweight=-2000;
}
delay(1000);
outbound = 1;
inbound = 1;
}
//drives truck to mapped distance
if(outbound == 1){
myStepper.moveTo(moveweight);
while (myStepper.distanceToGo()!=0){
myStepper.run();
}
if (myStepper.distanceToGo() == 0){
inbound = 0;
}
}
//drives truck to original position
if (inbound == 0){
delay(2000);
myStepper.moveTo(0);
outbound = 0;
while (myStepper.distanceToGo()!=0){
myStepper.run();
}
if (myStepper.distanceToGo() == 0){
myStepper.stop();;
}
}
}