Tags: , Color, RGB, sensor, module, GY-31, TCS3200, Recognition, Module, Arduino

Color RGB sensor module GY-31 TCS3200 Recognition Module For Arduino

  • 7.00 AED
    • Ex Tax:7.00 AED
    • Brands RobotDyn
    • Product Code: 244
    • Availability: In Stock
    The TCS3200 and TCS3210 programmable color light-to-frequency converters that combine configurable silicon photodiodes and a current-to-frequency converter on a single monolithic CMOS integrated circuit. The output is a square wave (50% duty cycle) with frequency directly proportional to light inten..

    The TCS3200 and TCS3210 programmable color light-to-frequency converters that combine configurable silicon photodiodes and a current-to-frequency converter on a single monolithic CMOS integrated circuit. The output is a square wave (50% duty cycle) with frequency directly proportional to light intensity (irradiance). The full-scale output frequency can be scaled by one of three preset values via two control input pins. Digital inputs and digital output allow direct interface to a microcontroller or other logic circuitry. Output enable (OE) places the output in the high-impedance state for multiple-unit sharing of a microcontroller input line.

    In the TCS3200, the light-to-frequency converter reads an 8 x 8 array 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. In the TCS3210, the light-to-frequency converter reads a 4 x 6 array of photodiodes. Six photodiodes have blue filters, 6 photodiodes have green filters, 6 photodiodes have red filters, and 6 photodiodes are clear with no filters.

    Color Sensor TCS3200 Arduino Hookup



    This TCS3200 sensor module can be easily interfaced with Arduino development board, Connect the OUT pin of sensor to Arduino digital pin D8 and connect S2,S3 to Pin D7,D6 by the way connect S1,S0 to Pin D5,D4 finally connect bias to the sensor Vcc to 5V and Gnd to Gnd pins, thats all after that upload the following Arduino code for color sensor TCS3200.

    Arduino Code

     

    #define S0 4
    #define S1 5
    #define S2 6
    #define S3 7
    #define sensorOut 8
    int frequency = 0;
    void setup() {
      pinMode(S0, OUTPUT);
      pinMode(S1, OUTPUT);
      pinMode(S2, OUTPUT);
      pinMode(S3, OUTPUT);
      pinMode(sensorOut, INPUT);
      
      
      digitalWrite(S0,HIGH);
      digitalWrite(S1,LOW);
      
      Serial.begin(9600);
    }
    void loop() {
      
      digitalWrite(S2,LOW);
      digitalWrite(S3,LOW);
     
      frequency = pulseIn(sensorOut, LOW);
    
      Serial.print("R= ");
      Serial.print(frequency);
      Serial.print("  ");
      delay(100);
      
      digitalWrite(S2,HIGH);
      digitalWrite(S3,HIGH);
      
      frequency = pulseIn(sensorOut, LOW);
     
      Serial.print("G= ");
      Serial.print(frequency);
      Serial.print("  ");
      delay(100);
      
      digitalWrite(S2,LOW);
      digitalWrite(S3,HIGH);
     
      frequency = pulseIn(sensorOut, LOW);
      
      Serial.print("B= ");
      Serial.print(frequency);
      Serial.println("  ");
      delay(100);
    }

    Input voltage: DC 3 - 5V
    Use bright white LED lights
    Can be connected directly with Microcontroller
    Static detection of the measured object color
    Best detection distance: 1cm