Overview

The TCS34725 is a high-precision color light-to-digital converter IC manufactured by ams OSRAM (formerly TAOS). It features a 3×43 \times 4 array of filtered photodiodes (Red, Green, Blue, and Clear / Unfiltered) integrated with an IR-blocking filter.

Because the IR filter blocks infrared spectral interference from ambient light sources (incandescent light bulbs, sunlight), the TCS34725 delivers accurate RGB color readings, color temperature in Kelvin (KK), and lux illuminance. Breakout boards include an onboard neutral white 4150K LED for illuminating target objects.

Quick reference

Module VCC3.3 V to 5.0 V DC (onboard 3.3V LDO)
Chip VDD2.7 V to 3.6 V DC
Dynamic Range3,800,000 : 1
IR FilterIntegrated Infrared Blocking Filter
Selectable Analog Gain1×,4×,16×,60×1\times, 4\times, 16\times, 60\times
Programmable Integration Time2.4 ms, 24 ms, 101 ms, 154 ms, 700 ms
Communication InterfaceI2C (fixed slave address 0x29, up to 400 kHz)
Illumination Control (LED pin)High-brightness neutral white LED output control pin

Pinout

Standard 7-Pin Breakout Header

PinNameTypeDescription
1VINPower InputSupply voltage (+3.3 V to +5.0 V DC)
2GNDPowerGround (0 V)
33V3Power OutputRegulated +3.3 V DC output from internal LDO
4SCLDigital InputI2C Serial Clock input
5SDADigital I/OI2C Serial Data line
6INTDigital OutputActive-LOW Interrupt output pin
7LEDDigital InputOnboard White LED control pin (HIGH/Unconnected = LED ON, LOW = LED OFF)

Specifications

ParameterSymbolMinTypMaxUnitConditions
Supply Voltage (Chip)VDDV_{DD}2.73.03.6VDC
Active CurrentIDDI_{DD}235330µAActive conversion mode
Sleep CurrentISLEEPI_{SLEEP}2.510µASleep state
Red Photodiode ResponsivityRRR_R125%Normalized to peak red
Green Photodiode ResponsivityGRG_R140%Normalized to peak green
Blue Photodiode ResponsivityBRB_R100%Normalized to peak blue
Max ADC CountFScountFS_{count}65535Counts16-bit ADC per channel

Color Temperature & Lux Calculation

To calculate Color Temperature (CTCT in Kelvin) and Illuminance (LuxLux) from raw 16-bit RGBC counts (R,G,B,CR, G, B, C):

  1. Calculate Chromaticity Coordinates (X,Y,ZX, Y, Z): X=(0.14282×R)+(0.15492×G)+(0.05291×B)X = (-0.14282 \times R) + (0.15492 \times G) + (-0.05291 \times B) Y=(0.32466×R)+(1.57837×G)+(0.73191×B)Y = (-0.32466 \times R) + (1.57837 \times G) + (-0.73191 \times B) Z=(0.68202×R)+(0.77073×G)+(0.56332×B)Z = (-0.68202 \times R) + (0.77073 \times G) + (0.56332 \times B)

  2. Calculate Chromaticity Coordinates (x,yx, y): x=XX+Y+Z,y=YX+Y+Zx = \frac{X}{X + Y + Z}, \quad y = \frac{Y}{X + Y + Z}

  3. McCamy's Formula for Color Temperature (CTCT): n=x0.33200.1858yn = \frac{x - 0.3320}{0.1858 - y} CT (in Kelvin)=449×n3+3525×n2+6823.3×n+5520.33CT\text{ (in Kelvin)} = 449 \times n^3 + 3525 \times n^2 + 6823.3 \times n + 5520.33

Wiring

TCS34725 Breakout PinMicrocontroller (Arduino Uno / ESP32)
VIN5V (or 3.3V)
GNDGND
SCLSCL (A5 on Uno, GPIO22 on ESP32)
SDASDA (A4 on Uno, GPIO21 on ESP32)
LEDDigital Pin (or leave floating to keep white LED ON)

Common mistakes

  • Forgetting Command Byte bit 7 (0x80): All I2C register transactions require setting bit 7 of the register address byte (0x80 | Register_Address).
  • ADC Saturation under bright white LED reflection: Placing glossy colored objects too close (<2 mm<2\text{ mm}) to the white LED causes 16-bit ADC overflow (65535 counts). Adjust Gain down to 1×1\times or reduce integration time to 24 ms24\text{ ms}.
  • Measuring unilluminated objects: Ambient shadows distort color reading accuracy. Always use the onboard white LED in a covered sensor shroud for consistent color sorting.

Notes

  • Standard choice for automated color-sorting robot arms, fruit ripeness sensors, and display color calibration tools.

Assets & downloads