Introduction: Skittle Sorter

Picture of Skittle Sorter

Make a machine capable of sorting 100g of skittles by color as quickly and as accurately as possible.

The learning goals are to apply basic understandings in electricity and to develop an intermediate level of understanding with an Arduino, mainly the use of third party sensors, if/else statements and servo-motion control.

To evaluate the success of your machine, imagine this is in a pharmaceutical application and that the green, yellow and orange skittles are very different medications to be distributed to patients and that the red and purple skittles are poison to be discarded. Discarding medication is not nearly as bad as distributing poison. Mixing medications is bad with varying consequences.

I hope you enjoy the project!

Step 1: Getting Started

Plan and make the back-board of your skittle sorter. You will also be adding the vibration necessary to keep the skittles flowing smoothly through your skittle sorter. Be careful with the hot glue and the box cutter!

Step 2: Feeding Skittles One at a Time

Learn to control a continuous rotation servo using an Arduino so that you can feed skittles one at a time in front of the camera.

Step 3: Detecting the Skittle Color

Learn to connect a camera to your Arduino and how to use that camera to get skittle color data back to your Arduino.

Step 4: Sorting Based on Color

Use the color information from the camera and your understanding of servo motion to sort the skittles based on color.


DavidL537 (author)2017-02-05

how do you feed only one at a time though?

BVarv (author)DavidL5372017-02-05

Important question! Thank you. Students measure the skittle dimensions, then use those dimensions to design an advancer wheel that lifts only one skittle per notch. The second half of this video shows designing such an advancer as well as an example sorter in action.

nedevski (author)2017-02-01

The second I heard "sorted by color" I thought of the cheap chinese color sensors (link below). From what I've seen they have fast response and you don't need a computer or a Raspberry Pi to make it work, Arduino should be fine.

Actually I will order a color sensor just for the sake of trying this with M&M's :D

Link to example module:

What do you think?

BVarv (author)nedevski2017-02-01

Wow, such a great resource! Thank you! Yes, please do and post your results. I'd love to check it out.

What do I think?

The sensor you suggest is definitely a cheaper solution, and would likely work with some diligence and critical thinking. However, I have to remind myself that the project is less about sorting skittles and more about getting beginning microcontroller users comfortable navigating online documentation and with picking and choosing code needed to solve their specific challenge. The documentation and support around Arduino and Pixy are wonderful arenas for this learning to occur. The cut sheet on the TCS3200 seems like it would be intimidating to this audience. However, "intimidating to a beginner" equals fantastic extension challenge to early finishers and/or good starting place for learners already at the intermediate level. I'll order a few and see how it goes.

Great contribution. Thank you!

nedevski (author)nedevski2017-02-01

Just found this video, but it seems a loooot slower than your solution.

But I totally love the concept with the pills, awesome idea and project!

DIY Hacks and How Tos (author)2017-01-29

Clever. I wonder if you could get this to sort the marshmallows in Lucky Charms cereal.

Thanks! You sure could, you would only need to program Pixy to the marshmallow colors. Thanks for looking at the project!

About This Instructable




Bio: Purdue University Mechanical Engineer. CAD designing, 3-D printing, CNC Plasma cutting, Laser cutting, welding, woodworking, Arduino enthusiast and instructor.
More by BVarv:Pool Playing RobotSkittle Sorter
Add instructable to: