About the Project
Colour-based object sorting machines use sensors to detect the colour of an object. Once the colour is detected, a sorting mechanism separates the objects by colour.
Arduino is a popular choice for controlling colour-based object sorting machines because it is relatively easy to use and program.
There are many different ways to design a colour-based object sorting machine, so there is no one correct answer. However, some tips on how to build a colour-based object sorting machine using Arduino include:
1. Choose the right sensor for your application. There are many different types of colour sensors available, so it is important to select the one that is best suited for your particular application.
2. Configure the sensor to work with Arduino. This step will vary depending on the sensor you have chosen.
3. Write a program to control the sorting mechanism. This step will also vary depending on the particular design of your machine.
4. Test your machine to ensure that it is sorting correctly.
5. Make any necessary adjustments to your program or machine.
6. Enjoy your fully functioning colour-based object sorting machine!
What is TCS230 TCS3200 Color Sensor Module?
TCS230 is a colour sensor consisting of an array of photodiodes, transistors and an op-amp mounted on a small board. The sensor converts light into an electrical signal. It has 4 leads: VCC, GND, S0 and S1. S0 and S1 leads are used to select the desired colour to be detected. VCC supplies power to the sensor and GND is the ground lead.
TCS230 has a photosensitive surface area of 1mm2. It has a built-in blue, green and red filter and can detect light in the visible spectrum. The sensor has a high sensitivity to light. It can detect light intensity as low as 0.01 lux. The sensor can also be used to measure colour temperature.
The sensor outputs an analogue voltage that is proportional to the intensity of the light. The voltage can be read using an analog-to-digital converter. The sensor can be interfaced with a microcontroller or a microprocessor.
The sensor can be used in a variety of applications such as colour detection, colour identification, colour sorting, colour recognition, colour matching, etc.
The sensor can be used in a variety of projects such as:
– Color detection
– Color identification
– Color sorting
– Color recognition
– Color matching
Video Demonstration 1:- Colour Sorting Machine using Arduino and Colour sensor TCS3200
Video Demonstration 2:- Colour Sorting Scara Robot Project with program
Code of project 1: Colour Sorting Machine using Arduino and Colour sensor TCS3200
int m1=8;
int m2=9;
int m3=10;
int m4=11;
int relay =12;
int d3=6;
int d4=7;
int led = 13 ;
void setup() {
pinMode(m1,OUTPUT);
pinMode(m2,OUTPUT); // put your setup code here, to run once:
pinMode(m3,OUTPUT);
pinMode(m4,OUTPUT);
pinMode(relay,OUTPUT);
pinMode(d3,OUTPUT);
pinMode(d4,OUTPUT);
digitalWrite(m1,HIGH);
digitalWrite(m2,HIGH);
digitalWrite(m3,HIGH);
digitalWrite(m4,HIGH);
digitalWrite(relay,HIGH);
digitalWrite(d3,HIGH);
digitalWrite(d4,HIGH);
}
void loop()
{
if((digitalRead(d1)==HIGH)&&(digitalRead(d2)==LOW)&&(digitalRead(d3)==LOW)&&(digitalRead(d4)==LOW))
{
digitalWrite(m1,HIGH);
digitalWrite(m2,LOW);
digitalWrite(m3,HIGH);
digitalWrite(m4,LOW);
}
if((digitalRead(d1)==LOW)&&(digitalRead(d2)==HIGH)&&(digitalRead(d3)==LOW)&&(digitalRead(d4)==LOW))
{
digitalWrite(m1,LOW);
digitalWrite(m2,HIGH);
digitalWrite(m3,LOW);
digitalWrite(m4,HIGH);
}
if((digitalRead(d1)==HIGH)&&(digitalRead(d2)==HIGH)&&(digitalRead(d3)==LOW)&&(digitalRead(d4)==LOW))
{
digitalWrite(m1,LOW);
digitalWrite(m2,HIGH);
digitalWrite(m3,HIGH);
digitalWrite(m4,LOW);
}
if((digitalRead(d1)==LOW)&&(digitalRead(d2)==LOW)&&(digitalRead(d3)==HIGH)&&(digitalRead(d4)==LOW))
{
digitalWrite(m1,HIGH);
digitalWrite(m2,LOW);
digitalWrite(m3,LOW);
digitalWrite(m4,HIGH);
}
if((digitalRead(d1)==LOW)&&(digitalRead(d2)==HIGH)&&(digitalRead(d3)==HIGH)&&(digitalRead(d4)==LOW))
{
digitalWrite(m1,LOW);
digitalWrite(m2,LOW);
digitalWrite(m3,LOW);
digitalWrite(m4,LOW);
}
if((digitalRead(d1)==HIGH)&&(digitalRead(d2)==LOW)&&(digitalRead(d3)==HIGH)&&(digitalRead(d4)==LOW))
{
digitalWrite(relay,LOW);
}
if((digitalRead(d1)== HIGH)&&(digitalRead(d2)==HIGH)&&(digitalRead(d3)==HIGH)&&(digitalRead(d4)==LOW))
{
digitalWrite(relay,HIGH);
}
// put your main code here, to run repeatedly:
}
Code of project 2: Colour Sorting Scara Robot Project with program
#define S0 2
#define S1 3
#define S2 4
#define S3 5
#define sensorOut 1
int frequency1 = 0;
int frequency2 = 0;
int frequency3 = 0;
int m1=8;
int m2=9;
int m3=10;
int m4=11;
int relay =12;
int d3=6;
int d4=7;
int led = 13 ;
void setup() {
pinMode(m1,OUTPUT);
pinMode(m2,OUTPUT); // put your setup code here, to run once:
pinMode(m3,OUTPUT);
pinMode(m4,OUTPUT);
pinMode(relay,OUTPUT);
pinMode(d3,OUTPUT);
pinMode(d4,OUTPUT);
digitalWrite(m1,HIGH);
digitalWrite(m2,HIGH);
digitalWrite(m3,HIGH);
digitalWrite(m4,HIGH);
digitalWrite(relay,HIGH);
digitalWrite(d3,HIGH);
digitalWrite(d4,HIGH);
pinMode(S0, OUTPUT);
pinMode(S1, OUTPUT);
pinMode(S2, OUTPUT);
pinMode(S3, OUTPUT);
pinMode(sensorOut, INPUT);
// Setting frequency-scaling to 20%
digitalWrite(S0,HIGH);
digitalWrite(S1,LOW);
Serial.begin(9600);
}
void loop()
{
digitalWrite(S2,LOW);
digitalWrite(S3,LOW);
// Reading the output frequency
frequency1 = pulseIn(sensorOut, LOW);
// Printing the value on the serial monitor
Serial.print("R= ");//printing name
Serial.print(frequency);//printing RED color frequency
Serial.print(" ");
delay(100);
// Setting Green filtered photodiodes to be read
digitalWrite(S2,HIGH);
digitalWrite(S3,HIGH);
// Reading the output frequency
frequency2 = pulseIn(sensorOut, LOW);
// Printing the value on the serial monitor
Serial.print("G= ");//printing name
Serial.print(frequency);//printing RED color frequency
Serial.print(" ");
delay(100);
// Setting Blue filtered photodiodes to be read
digitalWrite(S2,LOW);
digitalWrite(S3,HIGH);
// Reading the output frequency
frequency3 = pulseIn(sensorOut, LOW);
// Printing the value on the serial monitor
Serial.print("B= ");//printing name
Serial.print(frequency);//printing RED color frequency
Serial.println(" ");
delay(100);
if( frequency1 >= 239 && frequency1 <= 330 )
{
delay(1200);
digitalWrite(m3,HIGH);
digitalWrite(m4,LOW);
delay(300);
digitalWrite(m3,LOW);
digitalWrite(m4,HIGH);
delay(300);
digitalWrite(m3,LOW);
digitalWrite(m4,HIGH);
delay(100);
}
if( frequency2 >= 239 && frequency2 <= 330 )
{
delay(2400);
digitalWrite(d3,HIGH);
digitalWrite(d4,LOW);
delay(300);
digitalWrite(d3,LOW);
digitalWrite(d4,HIGH);
delay(300);
digitalWrite(d3,LOW);
digitalWrite(d4,HIGH);
delay(100);
}
if( frequency3 >= 239 && frequency3 <= 330 )
{
delay(3600);
digitalWrite(m1,HIGH);
digitalWrite(m2,LOW);
delay(300);
digitalWrite(m1,LOW);
digitalWrite(m2,HIGH);
delay(300);
digitalWrite(m1,LOW);
digitalWrite(m2,HIGH);
delay(100);
}
}
You Can Book the Project from here: – Click Here and contact our Team
To Book Directly go to the contact us section of the website.