Skip to content
Light

TSL2561 Luminosity Sensor

Dual-photodiode lux sensor with good accuracy across mixed lighting conditions.

A precision light sensor using two photodiodes to separate infrared from visible light, giving more accurate lux readings than a single-diode LDR.

Specifications

Sensor designTwo photodiodes — one sensitive to visible+infrared light, one to infrared only — allowing visible-light-only lux to be computed
InterfaceI2C, up to 400kHz Fast mode
I2C address0x39 default; 0x29 or 0x49 selectable via the ADDR pin
Supply voltage2.7V–3.6V (breakout boards commonly accept 3.3-5V via onboard regulation)
Dynamic range~0.1 to 40,000+ lux
Resolution16-bit ADC per photodiode channel
Integration timeSelectable 13.7ms / 101ms / 402ms — trade-off between read speed and precision/max range
InterruptProgrammable threshold interrupt available on the INT pin (open-drain, needs a pull-up)

Pinout

PinNameDescription
1VCCPower, 3.3–5V DC depending on breakout
2GNDGround
3SDAI2C data line
4SCLI2C clock line
5ADDRI2C address select — float/GND-tie for 0x29, leave as-is for default 0x39, tie to VCC for 0x49 (varies slightly by breakout, check silkscreen)
6INTProgrammable threshold interrupt output, open-drain — needs an external pull-up if used

ADDR pin behavior varies by breakout — check your specific board's silkscreen/datasheet: on most, floating gives 0x39, grounding gives 0x29, and tying to VCC gives 0x49. This lets you run up to three TSL2561s on one I2C bus without a multiplexer.

Integration time is a speed/precision trade-off — the default library setting is usually a reasonable middle ground (101ms), but low-light scenes benefit from the longer 402ms integration time for better resolution, while fast-changing light logging benefits from the shorter 13.7ms setting at the cost of some precision.

INT is open-drain — it needs an external pull-up resistor (or the microcontroller's internal pull-up) if you plan to use the interrupt-on-threshold feature; leaving it unconnected is fine if you're just polling lux values in code.

Lux isn't a single raw register read — computing an actual lux value requires combining both photodiode channels through the datasheet's piecewise formula (or CMOS/T-package-specific lookup table); this is handled automatically by libraries like Adafruit_TSL2561, but matters if you're reading registers manually.

Variants

The TSL2561's dual-photodiode design gives it a real accuracy edge over single-diode sensors under artificial or IR-heavy lighting, since it can subtract out the infrared component the human eye doesn't perceive. If that level of accuracy isn't needed, the BH1750 is simpler and cheaper for straightforward ambient-light logging, and a plain LDR is enough for basic light/dark threshold detection.

VariantTemp rangeHum rangeAccuracyProtocolPrice
TSL2561~$3-5
BH1750~$1-3
LDR (photoresistor)~$0.50-1