Robot Steps
Robot Steps
Contents:
Manufacturing Plans
Base Frame
Cutting:
● 4 - 1”x1”x34” Aluminum Square Tubing
● 2 - 1”x1”x28” Aluminum Square Tubing
● 2 - 1”x1”x22” Aluminum Square Tubing
● 3 - 1”x1”x14” Aluminum Square Tubing
● 2 - 1”x1”x11” Aluminum Square Tubing
● 4 - 1”x1”x5” Aluminum Square Tubing
UNI Robotics Page 4
Label:
● 1”x1”x34” Aluminum Square Tubing
○ “S-OL”
○ “S-IL”
○ “S-OR”
○ “S-IR”
● 1”x1”x28” Aluminum Square Tubing
○ “T-R”
○ “T-L”
● 1”x1”x22” Aluminum Square Tubing
○ “F”
○ “B”
● 1”x1”x14” Aluminum Square Tubing
○ “M-F”
○ “M-B”
○ “M-T”
● 1”x1”x11” Aluminum Square Tubing
○ “M-R”
○ “M-L”
● 1”x1”x5” Aluminum Square Tubing
○ “C”
UNI Robotics Page 5
Drilling:
● 1”x1”x34”
● 1”x1”x28”
● 1”x1”x22”
● 1”x1”x14” (T-M)
● 1”x1”x5” (C)
UNI Robotics Page 6
Assembly of Base:
● Connect S-OL, S-IL, S-OR, and S-IR to F & B
○ Using 16, 90 degree brackets
● Connect S-IL and S-IR to C
○ Using 8, 90 degree brackets
● Connect C to T-L and T-R
○ Using 4, 90 degree brackets
● Connect C to T-M
○ Using 2, 90 degree brackets
● Connect S-IL and S-IR to M-F and M-B
○ Using 8, T Brackets
● Connect M-F and M-B to M-L and M-R
○ Using 8, 90 degree brackets
UNI Robotics Page 7
3D Prints:
● 1 - Motor Bracket
● 8 - Pulley Guards
● 4 - ¾” Hole Caps
● 1 - REV Battery Holder
UNI Robotics Page 11
Aluminum Sheets
Cut LxH:
● 2 - 36” x 4”
● 2 - 30” x 5”
● 2 - 22” x 4”
● 1 - 14” x 20”
● 1 - 16” x 5”
● 2 - 15.”5 x 1”
● 1 - 16” x 14.5”
UNI Robotics Page 12
Label:
● 36” x 4”
○ UL
○ UR
● 30” x 5”
○ CSL
○ CSR
● 22” x 4”
○ R-F
○ R-B
● 14” x 20”
○ EDT
● 16” x 5”
○ Back Sheet
● 15.5”x1”
○ Thin Sheets
● 16”x14.5”
○ TBS
UNI Robotics Page 13
Arm Extensions
Cut:
● 2 - 1”x1”x25”
● 2 - 1”x1”x12”
Label:
● 1”x1”x25”
○ AEL
○ AER
● 2 - 1”x1”x12”
○ AEM
Drilling:
● 1”x1”x25”
● 1”x1”x12”
Assembly:
● Connect AEL to AEM
○ Using 2, T Brackets
● Connect AER to AEM
○ Using 2, T Brackets
UNI Robotics Page 14
Sliders
Cut:
● 2 - 1”x1”x15”
● 2 - 1”x1”x12”
● 2 - 1”x1”x6”
Label:
● 2 - 1”x1”x15”
○ FRK
● 2 - 1”x1”x12”
○ FRKV
● 2 - 1”x1”x6”
○ FRKS
Drilling:
● 1”x1”x15”
● 1”x1”x12”
● 1”x1”x6”
Assembly:
Forks Backing
Cut:
● 2 - 1”x1”x16”
● 2 - 1”x1”x14”
● 2 - 1”x1”x5”
Label:
● 2 - 1”x1”x16”
○ FBTB
● 2 - 1”x1”x14”
○ FBS
● 2 - 1”x1”x5”
○ FBAH
Drilling:
● 1”x1”x16”
● 1”x1”x14”
● 1”x1”x5”
UNI Robotics Page 16
Assembly:
Hex Shaft
Cut:
● 3 - 18 ⅝” Hex Shafts
● 1 - 15 ¼” Hex Shaft
UNI Robotics Page 17
Attach:
● Attach Sliders to Forks Backing
○ Using 2, 18 ⅝” Hex Shafts
■ Using 8, Hex Shaft Collars
UNI Robotics Page 18
Assembly:
● Attach the Sliders & Forks Backing Assembly to the Arm Assembly
○ Using 1, 18 ⅝” Hex Shaft
■ Using 4 Hex Shaft Collars
● Attach EDT to top of Arm Assembly
○ Using 4, Self Tapping Screws
● Attach Motors (2) and Motor Brackets (2) to bottom of Arm Assembly
○ Using 2, Self Tapping Screws/Motor Bracket
UNI Robotics Page 19
UNI Robotics Page 20
Attach:
● Attach Forklift & Arm Assembly to Base
○ Using 1, 15 ¼” Hex Shaft
UNI Robotics Page 21
Plates to Base
Attach:
● UL and UR to Bottom Sides of Robot
● CSL and CSR to Top Sides of Robot
● RF and RB to Bottom Front and Bottom Back of Robot
● Back Sheet to Top Back of Robot
● Thin Sheets to Top of Robot
● TBS to Back Top of Robot
UNI Robotics Page 22
Electronics Board:
UNI Robotics Page 23
Sensors
● Smart Sensors
○ Pixi 2
UNI Robotics Page 24
● Regular Sensors
○ IR Sensors
○ Temperature Sensor
UNI Robotics Page 25
Code
Main Code:
#include <Pixy2.h>
#include <Servo.h>
Pixy2 pixy;
Servo servoLeft;
Servo servoRight;
Servo servoLift;
Servo servoLiftL;
Servo servoLiftR;
int flag1=0; // flag to indicate the pick-up task or drop-off task is done 0: nothing 1: carrys an
object
int flag2=0; // flag to indicate if enabling or disabling barcodes detection 1: barcode, 0: color
int color=0; //indicate the color that have been picked up
int IR1=9; //Infrared 1
int IR2=10; //Infrared 2
int IR3=8; //Infrared 3
int data[3]; //for IR status
void forward(unsigned int time);
void backward(unsigned int time);
void liftup(unsigned int time);
void liftdown(unsigned int time);
void liftLR(unsigned int time);
void downLR(unsigned int time);
void TurnLeft(unsigned int time);
void TurnRight(unsigned int time);
void PivotTurnRight(unsigned int time);
void TurnAround(unsigned int time);
void setup()
{
pinMode(5, OUTPUT);
pinMode(6, OUTPUT);
pinMode(3, OUTPUT);
pinMode(4, OUTPUT);
pinMode(2, OUTPUT);
pinMode(IR1, INPUT);
pinMode(IR2, INPUT);
pinMode(IR3, INPUT);
servoLeft.attach(5);
servoRight.attach(6);
servoLift.attach(3);
servoLiftL.attach(4);
UNI Robotics Page 26
servoLiftR.attach(2);
pixy.init();
Serial.begin(115200);
}
void loop()
{
data[1]=digitalRead(9); //middle IR
data[2]=digitalRead(10); //right IR
data[0]=digitalRead(8); //left IR
track();
}
void track()
{
UNI Robotics Page 28
char message[80];
if(flag2==0) // if barcode enabling flag is disabled, switch to the color mode.
{
Serial.println("change to color");
pixy.changeProg("color_connected_components");
pixy.ccc.getBlocks(); //get colors
}
else //if barcode enabling flag is enabled, switch to the line-tracking mode
{
Serial.println("change to line");
pixy.changeProg("line");
pixy.line.getMainFeatures();//read barcodes
}
//pixy.ccc.getBlocks();
Serial.print("pixy ccc numBlocks: ");
Serial.println(pixy.ccc.numBlocks);
if (pixy.ccc.numBlocks)
{
Serial.println(pixy.ccc.blocks[0].m_signature);
Serial.print("pixy.ccc.blocks[0].m_width= ");
Serial.println(pixy.ccc.blocks[0].m_width);
}
if(pixy.ccc.numBlocks && flag1==0) //if the object is too close, save the color data, pick it up
and turn around
{
color = pixy.ccc.blocks[0].m_signature;
Serial.print("color = ");
Serial.println(color);
//Halt(1000);
//liftup(1000);
//backward(1000);
// TurnAround(1000);
flag1 = 1; //now its knows it got something
flag2 = 0; //now it knows it ignores barcode
}
sprintf(message, "data[0] = %d, data[1] = %d, data[2] = %d \n", data[0], data[1], data[2]);
Serial.write(message);
if(data[0]==0 && data[1]==1 && data[2]==0) //if middle IR detects black line, both sides dont,
follow the line
{
forward(200);
}
UNI Robotics Page 29
if(data[0]==1 && data[1]==1 && flag1==1) // if left IR detects black line, and it is carrying the
pallet
{
backward(1000);
TurnLeft(200);
if(color==1)//if bring red back, PivotTurnLeft until middle IR detects white line and both sides
don't
{
TurnLeft(200);
}
else if(color==2) //if bring green back, PivotTurnRight until middle IR detects white line and
both sides don't
{
TurnRight(200);
forward(200);
}
}
if(data[1]==1 && data[2]==1 && flag1==1)//when got blue back, if right IR detects line,
PivotTurnRight until middle IR detects black line and both sides don't
{
backward(1000);
PivotTurnRight(200);
}
if(pixy.ccc.blocks[0].m_x <=10 && flag1==1 && pixy.ccc.blocks[0].m_signature==4) //when it is
carrying the pallet, and when it reaches the zone
{
Halt(1000);
liftLR(1000);
backward(1000);
TurnAround(1000);
flag1 = 0; // now it knows it has dropped the pallet
flag2 = 1; //now it knows it needs to detect the barcodes
}
//the robot finished one task! now it needs to go back and pick the pallet
{
backward(1000);
TurnLeft(200);
flag2 = 0; //it has turned back to the main road and ready to pick up the pallet, disable
barcode detecting.
}
if(flag2==1 && pixy.line.barcodes->m_code==3) //when barcode3 for turning left is detectd, turn
left
{
backward(1000);
TurnRight(200);
flag2 = 0; //it has turned back to the main road and ready to pick up the pallet, disable
barcode detecting.
}
if(data[0]==0 && data[1]==0 && data[2]==0)//if lines are not detected anymore, make turns a
bit to find line
{
Serial.println("Turnright");
PivotTurnRight(200);
}
}
UNI Robotics Page 31
LCD Code:
#include <LiquidCrystal.h> // liquid crystal library contains
LiquidCrystal lcd(13, 12, 11, 10, 9, 8); // pins to display
float voltage = 0; //the voltage measured from the TMP36
float degreesC = 0; //the temp in C,
float degreesF = 0; //the temp in F,
void setup() {
void loop() {
voltage = analogRead(A0) * 0.004882813; //convert the analog reading, which varies from 0
to 1023, back to a voltage value from 0-5 volts
degreesC = (voltage - 0.5) * 100.0; //convert the voltage to a temp in C
degreesF = degreesC * (9.0 / 5.0) + 32.0; //convert the voltage to a temp F
lcd.clear(); //clear the LCD
Button Code:
int pushButton = 13; //Set pin for pushbutton
void setup() {
pinMode(pushButton, INPUT);
void loop() {
}
UNI Robotics Page 33
Bill of Materials
PART SIZE QTY COST