When you need to measure light intensity in your projects — whether it’s for smart lighting, weather stations, or battery optimization — the BH1750 is one of the easiest and most reliable sensors to use. It’s a small, inexpensive I²C module that outputs light levels directly in lux, without the need for complex calibration or conversion formulas. In this guide we’ll cover what the BH1750 is, how it works, how to wire it, and how to start using it with Arduino or ESP32.

What is the BH1750?
The BH1750FVI is a digital ambient light sensor from ROHM Semiconductor. It uses a photodiode, an ADC, and a built-in signal processor to give you a direct lux (lx) reading over the I²C bus.
Compared to simple photoresistors (LDRs) or analog photodiodes, the BH1750 is:
- More accurate — outputs calibrated lux values.
- Easier to use — digital I²C interface, no ADC math required.
- Wide measurement range — up to 65,535 lux, covering dim indoor lighting to bright sunlight.
- Low power — useful in portable and battery-powered projects.
Key Specifications
| Parameter | Value |
|---|---|
| Supply Voltage | 2.4 – 3.6V (most breakout boards include 3.3V/5V regulator) |
| Current Consumption | ~0.12 mA (active), 1 µA (power down) |
| Interface | I²C (7-bit address: 0x23 default, 0x5C alternate) |
| Measurement Range | 1 – 65,535 lux |
| Resolution | 1 lx (high resolution mode), 4 lx (low resolution mode) |
| Output | 16-bit lux value |
| Modes | High Resolution (1 lx step), High Resolution 2 (0.5 lx step), Low Resolution (4 lx step) |
Pinout and Wiring
Most BH1750 modules come as small breakout boards with 4–6 pins. Here’s the common pinout:
| Pin | Name | Function |
|---|---|---|
| VCC | 3.3V – 5V (depending on module) | |
| GND | Ground | |
| SDA | I²C data | |
| SCL | I²C clock | |
| ADD | I²C address select (LOW = 0x23, HIGH = 0x5C) | |
| NC | Not connected |
Example Wiring with ESP32
- VCC → 3.3V
- GND → GND
- SDA → GPIO21
- SCL → GPIO22
- ADD → GND (keeps default I²C address 0x23)
Tip: Pull-up resistors (4.7k – 10k) may already be on the module. If not, add them on SDA/SCL lines.
Using BH1750 with Arduino / ESP32
There are multiple Arduino libraries available, the most popular being BH1750 by Christopher Laws. It makes reading lux values as simple as calling a function.
Example Code (Arduino IDE)
#include <Wire.h>
#include <BH1750.h>
BH1750 lightMeter;
void setup(){
Serial.begin(115200);
Wire.begin(21, 22); // SDA, SCL for ESP32 (use Wire.begin() for Arduino UNO)
if (lightMeter.begin(BH1750::CONTINUOUS_HIGH_RES_MODE)) {
Serial.println("BH1750 sensor initialized");
} else {
Serial.println("Error initializing BH1750");
}
}
void loop() {
float lux = lightMeter.readLightLevel();
Serial.print("Light: ");
Serial.print(lux);
Serial.println(" lx");
delay(1000);
}
Modes Explained
The BH1750 supports multiple measurement modes:
- Continuous High Resolution: 1 lx resolution, continuous measurement.
- Continuous High Resolution 2: 0.5 lx resolution, but narrower range.
- Continuous Low Resolution: 4 lx resolution, faster response.
- One-time modes: Similar to above, but sensor powers down after measurement to save energy.
Use high resolution for accuracy, and low resolution for quick response or bright light environments.
Practical Tips
- Module voltage: Some BH1750 boards accept 5V, others require 3.3V. Check your breakout board!
- Sunlight saturation: In very bright outdoor sunlight, readings may max out. If you need >65k lux, consider a sensor like VEML7700.
- Sensor placement: Avoid shading the sensor with enclosures; for best results, leave it exposed or use a light-diffusing cover.
- Power saving: Use one-time mode in battery powered projects to cut down idle consumption.
- Multiple sensors: Use the ADD pin to run two BH1750s on the same I²C bus (0x23 and 0x5C).
Project Ideas
The BH1750 is simple but powerful. Here are some applications:
- Automatic lighting: Turn lights on/off based on ambient lux.
- Weather station: Measure daylight brightness, log sun intensity.
- Greenhouse / indoor growing: Monitor plant light exposure.
- Battery optimization: Adjust display brightness based on ambient light.
- Solar tracking: Combine with servo motors to align solar panels with light source.
Conclusion
The BH1750 light sensor is an excellent upgrade from simple LDRs. With I²C digital output, calibrated lux values, and wide range, it’s a drop-in solution for projects that need accurate ambient light measurement. Whether you’re automating lights, logging daylight levels, or adjusting screen brightness, the BH1750 makes it easy.