Compact M&M Sorter Goes Anywhere

Let’s face it — eating different colored candy like M&Ms or Skittles is just a little more fun if you sort your pile by color first. The not-fun part is having to do it by hand. [Jackofalltrades_] decided to tackle this time-worn problem for engineering class because it’s awesome and it satisfies the project’s requirement for sensing, actuation, and autonomous sequencing. We’d venture to guess that it satisfies [Jackofalltrades_]’ need for chocolate, too.

Here’s how it works: one by one, M&Ms are selected, pulled into a dark chamber for color inspection, and then dispensed into the proper cubby based on the result. [Jackofalltrades_] lived up to their handle and built a color-detecting setup out of an RGB LED and light-dependent resistor. The RGB LED shines red, then, green, then blue at full brightness, and takes a voltage reading from the photocell to figure out the candy’s color. At the beginning, the machine needs one of each color to read in and store as references. Then it can sort the whole bag, comparing each M&M to the reference values and updating them with each new M&M to create a sort of rolling average.

We love the beautiful and compact design of this machine, which was built to maximize the 3D printer as one of the few available tools. The mechanical design is particularly elegant. It cleverly uses stepper-driven rotation and only needs one part to do most of the entire process of isolating each one, passing it into the darkness chamber for color inspection, and then dispensing it into the right section of the jar below. Be sure to check out the demo after the break.

Need a next-level sorter? Here’s one that locates and separates the holy grail of candy-coated chocolate — peanut M&Ms that didn’t get a peanut.

12 thoughts on “Compact M&M Sorter Goes Anywhere

        1. Yeah, imagine a breaker tripping or part of the stage collapsing, let alone mid concert.

          Extra kudos to the tech who read the document and used an optical candy sorter to comply with the telltale clause.

    1. The mechanical hardware is very compact. Note the video says it a demo so once now the electronic can be replaced with an ARV MCU, a motor driver, an LCD display and some batteries. It’s quite compact.

  1. There’s the alternative of a white LED and RGB sensor? It’s a bit more expensive ($8 on a breakout board) and the sensor talks I2C but it tells you the color right away.

    Now I kinda want a completely miniaturized version that I can take anywhere to share a packet of Skittles in the nerdiest possible way. Small hopper with a sensor to start and stop sorting as you pour them.

  2. I love this thing, the compactness of the mechanics are awesome and I love the concept of two jars on top of each other. many years ago I made something for use with a C64, but that thing was huge.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.