Color Light Sensor ADJD-S371

{{Component
 * Image = ADJD-S371.jpg
 * Manufacturer = Avago
 * Supply Voltage = 3.7 Max
 * Communication Method = I2C
 * Spec Sheet =
 * Doc Sheet =

The ADJD-S371-QR999 is a 4 channel digital sensor with a mere size of 3.9 x 4.5 x 1.8 mm. 10-bit per channel resolution means the ADJD can discern the smallest differences between visible colors.  This is an IC module with combination of white LED and CMOS IC with integrated RGB filters + Clear channel and Analog-to-digital converter front end. It is ideal for applications like color detection, measurement, and illumination sensing.  The 2-wire serial interface allows direct connection to a Microcontroller or other logic control for further Signal processing without additional component such as analog to digital converter. With the wide sensing range of 100 Lux to 100,000 lux, the sensor can be used for many applications with different light levels by adjusting the Gain setting.
 * Overview =

The ADJD-S371 uses a 2-wire(TWI) I2C serial connection for communication. (See the I2C article for I2C pins on specific microcontrollers.)
 * Hooking it up =


 * SCL – Serial clock
 * SDA – Serial data
 * SLEEP - GND
 * LED - 5v (not required)
 * XCLK – Unconnected

The LED pin is to power the onboard white LED. This is useful for illuminating objects to read their color. If you are reading projected light (monitor etc), it is not necessary to use this.

If using the sensor to read reflected light, the sensor should be 1-2mm from the subject so there is enough room for the light to bounce to the other side of the sensor where it is read.


 * Code Information =

Calibration
To get more accurate color readings from your sensor, you will need to tweak the gain for each color. If the sensor is too sensitive to red for instance, we will need to turn the gain down.

On this sensor, you assign each color channel a number of capacitors, the more the capacitors assigned to a color, the less sensitive it is. You can assign 0 – 16 capacitors, the values are assigned in hex so 0×00 through 0x0f. If you didn’t know, 0x is placed in front of a number to note it is a hexadecimal number.

All the sensors will be a bit different from each other, but starting with 0×02 for all 4 colors and adjusting as needed should work well. If the sensor is reading too much red, raise the red gain. Too little blue? Lower the blue value, or raise all of the others.


 * bildrCode ID = ADJD-S371_Color_Sensor


 * Availability =
 * Sparkfun Electronics -


 * Links =
 * Arduino hookup and code


 * References =
 * Sparkfun Electronics - http://www.sparkfun.com/commerce/product_info.php?products_id=8618
 * Interactive Matter - http://interactive-matter.org/2008/08/tinkering-with-adjd-s371-q999/

}}