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 widely used in applications such as automatic brightness control for displays, energy-efficient lighting systems, and environmental monitoring.

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:

  • Automatic brightness adjustment for LCD and OLED displays
  • Smart lighting systems for energy efficiency
  • Environmental light monitoring in IoT devices
  • Photography and camera exposure control

Technical Specifications

The BH1750 offers high accuracy and a wide measurement range, making it suitable for various lighting conditions. Below are its key technical details:

Key Specifications:

  • Operating Voltage: 2.4V to 3.6V (logic level compatible with 3.3V systems)
  • Current Consumption: 0.12mA (typical in continuous mode)
  • Measurement Range: 1 lux to 65535 lux
  • Communication Protocol: I2C (7-bit address: 0x23 or 0x5C)
  • Resolution: 1 lux
  • Operating Temperature: -40°C to +85°C

Pin Configuration:

The BH1750 has six pins, as described in the table below:

Pin Name Description
VCC Power supply (2.4V to 3.6V)
GND Ground
SDA I2C data line
SCL I2C clock line
ADDR I2C address selection (0x23/0x5C)
NC Not connected

Usage Instructions

The BH1750 is straightforward to use in a circuit, thanks to its I2C interface. Below are the steps to integrate and use the sensor:

Circuit Connection:

  1. Connect the VCC pin to a 3.3V power source.
  2. Connect the GND pin to the ground of your circuit.
  3. Connect the SDA pin to the SDA pin of your microcontroller (e.g., Arduino UNO A4 pin).
  4. Connect the SCL pin to the SCL pin of your microcontroller (e.g., Arduino UNO A5 pin).
  5. Optionally, connect the ADDR pin to GND (default address: 0x23) or VCC (alternate address: 0x5C).

Important Considerations:

  • Use pull-up resistors (typically 4.7kΩ) on the SDA and SCL lines if not already present.
  • Ensure the I2C address matches the configuration of the ADDR pin.
  • Avoid exposing the sensor to extreme temperatures or humidity for prolonged periods.

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
  Wire.begin();       // Initialize I2C communication

  // Initialize the BH1750 sensor
  if (lightMeter.begin()) {
    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 lux value to the serial monitor
  Serial.print("Light Intensity: ");
  Serial.print(lux);
  Serial.println(" lux");

  delay(1000); // Wait for 1 second before the next reading
}

Notes:

  • Install the BH1750 library from the Arduino Library Manager before uploading the code.
  • Adjust the delay in the loop() function as needed for your application.

Troubleshooting and FAQs

Common Issues:

  1. No response from the sensor:

    • Ensure the wiring is correct and matches the pin configuration.
    • Verify that the I2C address in the code matches the ADDR pin configuration.
  2. Incorrect or fluctuating lux readings:

    • Check for proper pull-up resistors on the SDA and SCL lines.
    • Avoid placing the sensor in direct sunlight or near reflective surfaces.
  3. Compilation errors in Arduino IDE:

    • Ensure the BH1750 library is installed correctly.
    • Verify that the correct board and port are selected in the Arduino IDE.

FAQs:

  1. Can the BH1750 operate at 5V?

    • No, the BH1750 is designed for 3.3V operation. Use a level shifter if interfacing with a 5V system.
  2. What is the maximum I2C clock speed supported?

    • The BH1750 supports I2C clock speeds up to 400kHz (Fast Mode).
  3. How do I change the I2C address?

    • Connect the ADDR pin to GND for the default address (0x23) or to VCC for the alternate address (0x5C).

By following this documentation, you can effectively integrate and use the BH1750 light sensor in your projects.