Color Sensor Module
The Color sensor module base on TCS3200 which is a programmable color light-to-frequency converter, it could filter RGB data from source light and convert it to 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(SO, S1 Selectable Options 2%, 20%, 100% frequency),and pin S2, S3 control the filter of RGB. Digital inputs and digital output allow interface to a microcontroller or other logic circuitry directly. Output enable (OE) places the output in the high-impedance state for multiple-unit sharing of a microcontroller input line. At last, user can calculate the color of the light by RGB values.
- High-Resolution Conversion of Light Intensity to Frequency
- Programmable Color and Full-Scale Output Frequency
- Communicates Directly With a Microcontroller
- Single-Supply Operation (2.7 V to 5.5 V)
- Power Down Feature
- Nonlinearity Error Typically 0.2% at 50 kHz
- Stable 200 ppm/°C Temperature Coefficient
- Low-Profile Surface-Mount Package
- Avoid the interference of outside light,testing the better in a confined space
- No special requirements for light, but try to focus on a single
- The first use or restart or change light and so on, please adjust the WB(White Balance)
Pin definition and Rating
The module works at 5V, you can use Arduino for power supply directly. The White Color Sensor has shorted LED to GND by a short circuit Block Cap. The four white highlight LEDs in the surrounding are providing a source constant light.
The Demo pins to Arduino as below:
GND & LED – GND , OE – GND, VCC – VCC, S0 – D6, S1 – D5, S2 – D4, S3 – D3, OUT – D2
Here OE connects to GND that means the module was always enable. The OUT(Signal pin) is output of a square wave (50% duty cycle) with frequency directly proportional to light intensity (irradiance). Most Arduino boards have two external interrupts: numbers 0 (on digital pin 2) and 1 (on digital pin 3). So we connect OUT to D2 for counting the square wave frequency using external interrupt 0.
So you need an other timer library which is a collection of routines for configuring the 16 bit hardware timer called Timer1 on the ATmega168/328 . Get the Timer1 Library.
Includes important code snippet. Demo code like :
The projects and application examples.
- Reference the post from http://www.elecfreaks.com/1666.html
Please list your question here:
If you have questions or other better design ideas,
|v1.0b||Initial public release||date|
Bug Tracker is the place you can publish any bugs you think you might have found during use. Please write down what you have to say, your answers will help us improve our
How to buy
Click here to buy: http://www.elecfreaks.com/estore/color-sensor-module-colsen01.html
Other related products and resources.
This documentation is licensed under the Creative Commons Attribution-ShareAlike License 3.0 Source code and libraries are
licensed under GPL/LGPL, see source code files for details.
Links to external webpages which provide more application ideas, documents/datasheet or software libraries