Skip to the content.

Back

Colour-Sorting Palletiser Robotic Arm

A robotic arm in a palletiser configuration that sorts objects by colour. A TCS3200 sensor reads the colour of each piece and the arm drops it in the position assigned to that colour, driven by SG90 servos.

The interesting constraint was the Atmega328p. It had two PWM outputs available and the arm needed four servos, so I used transistors to switch which pair of servos those outputs were driving. Each servo had its own state machine, plus a calibration mode for fine positioning.

Colour detection worked from the sensor’s output frequency, measured with the external timers and converted into RGB values to classify the piece. The whole flow, from detecting an object to placing it, ran as a finite state machine.

The positions for the sensor, the pickup point and each drop-off were configurable through buttons and a 16x2 LCD, which also showed the current status. Those settings were stored in EEPROM, so they survived a power cycle.

Here is a picture of the prototype (without any of the coloured pieces):

prototype

And here is the hardware schematic:

schematic

Tech Explored

Highlights

Lowlights

Lessons Learned