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.