top of page

USING TCS3200 IN GARMENT INDUSTRY

INSPIRATION

01 / BRING IT CLOSER

It is often a trouble when you are at one place but you really need to know something that is distant from you.

In a garment industry, fabrics are often outsourced and stored in the warehouse till production. Mills with a large-scale production unit needs to maintain inventory of the fabric in need as well as fabric in excess. And these warehouses are often at a distance from the actual area of production.

So, every time one has to know if a roll of fabric is available, one has to visit the warehouse.

02 /  A LITTLE WARNING

Another situation, where say one has to manufacture a garment of 500 pieces and has managed to finish 490 pieces and they realize that they just used the last roll of fabric. Placing another order, no matter how urgent, would require a minimum number of days, thus slowing down the production process and the company may not be able to meet the deadline. The inventory manager needs to place an order, long before the last roll of fabric is used, so a little warning would be nice.

03 / THE RIGHT COLOUR

A final situation, rolls of fabric are prepared in batches. So, at times there may be shade variation. A layman would not know the specific difference between the slight shade difference, which will cause trouble in large scale production.

About
Details

UNDERSTANDING SENSORS AND TCS3200

​

SENSORS
TCS3200
HOW TCS3200 WORKS

The circuit of the colour sensor contains delicate filters, sensor clusters, LED'S, target surfaces, and recipient. At the point when the bright red light is enlightened on the surface, a similar red light is mirrored and blue light is consumed. This reflection and assimilation are dictated by the filters utilized in these sensors.

In the TCS3200, the light-to-recurrence converter peruses a 8 x 8 cluster of photodiodes. Sixteen photodiodes have blue filters, 16 photodiodes have green filters, 16 photodiodes have red filters, and 16 photodiodes are clear with no filters. 

There are two logic inputs, S2 and S3, which work in co-ordination to produce the results and controls the photodiode.

  • S2 and S3 are low for the red photodiode.

  • For the blue photodiode, S2 is low and S3 is high.

  • S2 and S3 are high for the green and

  • When the S2 is high and S3 is low, none of the above filters (red, blue or green) are selected.

WHY TCS3200?

When picking shading filter, the TCS3200 can permit just a single specific tone to traverse and forestall other tone. For instance, while picking the red filter, just red frequency light can traverse, blue and green will be prevented. Similarly, when pick different filters we can get blue or green light.

This sensor will be able to identify the colours of the roll of fabric in the warehouse. A difference in shade that may fool a human eye can’t get past a sensor. And adding an alarm that sends a notification when the roll of fabric is about to be finished, will make the life of the managers so easy!

MATERIALS REQUIRED

NODEMCU
BREADBOARD
TCS3200
JUMPER WIRES
Product

MAKE THE CONNECTIONS

  1. VCC to 5V

  2. GND to GND

  3. S0 to digital pin 8

  4. S1 to digital pin 9

  5. S2 to digital pin 12

  6. S3 to digital pin 11

  7. OUT to digital pin 10

 

​In addition to the above connections, the red, green and blue led has to be connected to the digital pin 2,3 and 4 respectively of the Arduino Uno board.

ENTER THE CODES!

const int s0 = D4;

const int s1 = D5;

const int s2 = D6;

const int s3 = D7;

const int out = D8;

int red = 0;

int green = 0;

int blue = 0;

void setup()

{

Serial.begin(9600);

pinMode(s0, OUTPUT);

pinMode(s1, OUTPUT);

pinMode(s2, OUTPUT);

pinMode(s3, OUTPUT);

pinMode(out, INPUT);

digitalWrite(s0, HIGH);

digitalWrite(s1, HIGH);

}

void loop()

{

color();

Serial.print("R Intensity:");

Serial.print(red, DEC);

Serial.print(" G Intensity: ");

Serial.print(green, DEC);

Serial.print(" B Intensity : ");

Serial.print(blue, DEC);

if (red < blue && red < green && red < 20)

{ Serial.println(" - (Red Color)"); }

else if (blue < red && blue < green)

{ Serial.println(" - (Blue Color)"); }

else if (green < red && green < blue)

{ Serial.println(" - (Green Color)"); }

else{ Serial.println(); } delay(300);

}

void color()

{ digitalWrite(s2, LOW);

digitalWrite(s3, LOW);

//count OUT, pRed, RED

red = pulseIn(out, digitalRead(out)

== HIGH ? LOW : HIGH);

digitalWrite(s3, HIGH);

//count OUT, pBLUE, BLUE

blue = pulseIn(out, digitalRead(out)

== HIGH ? LOW : HIGH);

digitalWrite(s2, HIGH);

//count OUT, pGreen, GREEN

green = pulseIn(out, digitalRead(out)

== HIGH ? LOW : HIGH);

}

Codes
Demo

Here's how it should look

bottom of page