BH1750 Light Intensity | Arduino Tutorial

Introduction

Light sensing is a crucial aspect of various electronic applications, from energy-efficient lighting to environmental monitoring. The BH1750 Light Intensity | Arduino Tutorial is a powerful Project that enables accurate measurement of ambient light levels. In this comprehensive guide, we will explore the working principles and capabilities of the BH1750 sensor. Furthermore, we will learn how to Interface BH1750 Light Intensity Sensor with Arduino Nano to create a light sensing system. By the end of this tutorial, you’ll possess the knowledge and skills to incorporate the BH1750 Light Sensor into your projects, allowing them to respond intelligently to changing light conditions. Let’s dive into the realm of light sensing with Arduino Nano and unlock the potential of the BH1750 Light Sensor!

Hardware Required

You will require the following Hardware Components for interfacing BH1750 Light Intensity Sensor with Arduino Nano.

Components#Buy From Amazon
Arduino Nano1Buy Now
BH1750 Light Intensity Sensor1Buy Link
37 in 1 Sensor kit (Optional)1Buy Link
9v DC Adapter (Optional)1Buy Link
Jumper Wires4Buy Link
Breadboard1Buy Link

What is BH1750 Light Intensity Sensor?

The BH1750 Light Intensity Sensor is a celestial observer in the Arduino cosmos, designed to measure the intensity of light in lux. With its ethereal precision, it transforms the dance of photons into a language that Arduino comprehends—the language of illumination.

Pinout

BH1750-Light-Intensity-Sensor-Module-Pinout

Pin Configuration of BH1750 Sensor

PinDescription
VCCModule power supply: 2.4V to 3.6V, typically 3.0V.
GNDGround, connected to ground of the circuit
SCLSerial Clock Line provides clock pulses for I2C communication.
SDASerial Data Address for data transfer in I2C communication.
ADDRAddress pin selects module address in a multi-module setup.

Specifications

  1. Measurement Range: The BH1750 sensor typically has a measurement range suitable for both indoor and outdoor light conditions.
  2. Digital Output: The sensor provides digital output, making it easy to interface with microcontrollers like the Arduino Nano.
  3. High Accuracy: The BH1750 offers high accuracy in light-intensity measurement, allowing for precise adjustments.

Features

  1. Lux Measurement: The sensor measures light intensity in lux, a unit that accounts for the human eye’s sensitivity to different wavelengths.
  2. Auto-Adjustment: It enables devices to automatically adjust lighting or display settings based on changing light conditions.
  3. Compact Size: The small size of the BH1750 sensor makes it easy to integrate into various projects.

Circuit Diagram

The following circuit shows you the connection of the BH1750 Light Intensity | Arduino Tutorial with Arduino Please make the connection carefully

Interface BH1750 Light Intensity Sensor with Arduino

Circuit Connections

ArduinoBH1750 Sensor
VCC5V
GNDGND
A5SCL
A4SDA

Installing Arduino IDE Software

First, you will require to Download the updated version of Arduino IDE Software and Install it on your PC or laptop. if you Learn How to install the Arduino step-by-step guide then click on how to install Arduino Button given Blow

Installing Libraries

Now when you are Ready to upload the code, to the Arduino Board you will need first to add the Following Libraries in Arduino, If you Learn How to add the library in the Arduino step-by-step guide click on how to install the library Button given Blow

Code

//For more Projects: www.arduinocircuit.com

#include <Wire.h>
#include <BH1750.h>
BH1750 lightMeter;
void setup(){
Serial.begin(9600);
lightMeter.begin();
}
void loop() {
uint16_t lux = lightMeter.readLightLevel();
Serial.print(“Light: “);
Serial.print(lux);
Serial.println(” lx”);
delay(100);
}

Explanation

Let’s understand the code step by step:

  1. First, we include the Wire library for I2C communication and the BH1750 library.
  2. Next, we create an instance of the BH1750 class called “lightMeter”.
  3. In the setup function, we initialize the serial communication and call the begin function of the lightMeter object.
  4. In the loop function, we read the light intensity using the readLightLevel function and store it in the “lux” variable.
  5. We then print the light intensity in lux units using Serial.print.
  6. Finally, we add a delay of 1 second before repeating the process.

Testing

To test the BH1750 light intensity sensor, follow these steps:

  1. Connect the Arduino to your computer.
  2. Upload the code to the Arduino.
  3. Open the Serial Monitor in the Arduino IDE.
  4. You should see the light intensity values in lux being printed every second.
  5. Try shining a light source on the sensor and observe how the values change.

Applications

  1. Smart Lighting Systems: BH1750 enables Arduino to create responsive lighting systems that adjust based on ambient light conditions, fostering energy efficiency.
  2. Weather Stations: Utilizing BH1750, Arduino can gauge daylight levels for comprehensive weather monitoring.
  3. Greenhouse Automation: Arduino, guided by BH1750, ensures optimal light conditions for plant growth in a greenhouse.
  4. Artificial Intelligence in Robotics: BH1750 aids Arduino-powered robots in perceiving and reacting to changing light environments.
  5. Energy-Efficient Homes: BH1750, in collaboration with Arduino, contributes to smart homes by adjusting artificial lighting according to natural light availability.

Conclusion

In this tutorial, we have learned how to measure light intensity using the BH1750 sensor and Arduino. You can now use this sensor in your projects to automate lighting systems, monitor ambient light levels, or create interactive lighting effects. Have fun experimenting!

Leave a Comment


error: