The BH1750 light sensor wiring diagram requires exactly four core connections for standard operation: VCC to 3.3V, GND to GND, SDA to GPIO21 (ESP32) or A4 (Arduino Uno), and SCL to GPIO22 (ESP32) or A5 (Arduino Uno). The fifth pin, ADDR, is left floating to set the default I2C address (0x23) or tied to GND for the alternate address (0x5C). Unlike analog photoresistors that require a voltage divider and ADC calibration, the Rohm BH1750FVI outputs a digital lux value directly over the I2C bus, eliminating the need for load resistors in your wiring path.

The BH1750 Light Sensor Wiring Diagram: Symbol Key & Terminal Map

Before stripping wires, you need to translate the schematic symbols on your diagram to the physical silk-screen on the breakout board. Most hobbyist diagrams use the GY-302 breakout board, which houses the BH1750FVI IC, a 3.3V LDO voltage regulator, and 4.7kΩ I2C pull-up resistors.

Schematic Symbol Translation: If your diagram shows a standard IC block with "SDA" and "SCL" lines, it represents the digital I2C protocol. If you see a zig-zag resistor symbol paired with an arrow pointing inward, that represents an analog Light Dependent Resistor (LDR) voltage divider—not the BH1750. Ensure your diagram explicitly labels I2C data lines before proceeding.

Terminal and Pin Mapping Table

Module Pin (Silk-screen) Physical Location (GY-302) ESP32 DevKit Pin Arduino Uno Pin Function & Electrical Role
GND Pin 1 (Leftmost) GND GND Common ground reference and current return path.
ADDR Pin 2 Leave Floating (or GND) Leave Floating (or GND) I2C address select. Floating = 0x23, GND = 0x5C.
SCL Pin 3 GPIO 22 A5 (or SCL header) I2C Clock line. Idle-high at 3.3V.
SDA Pin 4 GPIO 21 A4 (or SDA header) I2C Data line. Bidirectional open-drain.
VCC Pin 5 (Rightmost) 3V3 3.3V (or 5V) Power input. Breakout LDO regulates to 3.3V internally.

Node-by-Node Trace: Power, Ground, and I2C Data Paths

A proper wiring trace follows the current from the source, through the load, and back via the ground path, while mapping the logic signals separately. Here is the exact node-by-node trace for connecting the GY-302 BH1750 module to an ESP32 DevKit v1.

  1. The Power Path (Source to Load): Current originates at the ESP32’s 3V3 voltage regulator pin. A red jumper wire routes this 3.3V DC to the VCC terminal on the GY-302. While the GY-302 has an onboard LDO that can accept 5V, feeding it 3.3V directly bypasses the LDO's dropout voltage risks and prevents 5V logic from accidentally back-feeding into the ESP32's strictly 3.3V-tolerant GPIO pins via the I2C pull-ups.
  2. The Ground Path (Return): A black jumper wire connects the ESP32 GND pin to the module’s GND pin. This establishes the equipotential bonding required for the I2C logic high/low thresholds to be read correctly. Without this common ground, the SDA/SCL signals will float, resulting in I2C bus lockups.
  3. The Clock Path (SCL): A yellow wire routes from ESP32 GPIO 22 to the module SCL. The ESP32 generates the clock pulses. The module’s onboard 4.7kΩ resistor pulls this line high to 3.3V when idle.
  4. The Data Path (SDA): A blue wire routes from ESP32 GPIO 21 to the module SDA. This is an open-drain line; the ESP32 and the sensor take turns pulling the line to GND to transmit bits, while the pull-up resistor returns it to 3.3V.
  5. The Address Path (ADDR): The ADDR pin is left unconnected (floating). Internally, the BH1750FVI IC has a weak pull-up on this pin. Leaving it floating tells the IC to listen for I2C address 0x23. If you need to wire a second sensor to the same bus, you will connect this ADDR pin to GND, shifting its address to 0x5C.

Verifying the Light Sensor Wiring with a Multimeter

Do not upload your I2C scanner code until you have verified the physical layer. I2C bus faults are almost always wiring errors, not code errors. Set your multimeter to the correct modes and follow this bench procedure.

Step 1: Pre-Power Continuity Check (Meter in Ohms/Beep Mode)

