Comparison · Beginner · 3 min read
Ambient Light Sensors
BH1750, TSL2591, VEML7700 and OPT3001
By Geekobot Learning Team · Updated 29 Oct 2026
On this page
Ambient light sensors such as the BH1750, TSL2591, VEML7700 and OPT3001 measure brightness in lux over I2C, so they give accurate readings that do not depend on how you wire a resistor. The BH1750 is the easiest and cheapest. Choose the TSL2591 or VEML7700 for very dim or very bright scenes. Use a plain LDR only when a rough dark-or-light switch is enough.
Key specs at a glance
- BH1750
- 1 to 65,535 lux, 16-bit, I2C 0x23 or 0x5C, 3.3 V chip (most modules take 3.3 to 5 V)
- TSL2591
- About 0.0002 to 88,000 lux, I2C 0x29, separate IR and visible channels
- VEML7700
- 0 to about 120,000 lux, I2C 0x10, gain and integration time selectable
- OPT3001
- 0.01 to 83,000 lux, human-eye response, I2C 0x44 to 0x47
- Output
- Lux (illuminance)
- Typical use
- Auto screen brightness, plant lights, camera exposure, smart blinds
Lux sensor or LDR?
An LDR changes resistance with light, but the response is curved, differs from part to part and cannot be converted to a true lux value without calibration. A lux sensor is a photodiode with a filter shaped like the human eye plus an ADC on one chip, so it returns a number in lux and ignores most infrared. Use an LDR for a cheap dusk switch; use a lux sensor when the number matters.
Typical light levels
Use these as a sanity check for your readings.
| Scene | Approximate lux |
|---|---|
| Moonlight | 0.1 to 1 |
| Dim living room | 50 to 100 |
| Office desk | 300 to 500 |
| Overcast day outdoors | 1,000 to 10,000 |
| Bright shade | 10,000 to 25,000 |
| Direct sunlight | 100,000+ |
- Moonlight
- 0.1 to 1
- Dim living room
- 50 to 100
- Office desk
- 300 to 500
- Overcast day outdoors
- 1,000 to 10,000
- Bright shade
- 10,000 to 25,000
- Direct sunlight
- 100,000+
Choosing a sensor
The chips differ mainly in range and how they handle very bright or very dark light.
| Sensor | Range | Best for | Notes |
|---|---|---|---|
| BH1750 | 1 to 65,535 lux | Indoor use, plant lights, screens | Easiest; fixed range saturates in direct sun without a diffuser |
| TSL2591 | Very wide dynamic range | Dim to bright scenes, data logging | IR and visible channels; more setup |
| VEML7700 | 0 to about 120,000 lux | Outdoor and indoor | Needs a correction formula above about 1,000 lux for best accuracy |
| OPT3001 | 0.01 to 83,000 lux | Eye-matched readings | Four I2C addresses; tiny SMD part |
| TSL2561 | 0.1 to 40,000 lux | Existing designs | Older design still sold on cheap modules |
- BH1750
- Range:
- 1 to 65,535 lux
- Best for:
- Indoor use, plant lights, screens
- Notes:
- Easiest; fixed range saturates in direct sun without a diffuser
- TSL2591
- Range:
- Very wide dynamic range
- Best for:
- Dim to bright scenes, data logging
- Notes:
- IR and visible channels; more setup
- VEML7700
- Range:
- 0 to about 120,000 lux
- Best for:
- Outdoor and indoor
- Notes:
- Needs a correction formula above about 1,000 lux for best accuracy
- OPT3001
- Range:
- 0.01 to 83,000 lux
- Best for:
- Eye-matched readings
- Notes:
- Four I2C addresses; tiny SMD part
- TSL2561
- Range:
- 0.1 to 40,000 lux
- Best for:
- Existing designs
- Notes:
- Older design still sold on cheap modules
BH1750 on Arduino
Wire VCC to 3V3 (or 5 V on modules with a regulator), GND to GND, SDA and SCL to the board's I2C pins, and leave ADDR unconnected for address 0x23.
#include <Wire.h>
const uint8_t BH = 0x23;
void setup() {
Serial.begin(115200);
Wire.begin();
Wire.beginTransmission(BH);
Wire.write(0x10); // continuous high-resolution mode, 1 lx steps
Wire.endTransmission();
delay(180); // first conversion takes up to 180 ms
}
void loop() {
Wire.requestFrom(BH, (uint8_t)2);
if (Wire.available() == 2) {
uint16_t raw = Wire.read() << 8;
raw |= Wire.read();
Serial.print(raw / 1.2); // lux
Serial.println(" lx");
}
delay(500);
}Getting good readings
- Put the sensor window where the light you care about falls, away from LEDs on the same board.
- Behind a window or a lid, expect a lower reading. A white diffuser spreads light and stops saturation in sunlight.
- Two sensors on one bus need different addresses. The BH1750 ADDR pin selects 0x23 or 0x5C.
- Do not use lux for plant growth directly; plants respond to PAR, and the lamp spectrum matters.
Try it: Adc resolution calculator
Change the values and the diagram and results update as you type.
Common mistakes to avoid
- Reading an LDR and calling it lux.
- Covering the sensor window with a frosted lid and forgetting the loss.
- Letting the BH1750 saturate in direct sun.
- Placing it beside a bright indicator LED.
- Using lux readings to judge plant light without checking the lamp spectrum.
Frequently asked questions
Is a BH1750 accurate?
It is accurate to roughly ±20% against calibrated meters, which is plenty for automatic lighting.
Can I use it outdoors?
Yes if you shade it and diffuse the light. The BH1750 tops out at 65,535 lux, below direct sun.
BH1750 or VEML7700?
BH1750 for simplicity. VEML7700 or TSL2591 if you need bright sun or deep dark.
What is lux?
Lux measures light falling on a surface, scaled to the sensitivity of the human eye.
Do I need pull-up resistors?
Most breakout boards already include I2C pull-ups.
Can it detect UV?
No. For ultraviolet use a UV sensor.
Parts for this guide
Calculators
Terms in this guide
Projects that use it
Put this into practice: 34 step-by-step builds in our project library use parts from this guide.
Keep learning
Sources
- ROHM BH1750FVI datasheet
- ams-OSRAM TSL2591 datasheet
- Vishay VEML7700 datasheet and application note
- Texas Instruments OPT3001 datasheet
Written by the Geekobot team from manufacturer datasheets. Always check the datasheet for the exact part and variant you buy.




