2.007 Competition – Spring 2014

For Spring semester, and I took 2.007 (Design and Manufacturing 1), a class that focuses on teaching Mechanical Engineering students about fabrication, design, and project planning. The goal of the class is to fabricate a robot that can perform a series of tasks that correspond to the competition board. The platform is a “ski-slope” which varies in steepness from 30 degrees to 60 degrees. On each slope, there are flags attached to the slope via a magnet and there are medals, bronze, silver, and gold, that the robot can grab. There is also a multiplier at the bottom of the slope that can multiply your score up to 2.5x the amount. The goal is to obtain as many points as you can in 1.5 minutes. Thirty seconds of that time can be used for your robot to run autonomously and the last one minute is used for remote control.

This special page is to document all that I’ve done so far in the project. At the moment, all of my records, drawings, analysis, and CAD are too numerous to put on one post. So until I can make the post more compact, it’ll be here so that way, you can see what I have done/am doing. The pictures are more or less in order, going from first iterations to more recent iterations.

As I go through the class, I’ll keep updating this page with my documentation. Feel free to contact me via the About page if you have questions or need clarifications.

Drawings

robot assembly with motorrobot parallel arm assembly

Arduino Code

//COMPETITION CODE
// include additional headers
#include <Servo.h>
//global declarations
#define RIGHTSERVO 5 //define a pin for servo
#define LEFTSERVO 4
#define PHOTOR 5 //define a pin for Photo resistor
#define LED 13 //define a pin for LED
Servo rservo; // initialize servo
Servo lservo;
const int threshold = 75;
unsigned long time;
// played around with values that sets the servos to each position
// these values need to be set for each servo!!!
const int neutral = 1500;
const int forward = 2000;
const int backward = 1000;

//--- Function: Setup ()
void setup()
{ 
 pinMode (RIGHTSERVO, OUTPUT); // want servo pin to be an output
 pinMode (LEFTSERVO, OUTPUT);
 pinMode(LED, OUTPUT); // setup LED 
 rservo.attach(RIGHTSERVO); // attach pin to the servo 
 lservo.attach(LEFTSERVO);
 rservo.writeMicroseconds(neutral); // set servo to mid-point
 lservo.writeMicroseconds(neutral);
 Serial.begin(9600); // setup serial output
}
//--- Function: loop ()
void loop()
{
 if(analogRead(PHOTOR) < threshold) { //reads if photores has light on it
 rservo.writeMicroseconds(backward); //moves forward // set servo to forward pulse // Pauses the program 
 lservo.writeMicroseconds(forward);
 delay(3000); 
 rservo.writeMicroseconds(neutral); // set servo to mid-point
 lservo.writeMicroseconds(neutral); 
 delay(500); // Pauses the program 
 rservo.writeMicroseconds(backward); //turns servo right
 delay(750);
 rservo.writeMicroseconds(backward); //moves forward // set servo to forward pulse // Pauses the program 
 lservo.writeMicroseconds(forward); // set servo to forward pulse
 delay(5000);
 rservo.writeMicroseconds(neutral); // set servo to mid-point
 lservo.writeMicroseconds(neutral); 
 delay(500);
 }
else {
digitalWrite(LED, HIGH);
}
}

This was the code I used in the competition for the fully autonomous robot. It simply moves forward, up the bunny slope, turns, and then drives off across the slope. An LED is placed in the starting box to signify the beginning of the round, so I used a photoresistor to sense when the starting LED turned on. It’s a simple bit of code I think, and one that can be easily changed and tested over and over again.

CAD

Rough Prototypes

Fabricated Mechanisms

 

Below are my final designs. For the competition, I ended up having two robots, one smaller one that was fully autonomous, and one larger one that was fully controlled. The smaller one (which I affectionately named Nugget) uses an Arduino Nano and is programmed to go up the bunny slope once and turn off and head towards the middle of the slope (hopefully, out of the way). This earns me 6 points: 3 points for going up the bunny slope and x2 for doing it during the autonomous period. After the 30 second autonomous period (my robot takes less than this time to do its task), I use the fully controlled robot. With this one, I just make laps up the bunny and intermediate slope, earning 20 points each time I go up both.

 

 

Final Designs

Leave a comment