Color Sorter Machine

Published on . Written by

Color Sorter
Sorting is a technique used to group similar things together. It finds extensive scale applications in mass-production facilities because, in such production facilities, similar items need to be shipped together.

Read more..
Have you ever wondered how pencils, chalks and other such color-based objects are segregated and packed? Most of these packaging systems make use of sorting algorithms to place items together. In this project, let us take a look at a color sorting algorithm and a device that will help us group colors automatically.


Skyfi Labs Projects
Project Description

Color sorting puts things together based on their color. As grouping things is a repetitive task, automating it is a great way to save time and labor. The device makes use of a color sensor to read data regarding colors, and sense which objects are of which color. Once the detection has been successfully made, the device will then sort the balls, and place them into the right box by using guide rails.

Working Principle

  • The colored balls must be first lifted by the hand and dropped onto a flat surface or platform which comes under the range of the sensor.
  • The servo motor rotates the platform onto which the ball is dropped until it comes within the range of the sensor.
  • The color sensor must then analyze the balls and read enough data to identify the color of the object within or on the platform.
  • As per the data received from the sensor, the Arduino must appropriately actuate the motor.
  • The motor, as per instructions received from the Arduino, must rotate and put the ball into the right guide-rail or box.
Project Implementation

  1. Design the components for the arms and the chassis of the machine on a drafting tool.
  2. Check for stress formation and redraw and re-design till you get an optimum design.
  3. Once you are satisfied with your design, draw the parts out onto the cardboard or wood.
  4. Cut them out using a hand saw or power tool as per the drawings.
  5. Assemble the outer parts for the framework first, using either a glue gun or fasteners and screws.
  6. Next, attach the servo motors onto the assembly at the required positions.
  7. Next, fix the guide rails to the corresponding supports and boxes as per the color-coding.
  8. These guide rails will help the balls fall into the right box.
  9. Insert the switch and power source to run the Arduino using an adapter.
  10. Attach the color sensor onto the right position on the platform, and the device is set to go.
  11. Join the electrical components as per the circuit diagram is given.
  12. The last step is writing the code for the Arduino.
  13. Include the Servo.h library and determine the Arduino's pins onto which the color sensor would be connected.
  14. Create objects to define the two servo motors.
  15. Declare the variables needed for the program to function.
  16. Define the Output and Input pins as well and also determine the frequency with which the color sensor will scale the colors.
  17. Define servo-pins and then establish communication between the sensor and the Arduino.
  18. Use “for loops” to rotate the platform and bring the balls to different positions.
  19. Control the speed of rotation and angles at which to stop using the “for loop”.
  20. The TCS3200 can be used to read Red, Green and Blue colors and identify it.
  21. Using the RGB values picked up by the sensor, the Arduino utilizes a Sorting algorithm to put the balls into the right slot.
Concepts Used

  • Sensor Technology
  • Algorithm Logic
  • Arduino Programming
  • Sorting Algorithms
  • Arduino Architecture
  • Basic Circuit Designing
  • Solidworks/AutoCAD Drafting
  • Kinematics and Design of Machines
Components Required

  1. Fiberboard/Wood
  2. Power Tools for cutting and drilling
  3. Glue Gun
  4. Screws and Fasteners
  5. Servo Motors
  6. Guide rail
  7. Switch button
  8. Power Source/Battery
  9. Arduino Nano Board
  10. Adaptor
  11. TCS230/TCS3200 Color Sensor
  12. Jumper Wires
  13. Coloured Balls
  14. Cutter/Scissors
Kit required to develop Color Sorter Machine:
Technologies you will learn by working on Color Sorter Machine:


Any Questions?


Subscribe for more project ideas