loading

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.

<p>how do you feed only one at a time though?</p>
<p>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. </p><p><iframe allowfullscreen="" frameborder="0" height="281" src="//www.youtube.com/embed/LwjerjIbDJw" width="500"></iframe></p>
<p>The second I heard &quot;sorted by color&quot; 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.</p><p>Actually I will order a color sensor just for the sake of trying this with M&amp;M's :D</p><p>Link to example module: https://www.dfrobot.com/wiki/index.php/TCS3200_Col...</p><p>What do you think?</p>
<p>Wow, such a great resource! Thank you! Yes, please do and post your results. I'd love to check it out. </p><p>What do I think? </p><p>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, &quot;intimidating to a beginner&quot; 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.</p><p>Great contribution. Thank you! </p>
<p>Just found this video, but it seems a loooot slower than your solution.</p><p><iframe allowfullscreen="" frameborder="0" height="281" src="//www.youtube.com/embed/_siU2XmSDrc" width="500"></iframe></p><p>But I totally love the concept with the pills, awesome idea and project!</p>
<p>Clever. I wonder if you could get this to sort the marshmallows in Lucky Charms cereal. </p>
<p>Thanks! You sure could, you would only need to program Pixy to the marshmallow colors. Thanks for looking at the project!</p>

About This Instructable

4,000views

19favorites

License:

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 Robot Skittle Sorter 
Add instructable to: