Built to order

Colour Sorting Machine using TCS3200 Colour Sensor, Arduino and Servo Diverter

This project builds a Colour Sorting Machine using a TCS3200 colour sensor, Arduino and servo diverter that sorts red, green and blue objects automatically. Items slide down a chute, are illuminated by a fixed white LED, classified by calibrated frequency thresholds, and routed by a servo flap into labelled bins while a 16x2 LCD updates the per-colour counts. Suitable for B.E./B.Tech final-year projects in Electronics, E&TC and Embedded Systems.

Electronics / E&TC 16x2 LCD displayArduino Uno · ATmega328PThreshold classificationEmbedded C · Arduino IDETCS3200 colour sensorServo motor · SG90 / MG996RIR presence sensorFrequency measurementHardware
Colour Sorting Machine using TCS3200 Colour Sensor, Arduino and Servo Diverter — project thumbnail preview
More project photos (2)

The problem

Sorting coloured objects by hand is slow and inconsistent work. In small packing lines, classroom demonstrations and recycling sorting exercises, an operator must pick up each ball or cube, judge its colour under changing room light, and drop it into the correct container, repeating the same judgement hundreds of times. Fatigue, poor lighting and similar shades between items lead to mistakes, and the counts in each bin rarely match without a second manual check. A small automatic sorter removes that repetition for a defined set of colours: each item is presented one at a time under controlled illumination, measured by a colour sensor, and physically diverted into the matching bin while the system keeps a running count. This project demonstrates that complete sensing, decision and actuation loop on a benchtop scale, using a frequency-output colour sensor, threshold classification and a single servo diverter that students can calibrate, explain and extend.

How it works

  1. A coloured ball or cube is placed at the top of the inclined chute and slides down to the sensing position, where a small stop holds it in front of the TCS3200 module.
  2. The infrared presence sensor detects the item at the sensing position and the Arduino waits briefly for it to settle before starting a measurement.
  3. The fixed white LED illuminates the item inside the shielded housing, giving the sensor the same lighting for every reading regardless of room conditions.
  4. The TCS3200 outputs a square-wave frequency proportional to light intensity; by setting its S2 and S3 pins the Arduino selects the red, green, blue and clear photodiode filters in turn and measures the frequency for each.
  5. Firmware compares the red, green and blue frequencies against the calibrated thresholds stored for the sample set and classifies the item as red, green or blue, rejecting readings that match no class clearly.
  6. The servo rotates the diverter flap to the bin angle for that colour, the stop releases, and the item drops into the matching labelled collection bin.
  7. The count for that colour is incremented in firmware and the updated totals and last detected colour are shown on the 16x2 LCD before the next item is fed.

Tech stack:

  • Arduino Uno (ATmega328P)
  • TCS3200 colour sensor module
  • Servo motor (SG90 / MG996R class)
  • Infrared obstacle / presence sensor
  • 16x2 character LCD display
  • White LED illumination · shielded sensor housing
  • Acrylic / plywood chute and diverter flap
  • Arduino IDE · Embedded C firmware
Parameter Value
Controller Arduino Uno, ATmega328P
Colour sensor TCS3200 programmable colour-to-frequency converter (datasheet)
Sensor output Square wave, 50% duty cycle, frequency proportional to light intensity (datasheet)
Frequency scaling 100%, 20% or 2% via S0/S1 pins; power-down also available (datasheet)
Filter selection Red, green, blue and clear via S2/S3 pins (datasheet)
Sensor supply 2.7 V to 5.5 V (datasheet); module run at 5 V in this build
Colours sorted 3 — red, green, blue (calibrated set)
Diverter SG90 or MG996R servo, 3 bin positions (as used in the build)
Display 16x2 character LCD, per-colour counts
Sorting rate Approximately 10–15 items per minute (design target)
Item size Approximately 25–40 mm balls or cubes (design target, chute-dependent)
Power supply 5 V DC adapter, separate servo supply recommended (expected)

Project features

  • [TCS3200 frequency-based colour sensing] The TCS3200 module reads each item under a fixed white LED and outputs a square-wave frequency for each selected filter, so colour is measured as numbers the Arduino can compare directly rather than judged by eye.
  • [Calibrated red, green and blue classification] Firmware compares the red, green and blue frequency readings for each item against thresholds recorded during calibration with the actual sample objects, and assigns the item to the closest matching colour class.
  • [Servo diverter flap] A servo rotates a diverter flap to the angle for the detected colour before the item is released, routing it down the correct path into the matching collection bin without manual handling.
  • [IR item-presence detection] An infrared sensor at the sensing position detects when an item has arrived and is stationary, so a reading is taken only when an object is actually present and not on an empty chute.
  • [Shielded sensing position with fixed white LED] The sensor and LED sit inside a small shielded housing at a fixed distance from the item, keeping illumination repeatable between readings and reducing the effect of room lighting changes.
  • [16x2 LCD per-colour counts] A character LCD shows the last detected colour and the running totals for red, green and blue, so the sorting result can be checked against the bins at any point without recounting by hand.
  • [Singulated chute feed] Coloured balls or cubes are loaded one at a time at the top of an inclined chute and slide to the sensing position individually, which is what makes a single-sensor, single-flap design reliable.

What is included

  • Working colour sorting machine prototype with chute, sensor housing and three labelled bins
  • Set of sample coloured balls or cubes used for calibration
  • Firmware / source code for the Arduino
  • Circuit diagram and wiring documentation
  • Component list with part values and module details
  • Calibration procedure for recording red, green and blue thresholds with the sample set
  • Project report PDF (background, methodology, circuit explanation, calibration and results format)
  • PPT presentation for final review
  • Viva Q&A preparation document (TCS3200 working, frequency scaling, threshold classification, servo control)

Limitations & prerequisites

  • The machine sorts only the colours it has been calibrated for — red, green and blue in the base build; a new colour needs its own threshold calibration and a free bin position.
  • The sensing position must stay shielded; strong or changing ambient light reaching the sensor shifts the frequency readings and can cause misclassification.
  • Similar shades, for example light green versus yellow-green or dark red versus brown, sit close to the thresholds and can be confused — the sample set should use clearly distinct colours.
  • Items must be singulated: two items arriving together, or an item still moving during the reading, will produce a wrong or rejected classification.
  • Throughput is modest by design — each item is stopped, measured across three filters and diverted in sequence, so this is a benchtop demonstration, not a production-line sorter.
  • Reading repeatability depends on item distance, surface finish and LED brightness staying fixed; glossy and matte items of the same colour can read slightly differently.
  • The servo flap handles light balls and cubes only; heavy, oversized or irregular objects can jam the chute or miss the diverter.

Frequently Asked Questions

Is this project suitable for a final-year project?

Yes, for Electronics, E&TC and Embedded Systems programs. It combines sensor interfacing, frequency measurement, threshold classification, servo actuation and display handling in one working build. Each stage can be demonstrated and explained separately, from the TCS3200 filter selection to the calibration procedure, which gives clear, concrete material for a review discussion.

How does the TCS3200 actually identify a colour?

The TCS3200 contains filtered photodiodes and converts light intensity to a square-wave frequency. The Arduino selects the red, green and blue filters in turn using the S2 and S3 pins and measures each frequency. A red object reflects strongly under the red filter and weakly under the others, so the pattern of three frequencies identifies the colour.

What calibration is needed before sorting works?

Each sample colour is placed at the sensing position and its red, green and blue frequencies are recorded, then stored in firmware as reference thresholds. Sorting then compares new readings against those values. Calibration takes a few minutes, must be repeated if the LED, sensor distance or sample set changes, and is fully documented in the manual provided.

Can more colours or more bins be added?

Additional colours can be calibrated and added within the limits of the diverter positions and how distinct the shades are. More bins need a wider diverter arrangement or a second servo, which changes the mechanics and firmware. Such extensions are possible as a separate customisation and are not part of the base three-colour build described here.

What power supply does the machine need?

The Arduino, sensor, LCD and IR sensor run from 5 V, and the servo is best fed from a separate regulated 5 V supply so its movement does not dip the controller supply and disturb readings. A suitable adapter arrangement is specified in the documentation, and no internet or computer connection is needed during normal sorting operation.

What will I receive with the project?

The working prototype with chute, shielded sensor housing and three labelled bins, a set of calibrated sample objects, the complete Arduino firmware, circuit and wiring documentation, the component list, a written calibration procedure, the project report and PPT, and a viva Q&A document covering the sensor, classification logic and servo diverter.

Components & software requirements
  • Arduino Uno (ATmega328P)
  • TCS3200 colour sensor module
  • Servo motor (SG90 / MG996R class)
  • Infrared obstacle / presence sensor
  • 16x2 character LCD display
  • White LED illumination · shielded sensor housing
  • Acrylic / plywood chute and diverter flap
  • Arduino IDE · Embedded C firmware
Delivery information

Built-to-order project. Delivery timeline is shared after order confirmation based on current queue.

Support terms

Complete documentation, setup guide, and viva preparation included. Support for setup and explanation provided.

Download free synopsis (PDF)

Enter your name and email — the synopsis PDF downloads immediately. We may send occasional project updates; no spam, unsubscribe anytime.

Get a quotation