M&M Sorting Machine
I conceptualized, designed, and built this project for a mechanical engineering course about microprocessors. The objective for the project was to sort something. I was given an assortment of sensors, motors, and electrical components, an Arduino Uno, and access to a 3D printer.
I chose to attempt to sort m&m candies by color, which required coming up with a system to sense color with a limited assortment of electrical components. The system I developed uses a RGB LED and a photoresistor to measure the intensity of reflection of each m&m in response to several colors of light. The sorter trains itself on the responses of the first six m&ms and then uses those references to identify the color of each subsequent m&m. The sorter keeps track of how many m&ms have been sorted and refines the reference values as more m&ms are identified.
I am particularly proud of the mechanisms I designed for this project. The primary mechanism selects an m&m from the reservoir, places it into the sensing chamber, closes that chamber, and then dispenses of it in one of two directions, all with only one moving part driven by a stepper motor coupled with a limit switch. Movement of a second piece, driven by a servo, further divides the m&m path to triple the number of colors that the machine can sort. The whole machine was designed to be compact, visually pleasing, and to screw onto a jam jar that I had outfitted with dividers. All parts were designed in SolidWorks and 3D printed.