Introduction: Color Sensor

Description:

Color Sensor Module is a complete colour detector, including a 4 white LEDs and TAOS TCS3200 RGB sensor chip. The four white LED’s to provide a broad spectrum light source .The TCS230 has an 8 x 8 array of photodiodes with color filters (16 Red, 16 Blue, 16 Green, 16 Clear). A light to frequency converter generates a 50% duty cycle square wave on the output pin. Frequency is directly proportional to light intensity. Output scaling 100%, 20% and 2% allows for wide dynamic range of intensities. The color selects (S2, S3), frequency scale (S0, S1) and output are TTL logic level and can be connected directly to the micro controller. Basic readings are easy using the Arduino “pulsein” command. Take a reading for each color. The reading with narrowest pulse width or highest frequency is the major color.

Features:

  • Single-Supply Operation (2.7V to 5.5V)
  • High-Resolution Conversion of Light Intensity to Frequency
  • Programmable Color and Full-Scale Output Frequency
  • Power Down Feature
  • Communicates Directly to Microcontroller/Arduino
  • S0~S1: Output frequency scaling selection inputs
  • S2~S3: Photodiode type selection inputs
  • OUT Pin: Output frequency
  • EO Pin: Output frequency enable pin (active low)

Step 1: Material Planning

For this tutorial, the items needed to run this project are:

  1. Arduino Uno
  2. USB Cable type A to B
  3. Female to male jumper wire
  4. Male to male jumper wire
  5. LED (Red, Green and Blue)
  6. 470 ohm

Step 2: Hardware Installation

Diagram above shows the simple connection between Color Sensor and Arduino UNO:

  1. vcc > 5v
  2. GND > GND
  3. SO > D3
  4. S1 > D4
  5. S2 > D5
  6. S3 > D6
  7. OUT > D2

Connection between LED and Arduino UNO:

  1. Red LED > D8
  2. Green LED > D9
  3. Blue LED > D10

After completing the connection, connect the Arduino to power supply with USB cable.

Step 3: Insert Source Code

  1. Download the test code and open it by using Arduino software or IDE.
  2. Make sure that you have choose the right board and the corresponding port. (In this tutorial, Arduino Uno is used)
  3. Then, upload the test code into your Arduino Uno.

Step 4: Result

When the color sensor is towards the red color, the Red LED will ON. Same like Green LED and Blue LED it will ON when the color sensor is towards to the color.

Step 5: Video

Enjoy watch the tutorial!