With the ESP32 completely disconnected from USB power, place your red probe on the ESP32 GND pin and your black probe on the GY-302 GND pin. You should read < 1.0 Ω. Next, check the VCC line. Place probes on the 3V3 pin and the VCC module pin. It should also read near zero ohms. Finally, check for shorts: probe between VCC and GND on the module. It should read open (OL) or very high resistance, not a dead short.

Step 2: Powered Voltage Verification (Meter in DC Volts Mode)

Plug in the ESP32. Place your black probe on the breadboard GND rail and your red probe on the module's VCC pin. You must read between 3.2V and 3.4V. If you read 5V, you are plugged into the wrong rail and risk damaging the ESP32's GPIO matrix when the I2C lines toggle.

Step 3: I2C Idle-High Check

With the ESP32 powered but before running any I2C code (or while running a simple blink sketch), probe the SDA and SCL lines. Because of the 4.7kΩ pull-up resistors on the breakout board, both lines should sit at an idle-high state of roughly 3.2V to 3.3V.

Troubleshooting threshold: If your meter reads 0V on SDA or SCL, you have a hard short to ground, or the sensor is locked up and pulling the line low. If it reads 1.5V to 2.0V, you likely have a missing common ground between the MCU and the sensor, causing the pull-up voltage to float relative to your meter's ground reference.

Pro Tip for Long Runs: The Espressif I2C documentation notes that standard I2C capacitance limits the bus length to about 30cm (1 foot) at 400kHz. If your light sensor wiring diagram requires a longer run to a weatherproof enclosure, drop the I2C clock speed to 100kHz in your Wire library initialization, or use an I2C bus extender like the P82B715.

Light Sensor Wiring Diagram FAQ

Why is my light sensor wiring diagram showing 5V but the ESP32 needs 3.3V?

Most generic Fritzing diagrams for the GY-302 module show a 5V connection because those diagrams were originally written for the Arduino Uno, which operates at 5V logic. The GY-302 breakout includes an LDO (usually an ME6211 or similar) that drops 5V down to the 3.3V required by the raw BH1750FVI IC. However, when using an ESP32, Raspberry Pi Pico, or any 3.3V microcontroller, you should wire VCC directly to the 3.3V pin. This bypasses the LDO, reduces heat, and ensures the I2C pull-up resistors are pulling the SDA/SCL lines up to exactly 3.3V, preventing 5V logic from back-feeding into your ESP32's sensitive GPIO pins.

How do I wire two BH1750 light sensors to the same I2C bus?

The BH1750 does not have a configurable hardware address via dip switches, but it does have a two-state address pin. To wire two sensors on the same SDA/SCL lines, wire Sensor #1 exactly as the primary diagram (leave the ADDR pin floating for address 0x23). For Sensor #2, wire a jumper from its ADDR pin directly to the common GND rail. This forces the second IC to listen on address 0x5C. You can then initialize both in your code using the Arduino Wire library by calling Wire.beginTransmission(0x23) and Wire.beginTransmission(0x5C) respectively.

What does the light sensor wiring diagram symbol with a zig-zag line and arrows mean?

If your diagram features a zig-zag resistor symbol with two inward-pointing arrows, you are looking at a schematic for an analog Light Dependent Resistor (LDR), such as the GL5528 photoresistor, not the digital BH1750. That symbol requires a completely different wiring path: a voltage divider circuit using a fixed 10kΩ resistor tied to GND, with the middle node routed to an Analog-to-Digital Converter (ADC) pin (like ESP32 GPIO 34). The BH1750 uses standard I2C bus symbols (SDA/SCL lines) instead.

My multimeter shows 3.3V on VCC but the sensor reads 0 lux in code. What connection did I miss?

If power and ground are verified, a 0 lux reading (or a complete I2C bus hang) almost always points to an SDA/SCL swap or a missing common ground. First, use your multimeter to verify continuity between the MCU's GND pin and the sensor's GND pin; a missing ground return will cause the I2C logic levels to float unpredictably. Second, check your physical pinout against the Adafruit BH1750 pinout guide. It is incredibly common to accidentally swap SDA and SCL on the breadboard. While some modern microcontrollers feature a GPIO matrix that can remap I2C in software, standard Wire library implementations expect SDA on GPIO21 and SCL on GPIO22 for the ESP32. Swap the blue and yellow wires and re-run an I2C scanner sketch to confirm the device appears at 0x23.