Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Component Documentation

How to Use Adafruit TSL2591 High Dynamic Range Digital Light Sensor: Examples, Pinouts, and Specs

Image of Adafruit TSL2591 High Dynamic Range Digital Light Sensor
Cirkit Designer LogoDesign with Adafruit TSL2591 High Dynamic Range Digital Light Sensor in Cirkit Designer

Introduction

The Adafruit TSL2591 is a sophisticated digital light sensor that offers high dynamic range detection of ambient light intensity. It is capable of measuring illuminance from deep dark (188 µLux) to bright sunlight (88,000 Lux) with an extended range. This sensor is ideal for applications that require precise light measurements, such as screen brightness adjustments in smartphones, industrial lighting systems, and environmental monitoring.

Explore Projects Built with Adafruit TSL2591 High Dynamic Range Digital Light Sensor

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
ESP8266 and TSL2561 Wi-Fi Connected Light Sensor
Image of Schaltplan_1: A project utilizing Adafruit TSL2591 High Dynamic Range Digital Light Sensor in a practical application
This circuit consists of an ESP8266 NodeMCU microcontroller connected to a TSL2561 Lux Sensor. The microcontroller reads light intensity data from the sensor via I2C communication, with the SCL and SDA lines connected to D1 and D2 pins of the ESP8266, respectively. Power is supplied to the sensor through the 3V3 and GND pins of the ESP8266.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino UNO with TCS34725 Color Sensor and LDR Light Detection
Image of SSC: A project utilizing Adafruit TSL2591 High Dynamic Range Digital Light Sensor in a practical application
This circuit features an Arduino UNO microcontroller connected to an Adafruit TCS34725 RGB Color Sensor and a photocell (LDR) with a 10k Ohm resistor forming a voltage divider connected to the Arduino's analog input A0. The RGB sensor is interfaced with the Arduino via I2C communication, using SDA and SCL lines. The purpose of this circuit is likely to measure ambient light intensity with the photocell and detect colors with the RGB sensor, both interfaced with the Arduino for processing and potential output of the sensor data.
Cirkit Designer LogoOpen Project in Cirkit Designer
Raspberry Pi 4B Smart Weather Station with Humidity, Temperature, Light, and Soil Moisture Sensors
Image of PT plantas: A project utilizing Adafruit TSL2591 High Dynamic Range Digital Light Sensor in a practical application
This circuit is a sensor monitoring system using a Raspberry Pi 4B as the central controller. It integrates a DHT11 sensor for humidity and temperature, a TSL2561 sensor for light intensity, an ADS1115 ADC for analog-to-digital conversion, and a YL-69 soil moisture sensor. The data from these sensors is displayed on an OLED screen.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino UNO Light Sensor with TSL2561 and LED Indicator
Image of TSL2561 light sensor: A project utilizing Adafruit TSL2591 High Dynamic Range Digital Light Sensor in a practical application
This circuit uses an Arduino UNO to read data from a TSL2561 Lux Sensor and control a red LED. The Arduino reads light intensity values from the sensor via I2C communication and powers the LED through a current-limiting resistor.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with Adafruit TSL2591 High Dynamic Range Digital Light Sensor

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Image of Schaltplan_1: A project utilizing Adafruit TSL2591 High Dynamic Range Digital Light Sensor in a practical application
ESP8266 and TSL2561 Wi-Fi Connected Light Sensor
This circuit consists of an ESP8266 NodeMCU microcontroller connected to a TSL2561 Lux Sensor. The microcontroller reads light intensity data from the sensor via I2C communication, with the SCL and SDA lines connected to D1 and D2 pins of the ESP8266, respectively. Power is supplied to the sensor through the 3V3 and GND pins of the ESP8266.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of SSC: A project utilizing Adafruit TSL2591 High Dynamic Range Digital Light Sensor in a practical application
Arduino UNO with TCS34725 Color Sensor and LDR Light Detection
This circuit features an Arduino UNO microcontroller connected to an Adafruit TCS34725 RGB Color Sensor and a photocell (LDR) with a 10k Ohm resistor forming a voltage divider connected to the Arduino's analog input A0. The RGB sensor is interfaced with the Arduino via I2C communication, using SDA and SCL lines. The purpose of this circuit is likely to measure ambient light intensity with the photocell and detect colors with the RGB sensor, both interfaced with the Arduino for processing and potential output of the sensor data.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of PT plantas: A project utilizing Adafruit TSL2591 High Dynamic Range Digital Light Sensor in a practical application
Raspberry Pi 4B Smart Weather Station with Humidity, Temperature, Light, and Soil Moisture Sensors
This circuit is a sensor monitoring system using a Raspberry Pi 4B as the central controller. It integrates a DHT11 sensor for humidity and temperature, a TSL2561 sensor for light intensity, an ADS1115 ADC for analog-to-digital conversion, and a YL-69 soil moisture sensor. The data from these sensors is displayed on an OLED screen.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of TSL2561 light sensor: A project utilizing Adafruit TSL2591 High Dynamic Range Digital Light Sensor in a practical application
Arduino UNO Light Sensor with TSL2561 and LED Indicator
This circuit uses an Arduino UNO to read data from a TSL2561 Lux Sensor and control a red LED. The Arduino reads light intensity values from the sensor via I2C communication and powers the LED through a current-limiting resistor.
Cirkit Designer LogoOpen Project in Cirkit Designer

