Sliding Swivel Crane Justin Basel and Luke Northey

advertisement
Sliding Swivel Crane
Justin Basel and Luke Northey
Problem at Hand
Design and create a microcontroller system that
properly utilizes the knowledge and techniques
obtained through the semester
Project Solution
A sliding crane that has the ability to pick up small
metal objects via magnet
Control by entering a coordinate (in cm) from origin
System Details
2 – 12v stepper motors (200 steps)
2 – EasyDriver units (what drives and controls
motors)
SSMI microcontroller board
“Slider Kit”
Schematic Overview
y-axis
(x,y)
R
(0,0)
𝑥 = 𝐿 + 𝑅𝑐𝑜𝑠(𝜃)
𝑦 = 𝑅 sin(𝜃)
L
Solving
𝜃
x-axis
𝐿=𝑥 −
𝑅2 − 𝑦 2
𝑦
𝜃 = arcsin( )
𝑅
Pseudo Code
Initialize variables
Implement Delay Function
Enable PT0 and PT1 – Motor direction control
Enable PM0 and PM1 – Motor speed control
Set x-y coordinates (in mm)
Solve for “L” length (horizontal movement)
Solve for “theta” value (rotational movement)
Convert length and angle values to “iteration” values
Move L:
For(I < L Iterations)
Set Motor to move right
Move one mm
Pseudo Code (Continued)
Move theta:
For(I < theta iteration)
Set motor to increase angle
Rotate 1.8 degrees
Delay for 2 Seconds
Return home:
For(I < theta iteration)
Set motor to decrease angle
Rotate 1.8 degrees
For(I < L Iterations)
Set Motor to move left
Move one mm
// move L
for(iL=0; iL < L; iL++){
PTT = 0x01;
// move right
for(i=0; i<100; i++){
// move one cm
PTM = 0x00;
delay(600);
PTM = 0x01;
delay(600);
}
}
// move theta
for(iTheta=0;iTheta < floor(theta_it); iTheta++){
PTT = 0x02;
// increase angle
PTM = 0x00;
delay(3000);
PTM = 0x02;
delay(3000);
}
Questions?
Thanks for your time 
Download