from Hacker News

A DIY M&Ms and Skittles sorting machine

by joeguilmette on 2/5/17, 6:31 PM with 121 comments

  • by Animats on 2/5/17, 7:51 PM

    Here's the commercial version.[1] This machine is sorting peas by color. Peas. Individual peas. Each individual pea is examined by cameras for size, color, and looking like a pea. Rejects are kicked into the reject hopper by an air jet. There are machines like this for most fruit. Typical throughput is a ton per hour. Most fruit and berries go through such machines today. That's why the fruit at the supermarket is so consistent.

    The process looks like magic. Color-mixed items go in, and single-color items come out, on a line going so fast that no human can see what's happening. It's amazing to see computer vision systems that fast.

    These machines work by putting the items on a conveyor belt, then dropping them on a much faster conveyor to spread them out. The fast conveyor goes past cameras, and at the end, launches the items into free flight for a few inches. While in flight, computer-controlled air jets knock out the rejects.

    [1] https://www.youtube.com/watch?v=JyGR6A5MWG0

  • by jacquesm on 2/6/17, 12:39 AM

    What a nice job this person did.

    Coincidentially I'm working on something similar at the moment only with an order of complexity that is several magnitudes larger than the one on display here (39000 different shapes, several 10's of possible colors). But my contraption doesn't nearly look as nice as this one and definitely is not ready for any kind of production.

    I've been working on this for the last two years or so, it has just about every bit of my skills exercised (optical, mechanical, software, electronics) and every time there is a minor breakthrough I feel like throwing a party.

    Likely this piece of gear will never see the light of day in a commercial setting but it's the most fun I've had in a long long time.

    Disillusioned with web programming (security really spoiled the fun I used to have making web stuff) I figured I should do something that will make programming fun again and at least on that count I have succeeded.

    And on another note, I've gained a lot of respect for the visual cortex and it's preprocessing capabilities.

  • by crusso on 2/5/17, 7:46 PM

    Top marks for: 1. Showing a diversity of maker skills 2. Making something that actually works 3. Industrial design savvy 4. Entertaining video

    You've given me some motivation to get off of HN and work on one of my side projects for the rest of today.

  • by acheron on 2/5/17, 10:18 PM

    Now that green skittles have changed from "lime" to "apple" (my lawsuit regarding calling the flavor assortment "original" will be filed any day now), I need a machine like this to sort the green ones into the trash where they belong.
  • by dankohn1 on 2/5/17, 7:08 PM

    Your video is even more compelling: https://www.youtube.com/watch?v=ceGlMV4sHnk
  • by gjkood on 2/5/17, 7:36 PM

    Fantastic job! Functional and beautiful at the same time.

    This is the kind of stuff that I love to read about in the mornings.

    I know this machine will not solve world hunger or bring about world peace but I know this would bring peace to my family.

    I apologize in advance but I am going to "borrow" your design and work with my kids to recreate this.

    Thank you for giving me something worthwhile and productive to do with my kids today. Atleast give them something inspiring and fun to look forward to.

  • by saghm on 2/5/17, 7:17 PM

    This is really cool! I love how it lights up with the color of the candy it's sorting each time.

    I'm curious, have you tried putting both Skittles and M&M's in the same batch? I'd be interested to see if it determines that the purple Skittles and the brown M&M's are the same color, for example

  • by asafira on 2/6/17, 12:04 AM

    This is still an awesome project, but anyone else notice the machine makes a mistake? @ 1:10, in the background, you can see a purple skittle with green ones.

    (Technically it we don't see it make the mistake, but it probably had made a mistake...)

    Awesome job! Any stats on its error rate?

  • by elihu on 2/6/17, 2:33 AM

    I wish I had a link, but this reminds me of a machine that was at the OMSI Maker Faire in Portland last summer that measured the shininess of pennies and then directed them into a large board with columns (kind of like a giant connect-four board).

    The machine sorted the pennies to match a greyscale image given as input, so that the final output is a penny mural ready to be encased in epoxy.

  • by pimlottc on 2/5/17, 7:20 PM

    I've often idly thought about such a machine but this is much more beautiful than anything I would come up with, well done! I expect you'll be working on some statistical analysis on M&M color distribution now that you've got this part finished?

    Also, what's the difference between processing M&Ms and Skittles? Is it just the expected colors?

  • by ktta on 2/5/17, 8:49 PM

  • by DoctorNick on 2/5/17, 7:43 PM

    The perfect machine for when you're hosting Van Halen concerts: http://www.snopes.com/music/artists/vanhalen.asp
  • by prashnts on 2/5/17, 7:14 PM

    It's brilliant! Well done for such a fantastic job designing the hopper and sort units. Plus the sound it makes while sorting is very pleasing. :)
  • by overcast on 2/5/17, 11:45 PM

    I remember doing the same thing in my Digital Electronics class in junior high. Except it was marbles, and we used BASIC.
  • by BillyParadise on 2/6/17, 3:10 AM

    You could probably sell one of these into every concert theatre in the world. I'm wracking my brain and exercising my google-fu, but I can't seem to find/remember which famous musician wanted only one color of candy on their rider. Or was it everything except the green ones. Or something like that.
  • by nycmattw on 2/5/17, 7:44 PM

    You know what would be even better? Sorting the difference between M&Ms and Skittles :)
  • by matart on 2/5/17, 8:05 PM

    I didn't see it anywhere but are you willing to provide the 3D printing files?
  • by Reason077 on 2/5/17, 11:28 PM

    Mars, Inc. could save us all a lot of trouble by pre-sorting them at the factory!
  • by myfonj on 2/5/17, 10:48 PM

    If you are into this kind of things, check out the pebble sorting artistic installation, Jller: https://vimeo.com/167126696
  • by femto113 on 2/5/17, 11:46 PM

    Am I the only one who read the headline and thought the machine was created to undo this monstrosity?

    http://imgur.com/kXfGutB

  • by dugluak on 2/5/17, 10:18 PM

    A lego sorting machine by shape and color would be so great
  • by zaf on 2/6/17, 12:52 PM

    For our high school end of year CDT (Craft, Design and Technology) project, my best friend built a snooker ball sorter. It was awesome.
  • by source99 on 2/5/17, 10:52 PM

    This is very cool. Well done and great write up.

    I don't think I could punch that much effort into something i wasn't going to commercialize.

  • by BlytheSchuma on 2/5/17, 9:23 PM

    Anyone here found a good pill sorting machine yet? All the ones I've found just seem to be vaporware.
  • by makwarth on 2/5/17, 9:24 PM

    Very cool - thanks for sharing!
  • by exabrial on 2/8/17, 2:48 AM

    Thank goodness this problem is finally solved.
  • by dammitcoetzee on 2/5/17, 7:22 PM

    This one is so fast! Nice Job!
  • by anjc on 2/5/17, 8:15 PM

    Very cool