Spring 2025

Skittles Color-Sorting Device

CAD · C++ · Wiring · Assembling · Team Work

Demo

See it in action

Objective

Sort five candy colors accurately, quickly, and anywhere

The goal was to build a portable device that sorts Skittles by color into five compartments (red, yellow, green, purple, and orange) with no help from the user. We set five key objectives at the start: sort by color, detect colors consistently (above 99% over a long run), measure accurately (above 95%), stay portable (under 4 kg), and sort each candy in under 5 seconds. Accessibility shaped the design as well, so every compartment also carries a Braille label for people who are color blind or visually impaired.

The Device

A sorter built for everyone

This project was a portable, fully 3D printed candy color sorting device that sorts Skittles by color into five labeled compartments. The device was built with accessibility in mind: each compartment is marked with both a large engraved letter and a Braille label, making it usable for people who are color blind or visually impaired. The entire housing is powered by batteries with no external power source needed and is lightweight (1.2kg), making it very portable.

CAD & 3D Printing

Built from the ground up

Every component of the device was designed from scratch in SolidWorks and 3D printed in PLA material. The 18 custom parts include the funnel, rotating disc, ramp, compartment storage, sensor mounts, servo supports, and housing for the Arduino and batteries. Each part was dimensioned precisely to fit Skittles and integrate cleanly with the motors and wires.

CAD model of the Skittles color sorter

Code & Detection Algorithm

The logic behind every sort

The Arduino code reads raw RGB values from the TCS3200 color sensor and converts them into normalized ratios, which are then compared against calibrated reference values for each of the five Skittle colors using a nearest-neighbor algorithm. To eliminate false readings, the system requires two consecutive matching detections before confirming a color and moving the ramp servo to the correct position.

Flow chart of the sorting logic

Results

Every objective met

We set five key objectives at the start of the project and hit every single one. The device achieved 99% sorting accuracy and 100% color detection across 100 trials, sorted each candy in under three seconds on average, and came in at just 1.26 kilograms.

Table of the five key objectives, their metrics, and the results achieved

Project Image

The Skittles color-sorting device
← Return to Projects