Quick Candy Sorting Machine

570px-Sorting_machine_view

OCD. Sometimes things just get to you, like those pesky bags of randomly assorted candies. [Torsten] decided to build a sorting machine capable of sorting Skittles or M&Ms into separate cups by color at around 80 pieces per minute. It’s a great implementation, using an Arduino Duo. He based the code on the principles of a finite-state machine, in order to make it as quick as possible.

It works as you would expect: When a candy piece is loaded, the color is determined using an RGB sensor. A 360-degree servo is used to move the chute to the proper position, and interestingly, the system preemptively releases the candy before the chute is in position in order to maximize the speed. If you watch closely, you can see this behavior in the video (embedded after the break).

[Torsten] includes a complete bill of materials, if you’d like to try it for yourself. He also included a list of possible improvements.

31 thoughts on “Quick Candy Sorting Machine

    1. There seams enough color deferential to pick them apart with fairly low accuracy equipment. My guess is that this device run at better than 99.9% and most likely not made a mistake since final software revision.

  1. Just the thing when you need to eliminate all brown M&M’s:

    http://www.thesmokinggun.com/file/van-halens-legendary-mms-rider?page=6
    http://www.snopes.com/music/artists/vanhalen.asp
    http://www.npr.org/blogs/therecord/2012/02/14/146880432/the-truth-about-van-halen-and-those-brown-m-ms

    Personally, if I had ever produced their show (very unlikely :^), I would have adhered to the letter of the contract, but left a bag in a bowl and a big sign “pick out your own @#$% brown M&Ms.

    (I tried to get a boss to do basically the same – he sent a long and fairly detailed contract to a supplier. I wanted a clause in the middle where they would send us a couple of pounds of M&Ms when they actually signed the contract, just to check they really read it. He did not see the humor. Sigh.)

  2. Awesome. I wonder if it’d be practical to sort faster by having the chute rotate at a constant speed (higher than the current speed, as it wouldn’t need to keep stopping and starting) and just dropping the items at the right times.

      1. I would use six chutes and a small angled centerpiece as the only rotating part to reduce the inertia. Once you drop the candy, you can immediately start to move it to the next position instead of waiting for the candy to fall down the chute.

          1. He still has to keep the arm there all the while the candy is rolling down the chute, instead of dropping the candy in and immediately turning to drop the next candy to a different chute.

  3. If speed’s the driver, perhaps add a continuous rotation servo to the chute also? Seems to got ‘the long way around’ sometimes. A continuous rotation pot would give you abs. pos. feedback, as would reed/hall/IR/etc etc sensors placed at each cup. Does the system provide stats? Ie. total # counted, # of each colour, etc? Fun, elegantly designed project – thanks for sharing!

  4. This would be an interesting piece, not necessarily art, but something with the video or demonstration of Skittles or M&Ms being funneled together by the machine that makes them at the factory. As I’m sure they are made in batches by color. And then this little semi-autonomous machine, unsorting them. Like some kind of null void.

    1. I think his rotation servo is a 360 degree servo, not a “continuous rotation” one. It has an end-stop at the right. It cannot move directly from “two oclock” to “four oclock” except by passing the “nine oclock” position..

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s