GY-31 TCS3200 Color Recognition Sensor Module

₹557

In stock

  • (GST Bill) Enter your GST number at checkout
  • Free shipping on eligible prepaid orders
  • Secure payments via Razorpay and Paytm
  • Dispatch in 24 Hours from Noida warehouse!
  • Supercharge your robotics and automation projects with the GY-31 TCS3200 Color Recognition Sensor Module! Built around the high-resolution TAOS TCS3200 light-to-frequency converter IC, this PCB module features a 64-element photodiode matrix (with Red, Green, Blue, and Clear filters) and 4 onboard white LEDs for target illumination. Operating over a 2.7V to 5.5V DC range, it outputs a digital square wave whose frequency directly corresponds to light intensity, enabling seamless color identification with Arduino, ESP32, and Raspberry Pi.
SKU: SE1571 Category:

Description

The GY-31 TCS3200 Color Sensor Module is an optical identifier engineered for microcontrollers and single-board computers. Unlike basic light-dependent resistors (LDRs) that measure overall ambient brightness, the GY-31 module isolates individual primary wavelengths to distinguish distinct colors with high accuracy.

The module incorporates an array of 64 photodiodes partitioned into four filter sets: 16 photodiodes for Red light, 16 for Green light, 16 for Blue light, and 16 Clear without filters. By toggling control logic pins (S2 and S3), microcontrollers select which color channel to read. The internal CMOS circuitry generates a 50% duty-cycle square wave whose frequency is directly proportional to the light intensity of the active filter channel.

Technical Specifications

Parameter Technical Detail
Model GY-31 (TCS3200 / TCS230 Compatible)
Sensor Core TAOS TCS3200 Programmable Color Light-to-Frequency Converter
Photodiode Matrix 64 Elements (16 Red, 16 Green, 16 Blue, 16 Clear)
Operating Voltage 2.7V to 5.5V DC
Operating Current ~25 mA @ 5V (with LEDs active)
Illumination Source 4 Onboard Bright White SMD LEDs
Optimal Detection Distance 10 mm (~1 cm from target surface)
Output Type Digital Square Wave (50% Duty Cycle, Frequency ∝ Light Intensity)
Programmable Output Scaling 2%, 20%, or 100% via S0/S1 Control Pins
Dimensions & Weight ~28.4 mm × 28.4 mm (~4 g)

Board Pinout & Logic Control Matrix

              +------------------------------------+
              | [S0]  (o)     (o) [S3]             |
              | [S1]  (o)     (o) [S2]             |
              | [OE]  (o)     (o) [OUT]            |
              | [GND] (o)     (o) [VCC]            |
              |                                    |
              |        [ GY-31 PCB Layout ]        |
              |      [ TCS3200 IC + 4x LEDs ]      |
              +------------------------------------+
Pin Function Description
VCC Power Input 2.7V to 5.5V DC Regulated Input.
GND System Ground Common Ground Reference.
S0, S1 Frequency Scaling Controls output frequency scaling (Power Down, 2%, 20%, 100%).
S2, S3 Filter Channel Select Selects active color filter (Red, Green, Blue, Clear).
OUT Signal Output Digital square wave pulse train output.
OE Output Enable Active LOW pin (Pull LOW to enable OUT output).

Filter Channel Truth Table (S2 & S3)

S2 Logic S3 Logic Active Color Filter
LOW LOW Red Filter Channel
LOW HIGH Blue Filter Channel
HIGH LOW Clear / Unfiltered Channel
HIGH HIGH Green Filter Channel

Output Frequency Scaling (S0 & S1)

S0 Logic S1 Logic Frequency Scale Ideal Microcontroller
LOW LOW Power Down Mode Low-power idle state
LOW HIGH 2% Scale Slow 8-bit MCUs (8051 / PIC)
HIGH LOW 20% Scale Arduino Uno / Nano / Mega (Recommended)
HIGH HIGH 100% Scale High-speed 32-bit MCUs (ESP32 / STM32)

Arduino Interfacing Code

C++

// GY-31 TCS3200 Color Sensor Arduino Interfacing
#define S0 4
#define S1 5
#define S2 6
#define S3 7
#define sensorOut 8

int redPulse = 0;
int greenPulse = 0;
int bluePulse = 0;

void setup() {
  pinMode(S0, OUTPUT);
  pinMode(S1, OUTPUT);
  pinMode(S2, OUTPUT);
  pinMode(S3, OUTPUT);
  pinMode(sensorOut, INPUT);
  
  // Set Frequency scaling to 20% for Arduino
  digitalWrite(S0, HIGH);
  digitalWrite(S1, LOW);
  
  Serial.begin(9600);
}

void loop() {
  // Read RED Channel
  digitalWrite(S2, LOW);
  digitalWrite(S3, LOW);
  redPulse = pulseIn(sensorOut, LOW);
  
  // Read GREEN Channel
  digitalWrite(S2, HIGH);
  digitalWrite(S3, HIGH);
  greenPulse = pulseIn(sensorOut, LOW);
  
  // Read BLUE Channel
  digitalWrite(S2, LOW);
  digitalWrite(S3, HIGH);
  bluePulse = pulseIn(sensorOut, LOW);
  
  // Display Frequency Readings
  Serial.print("Red: "); Serial.print(redPulse);
  Serial.print(" | Green: "); Serial.print(greenPulse);
  Serial.print(" | Blue: "); Serial.println(bluePulse);
  
  delay(300);
}

Key Features & Highlights

  • Digital Frequency Output: Directly outputs a square wave proportional to color irradiance, bypassing noisy analog processing.

  • 4-LED Illumination System: Onboard white LEDs illuminate objects to prevent environmental shadow interference.

  • Programmable Frequency Output: Flexible scaling (100%, 20%, 2%) matches pulse counting speeds across different MCU clock frequencies.

  • Dual Voltage Compatibility: Operates smoothly on 3.3V and 5V logic rails without requiring external level shifters.

  • Breadboard-Friendly Header: Standard 2.54mm pitch breakout header for direct breadboard or DuPont cable wiring.

Common Applications

  • Industrial automated sorting machines (sorting items by color).

  • Line-following and maze-solving mobile robots.

  • Color calibration, paint matching, and print inspection setups.

  • Interactive RGB lighting and educational STEM projects.

What’s Included in the Box

  • 1 × GY-31 TCS3200 Color Recognition Sensor Module

Why Buy From Aryabot?

  • Quality Assured: Tested for photodiode filter switching, LED array output, and frequency pulse output.

  • 100% Authentic Hardware: Built with genuine TCS3200 ICs for stable frequency conversion.

  • GST Invoice Provided: Tax-compliant B2B invoices generated for academic institutions, maker spaces, and corporate R&D labs.

  • Fast Pan-India Dispatch: Anti-static protective packaging shipped directly from our Noida fulfillment facility.

Additional information

Weight 0.005 kg
Dimensions 5 × 4 × 3 cm