Designing a Skittle Sorter
Nobel Peace Prize Ceremony 2015
Geneva, Switzerland
Tarung Bhimnathwala, Abhimanyu Choudhary, Christopher Decarolis, Alexander Yi
Role Breakdown
Writing Code
What exactly are we doing here?
Research Conducted
Building a Color Sensor
- Abhimanyu Choudhary: Shepherd and leader of Manalapan High School Science and Engineering Program, certified Actuary, as well as project leader, reincarnate of Buddha, Jesus, Mohammed(Tupac Shakur).
- Structural Design and CAD Manager
- Tarung Bhimnathwala: self-proclaimed Quantum Physics deity.
- Circuitry Manager and kid who never picked up the phone
- Christopher Decarolis: ASA(Acoustical Society of America) certified Acoustical Engineer, lead guitarist of 21 Grammy winning band Chris D. and the Baby Seals (pun intended)
- Coding Manaeger and Resident Salt Mine
- Alex Yi: Certified Actuary, head intern at Liberty Science Center, and part time olympic swimmer.
- Documentation Manager
- Color Theory
- How can colors be represented and distinguished by a computer?
- The Arduino Language
- How does it work, and how can it be used to sense color and control motors?
- Circuitry
- How do we operate stepper/servo motors?
- Dampening
- How do we stop things from bouncing and oscillating more than we like?
- Two sorts of code were written for the arduino:
- Interaction with the color sensor
- Stores an array of initial R,G and B values for each color of Skittle (Orange,Purple,Red,Green,Yellow)
- Reads in a voltage from the LDR in the color sensor circuit
- Checks the read in values against those stored
- If there is a match, the skittle is considered to be a certain color.
- Accounts for small variations in values using root mean square error.
- Basic Design: A LDR juxtaposed to an RGB LED
- The RGB LED was initially three white LEDS with red green and blue color filters, ended up being too clunky
- Shine each primary color (Red Green Blue) onto the skittle and obtain voltages from the LDR.
- Check these voltages with prerecorded values
- Based on results of check, find out the color
- The skittle must be isolated from outside light to make it usable everywhere
- A pvc casing was developed, painted all black to prevent any internal reflection/interference (Sorry didnt mean to trigger you)
How exactly are we going to do this?
The Beginnings of a Design
Writing Code (Pt.2)
Issues Encountered(Pt.2)
Changes Made and to be Made
- Wheel was propped onto a felt sheet to prevent friction
- Still has alignment issues
- Color Sensor was covered by small paper drapes to prevent ambient light interference
- Prevents need for calibration every time
- All plywood was screwed to dowels to prevent unintended movement
- Planks were made parallel using a level
- Funnel continues to jam
- Use a solenoid periodically to shake and unjam
Demo
Stepper Motor Circuitry
Issues Encountered
- Stepper motors were nightmarish for a reason
- Very fickle devices, looked to work on their own whim
- "Disgusting" according to Christopher Sanzi
- One poorly soldered connection (thanks Tarung) often destroyed the function of the motor
- Funnel would jam often
- Shaking the funnel with one's hands often did nothing
- Morale often dipped
- Not helped by being within 10 feet of a salt mine at all times
- Code was also written to deal with stepper motor interactions
- To refresh, two steppers were used
- One rotated the final container
- One rotated the disk/wheel that moved skittles
- Code rotated the wheel 90° after each skittle's color was checked.
- After the color was detected bottom container was rotated in increments of 72°(5 partitions for each color).
- Wheel turns, skittle falls into the partitioned container.
- Many redesigns were in order
- Number of Wheels
- RGB LED or Three LEDs with separate color filters
- Issues 3D printing various parts
- Filled in areas where holes should be originally
- Innumerable amount of issues involving imprecision
- A slight movement or change in conditions caused a complete breakdown
- Ex.
- Pressure due to weight of skittles slowed wheel and inhibited proper sorting
- Color Sensor operation varied due to ambient light
- Few measurements were taken.
- Lead to poor aesthetics
- Hundreds of retakes and retests were required until final function
- Perhaps the most nightmarish and traumatic portion of the project.
- We originally used a two-pin setup to conserve pins on the Arduino
- This proved extremely difficult to implement, with botched soldering jobs making the circuits unuseable
- We switched to a four-pin setup, which was easier to execute
- The Arduino, using the leads, excites one coil in the motor at a time
- This rotates the central shaft one step at a time
- Since each step is a defined angle, rotation through a precise angle is straightforward
- Circuit was controlled using an Integrated Circuit(IC)
- Uses a number of logic gates in order to control the aforementioned rotations.
Structural Design
Good Question! We've asked the same one through the past two marking periods.
The Problem-Design a Robot that can sort skittles into different groups based on their color, with no human interaction.
A Quick Meme Break (B4 the gud stuffz)
- Skittle Sorter consisted of 4(four) sheets of plywood stacked with space in between.
- Plywood sheets were held up by wooden dowels
- First layer : funnel and various pieces of graffiti(credit to Christopher Sanzi)
- Second Layer: the "brains" of the machine, contained wheel to move skittles, as well as bulk of color sensor
- Third Layer: a servo motor rotating aforementioned disk
- Fourth Layer: Partitioned container to hold all skittles
- We looked to take a "Systems based approach"
- An approach emphasizing not only each separate component of the project, but also interactions between components.
- What were our our components?
- Color Sensor- A device(s) to detect what color each skittle is.
- A set of mechanical constructs to move a skittle from its initial location to final location.
- A structure to house all above components.
- Near the beginning of the process, we looked to use a design involving two wheels and two servo motors.
- One wheel would move skittles through the color sensor and then to a second platform
- From this platform, the skittle would be positioned over a partitioned container and dropped into it.
- We chose to abandon this design however
- Servo motors are only capable of turning 180° (π rad) relative to their original position.
- Switched to servo motors instead
- Two disks made it difficult to coordinate the movements of each servo, and was an unnecessary abstraction
- Kept a one wheel design
- Instead one wheel would rotate to move skittles, the partitioned container at the bottom would rotate.