

The BH1750 is a digital light sensor designed to measure ambient light intensity in lux, providing precise and reliable readings. It communicates via the I2C protocol, making it easy to integrate with microcontrollers and development boards. The sensor is highly sensitive and can detect a wide range of light levels, from very dim to bright sunlight.








The BH1750 is a compact and efficient sensor with the following key specifications:
| Parameter | Value |
|---|---|
| Operating Voltage | 2.4V to 3.6V |
| Typical Operating Voltage | 3.0V |
| Current Consumption | 0.12 mA (typical) |
| Measurement Range | 1 lux to 65535 lux |
| Communication Interface | I2C (7-bit address: 0x23 or 0x5C) |
| Light Resolution | 1 lux |
| Operating Temperature | -40°C to +85°C |
| Dimensions | 3.0mm x 1.6mm x 1.2mm |
The BH1750 has six pins, as described in the table below:
| Pin Name | Pin Number | Description |
|---|---|---|
| VCC | 1 | Power supply (2.4V to 3.6V) |
| GND | 2 | Ground |
| SDA | 3 | I2C data line |
| SCL | 4 | I2C clock line |
| ADDR | 5 | I2C address selection (LOW: 0x23, HIGH: 0x5C) |
| NC | 6 | Not connected (leave unconnected or floating) |
0x23.0x5C.Below is an example of how to use the BH1750 with an Arduino UNO:
#include <Wire.h>
#include <BH1750.h>
// Create an instance of the BH1750 sensor
BH1750 lightMeter;
void setup() {
Serial.begin(9600); // Initialize serial communication at 9600 baud
Wire.begin(); // Initialize I2C communication
// Initialize the BH1750 sensor in continuous high-resolution mode
if (lightMeter.begin(BH1750::CONTINUOUS_HIGH_RES_MODE)) {
Serial.println("BH1750 initialized successfully.");
} else {
Serial.println("Error initializing BH1750. Check connections.");
while (1); // Halt execution if initialization fails
}
}
void loop() {
// Read light intensity in lux
float lux = lightMeter.readLightLevel();
// Print the light intensity to the serial monitor
Serial.print("Light Intensity: ");
Serial.print(lux);
Serial.println(" lux");
delay(1000); // Wait for 1 second before the next reading
}
No Response from the Sensor
Inaccurate Readings
I2C Communication Errors
Sensor Not Detected
Q: Can the BH1750 measure light intensity in complete darkness?
A: The BH1750 can measure very low light levels, but it cannot detect absolute darkness (0 lux).
Q: What is the difference between continuous and one-time measurement modes?
A: In continuous mode, the sensor continuously measures light intensity and updates the data register. In one-time mode, the sensor performs a single measurement and enters a low-power state.
Q: Can the BH1750 operate at 5V?
A: No, the BH1750 operates at a voltage range of 2.4V to 3.6V. Use a level shifter if interfacing with a 5V system.