Common Applications and Use Cases

  • Ambient light sensing for display backlight control
  • Industrial lighting automation
  • Environmental monitoring in smart homes and buildings
  • Light data logging for scientific analysis

Technical Specifications

Key Technical Details

  • Dynamic Range: 600M:1
  • Maximum Lux: 88,000 Lux
  • Minimum Lux: 188 µLux
  • Communication: I2C interface
  • Supply Voltage: 3.3V to 5V
  • Operating Temperature: -30°C to 80°C

Pin Configuration and Descriptions

Pin Number Name Description
1 VIN Supply voltage (3.3V to 5V)
2 GND Ground connection
3 SCL I2C clock line
4 SDA I2C data line
5 INT Interrupt output (active low)

Usage Instructions

How to Use the Component in a Circuit

  1. Power Supply: Connect the VIN pin to a 3.3V or 5V power supply, and the GND pin to the ground.
  2. I2C Communication: Connect the SCL and SDA pins to the I2C clock and data lines on your microcontroller.
  3. Interrupts (Optional): The INT pin can be connected to a digital input on your microcontroller if you wish to use the interrupt feature.

Important Considerations and Best Practices

  • Ensure that the power supply is within the specified voltage range to prevent damage.
  • Use pull-up resistors on the I2C lines if they are not provided on the microcontroller board.
  • Avoid exposing the sensor to direct sunlight or strong artificial light sources that could exceed its maximum rating.
  • When placing the sensor in an enclosure, ensure that the light inlet is not obstructed and that the material does not significantly filter out light.

Example Code for Arduino UNO

#include <Wire.h>
#include <Adafruit_Sensor.h>
#include <Adafruit_TSL2591.h>

// Create the TSL2591 sensor object
Adafruit_TSL2591 tsl = Adafruit_TSL2591(2591);

void setup() {
  Serial.begin(9600);
  // Initialize the sensor
  if (tsl.begin()) {
    Serial.println("Started sensor successfully.");
  } else {
    Serial.println("No sensor found. Check your wiring.");
    while (1);
  }
  
  // Set the gain and integration time
  tsl.setGain(TSL2591_GAIN_MED);      // Medium gain
  tsl.setTiming(TSL2591_INTEGRATIONTIME_300MS);  // 300ms integration time

  // Uncomment to enable the interrupt feature on the sensor
  // tsl.registerInterrupt(500, 10000);
}

void loop() {
  // Read the visible + IR diode from the sensor
  uint32_t lumens = tsl.getFullLuminosity();
  // Calculate the actual lux value
  uint16_t lux = tsl.calculateLux(lumens >> 16, lumens & 0xFFFF);
  
  // Print the results to the Serial Monitor
  Serial.print("Lux: ");
  Serial.println(lux);
  
  delay(1000); // Wait for 1 second before the next reading
}

Troubleshooting and FAQs

Common Issues Users Might Face

  • Sensor Not Responding: Ensure that the wiring is correct and that the sensor is properly powered.
  • Inaccurate Readings: Check if the sensor is facing the light source directly and that there are no obstructions.
  • I2C Communication Errors: Verify that the pull-up resistors are in place and that there are no short circuits on the I2C lines.

Solutions and Tips for Troubleshooting

  • Double-check the connections and solder joints.
  • Make sure that the I2C address of the sensor does not conflict with other devices on the bus.
  • Reset the sensor and microcontroller to clear any temporary issues.
  • Use the Serial.println() function to debug and track down where the issue might be occurring in your code.

FAQs

Q: Can the TSL2591 sensor measure UV light? A: No, the TSL2591 is designed to measure visible and infrared light, not ultraviolet light.

Q: Is it necessary to calibrate the sensor? A: The TSL2591 comes factory-calibrated, but for critical applications, you may perform additional calibration against a known light source.

Q: How can I change the I2C address of the sensor? A: The TSL2591 has a fixed I2C address and cannot be changed. If you need to connect multiple sensors, you will need an I2C multiplexer.

Q: What is the purpose of the INT pin? A: The INT pin can be used to trigger an interrupt on the microcontroller when certain light thresholds are reached, reducing the need for constant polling of the sensor.

This documentation provides a comprehensive guide to the Adafruit TSL2591 High Dynamic Range Digital Light Sensor, ensuring users can effectively integrate and utilize this component in their projects.