TCS3200 Color Sensor Guide with Arduino Programming

Introduction

TCS3200 Color Sensor Module
TCS3200 Color Sensor Module

 

  • Color Sensor Module has 4 LEDs with TCS3200 Color Sensor IC.
  • Module is designed in such way that 4 bright LEDs will light the object and reflections from that object will strike the TCS3200 Color Sensor IC to detect the colour of an object.
  • As its name gives us clear idea about its application, it is basically used to detect colour of an object. It has variety of applications in industrial, medical as well as consumer’s areas.
  • Note that, as per TCS3200 datasheet, TCS3200 product is not designed to use in critical applications, where failure or malfunction of this product may result in any lives injury or death. Any such use by customer is completely at the customer’s risk.

Let’s see about TCS3200 Color Sensor IC

  • TCS3200 is a programmable color to frequency converter, which consists of configurable photodiode and current to frequency converter.
  • TCS3200 gives square wave output with frequency directly proportional to the light sensitivity.
This is the picture of TCS3200 IC
TCS3200 Color Sensor IC
  • It consists of 8x8 array of photodiodes i.e. 64 photodiodes.
  • From total 64 photodiodes, 16 photodiodes have Red filters, 16 photodiodes have Green filters, 16 photodiodes have Blue filters, and 16 photodiodes are Clear with No filters.
  • All photodiode of same colour are connected in parallel.
  • This sensor gives us object color in form of RGB (Red, green, Blue) values, from which we can define the object color.

 

Functional Block Diagram

This is the picture of Functional Block of TCS3200 Color Sensor
Functional Block of TCS3200 Color Sensor

 

  • As light from object strikes photodiode array, each filter allows only one color to pass through and blocks other colors.
  • Then the current (I) output of these photodiode array is converted into frequency. This output is in the form of square wave.
  • Change in input incident light, changes the current flow through photodiode due to which the frequency of the square waves changes.
  • The output square wave frequency is later used to detect the RGB content of color to define object color.
  • PinS2 and S3 are used to choose array of photodiodes (red, green, blue, clear).
  • We can select the Scaling of frequency by using pins S0 and S1.

 

TCS3200 Color Sensor Pinout

This is the picture of Color Sensor TCS3200 Pinout
Color Sensor TCS3200 Pin Description

 

TCS3200 Module Pin Description

Pin 1:2 – S0:S1: Output frequency scaling selection pins

 These two pins are used to scale the frequency of current to frequency converter.

 

Table. Frequency Scaling Selection pins

S0S1Output Frequency Scaling (f0)Min o/p FrequencyTyp o/p Frequency
00Power Down Mode--
01Output frequency is 2% of current to frequency converter’s output.10 KHz12 KHz
10Output frequency is 20% of current to frequency converter’s output.100 K120 K
11Output frequency is 100% of current to frequency converter’s output.500 K600 K

 

Pin 3 – OE (Active Low): Output Enable

            0= Output pin is enabled.

            1= Output pin is in High-Impedance state.

 Pin 4:5 – GND: VCC

            GND= Power Supply Ground.

            VCC= Supply Voltage to sensor.

Pin 6 – Output

     This pin gives output in the form of train of pulses. The duty cycle of these pulses is fixed to 50% and the frequency of these pulses is varying according to the input light.

Pin 7:8 – S2:S3 – Photodiode filter type selection pins

 

Table. Photodiode type selection

S2S3Photodiode Type with their respective Filter
00Red
01Blue
10Clear
11Green

  

  • These color filters are used to pass the respective color while other colors gets blocked. For example, when choose the red filter, only red incident light can get through, blue and green will be prevented. So, we can get the red-light intensity.

 

Specification of TCS3200 Color Sensor

  • Operating voltage range of 2.7V to 5.5V
  • Operating temperature range of -40°C to 85°C
  • Output frequency range of 0KHz to 2.7KHz
  • High sensitivity to a wide range of colors
  • Can be programmed for different color detection ranges (red, blue, green, clear)

 

Alternate options for TCS3200 Color Sensor

  1. TCS34725 Color Sensor
  2. TCS230 Color Sensor
  3. APDS-9301 Color Sensor
  4. ISL29125 RGB Light Sensor
  5. BH1745NUC Color Sensor
  6. TSL2561 Luminosity Sensor.

 

Power down mode

  • This mode is active when Pin S0 and Pin S1 are in LOW states.
  • The output pin is in High-Impedance state after this mode is enabled.
  • The function of this mode is like OE (Active Low) pin.
  • But, Power down mode saves more power compare to enabling OE (Active Low) pin.

 

Full Scale Frequency

Full scale frequency can be defined as the maximum frequency at which output is stable.

Operating Characteristics of Full Scale Frequency

  • The Full-Scale Frequency is different for Red Pass Filter, Green Pass Filter and Blue Pass Filter.
  • Below figure shows the frequency spectrum diagram.
  • The wavelengths at which Red, Green and Blue colors are relatively responsive, are Highlighted.
This is the picture of Frequency Spectrum
Frequency Spectrum

 

Now we will see the sensor output of Red Filter, Blue Filter and Green Filter for the wavelengths highlighted in above figure.

 

Let’s see an example for 100% output frequency mode (S0=H, S1=H).

  • The output frequency of Red pass filter, Blue pass filter and Green pass filter is compared with Typical frequency (600KHz) and the % values are shown in below table.

 

Table: Operating Characteristics at 100% frequency

Test

Conditions

 

Blue

Photodiode

S2 = L, S3 = H

Min             Max

Green

Photodiode

S2 = H, S3 = H

Min              Max

Red

Photodiode

S2 = L, S3 = L

Min               Max

λp = 470 nm (Blue)61%             84%22%             43%

0%                 6%

 

λp = 524 nm (Green)8%              28%57%             80%9%                27%
λp = 640 nm (Red)5%               21%0%              12%

84%             105%

 

 

  • As shown in above table, if the wavelength of color is 470nm (Blue Color), the output of Blue pass filter is 61% to 84% of typical frequency.
  • The Red and Green color are less responsive in Blue color.
  • So, the output of Red pass filter is 0% to 6% of the typical frequency, and output of the Green pass filter is 22% to 43% of typical frequency.

Similarly, for different color (wavelength), the output of Red pass filter, Green pass filter, and Blue pass filter is different.

 

Example

TCS3200 Color Sensor Interfacing with ESP32


Components Used

TCS3200 Colour Sensor Module
Color Sensor Module (TCS3200) can detect colors. It is generally used for color identification by their RGB values.
1

Downloads

Colour Sensor TCS3200 Datasheet Download
Ad