Component guide · Beginner · 3 min read
BH1750 light sensor

Pinout, Wiring and Code
By Geekobot Learning Team · Updated 29 Oct 2026
On this page
The BH1750 is a digital ambient light sensor that reports brightness directly in lux over I2C, from 1 to 65,535 lux. GY-30 and GY-302 are common module names. Its address is 0x23 with ADDR low or 0x5C with ADDR high. It is far more useful than an LDR when you need real lux values for plants, lighting or displays.
Key specs at a glance
- Range
- 1 to 65,535 lux
- Resolution
- 1 lux (high resolution mode), 0.5 lux (mode 2), 4 lux (low)
- Interface
- I2C, 0x23 or 0x5C
- Supply
- 3 to 5 V on modules (chip is 2.4 to 3.6 V)
- Spectral response
- Close to the human eye
- Measurement time
- About 120 ms in high resolution mode
Models in this guide
These are alternatives. Pick the one that fits your project; you only need one.
What the BH1750 light sensor is
The BH1750 from ROHM measures visible light the way the human eye sees it and outputs lux directly, with no calibration needed. Modules add a regulator and pull-ups so they work at 5 V.
Typical uses: automatic display brightness, grow light control, daylight logging and smart lighting. For UV or infrared, use a dedicated UV sensor instead.
BH1750 light sensor pinout
The pins on the BH1750 light sensor and what each one does.
| Pin | Function |
|---|---|
| VCC | 3 to 5 V |
| GND | Ground |
| SCL | I2C clock |
| SDA | I2C data |
| ADDR | LOW or open = 0x23, HIGH = 0x5C |
- VCC
- 3 to 5 V
- GND
- Ground
- SCL
- I2C clock
- SDA
- I2C data
- ADDR
- LOW or open = 0x23, HIGH = 0x5C
Wiring the BH1750 light sensor
Use ADDR to put two sensors on one bus, for example one inside and one outside.
| BH1750 light sensor pin | Arduino Uno | ESP32 |
|---|---|---|
| VCC | 5V (or 3.3V) | 3V3 |
| GND | GND | GND |
| SDA | A4 | GPIO 21 |
| SCL | A5 | GPIO 22 |
| ADDR | Leave open (0x23) | Leave open (0x23) |
- VCC
- Arduino Uno:
- 5V (or 3.3V)
- ESP32:
- 3V3
- GND
- Arduino Uno:
- GND
- ESP32:
- GND
- SDA
- Arduino Uno:
- A4
- ESP32:
- GPIO 21
- SCL
- Arduino Uno:
- A5
- ESP32:
- GPIO 22
- ADDR
- Arduino Uno:
- Leave open (0x23)
- ESP32:
- Leave open (0x23)
Example code
Install the BH1750 library by Christopher Laws.
#include <Wire.h>
#include <BH1750.h>
BH1750 meter(0x23);
void setup() {
Serial.begin(115200);
Wire.begin();
meter.begin(BH1750::CONTINUOUS_HIGH_RES_MODE);
}
void loop() {
float lux = meter.readLightLevel();
Serial.print(lux); Serial.println(" lx");
delay(1000);
}Setup and tuning
point the sensor where you want to measure; a white diffuser dome gives a wider viewing angle.
full sunlight can exceed 100,000 lux and saturate it; adjust the measurement time register (MTreg) or add a neutral filter.
office 300 to 500 lux, overcast day 1,000 to 10,000 lux, direct sun 30,000 to 100,000 lux.
readings drop; compare with a reference meter and scale.
What you need
Shop this list4 of 5 found in our store · ₹1,035
GY-30 BH1750FVI light intensity module: the most common versionGY-30 BH1750FVI Digital Light Intensity Illumination Sensor Module₹136Closest match, check the specs
GY-302 BH1750 light intensity module: the same chip on a different boardGY-302 BH1750 Light Intensity Module – I2C Interface₹121Closest match, check the specs
Adafruit BH1750 module (STEMMA QT / Qwiic): plug-in cable, no solderingAdafruit BH1750 Ambient Light Sensor Module – STEMMA QT/Qwiic₹729Closest match, check the specs- Uno R3 development board: the controller used in the wiring tableFind this part
Dupont jumper wires: for the connectionsDupont Jumper Wires (40 pcs)₹49Closest match, check the specs
Alternatives and when to choose them
- LDR light sensor: cheapest, only relative brightness.
- Ambient light sensors: VEML7700, TSL2591 and others for wider ranges.
- Colour sensors: when you need colour, not just brightness.
Try it: I2c pullup calculator
Change the values and the diagram and results update as you type.
Common mistakes to avoid
- Expecting it to measure direct sunlight without saturating.
- Two modules on the same address.
- Mounting it behind tinted plastic and trusting the numbers.
- Reading faster than the 120 ms measurement time.
Frequently asked questions
What is the I2C address of BH1750?
0x23 when ADDR is low or unconnected, 0x5C when ADDR is high.
GY-30 or GY-302?
Both use the same BH1750 chip; only the board layout differs.
Does it work on 3.3 V?
Yes. Modules work at 3.3 V or 5 V.
Can it measure sunlight?
Up to 65,535 lux by default, which strong sun can exceed. Change MTreg to extend the range.
Does it detect UV or IR?
No. Its response is matched to visible light.
How accurate is it?
About ±20 percent out of the box, good enough for lighting control.
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
- BH1750FVI digital 16-bit serial output type ambient light sensor IC datasheet (ROHM)
- BH1750 Arduino library by Christopher Laws
Written by the Geekobot team from manufacturer datasheets. Always check the datasheet for the exact part and variant you buy.

