Color Recognition Sensor SEN32

Color Recognition Sensor SEN32

Fr7,800 Fr6,800

This is Color Sensor Module is made using IC TCS320, programmable color light to frequency converter, It has configurable silicon photodiodes and a current to frequency converter in a single monlithic CMOS Integrated Circuit, Its output is square wave having 50% duty cycle with frequency directly proportional to irradiance (light intensity).

Category:

Description

  • This is Color Sensor Module is made using IC TCS320, programmable color light to frequency converter.
  • It has configurable silicon photodiodes and a current to frequency converter in a single monlithic CMOS Integrated Circuit.
  • Its output is square wave having 50% duty cycle with frequency directly proportional to irradiance (light intensity).
  • This module can be directly interfaced with Microcontrollers, Arduino Boards, Raspberry Pi etc.
  • Input voltage: DC 3 – 5V
  • Use bright white LED lights

Getting started with the Colour Recognition Sensor

In this example you’re going to detect colors with the Arduino and the TCSP3200 color sensor.  This sensor is not very accurate, but works fine for detecting colors in simple projects.

How does the TCS3200 sensor work?

The TCS3200 has an array of photodiodes with 4 different filters. A photodiode is simply a semiconductor device that converts light into current. The sensor has:

  • 16 photodiodes with red filter – sensitive to red wavelength
  • 16 photodiodes with green filter – sensitive to green wavelength
  • 16 photodiodes with blue filter – sensitive to blue wavelength
  • 16 photodiodes without filter

If you take a closer look at the TCS3200 chip you can see the different filters.

By selectively choosing the photodiode filter’s readings, you’re able to detect the intensity of the different colors. The sensor has a current-to-frequency converter that converts the photodiodes’ readings into a square wave with a frequency that is proportional to the light intensity of the chosen color. This frequency is then, read by the Arduino – this is shown in the figure below.

Pinout

Here’s the sensor pinout:

Pin Name I/O Description
GND (4) Power supply ground
OE (3) I Enable for output frequency (active low)
OUT (6) O Output frequency
S0, S1(1,2) I Output frequency scaling selection inputs
S2, S3(7,8) I Photodiode type selection inputs
VDD(5) Voltage supply

Filter selection

To select the color read by the photodiode, you use the control pins S2 and S3. As the photodiodes are connected in parallel, setting the S2 and S3 LOW and HIGH in different combinations allows you to select different photodidodes. Take a look at the table below:

Photodiode type S2 S3
Red LOW LOW
Blue LOW HIGH
No filter (clear) HIGH LOW
Green HIGH HIGH

Frequency scaling

Pins S0 and S1 are used for scaling the output frequency. It can be scaled to the following preset values: 100%, 20% or 2%. Scaling the output frequency is useful to optimize the sensor readings for various frequency counters or microcontrollers. Take a look at the table below:

Output frequency scaling S0 S1
Power down L L
2% L H
20% H L
100% H H

For the Arduino, it is common to use a frequency scaling of 20%. So, you set the S0 pin to HIGH and the S1 pin to LOW.

Hardware required

 Connecting the Hardware

Wiring the TCSP3200 sensor to your Arduino is pretty straightforward. Simply follow the next schematic diagram.

Here’s the connections between the TCSP3200 and the Arduino:

  • S0: digital pin 4
  • S1: digital pin 5
  • VCC: 5V
  • S3: digital pin 6
  • S4: digital pin 7
  • OUT: digital pin 8