Color Light Sensor ADJD-S371 (Redirected from ADJD-S371 Color Sensor)
From bildr
- Manufacturer: Avago
- Voltage: 3.7 Max
- Communication: I2C
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.
Contents |
Hooking it up
The ADJD-S371 uses a 2-wire(TWI) I2C serial connection for communication. (See the I2C article for I2C pins on specific microcontrollers.)
- 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
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.
Availability
- Sparkfun Electronics - [1]
External Links
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/
This page is a Component on bildr. Components are pages about specific parts, and include connection details and code when available.