Skittle Sorter




About: Purdue University Mechanical Engineer. CAD designing, 3-D printing, CNC Plasma cutting, Laser cutting, welding, woodworking, Arduino enthusiast and instructor.

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!

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

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.



    • Indoor Lighting Contest

      Indoor Lighting Contest
    • Make It Fly Challenge

      Make It Fly Challenge
    • Growing Beyond Earth Maker Contest

      Growing Beyond Earth Maker Contest

    7 Discussions


    Reply 2 years ago

    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.


    2 years ago

    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?

    2 replies

    Reply 2 years ago

    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!


    Reply 2 years ago

    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!

    BVarvDIY Hacks and How Tos

    Reply 2 years ago

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