Friday, June 1, 2012

Capstone Project (Marble Sorting)

Define: For this project, we were given the challenge of designing a machine and programming software that would sort 15 marbles (3 wood, 3 metal, 3 green, 3 red, and 3 clear) into separate boxes or sections.

Ideas: Some original ideas we had for the sorting were:
- Movable Track
- Photoresistors and a strong light for the colored marbles
- Magnet for the metal balls
- Fan for the wooden balls
- Pistons to allow one at a time
- Small alternating doors to allow one at a time

Efforts:
1. First we used a completely movable track to move the marbles. Photoresistors were used to sort the colored balls, a fan was used to sort the wood balls, and a magnet was used for the metal balls. The track consisted of four motors that ran in unison on the same output. Two doors were constructed that would run the first one open then close it, then run the second door after the ball had been registered and the track had been moved.

Problems: The magnets provided at first did not produce enough magnetic field to attract the metal ball at the speed it was traveling down the track. The fan was not working properly because of the angle of the force of the air. The biggest problem was that the doors did not move quick enough to prevent multiple balls from entering the sensor.



2. Next, we got rid of the magnet and we adjusted fan. The photoresistor had been sensing the balls incorrectly so we adjusted the values on the programming. We made a funnel so that the balls could be dropped from a higher position and still roll into a single file line. In replace of the magnet, we made a separate box for the metal marbles so that it would be sensed as if it was just a very dark colored marble. To replace the two doors, we placed two pistons that moved very quickly right next to each other that would only allow one ball in at once. This iteration proved to be quite successful.

Problems: The holding bay that we had kept after the first revision was not long enough to easily hold 15 marbles. Also, the balls entered the holding bay too quickly so they tended to jump up on eachother and make it harder for pistons to operate quickly. The fan still needed to be adjusted to combat the downward force of the wooden balls down the track (the wooden balls were half the weight of the colored balls and a fourth the weight of the metal balls!). The balls were moving slower down the track but the balls kept jumping up on each other.

3. This was our final attempt and it WAS successful! We added a roof to the top of the holding bay so that the balls were restricted to bounce on top of eachother. We completely got rid of the fan for it was very unreliable and instead we had discovered a powerful magnet. We switched the the boxes so that the wood balls would roll down the track into the old metal box and the metal balls would be attracted to the area where the old wood balls were supposed to go. The values worked well and the magnet was very reliable and we have gotten multiple 100% trials. Unfortunately, everytime we attempted to film the process, it seemed to not work... But take my word for it! When it did work, it really did create moments of joy when it worked after working on this one project for about three months.

Process Achievements:
Organize it!
Brainstorm!
"I've made a few special modifications..." (the story is explained in the previous section) AND this quote is from Star Wars (Han Solo)
Final Implementation:

This is the final project
Keys to success:
-The blue wires are connected to the pistons which control one ball entering at a time
-The Magnet is under the white tape on the track. It ensured very high efficiency when sorting the metal marbles.
-The black little boxes with the red switches on the track were very helpful. They let the machine know where it was on the track and know where it wanted to go.
The Programs:

This is the subprogram that controls the main track. It's difficult to see but it basically tells the main track to move towards a certain button depending on what color the ball is that is being sensed.

This is the subprogram that controls the door. After the main track has moved to the correct button, this door slides open the closes shut until the next ball is moved to the correct button.

This is the subprogram that controls the piston. The first piston quickly opens and then closes, allowing for one ball to enter. Then the second piston is a backup in case the first piston lets in a ball. This subprogram was supposed to work 100% but the balls sometimes managed to slide around the pistons if they came down too fast.
Product Achievements:
We sorted all 15 marbles
We did drop the 15 marbles from the highest position
We used two pistons


These are pictures from our final project:
The tunnel

A side view

The final project