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.
How about for the next contest, we have a “fastest skittle/m&m sorting machine” competition?
Next contest should be a machine that can sort Skittles from M&Ms while sorting them by color.
If only Del Preston had had this machine… him an jeff beck would have never gone to that sweet shop on the edge of town…
[youtube=http://www.youtube.com/watch?v=k_7kg5ZzDZo&w=420&h=315]
Slick project. Looks to me like an arduino uno, might want to fix the article.
Yeah it’s an Uno not a Duo
Bet it doesn’t work for Liquorice allsorts… ;-)
The colour sensing arrangement is quite interesting in particular – I wonder how accurate it is?
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.
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.)
Did he use a Mealy or Moore machine?
Really slick setup and good use of 3d printed parts. The wiring is even nice to look at,and modular. Not a practical machine but I’d put one on my desk ‘just because.’
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.
I thought the same thing, but then you’d have to be very sure that all M&M’s took the exact amount of time.
I also would use 2 chutes simultaneously.
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.
Conversely, you could also determine the time the candy takes to travel down the shute and drop it before the end of the shute is even over the cup.
(he does)
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.
Or skip the chutes and scooch the cups closer to your small angled centerpiece.
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!
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.
What happened to al the “Blue” M&M’s?
It doesn’t appear to be able to choose which direction is shortest it just changes direction between each selection.
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..
I wonder if this can be used to sort beads.
I wonder if this can be used to sort kittens by eye color.
Better have a big tub for blue.
Seems to go the wrong way around often. I programmed an 8 bin sorter like this in ’84, though we weren’t sorting skittles by color. Was easy with an 8 byte lookup table: Where you are vs where you want to be, 1 for CW and 0 for CCW.
It always goes the right way. You can probably puzzle out how that can be without even reading the comments or article.
I’m pretty sure its because the multi-directional servo has a limited range of motion. Only the one dropping the candy is continuous motion.
socket packing tube as frame! I love it!
Anyone else notice that it throws a brown one in with a yellow at 1:24?
Forgot this one in “Related Hacks” http://hackaday.com/2012/11/05/skittles-sorting-machine-sorts-skittles-keeps-the-band-happy/
Why the sorting machine didn’t have schematic diagram . Can you help me to find the schematic diagram .