← All projects

Design & Fabrication

Automated Color Sorter

Engineering DesignerIntroduction to Engineering Design, Boston UniversityJun 2026 — Aug 2026

Project overview

From Client Brief To A Working Candy Sorter.

In a team of four, I helped design and build a device that detects the color of each candy and flicks it into one of five bins, so candy stores can sell single colors in bulk.

The client’s brief set a 2 ft × 2 ft footprint, a $200 budget, and a target of about one candy per second. We broke the device into three subsystems: a hands-free feed that filters out broken pieces and lines candies up single file, an RGB sensor and Arduino that read each color, and a servo-driven arm that flicks each candy into its bin.

Key Work & Outcomes

  • Sorted about 21 candies per minute into five color bins.
  • Sorted 111 of 125 test candies correctly (≈89%).
  • Designed a hands-free feeding pipeline and multi-bin collection system.
  • Kept the complete prototype within the $200 budget.

Concept

Mapping Functions To Mechanisms

We listed every function the sorter needed, then picked the simplest mechanism for each.

A morph chart let us compare options side by side. Cost and throughput pushed us toward a funnel-and-ramp feed over conveyors or vibratory bowls, and toward a servo arm over stepper or DC-motor flickers.

FunctionChosenAlso considered
Feed candiesFunnel onto a rotating plateVibratory bowl, step feeder, rotating drum
Single-file lineSloped ramp sized to one candyConveyor belt, reciprocating step
Detect colorRGB sensorLight detector, camera
Convert to a signalArduinoRaspberry Pi, ESP32
Sort into binsServo motor with armDC or stepper motor with arm
Glass-box function diagram of the color sorter
Glass-box diagram: feed, filter, detect, signal, and flick into bins

Design

From CAD To Prototype

A stationary candy plate, a rotating sorting core, and a stationary base with five bins.

Color Sorter
Final design of the color sorter
CAD drawing of the color sorter assembly
CAD drawing of the full assembly
Top of Color Sorter
Top section: detects each candy’s color and keeps a steady flow
Bottom of Color Sorter
Bottom section: routes each candy into its color bin

Demo

Sensing And Sorting In Action

The RGB sensor reads each candy, and the servo gates route it to the matching bin.

The Arduino reads raw red, green, blue, and clear values from the sensor, then scales them to a 0–255 range so each color can be matched against a set of thresholds. Steady readings from one candy show the sensor gives a consistent signal to sort on.

Demo of the sorter gates moving to direct candies into bins
Arduino Serial Monitor showing raw and normalized RGB sensor readings for a green Skittle
RGB sensor readings for a green Skittle: raw and normalized 0–255 values, with green clearly the strongest channel

Testing

Accuracy By Color

Orange and green sorted almost perfectly; purple and red were the hardest to tell apart.

Across 125 candies the sorter made 14 mistakes, an error rate of about 11%, just above our 10% target. Most errors were purple and red candies, which point to the next improvement: calibrating the RGB thresholds for darker colors.

Bar chart of correctly and incorrectly sorted candies by color
Correct and incorrect sorts by color: 111 of 125 correct

Continue exploring

See The Complete Project Collection.

Back to portfolio