You are on page 1of 11

Marble Sorter

Rory Gatson
Luke, Corbin

POE Block 4

Design Problem:
Problem Statement:
NRPA, a recycling organization, has asked us to design an automated machine to sort
marbles. We need a device that can sort marbles accurately, efficiently, and
consistently. The marbles are made of wood, steel, aluminum, and two types of plastic.
Design Statement:
Design, model, and test a device that will separate marbles.
Constraints:
Machine must sort marbles in a fully automated process and use only components from
one VEX kit and other materials approved by instructor. It must successfully separate
commingled (not lined up) recyclable materials into individual bins. The machine must
keep marbles must be under control during the process. Recyclable materials include 4
different in. material spheres totaling 16 marbles. Extra credit will be given for sorting
5 materials (20 marbles) successfully. Examples are steel, aluminum, wood, opaque
plastic, and clear plastic. Machine must be efficient and marbles must be fully sorted
within 2 minutes.

Brainstorm:
Description:
The marbles are dropped into a box which the funnels them out onto a sloped track.
The balls are stopped by a spinning sheet with a hole in it to slowly release the balls. A
spinning magnet evaluates each ball as it stops, picking up the steel balls and dropping
them as they are pushed across a sheet. The light sensor evaluates each ball and
moves a section of track to drop the ball into the correct bin.

Decision Process:
We used a decision matrix to decide which design we should make. We used five
criteria: precision (how accurate the design would be), simplicity (how simple it is to
understand and use), construction time (how fast we can build it), coding complexity
(how simple the code is), and runtime (how fast the design can sort the marbles)

Lukes Design:
Lukes design was the best based on the decision matrix score despite the fact that
other group members were skeptical. Luke's superior simplicity of hardware and code
made his design attractive to us.

Final Design Solution:


Lukes Design:

In Lukes design there is a splitter that lines the balls up on the track at the very
beginning. The balls then move down a track towards a gate that will be opened by a
servo. When the balls are released by the gate, they role a specific distance down a flat
piece of track because of their material type. At the distance that the marble stops there
is a box underneath the track corresponding to that type of marbles distance. Then, the
flat track rotates and the balls are dumped into the corresponding bucket that is directly
beneath them.
This design has the best simplicity out of any other design because of its modular
nature and time based rotations. However, it can only sort four balls without adding
another piece.

Design Modifications
The turntable also has a 5 cups instead of the original two bins. Once we found
out that the infrared sensor could distinguish all of the marble with a flashlight, we
removed our momentum idea and added 3 cups to the turntable to allow for a single test
to separate all of our marbles.
We also extended the walls so we could pour in the marbles without any falling
out. Once we began testing we realized that the marbles sometimes stacked up on
each other, so we added walls so that the shifts would not cause them to be pushed off
the track.

Another modification that we added is ramp on the side of the infrared sensor
because when we actually built our platform, the cups were too high and were hitting
the wall. We added the ramp so that we could move our cups out to prevent contact
with the wall.
We added gate attached to the servo axle which has a mechanism which holds
the marbles and knocks them into the cups. This allows us to release on marble, stop
another marble on the track, and push a marble into its cup
We decided to scrap the third part of our design, the momentum idea, that is
why we have a single ramp which the marbles roll down. The infrared sensor is also
now the only test that determines which cup our marbles go into.

Final Design

Our design worked fairly well, it sorted all four marbles for the aluminum, white
plastic, and clear, but only sorted two steel, and dropped one of the wood, taking a little

over two minutes. We were disappointed by our performance in the final test however,
because our marble sorter had sorted the marbles better in previous runs. In the official
test, our turntable turned too little on the way to the steel, resulting in one of the wood
marbles dropping to the floor and the turntable being slightly off for all of the other
marbles. This was our main problem during the test, and the reason that out
performance was not as strong as we had hoped.
Clear: 4/4
White: 4/4
Aluminum: 4/4
Steel: 2/4
Wood: 1/4

Program
#pragma config(Sensor, in1, lineFollower, sensorLineFollower)
#pragma config(Sensor, in2, potentiometer, sensorPotentiometer)
#pragma config(Sensor, in3, lightSensor, sensorReflection)
#pragma config(Sensor, dgtl1, limitSwitch, sensorTouch)
#pragma config(Sensor, dgtl2, bumpSwitch, sensorTouch)
#pragma config(Sensor, dgtl3, shaft,
sensorQuadEncoder)
#pragma config(Sensor, dgtl5, sonar,
sensorSONAR_cm)
#pragma config(Sensor, dgtl12, green,
sensorLEDtoVCC)
#pragma config(Motor, port2,
flashlight, tmotorVexFlashlight, openLoop, reversed)
#pragma config(Motor, port3,
leftMotor, tmotorServoContinuousRotation, openLoop)
#pragma config(Motor, port8,
servoMotor, tmotorServoStandard, openLoop)
#pragma config(Motor, port9,
turntable, tmotorVex393_MC29, openLoop)
//*!!Code automatically generated by 'ROBOTC' configuration wizard
!!*//
/*
Project Title: Activity 3.1.2 Part 4
Team Members: Luke, Corbin, Rory Gatson
Date: 4/14/16
Section:

Task Description:

Pseudocode:
*/
int location = 1;

