Skip to content

BH1750 light intensity sensor

This sensor uses the I2C interface standard to provide light intensity values in lux.

BH1750 light intensity module Figure 1: BH1750 ambient light sensor module

Hardware interface

The sensor requires an input voltage of 3.3V and so it works well with the Photon2. Figure 2 shows a sample breadboard layout.

BH1750 connections Figure 2: BH1750 connections

The module has five pins, two for power and ground, two for the I2C connection, and a fifth pin labelled ADDR. This pin is used to switch between two I2C addresses when you are using more than one module. As long as you are only using a single module, the ADDR pin can be ignored.

Pin label Explanation
VCC Power input
GND Ground
SCL I2C clock
SDA I2C data

The SCL and SDA pins are simply connected to the SCL and SDA pins on the Photon2.

NB: Check the pin labels on your actual device. They may come in a different order to the ones shown in Figure 2.

Software

The BH1750 library can be found in the Particle web IDE. It comes with an example sketch that works with no modifications.

BH1750 ambient light sensor BH1750 ambient light sensor