The CQRobot TSL25911FN Ambient Light Sensor is a highly sensitive device designed to measure the intensity of light in the surrounding environment and convert it into an electrical signal. This sensor is ideal for applications requiring precise light measurements, such as in smartphones, tablets, and other portable devices, as well as in industrial and environmental monitoring systems.
Parameter | Value |
---|---|
Manufacturer | CQRobot |
Part ID | TSL25911FN |
Supply Voltage | 2.7V to 3.6V |
Operating Current | 0.6mA (typical) |
Lux Range | 188 µLux to 88,000 Lux |
Interface | I2C |
Operating Temperature | -30°C to 80°C |
Package | FN (6-pin) |
Pin Number | Pin Name | Description |
---|---|---|
1 | VDD | Power supply (2.7V to 3.6V) |
2 | GND | Ground |
3 | SDA | I2C data line |
4 | SCL | I2C clock line |
5 | INT | Interrupt output (active low) |
6 | ADDR | I2C address select (connect to GND or VDD) |
#include <Wire.h>
// TSL25911FN I2C address
#define TSL25911FN_ADDR 0x29
void setup() {
Serial.begin(9600);
Wire.begin(); // Initialize I2C communication
// Initialize the TSL25911FN sensor
Wire.beginTransmission(TSL25911FN_ADDR);
Wire.write(0x00); // Command register
Wire.write(0x03); // Power on the sensor
Wire.endTransmission();
}
void loop() {
uint16_t ch0, ch1;
// Read channel 0 (visible + IR)
Wire.beginTransmission(TSL25911FN_ADDR);
Wire.write(0x14); // Data register for channel 0
Wire.endTransmission();
Wire.requestFrom(TSL25911FN_ADDR, 2);
ch0 = Wire.read();
ch0 |= (Wire.read() << 8);
// Read channel 1 (IR only)
Wire.beginTransmission(TSL25911FN_ADDR);
Wire.write(0x16); // Data register for channel 1
Wire.endTransmission();
Wire.requestFrom(TSL25911FN_ADDR, 2);
ch1 = Wire.read();
ch1 |= (Wire.read() << 8);
// Calculate lux (simplified formula)
float lux = (ch0 - ch1) * (1.0 / 0.39);
Serial.print("Lux: ");
Serial.println(lux);
delay(1000); // Wait for 1 second before next reading
}
By following this documentation, users can effectively integrate and utilize the CQRobot TSL25911FN Ambient Light Sensor in their projects, ensuring accurate and reliable light measurements.