ROSANNAPAPINI.IT ≡ Accessories Circuitoimpreso Kits Educativos Amplifier
  • Light

  • TCS230 Color Recognition

TCS230 Color Recognition

$33.3 $47.29
Mod­ule with 4 white LED based on the TAOS TCS230 chip, a col­or light-fre­quen­cy con­vert­er. The sen­sor is com­posed of 16 pho­to­di­odes with blue fil­ters, green fil­ters, red fil­ters and unfil­tered. All the pho­to­di­odes of the same col­or are con­nect­ed in par­al­lel. When an object is placed in front of the mod­ule, at a dis­tance of not more than 10 cm, it is illu­mi­nat­ed by 4 white LEDs and the reflect­ed light will hit the 64 pho­to­di­odes, result­ing in a square wave out­put (Duty cycle 50%) with a fre­quen­cy direct­ly pro­por­tion­al to the inten­si­ty of the reflect­ed light. The full scale out­put fre­quen­cy can be adjust­ed to one of three pre­set val­ues avail­able via two con­trol input pins. The full scale out­put fre­quen­cy can be adjust­ed to one of three pre­set val­ues avail­able via two con­trol input pins. The dig­i­tal inputs and dig­i­tal out­put allows you to inter­face direct­ly to the Arduino or oth­er log­ic cir­cuits. The pins S2 and S3 are used to select which group of pho­to­di­odes (red, green, blue, clear) are active.FeaturesHigh-Res­o­lu­tion Con­ver­sion of Light Inten­si­ty to Fre­quen­cyPro­gram­ma­ble Col­or and Full-Scale Out­put Fre­quen­cyCom­mu­ni­cates Direct­ly With a Micro­con­trollerSin­gle-Sup­ply Oper­a­tion (2.7 V to 5.5 V)Pow­er Down Fea­tureNon­lin­ear­i­ty Error Typ­i­cal­ly 0.2% at 50 kHzSta­ble 200 ppm/°C Tem­per­a­ture Coef­fi­cientLow-Pro­file Sur­face-Mount Pack­ageExample codeArduino /* // TCS230 color recognition sensor // Sensor connection pins to Arduino are shown in comments Color Sensor Arduino ----------- -------- VCC 5V GND GND s0 8 s1 9 s2 12 s3 11 OUT 10 OE GND */ const int s0 = 8; const int s1 = 9; const int s2 = 12; const int s3 = 11; const int out = 10; // LED pins connected to Arduino int redLed = 2; int greenLed = 3; int blueLed = 4; // Variables 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); pinMode(redLed, OUTPUT); pinMode(greenLed, OUTPUT); pinMode(blueLed, OUTPUT); 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); //Serial.println(); if (red < blue && red < green && red < 20) { Serial.println(" - (Red Color)"); digitalWrite(redLed, HIGH); // Turn RED LED ON digitalWrite(greenLed, LOW); digitalWrite(blueLed, LOW); } else if (blue < red && blue < green) { Serial.println(" - (Blue Color)"); digitalWrite(redLed, LOW); digitalWrite(greenLed, LOW); digitalWrite(blueLed, HIGH); // Turn BLUE LED ON } else if (green < red && green < blue) { Serial.println(" - (Green Color)"); digitalWrite(redLed, LOW); digitalWrite(greenLed, HIGH); // Turn GREEN LED ON digitalWrite(blueLed, LOW); } else{ Serial.println(); } delay(300); digitalWrite(redLed, LOW); digitalWrite(greenLed, LOW); digitalWrite(blueLed, LOW); } 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); }123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100/*// TCS230 col­or recog­ni­tion sen­sor // Sen­sor con­nec­tion pins to Arduino are shown in com­ments Col­or Sen­sor      Arduino———–      ——– VCC               5V GND               GND s0                8 s1                9 s2                12 s3                11 OUT               10 OE                GND*/con­st int s0 = 8;  con­st int s1 = 9;  con­st int s2 = 12;  con­st int s3 = 11;  con­st int out = 10;   // LED pins con­nect­ed to Arduinoint redLed = 2;  int green­Led = 3;  int blueLed = 4;// Vari­ables  int red = 0;  int green = 0;  int blue = 0;      void set­up()   {    Ser­i­al.begin(9600);   pin­Mode(s0, OUTPUT);    pin­Mode(s1, OUTPUT);    pin­Mode(s2, OUTPUT);    pin­Mode(s3, OUTPUT);    pin­Mode(out, INPUT);    pin­Mode(redLed, OUTPUT);    pin­Mode(green­Led, OUTPUT);    pin­Mode(blueLed, OUTPUT);    dig­i­tal­Write(s0, HIGH);    dig­i­tal­Write(s1, HIGH);  }      void loop() {    col­or();   Ser­i­al.print(“R Inten­si­ty:”);    Ser­i­al.print(red, DEC);    Ser­i­al.print(“ G Inten­si­ty: ”);    Ser­i­al.print(green, DEC);    Ser­i­al.print(“ B Inten­si­ty : ”);    Ser­i­al.print(blue, DEC);    //Serial.println();     if (red < blue && red < green && red < 20)  {     Ser­i­al.print­ln(“ — (Red Col­or)”);     dig­i­tal­Write(redLed, HIGH); // Turn RED LED ON    dig­i­tal­Write(green­Led, LOW);     dig­i­tal­Write(blueLed, LOW);    }     else if (blue < red && blue < green)     {     Ser­i­al.print­ln(“ — (Blue Col­or)”);     dig­i­tal­Write(redLed, LOW);     dig­i­tal­Write(green­Led, LOW);     dig­i­tal­Write(blueLed, HIGH); // Turn BLUE LED ON    }     else if (green < red && green < blue)    {     Ser­i­al.print­ln(“ — (Green Col­or)”);     dig­i­tal­Write(redLed, LOW);     dig­i­tal­Write(green­Led, HIGH); // Turn GREEN LED ON    dig­i­tal­Write(blueLed, LOW);    }    else{  Ser­i­al.print­ln();    }  delay(300);     dig­i­tal­Write(redLed, LOW);    dig­i­tal­Write(green­Led, LOW);    dig­i­tal­Write(blueLed, LOW);   }      void col­or()  {      dig­i­tal­Write(s2, LOW);    dig­i­tal­Write(s3, LOW);    //count OUT, pRed, RED    red = pul­seIn(out, dig­i­tal­Read(out) == HIGH ? LOW : HIGH);    dig­i­tal­Write(s3, HIGH);    //count OUT, pBLUE, BLUE    blue = pul­seIn(out, dig­i­tal­Read(out) == HIGH ? LOW : HIGH);    dig­i­tal­Write(s2, HIGH);    //count OUT, pGreen, GREEN    green = pul­seIn(out, dig­i­tal­Read(out) == HIGH ? LOW : HIGH);  }
Light

Light

  • TCS230 Color Recognition
    $33.3 $47.29
  • TSL2561 Digital Luminosity/Lux/Light Sensor Breakout
    $41.4 $60.03
  • Analog UV Light Sensor Breakout — GUVA-S12SD
    $34.2 $52.33
  • KY-018 PHOTORESISTOR MODULE
    $16.2 $31.1
  • Photoresistance Sensor Module — LDR Light Sensor
    $17.1 $30.1
  • BH1750FVI Digital Light Intensity Illumination Sensor
    $34.2 $41.04
  • Mini Photocell — LDR Light Sensor
    $11.05 $19.01
  • RGB Color Sensor with IR filter and White LED — TCS34725
    $34.2 $58.82
  • Photocell Street Light Control Switch Auto On/Off 220V
    $35.1 $68.44
  • TEMT6000 Ambient Light Sensor Module — CJMCU
    $24.3 $46.17

© 2026 - ROSANNAPAPINI.IT