TSL2561 Luminosity Sensor Hookup Guide
Let There Be Light!
The TSL2561 is an inexpensive but sophisticated light sensor. Unlike simpler sensors like photoresistors and photodiodes, the TSL2561 incorporates both infrared and visible light sensors to better approximate the response of the human eye. Because the TSL2561 is an integrating sensor (it soaks up light for a predetermined amount of time), it is capable of measuring both very small and very large amounts of light.
This hookup guide will explain what this sensor does, and how you can use it in your projects. Let’s get started!
What is lux? (Baby don’t hurt me…)
With a bit of math, the TSL2561 can output illumination in lux. Technically, one lux is equal to one lumen per square meter. Practially, lux is a measure of how bright any given illumination will appear to the human eye.
The human eye has a huge dynamic range, far more than most electronic sensors. Real-world conditions can range from 0.0001 lux in starlight, to over 100,000 lux in direct sunlight. The TSL2561 has features that allow it to handle this huge dynamic range. These settings are similar to a camera; one can change both the sensitivity (which is like an ASA film rating), and the integration time, (which is like the shutter speed). Like a camera, you can balance those measurements for the best results.
Lux is a very complex measurement to make because it involves both the human eye’s response to color (frequency), and the concentration of that light (a flashlight will produce a higher lux value than the equivalent bare bulb). The TSL2561 is not a true luxmeter, but the manufacturer of the TSL2561 has characterized its output against professional equipment to come up with lux approximation equations. (You can find these equations in the datasheet, and we’re also using them in our software library.) It should be noted that although these equations will get you in the ballpark, the TSL2561 is not a calibrated instrument (nor is it priced like one). If you need highly accurate results you should at least perform your own calibration. For everyday use however, the TSL2561 is far superior to simpler photoresistors and photodiodes for illumination measurement.
What we’ll cover in this tutorial
We will show you how to connect this sensor to an Arduino microcontroller, and use the included software library to get measurements out of the sensor. If you’re using a different type of microcomputer these instructions and source code may still be helpful.