int distance = 0;
int speed = 20;
int first = 0;
int last = 0;
int clockwiseDistance = 0;
//Method that turns the servo to the target location

void moveTo(int target)


{
SensorValue(shaft) = 0;
distance = abs((location - target)*60);
if (target == 1)
{
distance += 4.75;
}
if (target > location)
{
while (SensorValue(shaft) < distance)
{

startMotor(turntable, speed);
wait (.01);
}
}
if (target < location)
{
while (abs (SensorValue(shaft)) < distance)
{
startMotor(turntable, - speed);
wait (.01);
}
}
stopMotor(turntable);
location = target;
}
int checkMaterial()//returns a value based on the material
{

if(SensorValue(lineFollower) < 1300)


{
return 1;
}
if(SensorValue(lineFollower) < 2500)
{
return 2;
}
if(SensorValue(lineFollower) < 2960)
{
return 3;
}
if(SensorValue(lineFollower) < 2990)
{
return 4;
}
if(SensorValue(lineFollower) < 3050)
{
return 5;
}
return 1;
}

task main() //initial readying mechanism, turns on flashlight and sets the servo in the proper
location, then lets one marble through
{
turnFlashlightOn(flashlight, 50);
setServo(servoMotor, -120);
wait(7);
setServo(servoMotor, 90);
wait(.363);

for(int i = 0; i < 25; i++) //Lets marbles move one at a time, then sorts them in the proper
bin
{
setServo(servoMotor, -120);
wait(.5);
moveTo(1);
wait(3);

moveTo(checkMaterial());
setServo(servoMotor, 90);
wait(.363 + i*.002);
}
turnFlashlightOff(flashlight);
}

Design Process
Define the Problem:
For this step, we looked at our design constraints and requirements from NRPA
and created group norms.
Generate Concepts:
In this step, we all created our own individual idea. We discussed possible
methods to apply to our sorting method, such as turntables, and applied them to our
design.
Develop a Solution:
We presented our design to each other, then put them in a decision matrix to
decide which design to use. Lukes design won and we began testing to see if it would
work. During testing we found that the infrared sensor was more accurate than the
method his design employed, and changed our design to remove the third section.
Construct and Test a Prototype:
Using our newly modified design, we began construction and changed a few
things along the way (see design modifications). Once our design was built, we began
to continually modify our program.
Evaluate the Solution:
Each time we modified our program, we evaluated a new solution, and if it didnt
work we moved back to the construction stage of the program.
Present Solution:
We presented our solution to Mr. Landers and our peers in a final test. Our
design did not work perfectly but it did sort the majority of the marbles into the right
bins.

Team Evaluation
Luke:
Luke was an essential part of the team, often being the deciding vote between
Corbin and Rory. He did almost all of the turntable programming, and constructed to
ramp and infrared sensor with us.
Corbin:
Corbin built a lot of the essential parts of the machine, including the both
iterations of the turntable. He helped to program the gate mechanism, and provided
valuable feedback to the other team members.
Rory Gatson:
I built a lot of the machine, including ramp, gate mechanism, and infrared sensor.
I also programmed the gate mechanism with Corbin. Many of my ideas ended up being
essential parts of our marble sorter, such as the single axle gate and catcher and the
smooth ramp.

Reflection
What would your team do differently with your design solution and why?
The biggest problem for our machine was that it relied on extremely precise intervals
and degrees that could be easily by battery levels and the order of the balls, so I think if
I were to do it again i would try to fix this problem with hardware instead of trying to
adjust it with the program.
What was the most challenging aspect of this design problem?
The most challenging aspect of this design problem was the wood marbles. The
inconsistent nature of the wood made the marbles stop before they were supposed to
and changed their readings slightly every time. Using them in our tests was just a
hassle and extended our testing over a longer period of time.
What did you learn?
I learned the capabilities of robotics and with even a basic knowledge of programming
we were able to make a great marble sorter. With more advanced programming and
hardware the possibilities now seem endless.
What were some of the challenges of working in a design team?

The biggest challenge of working in a design team was deciding on what design to use.
We originally had a great deal of discussion about why or why not some design would
work. Once we got through the original decision matrix, we were a very cohesive and
responsive team that worked well together.