Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Component Documentation

How to Use BH1750: Examples, Pinouts, and Specs

Image of BH1750
Cirkit Designer LogoDesign with BH1750 in Cirkit Designer

Introduction

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.

Explore Projects Built with BH1750

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Bluetooth Audio Receiver with Battery-Powered Amplifier and Loudspeakers
Image of speaker bluetooh portable: A project utilizing BH1750 in a practical application
This circuit is a Bluetooth-enabled audio system powered by a rechargeable 18650 Li-ion battery. It includes a TP4056 module for battery charging and protection, a PAM8403 amplifier with volume control to drive two loudspeakers, and a Bluetooth audio receiver to wirelessly receive audio signals.
Cirkit Designer LogoOpen Project in Cirkit Designer
ESP32-Based Smart Environmental Monitoring System with BH1750 and DHT22 Sensors
Image of 2 LD2410C BH1750 DHT22: A project utilizing BH1750 in a practical application
This circuit features an ESP32 microcontroller interfaced with a BH1750 light sensor, a DHT22 temperature and humidity sensor, and two LD2410C radar sensors. The ESP32 collects environmental data from the sensors and can communicate with the radar sensors via UART for motion detection.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino Mega ADK Automated Plant Watering and Environmental Monitoring System
Image of Automatisierungsprojekt Mega: A project utilizing BH1750 in a practical application
This circuit features an Arduino Mega ADK as the central microcontroller, interfacing with a variety of sensors and actuators. It includes a BH1750 light sensor and a DHT11 temperature and humidity sensor for environmental monitoring, both interfacing via I2C. The system controls a stepper motor via an A4988 driver, two water pumps through a 3-channel relay, and a fan using an IRF520 PWM module, with several push switches to trigger inputs. An OLED display provides a user interface, and soil moisture levels are monitored with two soil sensors. A non-contact water level sensor is also included for liquid level detection.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino UNO Light Sensor with BH1750 and Relay Control
Image of light: A project utilizing BH1750 in a practical application
This circuit uses an Arduino UNO to interface with a BH1750 light sensor via I2C communication. The Arduino reads light intensity data from the BH1750 sensor, which is powered by the Arduino's 3.3V and GND pins.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with BH1750

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Image of speaker bluetooh portable: A project utilizing BH1750 in a practical application
Bluetooth Audio Receiver with Battery-Powered Amplifier and Loudspeakers
This circuit is a Bluetooth-enabled audio system powered by a rechargeable 18650 Li-ion battery. It includes a TP4056 module for battery charging and protection, a PAM8403 amplifier with volume control to drive two loudspeakers, and a Bluetooth audio receiver to wirelessly receive audio signals.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of 2 LD2410C BH1750 DHT22: A project utilizing BH1750 in a practical application
ESP32-Based Smart Environmental Monitoring System with BH1750 and DHT22 Sensors
This circuit features an ESP32 microcontroller interfaced with a BH1750 light sensor, a DHT22 temperature and humidity sensor, and two LD2410C radar sensors. The ESP32 collects environmental data from the sensors and can communicate with the radar sensors via UART for motion detection.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Automatisierungsprojekt Mega: A project utilizing BH1750 in a practical application
Arduino Mega ADK Automated Plant Watering and Environmental Monitoring System
This circuit features an Arduino Mega ADK as the central microcontroller, interfacing with a variety of sensors and actuators. It includes a BH1750 light sensor and a DHT11 temperature and humidity sensor for environmental monitoring, both interfacing via I2C. The system controls a stepper motor via an A4988 driver, two water pumps through a 3-channel relay, and a fan using an IRF520 PWM module, with several push switches to trigger inputs. An OLED display provides a user interface, and soil moisture levels are monitored with two soil sensors. A non-contact water level sensor is also included for liquid level detection.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of light: A project utilizing BH1750 in a practical application
Arduino UNO Light Sensor with BH1750 and Relay Control
This circuit uses an Arduino UNO to interface with a BH1750 light sensor via I2C communication. The Arduino reads light intensity data from the BH1750 sensor, which is powered by the Arduino's 3.3V and GND pins.
Cirkit Designer LogoOpen Project in Cirkit Designer

Common Applications and Use Cases

  • Automatic brightness control for LCD and OLED displays
  • Energy-efficient lighting systems
  • Smart home automation (e.g., light-based triggers)
  • Weather monitoring stations
  • Photography and camera exposure control

Technical Specifications

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

Pin Configuration and Descriptions

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)

Usage Instructions

How to Use the BH1750 in a Circuit

  1. Power the Sensor: Connect the VCC pin to a 3.3V power source and the GND pin to ground.
  2. I2C Communication: Connect the SDA and SCL pins to the corresponding I2C pins on your microcontroller. Use pull-up resistors (typically 4.7kΩ) on the SDA and SCL lines if not already present.
  3. Address Selection: Use the ADDR pin to select the I2C address:
    • Connect ADDR to GND for address 0x23.
    • Connect ADDR to VCC for address 0x5C.
  4. Initialize the Sensor: Configure the I2C interface on your microcontroller and initialize the BH1750 in the desired measurement mode.

Important Considerations and Best Practices

  • Avoid Direct Light: Place the sensor in a location where it can measure ambient light without being exposed to direct light sources.
  • Power Supply Stability: Ensure a stable power supply to avoid measurement inaccuracies.
  • Measurement Modes: The BH1750 supports multiple modes, such as continuous and one-time measurement. Choose the mode that best suits your application.
  • I2C Pull-Up Resistors: Verify that pull-up resistors are present on the I2C lines to ensure proper communication.

Example Code for Arduino UNO

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
}

Troubleshooting and FAQs

Common Issues and Solutions

  1. No Response from the Sensor

    • Cause: Incorrect I2C address or wiring.
    • Solution: Verify the ADDR pin connection and ensure the correct I2C address is used in the code. Check all wiring connections.
  2. Inaccurate Readings

    • Cause: Sensor exposed to direct light or unstable power supply.
    • Solution: Shield the sensor from direct light and ensure a stable power source.
  3. I2C Communication Errors

    • Cause: Missing or incorrect pull-up resistors on SDA and SCL lines.
    • Solution: Add 4.7kΩ pull-up resistors to the SDA and SCL lines if not already present.
  4. Sensor Not Detected

    • Cause: Incorrect initialization or damaged sensor.
    • Solution: Double-check the initialization code and replace the sensor if necessary.

FAQs

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.