Professional Documents
Culture Documents
Page
1. Introduction 2
4. Project plan 7
5. Budget Plan 10
6. Project Specification 11
6.4. Result 16
7. Project Evaluation 18
9. Project Performance 19
10. Conclusion 20
1
1. INTRODUCTION
Color sensor systems are increasingly being used in automated applications to detect
automation errors and monitor quality at the speed of production line. They are used in assembly
lines to identify and classify products by color.
An employee who has been performing an inspection task over and over again may
eventually fail to recognize the color of product. Automating many of the tasks in the industries
may help to improve the efficiency of manufacturing system.
The purpose of this Integrated Design Project is to develop an idea of how to implement a
system which automatically separates products based on their color and packaging the product
which consist of different colors in one package. This DIY Arduino based color sorter and
sequencer project consists of three parts: servo motor to fetch products, color sensor and another
servo motor to drop objects. The output and input of these parts was interfaced using Arduino
microcontroller.
2
2. AIM AND OBJECTIVES
AIM
To sort different objects according to the color.
OBJECTIVES
To program and design a sensor which can detect frequency range of different colors and
differentiate between them.
To apply the basic knowledge on microcontroller, sensor and actuators.
To solve sensor problems and errors.
FIGURE 1. TCS3200 color sensor and magnified views of its photodiode arrays
The TCS3200 has an array of photodiodes with 4 different filters. A photodiode is simply a
semiconductor device that converts light into current.
The sensor has:
▪ 16 photodiodes with red filter sensitive to red wavelength
▪ 16 photodiodes with green filter sensitive to green wavelength
▪ 16 photodiodes with blue filter sensitive to blue wavelength
▪ 16 photodiodes without filter
3
3.1.1. SENSOR SPECIFICATION
• Power 2.7V to 5.5V
• Size:28.4*28.4 mm
• Interface: digital TTL
• High-resolution conversion of light intensity to frequency
• Programmable color and full-scale output frequency
• Communicates directly to microcontroller
FIGURE 2. Light intensity is absorbed by photodiodes & converted to frequency and then sent to
microcontroller as an Input
By choosing the photodiode filter’s readings, we can detect the intensity of different colors.
The sensor has a current -to-frequency that converts its reading into a square wave with a frequency
that is proportional to the light intensity of the chosen color. And then this frequency is read by the
Arduino as shown above figure.
TABLE 1. Pinouts of TCS 3200
4
FIGURE 3. Schematic Diagram of TCS 3200
TABLE 2. Choosing the percentage of output frequency
depending on the microcontroller
3.1.2. FREQUENCY SCALING
Pins S0 and S1 are used for Output frequency S0 S1
scaling the output frequency. It can scaling
be scaled to the following preset
values: 100%, 20% or 2%. Scaling Power down Low Low
the output frequency is useful to
optimize the sensor readings for 2% Low High
various frequency counter or
microcontrollers. For the Arduino, it 20% High Low
is common to use a frequency scaling
of 20%. So, we set S0 pin to HIGH 100% High High
and S1 pin to LOW. 100% frequency
can be used for high speed
processers.
3.1.3. FILTER SELECTION TABLE 3. Choosing the type of photodiode for reading the
specific color
To select the color read by the
photodiode, we use the control pins Photodiode type S2 S3
S2 and S3. As the photodiodes are
connected in parallel, setting the S2 RED Low Low
and S3 LOW and HIGH in different
combinations allows us to select BLUE Low High
different photodiodes.
No filter (clear) High Low
5
3.2 SERVO MOTOR
• Rotary actuator and can also be used as linear actuator
• Work on PWM (Pulse Width Modulation)
• Made up of DC motor which is controlled by a variable resistor and some gears
6
3.2. ARDUINO UNO R3
The Arduino Uno is an open-source microcontroller board. This board is equipped with sets
of digital and analog input/output (I/O)pins.It has 14 digital pins,6 analog pins and programmable
with the Arduino IDE via a type B USB cable.It can be powered by the USB cable or by an external
9V battery.
4. PROJECT PLAN
4.1. PLAN CHART
Data Collection
Collect parts
Discussion
Draw design
Construction
Programming
Final report
7
4.2. DATA COLLECTION
Asking to
supervisor
From
Internet ://howtomechatronics.com/
8
4.4. ACTIVITIES FOR 4TH & 5TH WEEK
Collect Parts
Cutting
Circuit Testing
Programming
Check
Assembly
Design Testing
9
5. BUDGET PLAN
Glue Gun 1 - -
Cutter 1 - -
10
6. PROJECT SPECIFICATION
Power On
YES Is Color NO
Red?
Cup3
Cup4
END
11
6.2. PROGRAM CODE
12
13
14
The program code shown above is compiled in Arduino IDE and uploaded to Arduino board by
USB cable. Then, connect a 9V battery to Arduino board and run the project. Results for sorting and
sequencing are shown with figure in Section 6.4.1 and 6.4.2.
15
6.4. RESULT
FIGURE 11.
Step-by-step
sorting of
objects until
each color is
gathered in
separate cup.
16
6.4.2. OUTPUT ( SEQUENCING)
Then, the process is repeated from beginning. Detail of the how to loop the program when count is
greater than four can be checked in the program code.
FIGURE 12. Step-by-step filling of objects in each cup. Each cup contains three different colors. The filling
process starts from the left hand si
17
7. PROJECT EVALUATION
1.Collect Parts + + E + + 4 1
2.Data Collection + + - + E 3 2
3.Construction + + E + + 4 1
4.Testing - + E + + 2 3
5.Progrmming + + - E + 2 3
6.Modifying - - + + + 1 3
+=1, E=0, - = -1
(Total Score 4-3=Rank 1/ Total Score 3=Rank 2/ Total Score 1-2=Rank 3)
1.Cutting problem
Solving-Make square holes instead of circular holes.
-Overlap 2 foam boards using glue and reduce the thickness.
2.Color problem
Solving-Avoid using nearly similar colors to take significant range between R,G& B values.
18
3.Sensor problem
Solving-Cover from the external light that disturbs in sensing.
4.Power supply problem
Solving-Use external 9V or 12 V battery when the servo motors struggle to run. Using
external battery will support enough power (currnet and voltage) than supply from laptop by USB
cable
9. PROJECT PERFORMANCE
In this project, the objects are mentos. So, the objects become soft and get damaged over
time. So, the performance at this time is 75% - 83%.
If the color of the objects do not get fainted, the project performance would be above 98%.
19
10. CONCLUSION
In this project, we have implemented a design that can detect colors of each object
We were able to finish this project successfully from combing and using the knowledge from
the subjects we have studied, such as, PIC Microcontrollers, Circuit Analysis, Sensors and Actua-
tors, Design, Workshop, Engineering Economy and also by the help of supervisors.Based on the
idea on this mini-project, we tend to implement a truly useful color sorting and packaging system
that can be used in industries.
We give our special thanks to our supervisors and teachers and credit to the references we
have used for this project.
REFERENCES
Kunhimohammed C.K, Gokul M.S and Sheez and Usman Abdulla/ Automatic Color Sorting
Machine Using TCS2300 and PIC Microcontrller (International Jouranal of Research and
Innovatons in Science and Technology)
www.HowToMechatronics.com / Arduino Color Sensing Tutorial
www.HowToMechatronics.com/ Arduino Color Sorter Project
20